The Sample Complexity Of ERMs In Stochastic Convex Optimization

Daniel Carmon, Roi Livni, Amir Yehudayoff

Abstract

This paper settles a long-standing open question in learning theory by proving that the sample complexity for any Empirical Risk Minimizer (ERM) in stochastic convex optimization (SCO) is $\tilde{O}(d/\epsilon + 1/\epsilon^2)$. This result provides a tight upper bound that matches known lower bounds, proving that ERMs are more efficient than previously thought and fundamentally different from "uniform convergence" learners.

Introduction: The ERM Gap in Stochastic Convex Optimization

In machine learning, the goal is typically to find a parameter $x$ that minimizes a "population loss"—the expected error over an unknown distribution. In practice, we use Empirical Risk Minimization (ERM), finding the $x$ that minimizes the average error over $n$ observed data points.

In Stochastic Convex Optimization (SCO), where loss functions are convex, a significant gap existed in our understanding of ERM. While specific algorithms like Stochastic Gradient Descent (SGD) can achieve good solutions with $1/\epsilon^2$ samples regardless of dimension $d$, generic ERMs were thought to potentially require up to $O(d/\epsilon^2)$ samples to avoid overfitting. This paper addresses the central question: What is the worst-case sample complexity for an ERM to guarantee $\epsilon$-accuracy?

Figure 1: Visualization of Empirical Risk Minimization. The solid black line represents the empirical risk, calculated as the average of individual sample losses (grey curves). The dashed line represents the underlying population risk.

Theoretical Framework and Methodology

The authors employ a purely theoretical approach, utilizing tools from convex analysis and high-dimensional probability to bridge the gap between the $\Omega(d/\epsilon + 1/\epsilon^2)$ lower bound and previous loose upper bounds. Their proof strategy relies on two main pillars:

1. First-Order Optimality and Bregman Divergence

Instead of analyzing function values directly, the authors focus on the Bregman divergence—a measure of how much a convex function deviates from its linear approximation. They demonstrate that for a point to be a "bad" ERM (performing well on samples but poorly on the population), its Bregman divergence must be unexpectedly large.

Figure 2: The proof utilizes the geometry of convex functions, specifically the Bregman divergence, which measures the gap between the function and its linear approximation (dashed grey line).

2. Concentration and Generalization

The authors use Bernstein’s and McDiarmid’s inequalities to show that the probability of "bad" ERMs existing vanishes as the sample size $n$ reaches $\tilde{O}(d/\epsilon + 1/\epsilon^2)$. Furthermore, they extend these results from the standard Euclidean ($\ell_2$) setting to any symmetric convex body by analyzing the Rademacher complexity of linear functions over that body.

Key Insights: Beyond Uniform Convergence

A major contribution of this work is the decoupling of ERM performance from "uniform convergence." It was long assumed that ERM success required the empirical loss to be close to the population loss everywhere, which necessitates $\Theta(d/\epsilon^2)$ samples. This paper proves ERM can succeed even when uniform convergence fails.

The resulting complexity, $\tilde{O}(d/\epsilon + 1/\epsilon^2)$, reflects a combination of two learning regimes:

  • The $d/\epsilon$ term: Resembles "realizable" learning, where a perfect fit is possible.
  • The $1/\epsilon^2$ term: Resembles "agnostic" learning, dealing with inherent noise.

The authors use a coin-toss analogy to explain this: distinguishing a coin with bias $1/2 \pm \epsilon$ takes $1/\epsilon^2$ tosses, but distinguishing a bias of $\epsilon$ from $2\epsilon$ takes only $1/\epsilon$. The geometry of convex optimization allows ERM to leverage the more efficient regime.

Results and Implications

  • Tight Euclidean Bound: For 1-Lipschitz convex functions over the Euclidean unit ball, any ERM achieves $\epsilon$-accuracy with $n = \tilde{O}(d/\epsilon + 1/\epsilon^2)$ samples.
  • General Norms: The complexity generalizes to $\tilde{O}(d/\epsilon + \text{Rad}_K^{-1}(\epsilon))$ for a general unit ball $K$.
  • Robustness of Approximate ERMs: The proof holds for "approximate" ERMs, which is crucial for practical applications where exact minimization is computationally difficult.

Limitations and Future Directions

While this work settles the statistical complexity of ERM in SCO, several avenues remain for future research. The current upper bound includes logarithmic factors ($\tilde{O}$) that might be further refined. Additionally, the generalization to non-Euclidean norms currently assumes symmetric convex bodies; extending this to non-symmetric domains is a natural next step. Finally, while the paper establishes statistical efficiency, it does not address the computational complexity of finding such an ERM in high-dimensional spaces.

Summary updated

BibTeX
@inproceedings{carmon2024sample,
  author = {Daniel Carmon and Roi Livni and Amir Yehudayoff},
  title = {{The Sample Complexity Of ERMs In Stochastic Convex Optimization}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
}
Figure