The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)
Zihao Wang, Yibo Jiang, Jiahao Yu, Heqing Huang
摘要
Large language models (LLMs) that integrate multiple input roles (e.g., system instructions, user queries, external tool outputs) are increasingly prevalent in practice. Ensuring that the model accurately distinguishes messages from each role -a concept we call role separationis crucial for consistent multi-role behavior. Although recent work often targets state-of-the-art prompt injection defenses, it remains unclear whether such methods truly teach LLMs to differentiate roles or merely memorize known triggers. In this paper, we examine role-separation learning: the process of teaching LLMs to robustly distinguish system and user tokens. Through a simple, controlled experimental framework, we find that finetuned models often rely on two proxies for role identification: (1) task type exploitation, and (2) proximity to begin-of-text. Although data augmentation can partially mitigate these shortcuts, it generally leads to iterative patching rather than a deeper fix. To address this, we propose reinforcing invariant signals that mark role boundaries by adjusting token-wise cues in the model's input encoding. In particular, manipulating position IDs helps the model learn clearer distinctions and reduces reliance on superficial proxies. By focusing on this mechanism-centered perspective, our work illuminates how LLMs can more reliably maintain consistent multi-role behavior without merely memorizing known prompts or triggers.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficient Streaming Language Models with Attention Sinks 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy 引用了 Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game
- PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Training 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- DRIP: Defending Prompt Injection via Token-wise Representation Editing and Residual Fusion 引用了 Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy
- Prompt Injection as Role Confusion 引用了 Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy
- Prompt Injection as Role Confusion 引用了 Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game
- Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMs 引用了 Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchy
- Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMs 引用了 Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game
引用它的顶会 Paper3
- Prompt Injection as Role ConfusionCharles Ye, Jasmine Cui, Dylan Hadfield-MenellICML 2026 · 6 次引用
- DRIP: Defending Prompt Injection via Token-wise Representation Editing and Residual FusionRuofan Liu, Yun Lin, Zhiyong Huang, Jin Song DongCCS 2026 · 3 次引用
- Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMsTengyun Ma, Jiaqi Yao, Daojing He, Shihao Peng 等NeurIPS 2025
它引用的 Paper6
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
- Tensor Trust: Interpretable Prompt Injection Attacks from an Online GameSam Toyer, Olivia Watkins, Ethan Adrian Mendes, Justin Svegliato 等ICLR 2024 · 123 次引用
- PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise TrainingDawei Zhu, Nan Yang, Liang Wang, Yifan Song 等ICLR 2024 · 110 次引用
- Instructional Segment Embedding: Improving LLM Safety with Instruction HierarchyTong Wu, Shujian Zhang, Kaiqiang Song, Silei Xu 等ICLR 2025
相关 Paper
- Defenses Against Prompt Attacks Learn Surface HeuristicsShawn Li, Chenxiao Yu, Zhiyu Ni, Hao Li 等ACL 2026 · 8 次引用
- ASIDE: Architectural Separation of Instructions and Data in Language ModelsEgor Zverev, Evgenii Kortukov, Alexander Panfilov, Alexandra Volkova 等ICLR 2026 · 28 次引用
- Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?Egor Zverev, Sahar Abdelnabi, Soroush Tabesh, Mario Fritz 等ICLR 2025
- LocalAlign: Enabling Generalizable Prompt Injection Defense via Generation of Near-Target Adversarial Examples for Alignment TrainingYuyang Gong, Zihao Wang, Jiawei Liu, XiaoFeng WangCCS 2026 · 1 次引用
- Control Illusion: The Failure of Instruction Hierarchies in Large Language ModelsYilin Geng, Haonan Li, Honglin Mu, Xudong Han 等AAAI 2026 · 21 次引用
