Online Inference for Quantiles by Constant Learning-Rate Stochastic Gradient Descent

Jiaqi Li, Ziyang Wei, Jiaqi Li 0032, Likai Chen, Wei Biao WuarXiv 2025 · DOI

Estimating quantiles, such as the median or the 95th percentile, is a fundamental task in data science, offering robustness against outliers where mean-based methods fail. In the era of massive, streaming datasets, Stochastic Gradient Descent (SGD) is the standard optimization tool. However, a significant gap has existed between practice and theory: while practitioners favor a constant learning rate for its simplicity and adaptability to non-stationary data, standard statistical theory typically requires a decaying learning rate to guarantee convergence.

This paper provides the first theoretical proof that the "last iterate" of constant learning-rate SGD for quantile loss follows a Central Limit Theorem (CLT). By reframing the problem through Markov Chain theory, the authors enable efficient, real-time uncertainty quantification for quantiles without the tuning complexities of traditional methods.

Theoretical Framework: SGD as a Markov Chain

The core innovation of this work is treating the SGD iterates not just as a sequence of approximations, but as a time-homogeneous Markov chain. For a quantile $\tau = p/q$, the authors demonstrate that the iterates move across a discrete set of states.

Markov chain representation of SGD iterates for quantile estimation.

Using Foster’s Theorem, the researchers prove that this chain is "positive recurrent." This means the algorithm eventually enters a steady state—a stationary distribution—that it consistently returns to regardless of its starting point. This "quenched" property is vital for robust software, ensuring that long-term statistical behavior is independent of initial conditions.

Overcoming the Challenge of Non-Smoothness

Most existing SGD theory relies on the assumption that gradients are "well-behaved" or Lipschitz smooth. Quantile loss, however, presents a unique challenge: it has a sharp "kink" at the origin, making it non-smooth and not strongly convex.

Quantile loss functions and their corresponding step-function gradients.

By embracing the discrete nature of the state space, the authors bypass the need for traditional smoothness assumptions. They utilize Tweedie’s technique to bound the moment generating function and tail probabilities of the stationary distribution, effectively controlling the "noise" inherent in the algorithm's constant oscillation around the true value.

Key Results and Online Inference

The paper mathematically establishes that as the learning rate ($\eta$) approaches zero, the stationary distribution of the SGD iterate $\theta_n$ converges to a Gaussian distribution:

$$\sqrt{\eta}^{-1}(\theta_n - \theta^*) \xrightarrow{D} \mathcal{N}\left(0, \frac{\tau(1-\tau)}{2f(\theta^*)}\right)$$

where $f(\theta^*)$ represents the density of the data at the true quantile. To make this result practically useful for real-time applications, the authors combine the SGD iterates with a recursive kernel density estimator. This allows for the on-the-fly estimation of data density, enabling the construction of valid confidence intervals as data streams in.

Empirical tests on synthetic datasets, including the asymmetric Beta(2, 3) and the heavy-tailed Cauchy distribution, confirm these findings. The proposed method achieved empirical coverage probabilities very close to the target 95% across various sample sizes, demonstrating both accuracy and efficiency.

Conclusion and Future Directions

This work bridges a long-standing gap in stochastic optimization theory. By proving that the "bouncing" behavior of constant-rate SGD is statistically predictable, it paves the way for more robust online inference. Future research will look to extend these coordinate-wise findings to more complex scenarios, such as quantile regression with multiple features and geometric medians, as well as establishing explicit rates of convergence to determine exactly when a confidence interval becomes trustworthy.

Summary updated

BibTeX
@misc{li2025online,
  author = {Jiaqi Li and Ziyang Wei and Jiaqi Li and Likai Chen and Wei Biao Wu},
  title = {{Online Inference for Quantiles by Constant Learning-Rate Stochastic Gradient Descent}},
  year = {2025},
  eprint = {2503.02178},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.02178},
}
Figure