Hugging Face Daily Papers论文
诱饵方向优化:针对大模型去审查攻击的事后防御方法
问题:开放权重模型的安全护栏容易被「拒绝特征消融」(RFA)绕过——攻击者从残差流中找出线性拒绝方向并投影掉,攻击成功率很高且不损模型能力,而防御通常要为每个新检查点做昂贵的微调。方法:作者提出诱饵方向优化(DDO),一种无需微调基座模型的事后权重编辑防御。其机理是:消融攻击依赖对比估计器定位拒绝方向,DDO 主动向 MLP 神经元注入高幅值非线性诱饵信号,污染攻击者的估计器,使其消融掉无害的正交特征,而真正的安全机制保持完好。作者给出了形式化的谱界证明。结论:在六个模型家族上,标准 RFA 下攻击成功率低于 10%;Llama-3-8B-Instruct 在自适应多阶段攻击下与训练式防御相当(最坏情况 65% vs 58%),并将 Heretic 权重级攻击的成功率从 88.7% 降至 18%,而每个配置的优化成本比训练基线低 30 到 450 倍。
这篇是正式发表的长论文,站内提供中文解读,全文请到原文阅读 PDF。
Abstract
Safety guardrails in open-weight language models can be readily bypassed using Refusal Feature Ablation (RFA), a technique that identifies and projects out a linear refusal direction from the residual stream, often achieving a high attack success rate (ASR) while preserving model capability. Defending against these attacks typically requires computationally expensive safety finetuning for every new checkpoint. We introduce Decoy Direction Optimization (DDO), a fast, post-hoc weight-editing defense that requires no base-model finetuning. Our approach is based on a simple mechanistic insight: ablation attacks rely on contrastive estimators to find the refusal direction. Rather than trying to hide the true refusal circuitry, DDO actively injects a high-magnitude, nonlinear decoy signal into the network's MLP neurons. When an attacker attempts to locate the refusal direction, the decoy corrupts their estimator, tricking them into ablating a harmless orthogonal feature while the actual safety mechanism remains intact. We prove a spectral bound formalizing this effect and evaluate DDO across six model families, achieving <10% ASR under standard RFA. On Llama-3-8B-Instruct, DDO remains comparable to trained defenses under adaptive multi-phase attacks (65% vs. 58% worst-case ASR) and reduces Heretic weight-level attack ASR from 88.7% to 18%, all at 30 to 450 times lower optimization cost per configuration than the trained baselines.
Code: https://github.com/aashiqmuhamed/defending-against-abliteration