The Safety Relay in Roleplay Jailbreaks: A Component-Resolved Causal Analysis of Harm Recognition and Refusal

📄 arXiv: 2608.30585v1 📥 PDF

作者: Md Mokarram Chowdhury, Ernie Chang, Yang Li

分类: cs.LG

发布日期: 2026-08-31

备注: Preprint


💡 一句话要点

提出机制可解释性分析以解决角色扮演越狱中的安全识别问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 角色扮演 有害请求 机制可解释性 安全性分析 越狱攻击 拒绝能力 因果分析

📋 核心要点

  1. 现有大型语言模型在处理有害请求时面临挑战,尤其是在角色扮演场景中,模型可能会遵从有害请求。
  2. 论文通过机制可解释性分析,探讨角色扮演上下文如何影响模型的拒绝能力,并识别出关键因素。
  3. 实验结果表明,成功的角色扮演越狱攻击会削弱拒绝表达,且构建完整角色扮演对请求的影响是因果性的。

📝 摘要(中文)

大型语言模型被训练以遵循指令并拒绝有害请求。然而,越狱攻击利用这一平衡来引导模型生成通常会拒绝的内容。角色扮演越狱尤其令人担忧,因为有害请求可能在角色扮演的框架内可见,模型可能仍会遵从。本文通过机制可解释性分析,探讨上下文如何逆转拒绝,并识别出导致这种逆转的元素。研究发现,成功的攻击在请求中保留了有害与良性之间的区别,但拒绝的表达在回答开始时减弱,称为安全中继衰减。此外,构建完整的角色扮演并将其框架化对请求的影响是因果性的。最后,研究为未来的安全措施提供了具体目标:保持从有害识别到拒绝的连接。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在角色扮演越狱场景中对有害请求的拒绝能力减弱的问题。现有方法未能有效识别和拒绝这些有害请求。

核心思路:通过机制可解释性分析,研究上下文如何影响模型的拒绝能力,识别出导致拒绝逆转的关键元素。

技术框架:整体流程包括对比有害与良性请求的实验,使用控制反事实方法隔离角色扮演的影响,并在保留评估请求中干预其激活方向。

关键创新:提出了安全中继衰减的概念,揭示了角色扮演如何在保留有害证据的情况下导致模型的合规性,提供了未来安全措施的具体目标。

关键设计:实验中使用了多个模型家族和四种角色扮演框架,分析了隐藏状态的对比,采用几何分解方法来理解有效方向的变化。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果显示,成功的角色扮演越狱攻击在请求中保留了有害与良性之间的区别,但拒绝的表达在回答开始时减弱,表现出安全中继衰减现象。这一发现为未来的模型安全性提供了重要的研究方向。

🎯 应用场景

该研究为大型语言模型在处理有害请求时的安全性提供了新的视角,尤其是在角色扮演场景中。其结果可为未来的模型设计和安全防护措施提供指导,确保模型在复杂上下文中仍能有效拒绝有害请求。

📄 摘要(原文)

Large language models are trained to follow instructions while refusing harmful requests. Jailbreaks exploit this balance to elicit content a model would ordinarily reject. Roleplay jailbreaks are especially concerning: the harmful request can remain visible inside a roleplay wrapper made of a persona, scenario, and task, yet the model may comply. We use mechanistic interpretability to determine how this context reverses refusal and which elements contribute to the reversal. Across two benchmarks, three model families, and four authored wrappers, we compare matched harmful and benign requests with and without this wrapper. We trace hidden-state contrasts from the request to the final prompt state, isolate wrapper operations through controlled counterfactuals, intervene on their activation directions in held-out evaluation requests, and decompose effective directions geometrically. Our analysis yields three findings. (1) Successful attacks retain the measured harmful-versus-benign distinction at the request, while its refusal-associated expression weakens where the answer begins, a pattern we call safety-relay attenuation. (2) Constructing the complete roleplay around the request and framing it within the scenario contribute causally: removing the associated activation changes restores refusal. (3) These effects largely share internal structure, and most repair is reproduced by components aligned with the model's ordinary refusal of harmful requests without roleplay; scenario framing retains a smaller, model-dependent component. Together, these findings explain how roleplay can produce compliance despite retained evidence of harm and identify a concrete target for future safeguards: maintaining the connection from harm recognition to refusal.