Beyond Optimal Rates in Stochastic Optimization: Trajectory-Adaptive Stopping Rules

Liviu Aolaritei, Lucas Lévy, Francis Bach, Michael I. JordanarXiv 2026

TL;DR

This paper introduces trajectory-adaptive stopping rules for strongly convex stochastic gradient descent (SGD) that preserve statistical validity under continuous monitoring. By framing optimization as a sequential experiment and developing a novel time-uniform empirical Bernstein inequality, the authors construct fully observable confidence sequences that allow SGD to stop orders of magnitude earlier than traditional, conservative worst-case horizons.

What Problem Does This Paper Address?

When should you stop running a stochastic optimization algorithm like SGD? In practice, engineers and researchers monitor validation loss or trajectory stabilization to decide when to terminate. However, standard optimization theory operates ex ante—it assumes a fixed, predetermined number of iterations ($T$) chosen before the algorithm even starts.

This creates a fundamental mismatch. If you stop an algorithm based on its observed path (adaptive stopping), standard high-probability guarantees break down due to selection bias; you might just be stopping during an unusually lucky random fluctuation. To guarantee accuracy rigorously without peeking, traditional theory forces you to invert worst-case bounds, resulting in massive, highly conservative iteration budgets that waste immense computational resources.

The authors bridge this gap by answering a core operational question: Can SGD certify, from its own realized trajectory, when it should stop?

Methods

The authors treat the evolving SGD trajectory as a sequential experiment and construct anytime-valid upper confidence sequences—bounds that hold simultaneously across all time steps, allowing for continuous monitoring and data-dependent stopping.

The key technical innovations include:

  • Self-Localizing Feedback Loop: Instead of replacing unknown distances to the optimum with a loose global diameter bound (which degrades convergence rates to $t^{-1/2}$), they recursively feed back newly computed confidence envelopes into subsequent steps, preserving the optimal $1/t$ rate.
  • Time-Uniform Empirical Bernstein Inequality with Growing Predictable Range: Traditional empirical Bernstein bounds assume a fixed range scale. Because optimization error bounds grow or shrink dynamically (scaling as $\sqrt{t}$), the authors developed a new mathematical tool that handles time-varying conditional means and predictable ranges that can grow without bound. This allows the bounds to adapt to realized gradient magnitudes rather than a worst-case constant $G$.
  • Minibatch Spectral Relaxation: They extend the framework to minibatch SGD by utilizing a spectral relaxation ($\lambda_{\max}$ of the within-minibatch second-moment matrix). This allows the stopping rule to exploit the specific geometric structure of each minibatch, yielding a $1/\sqrt{b}$ variance reduction.

Datasets

The authors evaluated their approach using:

  • Real-world data: The covertype.binary dataset from the LIBSVM repository.
  • Synthetic data: Datasets generated via scikit-learn's make_classification utility, specifically engineered to vary class separability (low, medium, and high) to test instance adaptivity.

Key Insights and Ideas

  • Optimization as Sequential Experimentation: Shifting the perspective of SGD from a deterministic iteration budget to a live statistical experiment allows tools from sequential inference (like martingales and dyadic stitching) to be applied directly to machine learning workflows.
  • Rewarding "Easy" Paths: Traditional bounds rely on a fixed variance proxy ($G^2$). By switching to an empirical Bernstein approach, the stopping rule automatically rewards the algorithm when it encounters easy data or trajectories where the realized gradients happen to be small.
  • Transient Misspecification Error: A massive practical benefit of the empirical Bernstein approach is its robustness. If a user vastly overestimates the global gradient bound $G$ or the initial distance $R_0$, the penalty is purely transient. The recursive feedback loop quickly washes out the conservative initialization, making the bounds asymptotically tight.

Key Results

  • Orders-of-Magnitude Faster Termination: In experiments on the covertype.binary dataset ($suboptimality \le 10^{-3}$), the empirical Bernstein stopping rule certified the target accuracy 312 times earlier than the worst-case baseline. In terms of compute, this meant only $5.1 \times 10^6$ gradient lookups compared to $1.6 \times 10^9$ for the baseline.

The dramatic difference in certification times is illustrated below:

Trajectory-adaptive certification of SGD showing squared distance to optimum (left) and suboptimality of the weighted average (right).
  • Instance Adaptivity: When tested across synthetic datasets of varying difficulty, the adaptive bounds automatically became tighter for highly separable (easier) problems, whereas traditional worst-case bounds remained completely blind to this geometry.
  • True Single-Pass Validity: The authors verified that these benefits hold in a true single-pass regime (population risk), proving that the performance gains are not an artifact of finite-dataset sampling with replacement.

Limitations and Future Work

  • Strong Convexity Dependency: The current sharp contractive theory relies heavily on the objective function being $\mu$-strongly convex with a known parameter $\mu$. Extending this level of sharpness to general convex or non-convex regimes (like deep learning) remains an open challenge.
  • The Residual Gap: Even though these bounds are orders of magnitude tighter than previous ex-ante benchmarks, a noticeable gap still remains between the confidence sequences and the actual ground truth. The authors note that closing this residual gap via a sharper dynamical analysis of SGD is a promising direction for future work.

Summary updated

BibTeX
@misc{aolaritei2026beyond,
  author = {Liviu Aolaritei and Lucas Lévy and Francis Bach and Michael I. Jordan},
  title = {{Beyond Optimal Rates in Stochastic Optimization: Trajectory-Adaptive Stopping Rules}},
  year = {2026},
  eprint = {2608.25551},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.25551},
}
Figure