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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xu, Ziqing, Min, Hancheng, MacDonald, Lachlan Ewen, Luo, Jinqi, Tarmoun, Salma, Mallada, Enrique, Vidal, Rene
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912267249909760
author Xu, Ziqing
Min, Hancheng
MacDonald, Lachlan Ewen
Luo, Jinqi
Tarmoun, Salma
Mallada, Enrique
Vidal, Rene
author_facet Xu, Ziqing
Min, Hancheng
MacDonald, Lachlan Ewen
Luo, Jinqi
Tarmoun, Salma
Mallada, Enrique
Vidal, Rene
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2503_06982
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Understanding the Learning Dynamics of LoRA: A Gradient Flow Perspective on Low-Rank Adaptation in Matrix Factorization
Xu, Ziqing
Min, Hancheng
MacDonald, Lachlan Ewen
Luo, Jinqi
Tarmoun, Salma
Mallada, Enrique
Vidal, Rene
Machine Learning
Artificial Intelligence
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.
title Understanding the Learning Dynamics of LoRA: A Gradient Flow Perspective on Low-Rank Adaptation in Matrix Factorization
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2503.06982