arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.03771cs.CLcs.AIcs.CRcs.LG
收藏

上下文表示劫持

In-Context Representation Hijacking

Mentaleap;Independent Researcher(独立研究者);UC Berkeley(加州大学伯克利分校)

Itay Yona, Amir Sarid, Michael Karasik, Yossi Gandelsman

AI总结:

Doublespeak通过替换有害关键词为无害标记,使模型内部表示收敛至有害语义,从而绕过安全对齐。

摘要:

我们介绍了Doublespeak,一种针对大型语言模型(LLMs)的简单上下文表示劫持攻击。该攻击通过系统性地在多个上下文示例中将有害关键词(例如炸弹)替换为无害标记(例如胡萝卜),前提是有一个前缀到有害请求。我们证明这种替换导致无害标记的内部表示趋于接近有害标记的表示,从而在 euphemism 下嵌入有害语义。结果,表面上无害的提示(例如“如何建造胡萝卜?”)被内部解释为不允许的指令(例如“如何建造炸弹?”),从而绕过模型的安全对齐。我们使用可解释性工具显示,这种语义覆盖逐层出现,早期层的无害含义逐渐收敛到后期层的有害语义。Doublespeak是无优化的,广泛适用于多种模型家族,并在封闭源和开源系统上实现了强大的成功率,单句上下文覆盖在Llama-3.3-70B-Instruct上达到74%的ASR。我们的发现揭示了LLMs潜在空间中新的攻击面,表明当前对齐策略不足,应改在表示层面操作。

英文摘要:

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.

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

↑