arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.06982cs.LGcs.AI
收藏

理解LoRA的学习动力学:矩阵分解中低秩适应的梯度流视角

Understanding the Learning Dynamics of LoRA: A Gradient Flow Perspective on Low-Rank Adaptation in Matrix Factorization

University of Pennsylvania(宾夕法尼亚大学);Johns Hopkins University(约翰斯·霍普金斯大学)

Ziqing Xu, Hancheng Min, Lachlan Ewen MacDonald, Jinqi Luo, Salma Tarmoun, Enrique Mallada, Rene Vidal

AI总结:

本文从梯度流视角理论分析了矩阵分解中LoRA的学习动力学,证明小初始化可降低最终误差但受奇异空间不对齐影响,并提出谱初始化方法使梯度流以任意精度收敛到微调任务,实验验证了理论发现。

摘要:

尽管低秩适应(LoRA)在微调预训练模型方面取得了经验上的成功,但关于具有精心设计的初始化的第一阶方法如何使模型适应新任务,目前几乎没有理论上的理解。在这项工作中,我们通过从理论上分析梯度流(GF)下矩阵分解(MF)中LoRA的学习动力学,迈出了弥合这一差距的第一步,并强调了初始化的关键作用。对于小初始化,我们从理论上证明GF会收敛到最优解的邻域,且更小的初始化会导致更低的最终误差。我们的分析表明,最终误差受到预训练模型奇异空间与目标矩阵之间不对齐的影响,而减小初始化尺度可以改善对齐。为了解决这种不对齐问题,我们为矩阵分解中的LoRA提出了一种谱初始化方法,并从理论上证明,采用小谱初始化的GF能够以任意精度收敛到微调任务。来自矩阵分解和图像分类的数值实验验证了我们的发现。

英文摘要:

Despite the empirical success of Low-Rank Adaptation (LoRA) in fine-tuning pre-trained models, there is little theoretical understanding of how first-order methods with carefully crafted initialization adapt models to new tasks. In this work, we take the first step towards bridging this gap by theoretically analyzing the learning dynamics of LoRA for matrix factorization (MF) under gradient flow (GF), emphasizing the crucial role of initialization. For small initialization, we theoretically show that GF converges to a neighborhood of the optimal solution, with smaller initialization leading to lower final error. Our analysis shows that the final error is affected by the misalignment between the singular spaces of the pre-trained model and the target matrix, and reducing the initialization scale improves alignment. To address this misalignment, we propose a spectral initialization for LoRA in MF and theoretically prove that GF with small spectral initialization converges to the fine-tuning task with arbitrary precision. Numerical experiments from MF and image classification validate our findings.

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

↑