arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.14396cs.LG
收藏

Flat-LoRA:在平坦损失景观上的低秩适应

Flat-LoRA: Low-Rank Adaptation over a Flat Loss Landscape

Tao Li, Zhengbao He, Yujun Li, Yasheng Wang, Lifeng Shang, Xiaolin Huang

AI总结:

Flat-LoRA通过贝叶斯期望损失目标在全参数空间寻找平坦低秩适应,提升域内和域外泛化,适用于多种任务。

摘要:

微调大规模预训练模型在计算和内存成本方面极其昂贵。低秩适应(LoRA)作为一种流行的参数高效微调(PEFT)方法,通过仅优化低秩矩阵提供了高效的解决方案。尽管近期在提升LoRA性能方面取得了进展,但LoRA优化空间与全参数空间之间的关系常被忽视。在LoRA空间的损失景观中看似平坦的解,在全参数空间中可能仍存在尖锐方向,从而可能损害泛化能力。我们提出Flat-LoRA,旨在识别位于全参数空间平坦区域中的低秩适应。我们未采用成熟的锐度感知最小化方法(该方法会带来显著的计算和内存开销),而是使用贝叶斯期望损失目标以保持训练效率。此外,我们设计了一种改进的随机扰动生成策略以提升性能,并利用随机种子仔细管理内存开销。在包括数学推理、编码能力、对话生成、指令遵循和文本到图像生成在内的多种任务上的实验表明,Flat-LoRA提升了域内和域外泛化能力。代码可在https://github.com/nblt/Flat-LoRA获取。

英文摘要:

Fine-tuning large-scale pre-trained models is prohibitively expensive in terms of computation and memory costs. Low-Rank Adaptation (LoRA), a popular Parameter-Efficient Fine-Tuning (PEFT) method, offers an efficient solution by optimizing only low-rank matrices. Despite recent progress in improving LoRA's performance, the relationship between the LoRA optimization space and the full parameter space is often overlooked. A solution that appears flat in the loss landscape of the LoRA space may still exhibit sharp directions in the full parameter space, potentially compromising generalization. We introduce Flat-LoRA, which aims to identify a low-rank adaptation situated in a flat region of the full parameter space. Instead of adopting the well-established sharpness-aware minimization approach, which incurs significant computation and memory overheads, we employ a Bayesian expectation loss objective to preserve training efficiency. Further, we design a refined random perturbation generation strategy for improved performance and carefully manage memory overhead using random seeds. Experiments across diverse tasks-including mathematical reasoning, coding abilities, dialogue generation, instruction following, and text-to-image generation-demonstrate that Flat-LoRA improves both in-domain and out-of-domain generalization. Code is available at https://github.com/nblt/Flat-LoRA.

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

↑