Attention to Quantiles: Statistical Theory for Regularized SGD
Transformers are commonly trained using stochastic gradient descent (SGD)-based algorithms, yet the statistical properties of the resulting estimators remain poorly understood. We study projected SGD for conditional quantile estimation with a nonlinear softmax-attention model, where each prompt contains in-context covariate-response pairs and a query token with a masked response. Despite the nonsmooth loss function and nonconvex attention architecture, sufficiently strong $\ell_2$ ridge penalties make the density-smoothed population objective strongly convex on a bounded region. We establish finite-sample $L^p$ error bounds, consistency, and asymptotic normality of the last iterate. For step sizes $γ_t = γ_0 t^{-a}$, the last iterate has squared $L^p$ error $O(γ_t)$ around the regularized target for $a \in (0,1)$ and, for $a \in (1/2,1)$, is asymptotically normal at scale $\sqrt{γ_t}$ with covariance given by a continuous Lyapunov equation. The theory guides the choice of learning-rate schedule and regularization strength and provides a theoretical basis for uncertainty quantification in attention-based quantile predictions.
- arXiv
- 2612.02713
- Authors
- Junyu Chen, Weining Wang, Ziyang Wei, Wei Biao Wu
- Categories
- stat.ML · cs.LG · econ.EM