3.9 End of Chapter Activities
Exercises
Discussion Questions
- Define adversarial examples in your own words. How do they differ from regular inputs to a machine learning model?
- Why is it important that the perturbation in adversarial examples remains minimal? How does this relate to human perception?
- Explain the significance of adversarial examples in real-world applications. Provide an example not mentioned in the chapter.
- Discuss the potential consequences of adversarial attacks in the context of self-driving cars. How could such attacks be mitigated?
- How might adversarial examples impact spam detection systems? What are the ethical implications of such attacks?
- Provide an example of a physical-world adversarial attack not discussed in the chapter. How could it be detected or prevented?
- Compare and contrast targeted and non-targeted attacks. Provide an example scenario for each.
- What are the key differences between black-box and white-box attacks? Which type of attack is more challenging to execute, and why?
- What is the difference between digital and physical attacks? Provide an example of each.
- Explain the role of distance metrics ([latex]L_0, L_2, L_\infty[/latex]) in generating adversarial perturbations. How do they influence the quality of the perturbation?
- Describe the process of generating adversarial examples using the Fast Gradient Sign Method (FGSM). How does it exploit the gradient of the loss function?
- How does Projected Gradient Descent (PGD) improve upon FGSM? Why is it considered a more powerful attack?
- What is the significance of the C&W attack? How does it overcome defences like defensive distillation?
- Compare white-box and black-box attacks. What are the key challenges in executing a black-box attack?
- Explain the process of creating adversarial examples using a surrogate model in a black-box setting. Why is this approach effective?
- What is an adversarial patch? How does it differ from traditional adversarial examples?
- Discuss the implications of physical adversarial attacks on road sign recognition systems. How could such attacks be prevented?
- What are the strengths and limitations of adversarial training in real-world applications?
Critical Thinking and Application
- Imagine you are designing a defence mechanism against adversarial attacks. What strategies would you employ to protect a machine-learning model?
- How might adversarial attacks evolve in the future? What new techniques or domains could be targeted?
- Discuss the ethical implications of adversarial attacks. Should there be regulations to prevent their misuse? Why or why not?
- Can adversarial examples ever be beneficial? Provide an example of how they might be used for positive purposes.
- Can combining multiple mitigation strategies provide a more robust defence against evasion attacks? Why or why not?
Research and Exploration
- Research and summarize a recent (post-2020) paper on adversarial attacks. What new methods or insights does it provide?
- Explore the concept of adversarial training. How does it improve the robustness of machine learning models?
Knowledge Check
Quiz Text Description
1. MultiChoice Activity
What is the primary goal of an evasion attack?
- To improve the accuracy of the model
- To reduce the model’s training time
- To steal the model’s training data
- To generate adversarial examples that mislead the model
2. MultiChoice Activity
Why must the perturbation in adversarial examples be minimal?
- To avoid detection by the model
- To make the attack faster
- To ensure the changes are imperceptible to humans
- To reduce computational cost
3. MultiChoice Activity
Which of the following is an example of a physical adversarial attack?
- Changing pixel values in an image to fool a spam detector
- Modifying a stop sign to be misclassified by a self-driving car
- Uploading a malicious PNG file to bypass a spam filter
- Adding noise to an audio file to fool a speech recognition system
4. MultiChoice Activity
What is the main concern with adversarial examples in real-world applications?
- They improve model performance
- They improve model performance
- They increase the interpretability of models
- They reduce the cost of training models
5. MultiChoice Activity
Which of the following is true about a black-box attack?
- The attacker can modify the model’s training data
- The attacker can only query the model’s output
- The attacker can directly manipulate the model’s gradients
- The attacker has full access to the model’s parameters
6. MultiChoice Activity
What is the key difference between a one-shot attack and an iterative attack?
- Iterative attacks are only used in black-box settings
- One-shot attacks are faster but less effective
- One-shot attacks are only used in physical attacks
- Iterative attacks require multiple steps but are more effective
7. MultiChoice Activity
Which distance metric minimizes the number of pixels changed in an adversarial example?
- L∞
- L2
- L1
- L0
8. MultiChoice Activity
What does the L∞ norm measure in adversarial perturbations?
- The average change across all pixels
- The Euclidean distance of the perturbation
- The maximum change to any single pixel
- The total number of pixels changed
9. MultiChoice Activity
What is the main advantage of Projected Gradient Descent (PGD) over FGSM?
- It does not require gradient information
- It is an iterative attack with better attack success rates
- It is faster
- It is a single-step attack
10. MultiChoice Activity
What is the primary goal of a surrogate model in a black-box attack?
- To reduce the computational cost of the attack
- To approximate the decision boundaries of the target model
- To improve the accuracy of the target model
- To steal the target model’s training data
11. MultiChoice Activity
Which of the following is a white-box attack method?
- ZOO
- FGSM
- Surrogate model attack
- Differential evolution
12. MultiChoice Activity
What is an adversarial patch?
- A method to defend against adversarial attacks
- A small perturbation added to an entire image
- A printable label that can be stuck on objects to fool classifiers
- A 3D-printed object designed to fool classifiers
13. MultiChoice Activity
What is the key idea behind the Expectation Over Transformation (EOT) algorithm?
- It uses a surrogate model to approximate the target model
- It generates adversarial examples that are robust to transformations like rotation
- It is a single-step attack method
- It minimizes the number of pixels changed in an image
14. MultiChoice Activity
What is the main challenge in defending against robust adversarial examples?
- They are imperceptible to humans
- They are only effective in digital attacks
- They require access to the model’s parameters
- They remain effective under various transformations
15. MultiChoice Activity
Which of the following is an example of a robust adversarial example?
- A 1-pixel attack on an image classifier
- A stop sign misclassified as a speed limit sign
- A spam email bypassing a spam filter
- A 3D-printed turtle misclassified as a rifle
16. MultiChoice Activity
How does adversarial training help mitigate evasion attacks?
- By restricting access to the model for external users
- By removing adversarial samples from the dataset
- By injecting adversarial samples into training to improve model robustness
- By increasing model complexity to confuse attackers
Correct Answers:
- d. To generate adversarial examples that mislead the model
- c. To ensure the changes are imperceptible to humans
- b. Modifying a stop sign to be misclassified by a self-driving car
- b. They improve model performance
- b. The attacker can only query the model’s output
- d. Iterative attacks require multiple steps but are more effective
- d. L0
- c. The maximum change to any single pixel
- b. It is an iterative attack with better attack success rates
- b. To approximate the decision boundaries of the target model
- b. FGSM
- c. A printable label that can be stuck on objects to fool classifiers
- b. It generates adversarial examples that are robust to transformations like rotation
- d. They remain effective under various transformations
- d. A 3D-printed turtle misclassified as a rifle
- c. By injecting adversarial samples into training to improve model robustness
High Flyer. (2025). Deep Seek. [Large language model]. https://www.deepseek.com/
Prompt: Can you provide end-of-chapter questions for the content? Reviewed and edited by the author.