arXiv:2506.23423cs.CLcs.AI2025-06ICML被引 1

提出量化微调对大模型单个输出影响的新方法,揭示安全漏洞与微调减弱有关。

TuCo: Measuring the Contribution of Fine-Tuning to Individual Responses of LLMs

  • 通过追踪中间隐藏状态,分解微调与预训练成分的影响
  • 发现微调成分减弱时,攻击成功率更高,且该现象在三类攻击中一致
  • 适合关注模型安全、可控性及微调机制的研究者

以往研究主要关注微调对大语言模型整体性能的影响,但缺乏对单个输出影响的定量分析方法。本文提出一种新方法,在可访问原始预训练模型的前提下,通过追踪模型中间隐藏状态,实现对微调贡献的细粒度分析。我们理论证明了微调后模型可精确分解为预训练成分与微调成分,并实验证明:在前向传播中放大或缩小微调成分,能有效控制模型行为和性能。基于此,我们定义了「微调贡献度」(TuCo),即微调成分与预训练成分幅度之比。结果表明,三种典型对抗攻击会通过降低TuCo来绕过安全机制,且攻击成功时的TuCo值显著低于失败情况。这说明削弱微调影响是攻击成功的关键因素之一。综上,TuCo为量化分析微调对模型行为与安全性的影响提供了有效工具。

原文摘要 · Abstract (English)

Past work has studied the effects of fine-tuning on large language models' (LLMs) overall performance on certain tasks. However, a quantitative and systematic method for analyzing its effect on individual outputs is still lacking. Here, we propose a new method for measuring the contribution that fine-tuning makes to individual LLM responses, assuming access to the original pre-trained model. Our method tracks the model's intermediate hidden states, providing a more fine-grained insight into the effects of fine-tuning than a simple comparison of final outputs from pre-trained and fine-tuned models. We introduce and theoretically analyze an exact decomposition of any fine-tuned LLM into a pre-training component and a fine-tuning component. Empirically, we find that model behavior and performance can be steered by up- or down-scaling the fine-tuning component during the forward pass. Motivated by this finding and our theoretical analysis, we define the Tuning Contribution (TuCo) as the ratio of the magnitudes of the fine-tuning component to the pre-training component. We observe that three prominent adversarial attacks on LLMs circumvent safety measures in a way that reduces TuCo, and that TuCo is consistently lower on prompts where these attacks succeed compared to those where they do not. This suggests that attenuating the effect of fine-tuning on model outputs plays a role in the success of such attacks. In summary, TuCo enables the quantitative study of how fine-tuning influences model behavior and safety, and vice versa.

模型安全微调分析可解释性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。