[Paper Review] Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
This paper introduces dent, a dynamic defense that adapts models and inputs at test time using defensive entropy minimization to counter adversarial attacks. By leveraging gradients and batch statistics, dent improves robustness of both adversarially and nominally trained models, boosting state-of-the-art defenses by over 20 points on AutoAttack at ϵ∞=8/255 on CIFAR-10.
Adversarial attacks optimize against models to defeat defenses. Existing defenses are static, and stay the same once trained, even while attacks change. We argue that models should fight back, and optimize their defenses against attacks at test time. We propose dynamic defenses, to adapt the model and input during testing, by defensive entropy minimization (dent). Dent alters testing, but not training, for compatibility with existing models and train-time defenses. Dent improves the robustness of adversarially-trained defenses and nominally-trained models against white-box, black-box, and adaptive attacks on CIFAR-10/100 and ImageNet. In particular, dent boosts state-of-the-art defenses by 20+ points absolute against AutoAttack on CIFAR-10 at $ε_\infty$ = 8/255.
Motivation & Objective
- Address the limitation of static defenses that remain unchanged during testing despite evolving adversarial attacks.
- Overcome the vulnerability of existing defenses to iterative, gradient-based attacks by enabling real-time adaptation during inference.
- Develop a test-time adaptation method compatible with existing models and training procedures, without requiring retraining.
- Improve robustness against diverse attack types, including white-box, black-box, and adaptive attacks, while minimizing degradation on natural data.
- Demonstrate that dynamic adaptation at test time provides a strategic advantage—'the last move'—by countering attacks as they evolve.
Proposed method
- Propose defensive entropy minimization (dent) as a test-time optimization objective to maximize model confidence and reduce uncertainty.
- Adapt both the model parameters and input data during inference using gradients and batch statistics, inspired by test-time adaptation techniques.
- Update the model and input iteratively during testing, ensuring that each adversarial example faces a different defense configuration.
- Use batch normalization statistics updated at test time to enable dynamic adaptation, with ablation showing sensitivity to batch size.
- Maintain compatibility with pre-trained models and existing defenses by applying updates only at inference, not during training.
- Leverage gradient information from the input to guide defensive updates, effectively fighting adversarial gradients with defensive gradients.
Experimental results
Research questions
- RQ1Can test-time adaptation improve robustness against adaptive, gradient-based adversarial attacks that bypass static defenses?
- RQ2Does dynamic adaptation of both model and input during inference provide a strategic advantage over static defenses in the adversarial arms race?
- RQ3How does dent perform against diverse attack types, including white-box, black-box, and adaptive attacks, on standard benchmarks like CIFAR-10 and ImageNet?
- RQ4What is the impact of batch size and parameterization on the robustness and stability of the dynamic defense?
- RQ5Can dent be applied to both adversarially trained and standard models without retraining, and how does it affect natural accuracy?
Key findings
- Dent improves the robustness of state-of-the-art adversarially trained defenses by over 20 points absolute on AutoAttack at ϵ∞=8/255 on CIFAR-10.
- On CIFAR-10, dent boosts the robust accuracy of the best existing defense to 57.3% against AutoAttack, achieving a 15+ point lead on the AutoAttack leaderboard.
- Dent maintains high natural accuracy (86.6%) even under small batch sizes when using train-time batch statistics, demonstrating robustness to inference batch size.
- When using test-time batch statistics, dent's performance degrades significantly for batch sizes below 10, highlighting sensitivity to batch statistics during adaptation.
- Ablation studies confirm that dent’s performance is sensitive to the number of adaptation iterations and model parameterization, with optimal results achieved at moderate settings.
- Dent outperforms existing defenses on both CIFAR-10 and ImageNet across white-box, black-box, and adaptive attacks, demonstrating broad robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.