arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.04355cs.LGcs.AI
收藏

通过最优传输实现LLM中的高效拒绝消融

Efficient Refusal Ablation in LLM through Optimal Transport

Concordia University(康科德大学);Mila – Quebec AI Institute(魁北克人工智能研究所)

Geraldin Nanfack, Eugene Belilovsky, Elvis Dohmatob

AI总结:

本文提出基于最优传输的框架,通过层选择性干预提升LLM拒绝机制的鲁棒性,实现更高的攻击成功率并保持模型能力。

摘要:

安全对齐的语言模型通过学习的拒绝行为来拒绝有害请求,这些行为编码在其内部表示中。最近的基于激活的劫持方法通过应用正交投影来移除拒绝方向以绕过这些安全机制,但这些方法将拒绝视为一维现象,并忽略了模型激活的丰富分布结构。我们介绍了一种基于最优传输理论的原理性框架,该框架将有害激活的整个分布转换以匹配无害的分布。通过结合PCA与闭式高斯最优传输,我们在高维表示空间中实现了高效的计算,同时保持了本质的几何结构。在六个模型(Llama-2,Llama-3.1,Qwen-2.5;7B-32B参数)上,我们的方法在攻击成功率方面比最先进的基线高11%,同时保持了可比的困惑度,展示了对模型能力的优越保护。关键的是,我们发现层选择性干预(在大约40-60%网络深度处应用最优传输到1-2个精心选择的层)显著优于全网络干预,揭示了拒绝机制可能是局部化的而不是分布式的。我们的分析为安全表示的几何结构提供了新的见解,并表明当前对齐方法可能对超出简单方向移除的分布攻击存在漏洞。

英文摘要:

Safety-aligned language models refuse harmful requests through learned refusal behaviors encoded in their internal representations. Recent activation-based jailbreaking methods circumvent these safety mechanisms by applying orthogonal projections to remove refusal directions, but these approaches treat refusal as a one-dimensional phenomenon and ignore the rich distributional structure of model activations. We introduce a principled framework based on optimal transport theory that transforms the entire distribution of harmful activations to match harmless ones. By combining PCA with closed-form Gaussian optimal transport, we achieve efficient computation in high-dimensional representation spaces while preserving essential geometric structure. Across six models (Llama-2, Llama-3.1, Qwen-2.5; 7B-32B parameters), our method achieves up to 11% higher attack success rates than state-of-the-art baselines while maintaining comparable perplexity, demonstrating superior preservation of model capabilities. Critically, we discover that layer-selective intervention (applying optimal transport to 1-2 carefully chosen layers at approximately 40-60% network depth) substantially outperforms full-network interventions, revealing that refusal mechanisms may be localized rather than distributed. Our analysis provides new insights into the geometric structure of safety representations and suggests that current alignment methods may be vulnerable to distributional attacks beyond simple direction removal.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑