The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)
Not on the map. Why?
Abstract (arXiv)
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 separation -- is 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 fine-tuned 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.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 14 of its 20 references that are in the map. First posted on arXiv 1 May 2025.
Builds on
14 of 20 references.
References · 14
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
- 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
- 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Gamecited by 135
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
- 2024Coercing LLMs to do and reveal (almost) anythingcited by 88
- 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
- 2023Ignore This Title and HackAPrompt: Exposing Systemic Vulnerabilities of LLMs through a Global Scale Prompt Hacking Competitioncited by 65
- 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchycited by 62
2 more
Built on by
Citing papers per year: 2025: 3; 2026: 3.
6 papers.
- 2026Prompt Injection as Role Confusioncited by 11
- 2025Beyond Pipelines: A Survey of the Paradigm Shift toward Model-Native Agentic AIcited by 8
- 2025The Narrative Continuity Test: A Conceptual Framework for Evaluating Identity Persistence in AI Systemscited by 3
- 2025Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMscited by 0
- 2026VATS: Exploiting Implicit Authority in Error-Path Injection via Systematic Mutationcited by 0
- 2026How Language Models Choose Sides: Internal Representations of Instruction Hierarchycited by 0
- 2026How Language Models Choose Sides: Internal Representations of Instruction Hierarchy16 Aug 2026
- 2026VATS: Exploiting Implicit Authority in Error-Path Injection via Systematic Mutation6 Jun 2026
- 2026Prompt Injection as Role Confusion22 Feb 2026
- 2025Context-Aware Hierarchical Learning: A Two-Step Paradigm towards Safer LLMs3 Dec 2025
- 2025The Narrative Continuity Test: A Conceptual Framework for Evaluating Identity Persistence in AI Systems28 Oct 2025
- 2025Beyond Pipelines: A Survey of the Paradigm Shift toward Model-Native Agentic AI19 Oct 2025