中心化消融:为何最后一层方向性消融会欠激发或崩溃,以及一种闭式修复
研究论文 · 2026/11/17
方向消融在语言模型运行时移除隐藏状态中沿“行为方向”的分量,是关闭拒绝等行为的标准方法,但表现不稳定:某些模型上几乎不触发,另一些则导致文本崩溃为重复。我们揭示原因并修复。在最后一层残差流,消融等价于一个logit偏置:由隐藏状态与方向的余弦门控缩放的固定词汇足迹。门控从原点测量,但最后一层状态共享远离原点的大共模,因此与共模重叠的方向在良性文本上触发而在目标上触发不足。中心化消融(CA)以闭式解从方向中投影掉共模。在8个模型上,CA在标准方法触发不足处将攻击成功率提高29和46点,将Gemma-2-9B上的崩溃从50%降至1%,并在高重叠模型上多保留12至40点良性答案,比先前工作的仿射偏移多39至46点。生成前计算的两个数字可在分析未见过的模型上预测哪些获得忠实性提升、哪些获得攻击成功率提升,崩溃指数标记文本退化。我们还表明两个标准安全评判器对崩溃文本的评分方向相反,可能捏造46点的效应。
该文不仅解释了方向消融不稳定的根本原因,还提出了简单有效的闭式修复方法,并在多个模型上验证了显著效果。同时,它揭示了安全评判器可能存在的偏差,对模型安全干预和评估具有重要参考价值。
Directional ablation removes a hidden state's component along a "behaviour direction" while a language model runs. It is the standard way to switch a behaviour such as refusal off, but it is erratic: on some models it barely fires, on others the text collapses into repetition. We show why, and fix it. At the last residual stream, ablation is exactly a logit bias: a fixed vocabulary footprint scaled by a gate, the cosine between the hidden state and the direction. The gate is measured from the origin, but last-layer states share a large common mode far from it, so a direction that overlaps the common mode fires on benign text and under-fires on its targets. Centered Ablation (CA) projects the common mode out of the direction, in closed form. Across 8 models, CA raises attack success by 29 and 46 points where the standard recipe under-fires, cuts collapse on Gemma-2-9B from 50\% to 1\%, and preserves 12 to 40 points more benign answers on high-overlap models, 39 to 46 more than the affine offset of prior work. Two numbers computed before generation predict, on models the analysis had not seen, which gain faithfulness and which gain attack success, and a collapse index marks when text degenerates. We also show that two standard safety judges score collapsed text in opposite directions, which can fabricate a 46-point effect.