mlsanityData to 7 Oct 2026

The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)

arXiv 2505.00626 ↗First posted 1 May 2025cs.CL cs.AIcited by 6

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

  1. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  2. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
  3. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  4. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  5. 2024The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructionscited by 441
  6. 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
  7. 2023Tensor Trust: Interpretable Prompt Injection Attacks from an Online Gamecited by 135
  8. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
  9. 2024Coercing LLMs to do and reveal (almost) anythingcited by 88
  10. 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
  11. 2023Ignore This Title and HackAPrompt: Exposing Systemic Vulnerabilities of LLMs through a Global Scale Prompt Hacking Competitioncited by 65
  12. 2024Instructional Segment Embedding: Improving LLM Safety with Instruction Hierarchycited by 62
2 more
  1. 2023Assessing Prompt Injection Risks in 200+ Custom GPTscited by 49
  2. 2024PROMPTFUZZ: Harnessing Fuzzing Techniques for Robust Testing of Prompt Injection in LLMscited by 17

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 3.

6 papers.