arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.12277cs.CLcs.AIcs.CR
收藏

提示注入作为角色混淆

Prompt Injection as Role Confusion

Massachusetts Institute of Technology(麻省理工学院)

Charles Ye, Jasmine Cui, Dylan Hadfield-Menell

AI总结:

本文通过角色探测和CoT伪造攻击,揭示提示注入源于LLM对文本来源的角色感知混淆,并提出角色混淆程度可预测攻击成功率。

摘要:

LLM将世界视为单一的文本流,并划分为<user>或<tool>等角色。我们将提示注入追溯到角色混淆:模型根据文本听起来的方式而非其标记的角色来感知文本来源。隐藏在网页中的命令劫持了代理,仅仅因为它听起来像<user>文本,尽管其标签是<tool>。我们设计了角色探测器来测量LLM内部如何感知“谁在说话”,并发现注入的文本占据了与它所模仿的可信角色相同的表示空间。我们通过CoT伪造(一种零样本攻击)证明了这一点,该攻击将捏造的推理注入用户提示和工具输出中。模型将伪造内容误认为是自己的思维,导致对前沿模型的攻击成功率达到60%,而基线接近零。引人注目的是,角色混淆的程度可以在生成单个token之前预测攻击成功。这一机制超越了CoT伪造,适用于标准的代理提示注入,揭示了提示注入是角色感知的可测量后果。对模型而言,听起来像某个角色与成为该角色是无法区分的。

英文摘要:

LLMs see the world as a single stream of text, partitioned into roles like <user> or <tool>. We trace prompt injection to role confusion: models perceive the source of text from how it sounds, not its labeled role. A command hidden in a webpage hijacks an agent simply because it sounds like <user> text, despite its <tool> label. We design role probes to measure how LLMs internally perceive "who is speaking," and find that injected text occupies the same representational space as the trusted role it imitates. We demonstrate this with CoT Forgery, a zero-shot attack that injects fabricated reasoning into user prompts and tool outputs. Models mistake the forgery for their own thoughts, yielding 60% attack success against frontier models with near-zero baselines. Strikingly, the degree of role confusion predicts attack success before a single token is generated. This mechanism generalizes beyond CoT Forgery to standard agent prompt injections, revealing prompt injection as a measurable consequence of role perception. To the model, sounding like a role is indistinguishable from being one. Project page and writeup: https://role-confusion.github.io

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

↑