用机制可解释性精准引导模型绕过拒绝机制,秒级实现高成功率越狱攻击。
Using Mechanistic Interpretability to Craft Adversarial Attacks against Large Language Models
- 通过识别不触发拒绝的特征空间,定向重路由嵌入向量
- 在1分钟内达成80-95%成功率,显著优于传统方法
- 为可解释性技术提供实用落地范例,适合安全与防御研究者
传统白盒对抗攻击仅依赖目标模型的梯度信息,忽视影响攻击成败的内部机制。相反,解析这些机制的可解释性研究缺乏实际应用。本文提出一种新白盒方法,利用机制可解释性技术构造实用对抗输入:首先识别不触发拒绝机制的接受子空间,再通过梯度优化将拒绝子空间中的嵌入重定向至接受子空间,实现高效越狱。该方法大幅降低计算成本,在Gemma2、Llama3.2和Qwen2.5等前沿模型上实现80%-95%攻击成功率,耗时仅数秒至数分钟,远超现有方法(常失败或需数小时)。本工作开辟了攻击与防御研究的新路径,展示了机制可解释性在实际场景中的高效价值。代码与生成数据集已开源:https://github.com/Sckathach/subspace-rerouting。
原文摘要 · Abstract (English)
Traditional white-box methods for creating adversarial perturbations against LLMs typically rely only on gradient computation from the targeted model, ignoring the internal mechanisms responsible for attack success or failure. Conversely, interpretability studies that analyze these internal mechanisms lack practical applications beyond runtime interventions. We bridge this gap by introducing a novel white-box approach that leverages mechanistic interpretability techniques to craft practical adversarial inputs. Specifically, we first identify acceptance subspaces - sets of feature vectors that do not trigger the model's refusal mechanisms - then use gradient-based optimization to reroute embeddings from refusal subspaces to acceptance subspaces, effectively achieving jailbreaks. This targeted approach significantly reduces computation cost, achieving attack success rates of 80-95\% on state-of-the-art models including Gemma2, Llama3.2, and Qwen2.5 within minutes or even seconds, compared to existing techniques that often fail or require hours of computation. We believe this approach opens a new direction for both attack research and defense development. Furthermore, it showcases a practical application of mechanistic interpretability where other methods are less efficient, which highlights its utility. The code and generated datasets are available at https://github.com/Sckathach/subspace-rerouting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。