Robust Linear Regression: Gradient-descent, Early-stopping, and Beyond

Meyer Scetbon, Elvis Dohmatob

Introduction

Adversarial examples—small, intentional perturbations that lead to incorrect model predictions—pose a significant threat to machine learning systems. While much research has focused on classification, the fundamental problem of linear regression remains relatively under-explored in the context of general adversarial attacks. Standard defenses often assume Euclidean ($L_2$) constraints on the adversary, but real-world threats may operate under arbitrary norms, such as $L_\infty$ or Mahalanobis norms. This work investigates whether standard optimization techniques like Gradient Descent (GD) naturally provide robustness and proposes new algorithms to achieve near-optimal defense against general norm attacks.

The Limits of Vanilla Gradient Descent

A key finding is that while early-stopped vanilla GD is surprisingly robust against $L_2$ adversarial attacks, it fails significantly when the adversary uses non-Euclidean norms. In the $L_2$ case, early stopping acts as a form of implicit regularization, similar to Ridge regression, preventing the model from overfitting to adversarial vulnerabilities. However, for attacks constrained by other norms, vanilla GD can be arbitrarily sub-optimal. It cannot find a robust model at any point along its training path.

Figure 1: Comparison of adversarial risk across different values of $m$. Vanilla GD (red) fails to achieve the low risk of the optimal estimator (green), whereas the proposed GD+ method (blue) tracks the optimal performance closely.

GD+: Adapting to General Norms

To overcome the limitations of vanilla GD, the authors introduce GD+. This method involves transforming the input data by a matrix $M$ before applying gradient descent. This transformation effectively implements feature-dependent learning rates tailored to the specific geometry of the attack norm. For instance, in the case of Mahalanobis attacks defined by a matrix $B$, setting $M = B^{1/2}$ allows the optimization dynamics to align with the attacker's constraints, recovering near-optimal robustness.

A Universal Proxy for Adversarial Risk

Optimizing for exact adversarial risk is often computationally intractable. The authors address this by introducing a mathematically tractable "proxy" function. They rigorously prove that this proxy is always within approximately 11% ($\alpha \approx 1.1124$) of the true adversarial risk. This theoretical guarantee allows for the development of efficient defense algorithms that work for any arbitrary norm.

The Two-Stage Estimator

For practical scenarios with finite data, a two-stage algorithm is proposed:

  1. Stage 1: Estimate the data's covariance and the underlying generative model.
  2. Stage 2: Minimize the adversarial risk proxy using advanced optimization techniques like the Chambolle-Pock Primal-Dual algorithm or specialized soft-thresholding methods for $L_\infty$ attacks.

This estimator guarantees an adversarial risk that is at most 1.1124 times the best possible risk, plus a statistical error term that vanishes as the sample size $n$ increases.

Figure 6: Empirical performance of the proposed two-stage algorithms (Alg. 1+2 and Alg. 1+3) for different sample sizes $n$. As the amount of data increases, the estimators' performance stabilizes and approaches optimal robustness across various attack strengths.

Conclusion

This research demonstrates that while standard GD has inherent robust properties under specific conditions, it is not a universal defense. By understanding the optimization dynamics and employing data transformations (GD+) or a universal risk proxy, it is possible to build linear regression models that are robust against a wide array of adversarial threats. Future work may extend these insights to more complex, non-linear architectures like deep neural networks.

Summary updated

BibTeX
@inproceedings{scetbon2023robust,
  author = {Meyer Scetbon and Elvis Dohmatob},
  title = {{Robust Linear Regression: Gradient-descent, Early-stopping, and Beyond}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
}
Figure