Search papers, labs, and topics across Lattice.
This paper addresses the challenge of maintaining instruction hierarchies in Large Language Models (LLMs) during multi-turn interactions, where lower-priority directives can override higher-priority ones. By employing a Jensen-Shannon Divergence framework, the authors identify a role-influence inversion phenomenon that complicates multi-source input processing. The proposed IHDec method dynamically detects and corrects these hierarchy violations through contrastive decoding, outperforming training-based approaches while enhancing safety against adversarial prompts and maintaining response quality.
LLMs can be steered to respect instruction hierarchies in multi-turn dialogues without the need for costly fine-tuning, revealing a novel approach to mitigating role-influence inversion.
Large Language Models (LLMs) often fail to maintain instruction hierarchies (IH) when processing multi-source inputs with varying role-level priorities, paradoxically adhering to lower-priority directives during conflicts. While existing defenses mitigate this issue, they are largely restricted to single-turn scenarios and require expensive fine-tuning. In this paper, we formalize this failure mode in multi-turn contexts via a Jensen-Shannon Divergence (JSD) framework, uncovering a pervasive role-influence inversion phenomenon where subordinate inputs override superior roles. To rectify this without training, we propose IHDec (Instruction Hierarchy-steered Decoding). IHDec leverages JSD to automatically detect token-level hierarchy violations and dynamically executes contrastive decoding to suppress misaligned subordinate roles. Extensive evaluations demonstrate that IHDec outperforms training-based baselines in multi-turn conflicts while fully preserving general response quality. Furthermore, IHDec strengthens safety against adversarial prompt injections and exhibits a robust scaling synergy with larger models. The Code is available at https://github.com/nxcolelxu/IHDec.git