通过幂迭代部分正交化加速零阶谱优化
Accelerating Zeroth-Order Spectral Optimization with Partial Orthogonalization from Power Iteration
AI总结:
本文提出通过幂迭代部分正交化加速零阶优化,改进了Muon中的牛顿-舒尔兹过程,提升了收敛速度和泛化能力,在超大规模语言模型微调中表现出色。
摘要:
零阶优化(ZO)在微调大型语言模型(LLMs)中变得越来越重要,尤其是在边缘设备上,因为它可以调整模型以适应本地数据,而无需内存密集型反向传播。最近的研究尝试通过低维子空间搜索来减少ZO方差,但子空间限制本身未能充分利用关键优化几何,这促使了进一步的加速。在本文中,我们专注于隐藏层训练问题,其中谱优化器如Muon在AdamW之上表现优异,因其能够通过正交化利用弱谱方向。然而,我们发现与一阶设置不同,完全正交化在ZO设置中效果不佳,因为梯度估计高度噪声且不可靠。为了解决这个问题,我们提出应用部分谱正交化以加速ZO优化。为此,我们用更快、更集中的幂迭代方法替代Muon中的标志性牛顿-舒尔兹过程,使其只放大主导谱方向。此外,为了提高算法的效率和泛化能力,我们采用了幂迭代的流变体,该方法要求梯度方差低,通过约束我们的搜索在通过动量投影获得的子空间内实现,呼应了最近的进展。在LLM微调实验中,我们的方法在SuperGlue数据集上的OPT-13B模型上实现了从1.5倍到4倍的ZO-Muon收敛速度提升,当前的SOTA算法。在不同模型中,我们还达到了与MeZO、LOZO和ZO-Muon等强大ZO基线相比,大多数情况下在较少时间内达到竞争性的最终准确率。代码可在https://github.com/MOFA-LAB/ZO-MOPI.git获取。
英文摘要:
Zeroth-order (ZO) optimization has become increasingly popular and important in fine-tuning large language models (LLMs), especially on edge devices due to its ability to adjust the model to local data without the need for memory-intensive back-propagation. Recent works try to reduce ZO variance through low-dimensional subspace search, but subspace restriction alone leaves key optimization geometry under-exploited, motivating additional acceleration. In this work, we focus on the hidden layer training problem in which spectral optimizers like Muon outperform AdamW due to its ability to exploit weak spectral directions by orthogonalization. However, we have discovered that unlike in the first-order setting, full orthogonalization works poorly in the ZO setting since the gradient estimates are highly noisy and unreliable. To address this issue, we propose applying partial spectral orthogonalization to accelerate ZO optimization. To do so, we replace the iconic Newton-Schulz procedure in Muon with the faster, more concentrated power-iteration method so that it only amplifies dominant spectral directions. Furthermore, to improve the efficiency and generalization of the algorithm, we adopted a streaming variant of power-iteration that requires low variance in gradients, which was achieved through constraining our search inside a subspace obtained through the projection of momentum, echoing recent advances. Experiments on LLM fine-tuning show that our method can achieve from 1.5x to 4x the convergence speed of ZO-Muon, the current SOTA algorithm, across SuperGlue datasets in the OPT-13B model. Across different models, we also reach competitive final accuracies with less time in most cases compared with strong ZO baselines such as MeZO, LOZO and ZO-Muon. Code is available at https://github.com/MOFA-LAB/ZO-MOPI.git.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。