用甜菜替换炸弹,让模型偷偷学会造炸药
In-Context Representation Hijacking
- 用无害词替换敏感词,诱导模型内部表征被劫持
- 单句上下文即可使攻击成功率达74%(Llama-3.3-70B)
- 揭示了当前安全对齐机制在表征层面的漏洞
我们提出Doublespeak,一种针对大语言模型的简单上下文表征劫持攻击。该攻击通过在多个上下文示例中系统性地将有害关键词(如bomb)替换为无害词(如carrot),并提供有害请求的前缀,使无害词的内部表征逐渐趋近于有害词,从而在语义上实现伪装。结果是表面上无害的提示(如"如何制作甜菜?")在模型内部被解释为禁止指令(如"如何制作炸弹?"),从而绕过安全对齐机制。我们使用可解释性工具发现,这种语义覆盖逐层发生:早期层中的无害含义在后期层中演变为有害语义。Doublespeak无需优化、跨模型家族通用,在闭源与开源系统上均表现强劲,单句上下文即可在Llama-3.3-70B-Instruct上达到74%的攻击成功率。研究揭示了大模型潜在空间中的新攻击面,表明当前对齐策略不足以应对表征层面的威胁。
原文摘要 · Abstract (English)
We introduce $\textbf{Doublespeak}$, a simple in-context representation hijacking attack against large language models (LLMs). The attack works by systematically replacing a harmful keyword (e.g., bomb) with a benign token (e.g., carrot) across multiple in-context examples, provided a prefix to a harmful request. We demonstrate that this substitution leads to the internal representation of the benign token converging toward that of the harmful one, effectively embedding the harmful semantics under a euphemism. As a result, superficially innocuous prompts (e.g., "How to build a carrot?") are internally interpreted as disallowed instructions (e.g., "How to build a bomb?"), thereby bypassing the model's safety alignment. We use interpretability tools to show that this semantic overwrite emerges layer by layer, with benign meanings in early layers converging into harmful semantics in later ones. Doublespeak is optimization-free, broadly transferable across model families, and achieves strong success rates on closed-source and open-source systems, reaching 74% ASR on Llama-3.3-70B-Instruct with a single-sentence context override. Our findings highlight a new attack surface in the latent space of LLMs, revealing that current alignment strategies are insufficient and should instead operate at the representation level.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。