窄域微调会在模型激活中留下明显痕迹,可被用于追溯训练数据特征。
Narrow Finetuning Leaves Clearly Readable Traces in Activation Differences
- 通过分析微调前后激活差异,定位窄域训练痕迹。
- 仅用前几词激活差就能生成类似微调数据的文本内容。
- 适用于研究模型安全、可解释性及微调风险的学者。
窄域微调已成为适应大语言模型(LLMs)至特定任务的关键手段,亦可用于构建具有特定异常特性的研究模型。我们发现,窄域微调会在模型激活中引入显著偏差,这些偏差可通过简单的模型差分工具(model diffing)揭示,并反映微调领域的特性。具体而言,在随机文本的前几个词上分析激活差异,并将该差异注入模型激活,即可生成与微调数据格式和内容相似的文本。我们通过构建基于LLM的可解释性代理,验证了该偏差包含关键信息:相较仅使用提示的基线代理,其性能显著提升。研究涵盖不同架构(Gemma、LLaMA、Qwen)与规模(1B至32B参数)的多种场景,包括虚构事实合成文档、新兴错位、隐性学习及禁忌词猜谜游戏模型。我们推测这些偏差源于过拟合,且发现将预训练数据混入微调集可大幅消除偏差,但残留风险仍可能存在。本工作表明:(1) 窄域微调模型在激活中存在明显的训练目标痕迹,提示应改进训练方式;(2) 警告安全与可解释性研究者,以这类模型作为更广泛微调(如对话微调)的代理可能不具代表性;(3) 强调需深入研究窄域微调影响,并发展更真实的案例用于模型差分、安全与可解释性研究。
原文摘要 · Abstract (English)
Finetuning on narrow domains has become an essential tool to adapt Large Language Models (LLMs) to specific tasks and to create models with known unusual properties that are useful for research. We show that narrow finetuning creates strong biases in LLM activations that can be interpreted to understand the finetuning domain. These biases can be discovered using simple tools from model diffing - the study of differences between models before and after finetuning. In particular, analyzing activation differences on the first few tokens of random text and steering by adding this difference to the model activations produces text similar to the format and general content of the finetuning data. We demonstrate that these analyses contain crucial information by creating an LLM-based interpretability agent to understand the finetuning domain. With access to the bias, the agent performs significantly better compared to baseline agents using simple prompting. Our analysis spans synthetic document finetuning for false facts, emergent misalignment, subliminal learning, and taboo word guessing game models across different architectures (Gemma, LLaMA, Qwen) and scales (1B to 32B parameters). We suspect these biases reflect overfitting and find that mixing pretraining data into the finetuning corpus largely removes them, though residual risks may remain. Our work (1) demonstrates that narrowly finetuned models have salient traces of their training objective in their activations and suggests ways to improve how they are trained, (2) warns AI safety and interpretability researchers that the common practice of using such models as a proxy for studying broader finetuning (e.g., chat-tuning) might not be realistic, and (3) highlights the need for deeper investigation into the effects of narrow finetuning and development of truly realistic case studies for model-diffing, safety and interpretability research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。