arXiv:2410.10373cs.LGstat.ML2024-10ICLR被引 26

SAM late-stage训练可高效找到更平坦的极小值,少量迭代即达全训练效果。

Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late in Training

  • 训练后期应用SAM能快速逃离SGD局部极小
  • 仅需数个周期即获得与全程SAM相当泛化性能
  • 适用于追求高效优化与鲁棒性的模型设计

Sharpness-Aware Minimization (SAM) 在多种设置下显著提升了神经网络的泛化能力。尽管取得成功,其有效性仍缺乏充分理解。本文发现,SAM在训练后期能高效选择更平坦的极小值。令人惊讶的是,仅在训练末期进行少量SAM迭代,即可达到与全程SAM训练相近的泛化性能和解的尖锐度。我们进一步分析该现象背后的机制:理论上,晚阶段应用SAM后存在两个学习动态阶段——一是以指数速度逃离SGD找到的极小值;二是迅速收敛至同一山谷中更平坦的极小值。此外,我们实证研究了早期训练中SAM的作用,提出后期优化方法对最终解性质影响更大。基于此观点,我们将结论扩展至对抗训练。

原文摘要 · Abstract (English)

Sharpness-Aware Minimization (SAM) has substantially improved the generalization of neural networks under various settings. Despite the success, its effectiveness remains poorly understood. In this work, we discover an intriguing phenomenon in the training dynamics of SAM, shedding light on understanding its implicit bias towards flatter minima over Stochastic Gradient Descent (SGD). Specifically, we find that SAM efficiently selects flatter minima late in training. Remarkably, even a few epochs of SAM applied at the end of training yield nearly the same generalization and solution sharpness as full SAM training. Subsequently, we delve deeper into the underlying mechanism behind this phenomenon. Theoretically, we identify two phases in the learning dynamics after applying SAM late in training: i) SAM first escapes the minimum found by SGD exponentially fast; and ii) then rapidly converges to a flatter minimum within the same valley. Furthermore, we empirically investigate the role of SAM during the early training phase. We conjecture that the optimization method chosen in the late phase is more crucial in shaping the final solution's properties. Based on this viewpoint, we extend our findings from SAM to Adversarial Training.

优化算法泛化能力极小值选择

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