Tuning-Free Stochastic Optimization

Ahmed Khaled, Chi Jin

Abstract

In modern large-scale machine learning, hyperparameter tuning—particularly the selection of an optimal learning rate—represents a significant computational bottleneck. This paper formalizes the concept of "tuning-free" stochastic optimization: algorithms capable of matching the performance of an optimally-tuned Stochastic Gradient Descent (SGD) using only loose "hints" about problem parameters. Through a combination of lower-bound constructions and algorithmic analysis, the authors demonstrate that while tuning-free optimization is achievable in bounded domains, it is fundamentally impossible for general convex functions in unbounded domains unless the gradient noise is "benign" (characterized by a high signal-to-noise ratio). For nonconvex settings, the paper introduces a novel Restarted SGD variant that achieves high-probability convergence rates comparable to tuned baselines.

Introduction

The training of massive models, such as GPT-4 or Llama, often relies on "default" optimizer settings because exhaustive hyperparameter sweeps are prohibitively expensive. The ideal solution is a "tuning-free" algorithm that adaptively adjusts its parameters during training. While deterministic optimization can utilize line searches or bisection to achieve this, the stochastic setting—where only noisy gradients are available—presents a much more complex challenge. This research addresses a fundamental question: Can an algorithm match the convergence rate of an optimally-tuned SGD without prior knowledge of parameters like smoothness, Lipschitz constants, or the distance to the optimum?

Defining Tuning-Free Optimization

The authors provide a rigorous mathematical definition for tuning-free algorithms. An algorithm is considered tuning-free if its convergence error matches that of an optimally-tuned baseline up to a "polylogarithmic" factor. This factor grows very slowly relative to the uncertainty in the initial parameter hints, ensuring that even with poor initial guesses, the algorithm remains efficient.

The Bounded vs. Unbounded Divide

A central finding of the paper is the distinction between bounded and unbounded search spaces. If the search space is bounded (i.e., the solution is known to exist within a specific radius), tuning-free optimization is relatively straightforward. However, the authors prove that for general convex functions in unbounded domains, achieving tuning-free performance is impossible for all stochastic oracles.

Using 1D quadratic and absolute value functions, the authors establish lower bound constructions (Theorems 2 and 3) showing that an algorithm cannot distinguish between different functions if the stochastic noise is adversarial. In these cases, the "price of adaptivity" is significantly higher than a polylogarithmic factor.

The "Benign Noise" Loophole

The impossibility results for unbounded domains are driven by "bad" noise that masks the true gradient. However, the authors identify a loophole: if the noise is "benign" (such as sub-Gaussian noise where the variance is related to the range), algorithms can successfully adapt.

Key to this is the Signal-to-Noise Ratio (SNR), denoted as $K_{snr}$. When this ratio is sufficiently high, algorithms like DoG (Distance over Gradients) and DoWG (Distance over Weighted Gradients) can accurately estimate the noise level from observed gradients. Under these conditions, the authors prove (Theorem 4) that these algorithms become truly tuning-free even in unbounded domains.

Nonconvex Optimization and High Probability

In the realm of nonconvex optimization, the paper identifies a gap between expected convergence and high-probability convergence. While it is impossible to match the expected convergence rate of tuned SGD with high probability (Theorem 5), the authors propose a novel Restarted SGD with Leader Finding.

This algorithm utilizes a "doubling trick" to guess the learning rate and a "Leader Finding" subsampling procedure to select the best iterate from different epochs. This approach achieves the best-known high-probability convergence rate for finding stationary points in nonconvex functions, incurring only a minor polylogarithmic cost for its tuning-free nature (Theorem 6).

Conclusion and Future Work

This work establishes the theoretical boundaries of adaptive stochastic optimization. While it proves that universal tuning-free optimization is impossible in the most general sense, it provides a roadmap for success under benign noise conditions and in nonconvex landscapes.

Future research directions include:

  • Relaxing Noise Assumptions: Investigating if positive results hold under "expected smoothness" conditions common in practical machine learning.
  • Finite-Sum Settings: Exploring whether tuning-free optimization is easier when a fixed training set allows for periodic exact function evaluations.
  • Universal Optimizers: Developing a single algorithm that is tuning-free across smooth convex, Lipschitz convex, and smooth nonconvex functions remains an open challenge in the field.

Summary updated

BibTeX
@inproceedings{khaled2024tuning,
  author = {Ahmed Khaled and Chi Jin},
  title = {{Tuning-Free Stochastic Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=A6fmX9QCEa},
}
Figure