NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Adversarial Robustness through Local Linearization

Chongli Qin, James Martens, Sven Gowal, Dilip Krishnan, Krishnamurthy Dvijotham, Alhussein Fawzi, Soham De, Robert Stanforth, Pushmeet Kohli

Abstract

Deep neural networks are notoriously fragile to adversarial perturbations. While adversarial training (AT) remains the most effective defense, it is computationally expensive and often leads to "gradient obfuscation," where models appear robust by creating jagged loss surfaces that hinder gradient-based attackers without providing true security. We introduce the Local Linearity Regularizer (LLR), a novel training objective that explicitly encourages the loss surface to be locally linear. LLR prevents gradient obfuscation, matches state-of-the-art robustness on CIFAR-10, and achieves a 5x training speedup on ImageNet while significantly improving adversarial accuracy.

Introduction

The fragility of deep learning models is a major barrier to their deployment in safety-critical applications. Adversarial attacks—small, calculated perturbations to inputs—can easily cause misclassification. The standard defense, Adversarial Training, involves training on "hard" examples generated via Projected Gradient Descent (PGD). However, this approach faces two primary challenges:

  1. Computational Cost: Generating strong adversarial examples at every step is slow, particularly for large datasets like ImageNet.
  2. Gradient Obfuscation: Using weak attacks during training to save time often results in a highly non-linear, "jagged" loss surface. This fools simple optimizers during training but leaves the model vulnerable to more sophisticated attacks at test time.

Methodology: Local Linearity Regularization

The core innovation of this work is the Local Linearity Regularizer (LLR). Instead of relying solely on adversarial examples, LLR forces the model's loss function to behave linearly in the neighborhood of training data.

The LLR Objective

LLR adds a penalty based on the Taylor expansion of the loss function. In a truly linear surface, the loss at a nearby point should be accurately predicted by the current loss plus the gradient. LLR penalizes the discrepancy (the "gap") between the actual loss and this linear approximation. To implement this effectively:

  • Worst-Case Non-linearity: The algorithm uses a few PGD steps to find the specific perturbation that most severely violates linearity, then applies the penalty there.
  • Smooth Activations: To ensure the loss function is differentiable and well-suited for Taylor expansions, standard ReLU activations are replaced with Softplus.
  • Efficiency: Because LLR enforces a well-behaved surface, the model requires fewer PGD steps during training. Two steps are often sufficient, leading to massive reductions in training time.

Experimental Evaluation

The authors evaluated LLR on two benchmark datasets: CIFAR-10 (using Wide-ResNet architectures) and ImageNet (using ResNet-152). Performance was measured against a variety of white-box attacks, ranging from standard PGD to strong "Multi-Targeted" attacks.

Results and Discussion

Resistance to Obfuscation

Visualizations of the loss surface demonstrate that LLR successfully eliminates gradient obfuscation. While standard adversarial training with few steps produces jagged surfaces that "hide" the true gradient, LLR produces smooth, bowl-like surfaces where the gradient remains informative.

Comparison of loss surfaces: LLR produces a smooth, well-behaved surface (b, d) compared to the jagged surfaces of standard adversarial training (a, c).

Performance and Graceful Degradation

LLR models exhibit "graceful degradation," meaning their accuracy remains stable even as the attacker's strength (number of iterations) increases. In contrast, many existing defenses show a sharp drop in accuracy when faced with more than 20 iterations of PGD.

Adversarial accuracy vs. attack strength: LLR maintains significantly higher and more stable accuracy on ImageNet compared to standard adversarial training.

Key results include:

  • ImageNet SOTA: LLR achieved 47% adversarial accuracy at a radius of 4/255, outperforming standard AT (39.7%) and Denoising baselines (38.9%).
  • 5x Speedup: Training a robust ImageNet model on 128 TPUv3 cores took only 7 hours with LLR, compared to 36 hours for standard AT.
  • CIFAR-10: LLR matched state-of-the-art results, reaching 52.81% accuracy under the most rigorous multi-targeted attacks.

Conclusion

By shifting the focus from finding adversarial examples to enforcing structural properties like local linearity, LLR provides a more efficient and reliable path to robustness. While the method requires smooth activations and hyperparameter tuning, its ability to prevent gradient obfuscation and scale to ImageNet represents a significant step forward in securing deep learning systems.

Summary updated

BibTeX
@inproceedings{qin2019adversarial,
  author = {Chongli Qin and James Martens and Sven Gowal and Dilip Krishnan and Krishnamurthy Dvijotham and Alhussein Fawzi and Soham De and Robert Stanforth and Pushmeet Kohli},
  title = {{Adversarial Robustness through Local Linearization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=1gUZIelQt3},
}
Figure