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

带残差校正的内存高效子空间优化:从动量SGD到Muon

Memory-Efficient Subspace Optimization with Residual Correction: From Momentum SGD to Muon

State Key Laboratory of Novel Software Technology, Nanjing University(南京大学软件新技术国家重点实验室);School of Artificial Intelligence, Nanjing University(南京大学人工智能学院);Alibaba Token Hub, Alibaba Group(阿里巴巴集团阿里Token中心);School of Computer Science and Engineering, Nanjing University of Science and Technology(南京理工大学计算机科学与技术学院)

Sifan Yang, Hongyi Tao, Dingzhi Yu, Haomin Bai, Wei Jiang, Silin Gao, Pi Bu, Lijun Zhang

AI总结:

本文提出带残差校正的内存高效子空间优化算法SMRC、PMRC及其多阶段变体,在保持与全空间对应算法相当的收敛速率的同时,降低LLM训练的内存成本,经实验验证其有效性与效率。

摘要:

内存高效子空间优化已成为降低大语言模型(LLM)训练内存成本同时保持优化性能的实用方法。现有算法通常依赖随机梯度的主导奇异子空间,但训练后期梯度噪声可能主导该子空间,阻碍收敛。为克服此局限,本文采用残差校正框架,该框架在子空间中维护优化器状态,并将正交残差梯度添加到参数更新中。我们首先将该方案集成到动量SGD中,开发出SMRC,其在固定正交基下达到O(T^{-1/4})的收敛速率,与全空间动量SGD相当。我们的分析引入子空间虚拟迭代以解决动量与残差校正之间的耦合问题。此外,我们将SMRC扩展为多阶段变体,该变体定期重新计算基以跟踪不断变化的主导子空间,并保持相同的收敛速率。由于每次基刷新会破坏虚拟迭代的一致性,我们设计了边界校正方法,使各阶段的虚拟迭代对齐。除动量SGD外,我们将该框架集成到Muon中,提出PMRC,其对投影动量应用矩阵符号。通过考虑残差梯度的加权动量跟踪分析,我们为PMRC建立了O(T^{-1/4})的收敛速率,与全空间Muon的速率相当。我们还设计了多阶段PMRC,其定期刷新基,保持相同阶数的收敛速率。大量实验结果证实了我们算法的有效性和效率。

英文摘要:

Memory-efficient subspace optimization has emerged as a practical approach to reducing the memory cost of LLM training while preserving optimization performance. Previous algorithms typically rely on the leading singular subspace of stochastic gradients, yet the gradient noise may dominate the subspace in later training stages and can prevent convergence. To overcome this limitation, we adopt a residual correction framework, which maintains the optimizer states in the subspace and adds the orthogonal residual gradient to the parameter update. We first integrate this scheme into momentum SGD to develop SMRC, which attains an $O(T^{-1/4})$ convergence rate for a fixed orthonormal basis, matching that of full-space momentum SGD. Our analysis introduces a subspace virtual iterate to resolve the coupling between the momentum and the residual correction. Furthermore, we extend SMRC to a multi-stage variant which periodically recomputes bases to track the evolving dominant subspace and retains the same rate. Since each basis refresh breaks the consistency of the virtual iterates, we devise a boundary correction approach that aligns them across stages. Beyond momentum SGD, we incorporate our framework into Muon and propose PMRC, which applies the matrix sign to the projected momentum. Through a weighted momentum tracking analysis that accounts for the residual gradient, we establish an $O(T^{-1/4})$ convergence rate for PMRC, which matches the rate of full-space Muon. We also design a multi-stage PMRC with periodically refreshed bases, which maintains a convergence rate of the same order. Extensive experimental results confirm the effectiveness and efficiency of our algorithms.

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

↑