Language models remain vulnerable to prompt injection attacks despite extensive safety training. We trace this failure to role confusion: models infer the source of text based on how it sounds, not where it actually comes from. A command hidden in a webpage hijacks an agent simply because it sounds like a user instruction. This is not just behavioral: in the model's internal representations, text that sounds like a trusted source occupies the same space as text that actually is one. We design role probes which measure how models internally perceive "who is speaking", showing that attacker-controllable signals (e.g. syntactic patterns, lexical choice) control role perception. We first test this with CoT Forgery, a zero-shot attack that injects fabricated reasoning into user prompts or ingested webpages. Models mistake the text for their own thoughts, yielding 60% attack success on StrongREJECT across frontier models with near-0% baselines. Strikingly, the degree of role confusion strongly predicts attack success. We then generalize these results to standard agent prompt injections, introducing a unifying framework that reframes prompt injection not as an ad-hoc exploit but as a measurable consequence of how models represent role.


翻译:尽管经过广泛的安全训练,语言模型仍易受提示注入攻击。我们将此缺陷归因于"角色混淆":模型根据文本的措辞风格而非实际来源推断其出处。隐藏在网页中的指令之所以能劫持智能体,仅仅因为其措辞风格类似用户指令。这不仅是行为层面的问题:在模型内部表征中,风格类似可信来源的文本与真实可信来源的文本占据相同的表征空间。我们设计了"角色探针"来测量模型内部如何感知"谁在说话",证明攻击者可控信号(如句法模式、词汇选择)能够控制角色感知。我们首先通过"思维链伪造"攻击测试该假设——这是一种零样本攻击,将捏造的推理过程注入用户提示或已摄取网页。模型将这些文本误判为自身思维,针对前沿模型的StrongREJECT攻击成功率高达60%,而基线攻击成功率接近0%。值得注意的是,角色混淆程度与攻击成功率呈现强相关性。随后我们将此结论推广至标准智能体提示注入,提出统一框架,将提示注入重新定义为模型表征角色方式的可量化后果,而非临时性漏洞利用行为。

0
下载
关闭预览

相关内容

大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大语言模型越狱攻击:模型、根因及其攻防演化
专知会员服务
22+阅读 · 2025年4月28日
如何提示?浙大最新《大型语言模型提示框架》综述
专知会员服务
83+阅读 · 2023年11月23日
《深度伪造与国际冲突》
专知会员服务
39+阅读 · 2023年10月27日
知识图谱嵌入的Translate模型汇总(TransE,TransH,TransR,TransD)
深度学习自然语言处理
31+阅读 · 2020年6月12日
什么是语义角色标注?
人工智能头条
18+阅读 · 2019年4月28日
注意力能提高模型可解释性?实验表明:并没有
黑龙江大学自然语言处理实验室
11+阅读 · 2019年4月16日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
跨越注意力:Cross-Attention
我爱读PAMI
172+阅读 · 2018年6月2日
一次 PyTorch 的踩坑经历,以及如何避免梯度成为NaN
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月20日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
6+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
3+阅读 · 6月21日
学习数据的几何:形状空间分析数学综述
专知会员服务
10+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
12+阅读 · 6月17日
相关资讯
知识图谱嵌入的Translate模型汇总(TransE,TransH,TransR,TransD)
深度学习自然语言处理
31+阅读 · 2020年6月12日
什么是语义角色标注?
人工智能头条
18+阅读 · 2019年4月28日
注意力能提高模型可解释性?实验表明:并没有
黑龙江大学自然语言处理实验室
11+阅读 · 2019年4月16日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
跨越注意力:Cross-Attention
我爱读PAMI
172+阅读 · 2018年6月2日
一次 PyTorch 的踩坑经历,以及如何避免梯度成为NaN
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员