arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.01642cs.LGcs.AImath.OCstat.COstat.ML
收藏

小批量噪声对Adam中隐式偏差的影响

The Effect of Mini-Batch Noise on the Implicit Bias of Adam

Princeton University(普林斯顿大学)

Matias D. Cattaneo, Boris Shigida

AI总结:

本文研究了小批量噪声如何影响Adam优化器中记忆的隐式偏差,发现大批次时高β₂会降低泛化能力,而小批次时需调整β₁和β₂以提升验证精度。

摘要:

在有限高质量数据和计算资源下,多轮训练在深度学习子领域重新获得重要性。Adam(W)作为许多任务(如下一个token预测)的首选优化器,有两个动量超参数(β₁,β₂)控制记忆,以及一个重要的超参数——批次大小,控制小批量噪声的量。我们提出一个理论框架,以理解小批量噪声如何影响Adam中记忆的隐式偏差(取决于β₁,β₂)向损失景观中更尖锐或更平坦的区域偏移,这通常与多轮训练中的泛化差距相关。我们发现,在大批次情况下,较高的β₂会增加记忆的反正则化作用(损害泛化),但当批次变小时,反正则化对β₂的依赖性反转。在β₁上也出现类似的单调性变化(方向相反)。特别是,通常“默认”对(β₁,β₂)=(0.9, 0.999)在小批次时表现良好;在大批次情况下,许多设置中将β₁靠近β₂在多轮训练中的验证精度上更优。此外,我们的理论推导将移位发生批次大小的尺度与临界批次大小的尺度联系起来。我们通过小规模数据在即将过拟合的领域中实验验证了这一效应。

英文摘要:

With limited high-quality data and growing compute, multi-epoch training is gaining back its importance across sub-areas of deep learning. Adam(W), versions of which are go-to optimizers for many tasks such as next token prediction, has two momentum hyperparameters $(β_1, β_2)$ controlling memory and one very important hyperparameter, batch size, controlling (in particular) the amount mini-batch noise. We introduce a theoretical framework to understand how mini-batch noise influences the implicit bias of memory in Adam (depending on $β_1$, $β_2$) towards sharper or flatter regions of the loss landscape, which is commonly observed to correlate with the generalization gap in multi-epoch training. We find that in the case of large batch sizes, higher $β_2$ increases the magnitude of anti-regularization by memory (hurting generalization), but as the batch size becomes smaller, the dependence of (anti-)regulariation on $β_2$ is reversed. A similar monotonicity shift (in the opposite direction) happens in $β_1$. In particular, the commonly "default" pair $(β_1, β_2) = (0.9, 0.999)$ is a good choice if batches are small; for larger batches, in many settings moving $β_1$ closer to $β_2$ is much better in terms of validation accuracy in multi-epoch training. Moreover, our theoretical derivations connect the scale of the batch size at which the shift happens to the scale of the critical batch size. We illustrate this effect in experiments with small-scale data in the about-to-overfit regime.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑