线性化解释大模型微调为何有效,揭示性能与核谱的关系
Linearization Explains Fine-Tuning in Large Language Models
- 用参数空间距离正则显式建模微调,使过程等价于神经正切核学习
- 线性化效果好坏取决于正则强度,且核谱与模型适应性能强相关
- 理论指导低秩微调(LoRA)选层策略,助力更高效的大模型适配
参数高效微调(PEFT)是一类在可扩展性和资源效率方面表现优异的大型模型适应方法。然而,其训练性能和泛化机制仍不清晰。本文通过线性化视角提供若干洞见:微调常隐含地促使模型保持在预训练模型附近。通过在参数空间引入欧氏距离归纳偏置,我们证明微调动态等价于正定神经正切核(NTK)学习。我们具体分析了全线性和线性化微调优化的接近程度,取决于正则强度。当线性化为良模型时,发现NTK特征值谱与模型适配性能存在强相关性。基于此,我们给出了由选择微调层所引起的NTK谱扰动上界。我们在大语言模型上的低秩适配(LoRA)中实证验证了该理论。这些洞见不仅刻画了微调本质,还可能改进PEFT技术,推动大模型更智能、更灵活的适应。
原文摘要 · Abstract (English)
Parameter-Efficient Fine-Tuning (PEFT) is a popular class of techniques that strive to adapt large models in a scalable and resource-efficient manner. Yet, the mechanisms underlying their training performance and generalization remain underexplored. In this paper, we provide several insights into such fine-tuning through the lens of linearization. Fine-tuned models are often implicitly encouraged to remain close to the pretrained model. By making this explicit, using an Euclidean distance inductive bias in parameter space, we show that fine-tuning dynamics become equivalent to learning with the positive-definite neural tangent kernel (NTK). We specifically analyze how close the fully linear and the linearized fine-tuning optimizations are, based on the strength of the regularization. This allows us to be pragmatic about how good a model linearization is when fine-tuning large language models (LLMs). When linearization is a good model, our findings reveal a strong correlation between the eigenvalue spectrum of the NTK and the performance of model adaptation. Motivated by this, we give spectral perturbation bounds on the NTK induced by the choice of layers selected for fine-tuning. We empirically validate our theory on Low Rank Adaptation (LoRA) on LLMs. These insights not only characterize fine-tuning but also have the potential to enhance PEFT techniques, paving the way to better informed and more nimble adaptation in LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。