Bootstrap SGD: Algorithmic stability and robustness

Andreas Christmann, Yunwen Lei

TL;DR

This paper provides a rigorous theoretical foundation for why bootstrapping improves the performance of Stochastic Gradient Descent (SGD). By analyzing "algorithmic stability," the authors prove that averaging multiple models trained on resampled data directly reduces generalization error and propose a median-based bootstrap method that remains robust even when data is plagued by extreme outliers.

What Problem Does This Paper Address?

While Stochastic Gradient Descent (SGD) is the workhorse of modern machine learning, it can be sensitive to the specific training data it sees, leading to "instability" and poor generalization on new data. Bootstrapping—training multiple models on different resampled versions of the dataset—is a common trick to improve performance, but its theoretical benefits for SGD haven't been fully understood.

Specifically, previous stability analyses made a simplifying assumption: they treated multiple copies of a data point in a bootstrap sample as if they were just one point. In reality, the "sampling with replacement" process often creates duplicates, and practitioners need to know how these duplicates affect the final model. This paper fills that gap, providing a first-of-its-kind analysis that accounts for the true nature of bootstrap resampling in SGD.

Methods

The authors investigate three distinct ways to aggregate bootstrap SGD models:

  • Type 1 (Weight Averaging): Train $B$ separate models and then average their final weight parameters into one "master" model.
  • Type 2 (Prediction Averaging): Train $B$ models and, for any new input, average the predictions made by all $B$ models.
  • Type 3 (Median Prediction): Train $B$ models and take the median of their predictions. This is used to create "distribution-free" confidence intervals.

The core of the paper is a theoretical analysis using algorithmic stability. They use $\ell_1$ and $\ell_2$ "argument stability" to measure how much a model's output changes if one training example is replaced. Crucially, they show that $\ell_2$ stability is the right tool to capture the "variance reduction" effect of bootstrapping.

Datasets

The paper primarily focuses on theoretical proofs. However, it includes a one-dimensional toy numerical example to demonstrate the robustness of the three types.

  • Setup: 1,000 data points with a piecewise "true" function (linear, sinusoidal, constant, and quadratic segments).
  • Noise: To test robustness, they added noise from four different distributions: Uniform, Exponential, Gaussian, and Cauchy. The Cauchy distribution is particularly challenging because it has "heavy tails," meaning it produces extreme outliers that can easily break standard averaging methods.

Key Insights and Ideas

  • Solving the "Duplicate" Problem: The authors successfully solved an open question in the field by proving stability bounds that correctly handle multiple copies of a training point within a bootstrap sample.
  • Why $\ell_2$ Stability Matters: The researchers found that standard $\ell_1$ stability analysis fails to show the benefits of bootstrapping. It is only through $\ell_2$ stability—which looks at the squared difference between models—that the "variance reduction" (the "Aha!" moment of why bootstrapping works) becomes mathematically visible.
  • Robustness to "Wild" Data: The Type 3 (median-based) approach is remarkably robust. Even when the data contains extreme outliers (from the Cauchy distribution) that would make a standard average meaningless, the median-based bootstrap SGD still produces highly accurate predictions and reliable confidence intervals.
  • Distribution-Free Inference: The paper shows you can build valid confidence intervals for your predictions without assuming your data follows a "nice" distribution (like a Bell curve).

Key Results

  • Stability Bounds: For Type 1 and Type 2 bootstrap SGD, the authors derived stability bounds of order $O(1/n)$.
  • Generalization Gains: They proved that the generalization error is a decreasing function of $Bm$ (the total number of samples across all bootstrap sets). This confirms that increasing the number of bootstrap samples ($B$) directly improves how well the model performs on unseen data.
  • Numerical Success: In the toy example, even with extreme Cauchy noise (where $y$-values ranged from -261 to +1726), the bootstrap methods—especially Type 3—maintained a tight fit to the true underlying function.

Limitations and Future Work

  • Convexity Assumptions: Much of the theoretical proof relies on the loss function being convex and smooth. While the authors discuss how this might apply to non-convex models like shallow neural networks, a full theory for deep learning remains an open challenge.
  • Theoretical Gap for Type 3: While the paper demonstrates the numerical power of the median-based (Type 3) approach, it does not provide the same level of rigorous theoretical stability analysis for it as it does for Types 1 and 2.
  • Advanced Estimators: The authors suggest that future work could explore "one-step W-estimators," which are even more sophisticated robust statistics, to further improve the stability of bootstrap SGD in the presence of outliers.

Summary updated

BibTeX
@inproceedings{christmann2025bootstrap,
  author = {Andreas Christmann and Yunwen Lei},
  title = {{Bootstrap SGD: Algorithmic stability and robustness}},
  booktitle = {Analysis},
  year = {2025},
  doi = {10.1142/s0219530525400032},
}
Figure