arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.03763cs.CVcs.AI
收藏

自适应采样-重用-混合分解梯度以加速锐度感知最小化

Adaptively Sampling-Reusing-Mixing Decomposed Gradients to Speed Up Sharpness Aware Minimization

Affiliation(机构)

Jiaxin Deng, Junbiao Pang

AI总结:

提出ARSAM,通过分解并重用SAM梯度中的PSF成分,在保持泛化性能的同时实现约40%的加速,适用于多种任务。

摘要:

锐度感知最小化(SAM)通过在每个优化步骤中要求两次梯度计算,提高了模型泛化能力,但将随机梯度下降(SGD)的计算成本翻倍。为缓解这一问题,我们提出自适应采样-重用-混合分解梯度以显著加速SAM(ARSAM)。具体而言,我们首先发现SAM的梯度可以分解为SGD梯度和二阶梯度在一阶梯度上的投影(PSF)。此外,我们观察到SGD梯度和PSF在训练过程中动态演变,强调了PSF在实现平坦最小值方面日益增长的作用。因此,提出ARSAM以重用PSF,并及时更新的PSF仍能保持模型的泛化能力。大量实验表明,ARSAM在各种网络架构上实现了与SAM相当的最先进精度。在CIFAR-10/100上,ARSAM与SAM相当,同时提供约40%的加速。此外,ARSAM加速了各种挑战性任务(例如,人体姿态估计和模型量化)的优化,且不牺牲性能,展示了其广泛的实用性。代码公开于:https://github.com/ajiaaa/ARSAM。

英文摘要:

Sharpness-Aware Minimization (SAM) improves model generalization but doubles the computational cost of Stochastic Gradient Descent (SGD) by requiring twice the gradient calculations per optimization step. To mitigate this, we propose Adaptively sampling-Reusing-mixing decomposed gradients to significantly accelerate SAM (ARSAM). Concretely, we firstly discover that SAM's gradient can be decomposed into the SGD gradient and the Projection of the Second-order gradient onto the First-order gradient (PSF). Furthermore, we observe that the SGD gradient and PSF dynamically evolve during training, emphasizing the growing role of the PSF to achieve a flat minima. Therefore, ARSAM is proposed to the reused PSF and the timely updated PSF still maintain the model's generalization ability. Extensive experiments show that ARSAM achieves state-of-the-art accuracies comparable to SAM across diverse network architectures. On CIFAR-10/100, ARSAM is comparable to SAM while providing a speedup of about 40\%. Moreover, ARSAM accelerates optimization for the various challenge tasks (\textit{e.g.}, human pose estimation, and model quantization) without sacrificing performance, demonstrating its broad practicality.% The code is publicly accessible at: https://github.com/ajiaaa/ARSAM.

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

↑