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

Meyer Scetbon, Elvis Dohmatob

Abstract

Adversarial robustness is typically associated with classification tasks, yet its implications for regression are equally critical. This paper investigates the robustness of linear regression under various adversarial attack norms. We demonstrate that while early-stopped gradient descent (GD) provides optimal robustness against Euclidean ($\ell_2$) attacks, it is insufficient for non-Euclidean geometries. We introduce GD+, a modified gradient descent algorithm with feature-dependent learning rates, and a universal two-stage estimator. Our findings show that these methods achieve near-optimal robustness across diverse attack scenarios, supported by a tractable proxy risk and rigorous statistical consistency proofs.

Introduction

Adversarial attacks involve small, intentional perturbations designed to deceive machine learning models. In classification, this might involve subtle pixel changes that cause a model to misidentify an image. In regression, the goal is to perturb input features $x$ to maximize the error in predicting a continuous value $y$.

A significant challenge in building robust models is the tendency of standard optimization to overfit to "non-robust" features—components of the data that are highly predictive in clean settings but easily manipulated by an attacker at test time. While Ridge regression has been identified as a defense against Euclidean attacks, the role of the optimization algorithm itself, specifically Gradient Descent (GD), in fostering robustness has remained under-explored until now.

The Euclidean Bias of Gradient Descent

One of the primary insights of this research is the connection between the "optimization path" of GD and implicit regularization. In the context of Euclidean ($\ell_2$) adversarial attacks, stopping GD early is mathematically equivalent to Ridge regression. Because Ridge regression is the optimal defense against such attacks, standard GD is "accidentally" robust if stopped at the correct time.

However, this robustness is fragile. Standard GD possesses an inherent "Euclidean bias." When an attacker utilizes a non-Euclidean norm—such as a Mahalanobis norm that weights feature perturbations differently—standard GD fails. Even with early stopping, the resulting model can perform significantly worse than a truly robust estimator, as it cannot adapt to the specific geometry of the attack.

Methodology: GD+ and the Two-Stage Estimator

To address the limitations of standard GD, we propose two primary solutions designed to handle arbitrary attack norms:

1. GD+ (Adapted Gradient Descent)

GD+ is a modified version of gradient descent where the data is transformed prior to training. This transformation is equivalent to assigning a unique, feature-dependent learning rate to each input dimension. By tailoring these learning rates to the specific geometry of the expected attack norm, GD+ can navigate the optimization landscape toward a robust solution, even in non-Euclidean settings.

2. The Two-Stage Estimator

For practical applications where the underlying data distribution is unknown, we introduce a two-stage estimation process:

  1. Initial Estimation: Use a standard consistent estimator (such as Lasso) to obtain an initial estimate of the ground-truth weights ($w_0$) and the data covariance ($\Sigma$).
  2. Robust Optimization: Solve for the robust weights by minimizing a "proxy risk" function using a primal-dual algorithm.

The proxy risk is a crucial innovation. Because the true adversarial risk is often non-convex and difficult to optimize directly, we utilize a tractable proxy function. We prove that this proxy is guaranteed to be within a factor of approximately 1.1124 ($\alpha$) of the true optimal robust risk in a population regime.

Key Results and Insights

Our theoretical analysis and synthetic experiments on Gaussian features and sparse models yield several key findings:

  • Optimality Constants: For Euclidean attacks, early-stopped GD is proven to be within a factor of 1.68 ($\beta$) of the optimal robust risk. In the general case, our proxy-based approach remains within the 1.1124 factor of the absolute best possible model.
  • Statistical Consistency: The two-stage estimator is statistically consistent. As the sample size $n$ increases, the estimator converges to the optimal robust predictor for any given norm, demonstrating that the "statistical price" of robustness is manageable.
  • Adversarial Feature Selection: Under $\ell_\infty$ attacks, the robust solution acts as a "soft-thresholding" operator. This suggests that robustness in regression naturally leads to a form of feature selection, where the model ignores features that are too vulnerable to perturbation.

Conclusion and Future Work

This work clarifies the relationship between optimization paths and adversarial robustness in linear regression. While early stopping provides a "free" defense against Euclidean attacks, more complex threats require intentional algorithmic adjustments like GD+ or the two-stage estimator.

Currently, these findings are limited to linear models. The extension of these principles to deep neural networks—where the optimization landscape is non-convex and significantly more complex—remains a vital area for future research. Additionally, while our methods are robust to a known attack norm, developing "universal" defenses that protect against multiple, unknown norms simultaneously is the next frontier in robust machine learning.

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