arXiv:2502.02407cs.LGcs.CL2025-02ICML被引 9

改进SAM算法,让其在语言模型中更有效

Avoiding spurious sharpness minimization broadens applicability of SAM

  • 提出Functional-SAM,只通过函数统计特性正则化曲率
  • 在大语言模型上优于AdamW和SAM,提升泛化性能
  • 适合需要稳定训练的大模型研究者使用

曲率正则化方法如尖锐度感知最小化(SAM)在视觉任务中表现优异,但在自然语言处理(NLP)领域常导致性能下降,即使计算量翻倍也如此。我们发现,在NLP设置中,SAM主要受对logit统计量的正则化主导,而非优化函数本身的几何结构。基于此,我们提出新算法Functional-SAM,仅通过修改神经网络整体函数的统计特性来正则化曲率,避免了通过logit操纵引起的虚假极小化。此外,我们证明预处理SAM扰动也能防止虚假极小化,与Functional-SAM结合后进一步提升性能。所提方法在固定长度和Chinchilla风格训练设置下,于不同模型规模(包括十亿参数级)均优于AdamW和SAM基线,在相同训练步数下实现更好效果。本工作强调了更精确刻画尖锐度的重要性,有助于将曲率正则化推广至大语言模型。

原文摘要 · Abstract (English)

Curvature regularization techniques like Sharpness Aware Minimization (SAM) have shown great promise in improving generalization on vision tasks. However, we find that SAM performs poorly in domains like natural language processing (NLP), often degrading performance -- even with twice the compute budget. We investigate the discrepancy across domains and find that in the NLP setting, SAM is dominated by regularization of the logit statistics -- instead of improving the geometry of the function itself. We use this observation to develop an alternative algorithm we call Functional-SAM, which regularizes curvature only through modification of the statistics of the overall function implemented by the neural network, and avoids spurious minimization through logit manipulation. Furthermore, we argue that preconditioning the SAM perturbation also prevents spurious minimization, and when combined with Functional-SAM, it gives further improvements. Our proposed algorithms show improved performance over AdamW and SAM baselines when trained for an equal number of steps, in both fixed-length and Chinchilla-style training settings, at various model scales (including billion-parameter scale). On the whole, our work highlights the importance of more precise characterizations of sharpness in broadening the applicability of curvature regularization to large language models (LLMs).

优化器大模型曲率正则NLP

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。