A New Angle on L2 Regularization

Thomas Tanay, Lewis D. GriffinarXiv 2018

Abstract

Adversarial vulnerability in deep neural networks is often attributed to high dimensionality. This paper challenges that view, proposing instead that vulnerability arises from classification boundaries "tilting" too close to the data manifold. We demonstrate that L2 regularization acts as a direct control mechanism for this tilting angle, effectively serving as a form of adversarial training by forcing the boundary into a more robust orientation.

Introduction: The Problem of Boundary Orientation

Deep neural networks are notoriously fragile; human-imperceptible "adversarial perturbations" can trigger high-confidence misclassifications. While a popular theory suggests this is an inherent property of high-dimensional dot products, this research argues that the orientation of the classification boundary is the true culprit. Models often achieve zero training error with boundaries that are technically correct but "tilted" so sharply that they sit dangerously close to the data points. This paper formalizes this "tilting" and explains how standard L2 regularization (weight decay) helps maintain a robust orientation.

Methods: Formalizing the Tilt

The authors bridge the gap between simple intuition and complex neural networks through a multi-step approach:

  1. A Toy Problem: Visualizing how a boundary in 2D space can perfectly separate classes while remaining "tilted" enough to allow for tiny adversarial jumps.
  2. Mathematical Formalization: For linear classifiers, the norm of the weight vector (||w||) acts as a scaling parameter for the loss function (e.g., Hinge or Softplus).
  3. The Tilting Angle: A geometric "tilting angle" (θ) is defined between the classification boundary and the "nearest centroid classifier"—the intuitive boundary sitting halfway between the averages of two classes.
  4. Visualization Technique: Using the Gram-Schmidt process to define a "tilting plane," 784-dimensional MNIST data is projected onto a 2D plot where the boundary appears as a line, making the "tilt" visible.
Visualization of the tilting angle between two high-dimensional clusters and a separating hyperplane.
  1. Neural Network Extension: 2-layer ReLU networks are analyzed as collections of local linear classifiers, where L2 regularization controls the scaling of these local boundaries.

Key Insights: L2 as Adversarial Training

The research yields several profound insights into the nature of regularization:

  • The Scaling Factor: ||w|| is not merely a penalty term; it is a scaling factor for the input to the loss function. Small ||w|| (high regularization) "smooths" the loss function, forcing the model to consider the distance of all points from the boundary.
  • L2 as Adversarial Training: L2 weight decay is effectively a "first-order" version of adversarial training. By shrinking weights, the model is forced to maximize the "adversarial distance"—the gap between the data and the boundary.
  • Robustness = Alignment: Robustness is maximized when the tilting angle θ = 0, occurring when the boundary is perpendicular to the vector joining the class centroids.
  • Meaningful Perturbations: In highly regularized models, adversarial perturbations stop looking like random noise and begin to resemble features of the target class (e.g., an adversarial "3" actually starts to look like a "2"), aligning better with human perception.

Key Results

Experiments on MNIST using SVMs and the LeNet architecture confirmed the theoretical predictions:

  • SVM Alignment: As the regularization parameter λ increases, the SVM boundary rotates away from noisy, low-variance directions and aligns with class centroids, increasing the required adversarial distance.
  • LeNet Performance: Comparing "LeNet-low" (weight decay 10⁻⁴) and "LeNet-high" (10⁻¹):
  • Generalization: LeNet-high achieved a 1.2% test error compared to 1.6% for the low-regularization version.
  • Robustness: Adversarial perturbations required to fool LeNet-high had significantly higher L2 norms, indicating a more robust model.
  • Interpretability: Filters in the highly regularized model were smoother and resembled recognizable edge detectors.

Limitations and Future Work

While the theory holds for linear and shallow ReLU networks, the authors acknowledge that in very deep, non-linear models, the boundary is not flat, and adversarial distance cannot be reduced to a single angle. High weight decay is not a total cure; complex datasets present difficult trade-offs between training accuracy and robustness. Future research should focus on the scaling of logits during training, as this is where "tilting" behavior is mathematically rooted.

Summary updated

BibTeX
@misc{tanay2018new,
  author = {Thomas Tanay and Lewis D. Griffin},
  title = {{A New Angle on L2 Regularization}},
  year = {2018},
  eprint = {1806.11186},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.11186},
}
Figure