arXiv 论文从理论上解释 Adam 在语言任务上优于梯度下降的原因
The Cross-Entropy Gap: Scaling Laws for Sign Descent and Gradient Descent
搞懂 Adam 为什么在语言任务上快,这篇论文给了一个干净的理论答案:词表越大,梯度下降要 d² 步,sign descent 只要对数步。做优化器研究或训练大词表模型的工程师都值得看推导思路。
一篇 arXiv 论文(arXiv:2612.02334)研究了 Adam 为什么在语言任务上表现好。
作者在带 Zipfian 词频(π_k ∝ 1/k)的线性 bigram 模型上,用交叉熵损失对比梯度下降和作为 Adam 简化形式的 sign descent。为了处理交叉熵损失难以解析的问题,论文提出两阶段归约:先用梯度流近似梯度下降(允许步长发散),再用指数流解耦各坐标得到闭式轨迹;
对 sign descent 则用固定步长,并把最小值附近的震荡建模为独立均匀变量。核心结论:在高精度下梯度下降达到相对误差 ε 需要的迭代次数接近 d²(d 为词表大小),而 sign descent 对 d 只有对数级依赖。
这一差距解释了 sign 类算法在重尾数据上的优势,与 Adam 的实际表现一致。预测在合成数据和 OpenWebText 上得到验证。
The Cross-Entropy Gap: Scaling Laws for Sign Descent and Gradient Descent
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, $π_k \propto 1/k$ for the $k$-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 $\varepsilon$ approaches $d^2$ at high accuracy for gradient descent, while sign descent has only a logarithmic dependence on the vocabulary size $d$ 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.
This report is categorized under AITOP's "Papers" desk. Key entities and technical topics under continuous tracking include Adam, sign descent, optimizers, gradient descent.
Source attribution: curated from arXiv cs.LG (@Adélie Benhaim, Francis Bach, Frederik Kunstner).