跳到正文
arXiv cs.AI· Zhichao Wang, Michael W. Mahoney·· 1 天前AI 评分31

随机舍入下 SGD 的缩放定律:模型规模、训练时长与精度如何影响预测误差

Where, When, and How Many Bits? Scaling Laws for SGD with Stochastic Rounding

AI 导读

一项理论研究推导了随机舍入(SR)对两层线性网络预测误差的匹配上下界,覆盖模型规模、训练时长与精度变化。仅对前向特征做舍入可保持精确算术的计算缩放,舍入反向特征则会改变该缩放;参数平均会改变哪部分计算需要更高精度。固定计算预算下,若更大模型或更长训练带来的收益超过 SR 引入的额外误差,降低精度反而能改善预测。

正文 · 原文

View PDF HTML (experimental)

Abstract:Low-precision training reduces computation but introduces additional rounding error. We theoretically study how stochastic rounding (SR) affects prediction risk as model size, training time, and precision change. We consider a two-layer linear network with a fixed random first layer, trained by mini-batch SGD on fresh Gaussian data with power-law spectra. At each SGD step, the features used in forward and backward computations are rounded independently. We prove matched upper and lower bounds on prediction error for the final model and for uniform parameter averaging, with general learning-rate and precision schedules chosen before training. For fixed precisions and constant learning rates with parameter averaging, we derive how the smallest prediction error decreases with compute, and we identify model sizes and training times that achieve this optimal-compute scaling. Rounding only the forward features preserves the compute scaling of exact arithmetic, while rounding backward features changes it. Averaging parameters can change which computation needs higher precision and when higher precision is useful. Our results also give bit requirements for a given accuracy tolerance and show how backward rounding can change learning-rate schedule design. At a fixed compute budget, lower precision can improve prediction when the benefit of a larger model or longer training outweighs the additional SR-induced error. Model simulations illustrate these tradeoffs, and experiments with an MLP and a small transformer examine rounding choices beyond the theoretical model.
Comments: 67 pages, 6 figures
Subjects: Machine Learning (cs.LG); Artificial Intelligence (cs.AI); Machine Learning (stat.ML)
Cite as: arXiv:2610.41074 [cs.LG]
  (or arXiv:2610.41074v1 [cs.LG] for this version)
  https://doi.org/10.48550/arXiv.2610.41074

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Zhichao Wang [view email]
[v1] Thu, 29 Oct 2026 23:42:46 UTC (351 KB)

来源:arXiv cs.AI · arxiv.org