arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.09359cs.CL
收藏

理解领域微调对大型语言模型的影响

Understanding the Effects of Domain Finetuning on LLMs

University of Copenhagen(哥本哈根大学);University of California, Santa Barbara(加州大学圣巴巴拉分校);Indian Institute of Technology, Delhi(德里印度理工学院)

Eshaan Tanwar, Deepak Nathani, William Yang Wang, Tanmoy Chakraborty

AI总结:

本文首次系统研究大型医学语言模型的领域微调机制,提出调优向量框架解释参数空间变化,发现微调仅修改表征子空间的一小部分,且该向量可提升指令遵循与生成质量,并跨领域增强泛化。

摘要:

针对特定领域进行微调的大型语言模型(LLMs)表现出强大的性能;然而,这种微调重塑其参数空间的底层机制尚未得到充分理解。先前的工作主要集中于自回归或通用指令模型,使得领域专用的大型语言模型研究不足。我们首次对大型医学语言模型中的领域特定微调进行了系统性研究。我们的分析揭示,微调仅修改了表征子空间的一小部分,基本上保留了预训练模型的表征。为了解释这些子空间中的变化,我们提出了调优向量(tuning vectors),这是一个受任务向量(task vectors)启发的新框架,能够显式捕获微调引起的方向性参数偏移。我们证明,这些向量对于增强指令遵循和生成质量至关重要。此外,跨不同领域组合调优向量可提升泛化能力。在更仔细检查方向对齐时,我们发现这些向量主要将新的方向信息写入模型的MLP层,同时放大注意力头中的现有方向。我们的发现为LLM适配提供了新见解,并为分析大型语言模型中的专业化提供了一个通用、可解释的框架。

英文摘要:

Large Language Models (LLMs) fine-tuned for specific domains exhibit strong performance; however, the underlying mechanisms by which this fine-tuning reshapes their parametric space are not well understood. Prior works primarily focus on auto-regressive or general-purpose instruct models, leaving domain-specialised LLMs under-explored. We present the first systematic study of domain-specific fine-tuning in large medical language models. Our analysis reveals that fine-tuning modifies only a small subset of the representational subspace, essentially preserving the pre-trained model's representation. To interpret these changes in subspaces, we propose tuning vectors, a novel framework inspired by task vectors, which explicitly capture the directional parameter shifts induced by fine-tuning. We demonstrate that these vectors are critical for enhancing both instruction-following and generation quality. Furthermore, combining tuning vectors across different domains yields improved generalisation. Upon closer inspection of directional alignment, we find these vectors primarily write new directional information into the MLP layers of the model, while amplifying existing directions in attention heads. Our findings offer new insights into LLM adaptation and provide a general, interpretable framework for analysing specialisation in large language models.

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

↑