Saved in:
Bibliographic Details
Main Authors: Wang, Zihao, Jiang, Yibo, Yu, Jiahao, Huang, Heqing
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.00626
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912360073003008
author Wang, Zihao
Jiang, Yibo
Yu, Jiahao
Huang, Heqing
author_facet Wang, Zihao
Jiang, Yibo
Yu, Jiahao
Huang, Heqing
contents 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 \emph{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 \emph{role-separation learning}: the process of teaching LLMs to robustly distinguish system and user tokens. Through a \emph{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 \emph{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.
format Preprint
id arxiv_https___arxiv_org_abs_2505_00626
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)
Wang, Zihao
Jiang, Yibo
Yu, Jiahao
Huang, Heqing
Computation and Language
Artificial Intelligence
68T50
I.2
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 \emph{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 \emph{role-separation learning}: the process of teaching LLMs to robustly distinguish system and user tokens. Through a \emph{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 \emph{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.
title The Illusion of Role Separation: Hidden Shortcuts in LLM Role Learning (and How to Fix Them)
topic Computation and Language
Artificial Intelligence
68T50
I.2
url https://arxiv.org/abs/2505.00626