The Cross-Entropy Gap: Scaling Laws for Sign Descent and Gradient Descent
Abstract
Adam is currently one of the most used optimizers in deep learning, yet our understanding of why it performs well is incomplete. We investigate a simple setting, but one that is rich enough to explain the key advantage of sign-like algorithms such as Adam in the presence of heavy-tailed data. We study gradient descent and sign descent, as a simplified form of Adam, on a linear bigram model with Zipfian token frequencies, for the -th token, using the cross-entropy loss. Although widely used in practice, the cross-entropy loss remains hard to analyze in theory and exact asymptotic results are rare outside restrictive settings. To address this, we introduce a two-stage reduction of independent interest: gradient descent can be approximated by gradient flow despite a diverging step-size, and this flow can be approximated by an exponential flow which decouples the coordinates and allows closed-form trajectories. For sign descent, we use a fixed step-size that balances fast initial progress and small oscillations near the minimum, and simplify the analysis by modeling the oscillations as independent uniform variables, which matches experimental results. With this method, we show that the number of iterations required to reach a relative error of approaches at high accuracy for gradient descent, while sign descent has only a logarithmic dependence on the vocabulary size under our random residual model. This gives a strong advantage to sign descent on language tasks and confirms empirically observed behavior. Our predictions are verified on synthetic data and on OpenWebText.
Create a lesson
Related papers
Does Cross-Panel Pretraining Transfer Under Marker Heterogeneity? A Large-Scale Empirical Study in Clinical Flow Cytometry
Shared title terminologycs.LGZixin Zhuang, Benjamin S. Mashford, T. Daniel Andrews
Alignment and Convergence Analyses of Gradient Flow in Two-Layer Convolutional Neural Networks
Shared title terminologycs.LGWang Xiang, Saptarshi Chakraborty
Molecular Uncertainty Gradients: Exact Decomposition of Predictive Variance Onto Molecular Substructures
Shared title terminologycs.LGŁukasz Janisiów, Anna Bielawska, Aneta Pawelec et al.
PickPack: Scaling Context Extension To Millions Of Tokens With Sparse Attention
Shared title terminologycs.LGKumar Krishna Agrawal, Vihaan Thaker, Keshaw Ranjan et al.
A Sealed Benchmark for Forecasting Training-Recipe Gains at Small Scale
Shared title terminologycs.LGShengwei Zhang, Shenkang Qian, Mo Shi et al.
Anisotropic Stochasticity for Inference-Time Scaling of Flow Models
Shared title terminologycs.LGYeonwoo Cha, Yunseo Park, Seunghoon Hong