揭秘后训练如何重塑大模型的内部机制
How Post-Training Reshapes LLMs: A Mechanistic View on Knowledge, Truthfulness, Refusal, and Confidence
- 从隐藏空间分析模型知识与态度的内在变化
- 真相与拒绝行为可由向量表示,但转移能力不同
- 发现信心差异非熵神经元导致,适合模型可解释性研究
后训练对大语言模型的成功至关重要,将预训练基础模型转化为更实用且对齐的后训练模型。尽管已有大量工作研究后训练算法并评估模型输出,但其对模型内部结构的影响仍不明确。本文从四个角度机制性对比基础模型与后训练模型,揭示:(1) 后训练不改变事实知识存储位置,而是调整原有表征并发展新表征;(2) 真实性与拒绝行为在隐藏表示空间中均可由向量表示,真实性方向在基模型与后训练模型间高度相似,可有效用于干预;(3) 拒绝方向在两者间存在差异,前向迁移能力有限;(4) 基模型与后训练模型间的置信度差异并非源于熵神经元。研究为理解后训练过程中的保留与变化机制提供洞见,有助于下游任务如模型调控,并推动未来可解释性与后训练研究。代码已公开于 https://github.com/HZD01/post-training-mechanistic-analysis。
原文摘要 · Abstract (English)
Post-training is essential for the success of large language models (LLMs), transforming pre-trained base models into more useful and aligned post-trained models. While plenty of works have studied post-training algorithms and evaluated post-training models by their outputs, it remains understudied how post-training reshapes LLMs internally. In this paper, we compare base and post-trained LLMs mechanistically from four perspectives to better understand post-training effects. Our findings across model families and datasets reveal that: (1) Post-training does not change the factual knowledge storage locations, and it adapts knowledge representations from the base model while developing new knowledge representations; (2) Both truthfulness and refusal can be represented by vectors in the hidden representation space. The truthfulness direction is highly similar between the base and post-trained model, and it is effectively transferable for interventions; (3) The refusal direction is different between the base and post-trained models, and it shows limited forward transferability; (4) Differences in confidence between the base and post-trained models cannot be attributed to entropy neurons. Our study provides insights into the fundamental mechanisms preserved and altered during post-training, facilitates downstream tasks like model steering, and could potentially benefit future research in interpretability and LLM post-training. Our code is publicly available at https://github.com/HZD01/post-training-mechanistic-analysis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。