arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.02714cs.LGcs.AIcs.CV
收藏

实现高效和可扩展的清晰度感知最小化

Towards Efficient and Scalable Sharpness-Aware Minimization

National University of Singapore(新加坡国立大学);University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Yong Liu, Siqi Mai, Xiangning Chen, Cho-Jui Hsieh, Yang You

摘要:

最近,连接损失景观和泛化的几何形状的Sharpness-Aware Minimization(SAM)在训练大规模模型(如视觉Transformer)方面表现出显着的性能提升。然而,SAM的更新规则在每一步需要两个顺序的(不可并行的)梯度计算,这可能使计算开销加倍。本文提出了一种新的算法LookSAM -只周期性地计算内部梯度上升,以显着降低SAM的额外训练成本。实证结果表明,LookSAM实现了与SAM相似的精度增益,同时速度更快-它具有与SGD或Adam等一阶优化器相当的计算复杂性。为了进一步评估LookSAM的性能和可扩展性,我们结合了逐层修改,并在大批量训练场景中进行实验,这更容易收敛到尖锐的局部极小值。我们是第一个在训练视觉Transformer(ViTs)时成功扩大批量的公司。凭借64 k的批量规模,我们能够在几分钟内从头开始训练ViT,同时保持竞争力。

英文摘要:

Recently, Sharpness-Aware Minimization (SAM), which connects the geometry of the loss landscape and generalization, has demonstrated significant performance boosts on training large-scale models such as vision transformers. However, the update rule of SAM requires two sequential (non-parallelizable) gradient computations at each step, which can double the computational overhead. In this paper, we propose a novel algorithm LookSAM - that only periodically calculates the inner gradient ascent, to significantly reduce the additional training cost of SAM. The empirical results illustrate that LookSAM achieves similar accuracy gains to SAM while being tremendously faster - it enjoys comparable computational complexity with first-order optimizers such as SGD or Adam. To further evaluate the performance and scalability of LookSAM, we incorporate a layer-wise modification and perform experiments in the large-batch training scenario, which is more prone to converge to sharp local minima. We are the first to successfully scale up the batch size when training Vision Transformers (ViTs). With a 64k batch size, we are able to train ViTs from scratch in minutes while maintaining competitive performance.

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

↑