- Home
- Image Attacks Lab
- Data Poisoning Lab
- Evasion Attacks Lab
- Defense Lab
- LLM Red Teaming Lab
- Model Privacy Lab
- Backdoor / Trojan Lab
- Robustness Evaluation Lab
- My experiments
- Scientific references
- Glossary and FAQ
Defensive distillation and the gradient-masking lesson
Defense Lab · Defense
Level 1: idea and analogy
The idea
Trains a teacher at high temperature T and a student on its soft probabilities, which shrinks gradients near the data.
Analogy
Turns off the lamp the attacker uses to see the road, without closing the road.
Level 2: how it works and when to use it
Steps
1) Train the teacher at T. 2) Produce soft labels. 3) Train the student at T. 4) Deploy the student at T=1.
When to use it
Not recommended alone; use it for learning and comparison.
Strengths
Illustrates how protection can look good against weak attacks.
Level 3: mathematics, assumptions, limits
Mathematical form
q_i=\frac{\exp(z_i/T)}{\sum_j\exp(z_j/T)}\quad(\text{teacher and student trained at temperature }T)Assumptions
The attacker relies on direct gradients; the protection concerns those attacks.
Limitations
Shown not to stop C&W; in our test it partly fooled FGSM while PGD and C&W still succeeded.
Metrics
Accuracy under FGSM, PGD and C&W together.
Defenses
Adversarial training and certificates.
Level 4: pitfalls and references for researchers
Common pitfalls
Evaluating with FGSM only; reading a higher accuracy under FGSM as real robustness.
References
- Papernot, N. et al. (2016). Distillation as a Defense to Adversarial Perturbations against Deep Neural Networks. IEEE Symposium on Security and Privacy (SP) 2016. Link
- Carlini, N.; Wagner, D. (2017). Towards Evaluating the Robustness of Neural Networks. IEEE Symposium on Security and Privacy (SP) 2017, pp. 39-57. doi:10.1109/sp.2017.49
- Athalye, A. et al. (2018). Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examples. ICML 2018. Link
