Where the instruction hierarchy fails: diagnosis and repair of reasoning language model failuresWhere Instruction Hierarchy Breaks: Diagnosing and Repairing Failures in Reasoning Language Models
The authors propose a three-stage white-box diagnostic framework for instruction hierarchy failures and present two training-free self-monitoring mechanisms, PIM/SOM; the authors state that the strongest monitor reduces rule-following violations by 81–99%.
White-box model development setting: the attacker injects content conflicting with high-privilege instructions via low-privilege user messages or tool outputs (including indirect prompt injection and adaptive PAIR attacks); the defender can read the target model's reasoning trace and use the same model for input/output monitoring.
- Instruction hierarchy requires the model to obey the highest-privilege instruction when instructions conflict, but existing benchmarks only make end-to-end judgments, cannot distinguish at which stage the violation occurs, and are also difficult to use for guiding fixes.
- The authors decompose instruction hierarchy compliance into three stages—instruction recognition, conflict resolution, and response realization—and use reasoning traces to localize the first failing stage; they also propose two training-free self-monitoring mechanisms: parallel input monitoring PIM and serial output monitoring SOM.
- On IHEval-Long, the authors state that the dominant failure mode varies with model, task, and context length; SOM reduces rule-following violations for the three models by 81–99%, and under adaptive PAIR attacks GPT-5.3's PIM reduces attack success by 45%; on AgentDojo, Gemma's ASR drops from 3.69% to 0.00%.
- The authors note that PIM may miss failures visible only in the final response, and that SOM adds serial latency and may let string-level violations through; the evaluation is limited to the benchmarks and models used in the paper, and differences in adaptive attacks, chat templates, and tool interfaces may expose more failure modes.
- Evaluated models
- Gemma-4-31B-ITClaude Sonnet 4.6Qwen3.6-35B-A3BGPT-5.3
- Benchmarks
- IHEval-LongIHChallenge-LongAgentDojo
- Metrics
- non-compliance rateASRutilityTPRUWRlatency
The researchers propose a white-box diagnostic framework that localizes instruction hierarchy failures in reasoning language models into three stages: instruction recognition, conflict resolution and response realization, and propose two training-free self-monitoring mechanisms. The framework is evaluated on long-context adapted versions of IHEval and IHChallenge with Gemma-4-31B-IT, Qwen3.6-35B-A3B and Claude Sonnet 4.6, finding that the dominant failure modes vary with model, task and context length. Based on the observation that models can usually detect conflicts and output violations when explicitly prompted, the authors design a parallel input monitor for low-latency conflict detection before generation and a sequential output monitor for response-level review and repair; on Gemma-4-31B-IT, Claude Sonnet 4.6 and GPT-5.3, the strongest monitor reduces rule-following violation rates by 81-99%, with GPT-5.3 reducing them by 86% under static attacks and by 45% under adaptive attacks.
Paper analysis
What problem does this paper attempt to solve?
End-to-end evaluation cannot localize at which stage an instruction hierarchy violation occurs; the authors propose staged diagnosis and self-monitoring repair.
Core problem: when a model violates the instruction hierarchy (IH), existing end-to-end benchmarks can only see the final response violation and cannot distinguish at which stage the failure occurs.
- Scenario and importance: Reasoning models acting as agents over long contexts, calling tools, and encountering untrusted external data receive instructions of different privilege levels, such as system prompts, user requests, conversation history, and tool outputs. The authors consider prompt injection, privilege escalation, and many jailbreaks to be cases of failing to maintain privilege ordering.
- Shortcomings of existing methods: Benchmarks such as IHEval and IH-Challenge only judge whether the final response obeys the highest-privilege instruction; the authors state that the same violating response may originate from different failure stages, and end-to-end results are difficult to use directly for guiding model improvement.
- Core observation: IH following is a multi-stage process—identifying relevant instructions, resolving conflicts by privilege, and realizing the resolution in the response; the reasoning traces exposed by reasoning models make white-box localization of the failure stage possible. The authors also observe that when conflict detection is made a separate focused task, models can often detect the conflict even if the main thread has already violated (Figure 4).
- What the paper proposes: A diagnostic framework that localizes violations to three stages—instruction identification, conflict resolution, and response realization; long-context adaptations of IHEval and IH-Challenge; and two training-free self-monitoring mechanisms, PIM and SOM.
- Threat model:
- Attacker goal: make the model obey low-privilege instructions and violate high-privilege instructions (e.g., leaking a protected string).
- Attacker capability: control the content of low-privilege user messages or tool outputs; in adaptive experiments the attacker (Gemma-4-31B-IT) can see a redacted preview of the defender's context and iterate on attack payloads, but cannot see the defender's reasoning trace or the content of the protected system prompt (Appendix A).
- Defender knowledge: white-box model development setting, able to read the target model's reasoning trace.
- Victim system: a reasoning language model agent that receives messages from multiple sources.
What related research exists?
Related work falls into four categories: IH benchmarks, prompt injection and agent safety evaluation, long-context robustness, and injection defenses.
Instruction hierarchy evaluation and training
- Wallace et al. (2024)—proposes the instruction hierarchy framework and shows that fine-tuning on synthetic conflict scenarios can improve robustness to conflicts between higher- and lower-privilege instructions.
- IHEval (Zhang et al., 2025), IHChallenge (Guo et al., 2026), HieraBench (Jiang et al., 2026), ManyIH-Bench (Zhang et al., 2026)—evaluate whether models follow the hierarchy under controlled conflicts; the paper notes that they mainly score only final compliance and do not distinguish at which stage failures occur.
- RealGuardrails, System IFEval (Mu et al., 2025), TensorTrust (Toyer et al., 2024)—system prompt robustness and prompt injection evaluation, testing whether models maintain higher-privilege constraints under adversarial lower-privilege inputs.
Prompt injection and agent safety evaluation
- Greshake et al. (2023)—demonstrates indirect prompt injection: retrieved documents or tool outputs can carry malicious instructions.
- AgentDojo (Debenedetti et al., 2024), InjecAgent (Zhan et al., 2024)—evaluate tool-using agents' ability to resist injection while completing normal tasks; the paper notes that such benchmarks report only attack success or task success and do not distinguish misrecognition, misresolution, or realization failures.
Long-context and multi-turn robustness
- Hong et al. (2025)—shows that model performance degrades as context grows longer (context rot).
- Russinovich et al. (2025), Weng et al. (2025), Li et al. (2024), Ren et al. (2024)—multi-turn progressive and adaptive jailbreaks, exposing failures not visible in single-turn evaluation.
Defenses and enforcement mechanisms
- Input marking (spotlighting, Hines et al., 2024), injection classifiers and guardrails (ProtectAI, 2024; InjecGuard, Li and Liu, 2024; DataSentinel, Liu et al., 2025; PromptArmor, Shi et al., 2025), hierarchy-aware detectors (AlignSentinel, Jia et al., 2026), system-level agent defenses (CaMeL, Debenedetti et al., 2025; DRIFT, Li et al., 2025), reasoning guidance (Wu et al., 2025). The paper states that these methods typically require external filtering, specially trained detectors, or changes to the agent runtime.
Baselines and benchmarks: the controls in the intervention experiments are Baseline (no defense) and Warn (appending a fixed hierarchy reminder after the conflicting user message; prompts in Appendix H); the evaluation benchmarks are IHEval-Long, IHChallenge-Long, and AgentDojo.
The authors position this paper as complementary: it does not replace end-to-end benchmarks but adapts them to long context and uses white-box reasoning traces to classify violations into interpretable failure modes; for defense it reuses the model's own focused detection capability, requiring no training and low additional overhead.
How does the paper address this problem?
Formalize IH following as three stages—identification, resolution, and realization—use reasoning traces to localize failures, and then use PIM/SOM for self-monitoring on the input side and output side.
Overall approach: first formalize instruction hierarchy compliance as a three-stage process, using reasoning traces to localize violations to the first failing stage; then, based on the observation that "the model as a focused detector can often spot conflicts," use the same model for training-free monitoring before and after generation.
Formalization and three-stage decomposition
- Messages carry privilege levels, with the total order sys ≻ user ≻ history ≻ tool (Equation 1); messages in context are interpreted as instruction components and data components, and the same tool message can be mere data under one user request and implicitly instructional under another (Figure 2).
- Active instruction set
A(C) = I(C) \setminus \{i \in I(C) \mid \exists j \in I(C), \ell_j \succ \ell_i, j \text{ conflicts with } i\}, i.e., the set of instructions not overridden by a higher-privilege conflicting instruction. - The three failure modes are defined by the first stage that goes wrong and are mutually exclusive: recognition failure (the trace omits or misstates instructions relevant to the active set), resolution failure (recognition is correct but the active set is computed incorrectly, e.g., wrong priority used), realization failure (the trace reaches the correct decision but the final response violates it).
Long-context benchmark construction
- IHEval-Long: keeps the higher-privilege system instruction, conflicting user instruction, and programmatic checker of IHEval single-turn conflict samples, inserting only 0, 4, or 8 turns of benign dialogue from Nemotron-Instruction-Following-Chat-v1 between them (Appendix A).
- Scale: 541 items per context depth in the rule-following subset, and 1,860 items per depth in the safety subset (user prompt hijacking, system prompt extraction).
- IHChallenge-Long: takes the single-constraint subset and extends benign dialogue to 8 turns for adaptive PAIR attacks; a buried-system-prompt variant is also included, burying the protected instruction in neutral system text.
Diagnostic procedure
- Each sample runs the target model only once, recording the reasoning trace r and final response y; compliance is first judged with the original IHEval checker, and compliant samples are not diagnosed further.
- Violating samples first undergo validity adjudication (whether the checker failure is clearly entailed by a visible higher-privilege instruction), and invalid samples are removed; a diagnostic judge then assigns atomic labels to the trace, deterministically mapped to the first failing stage (Appendix I gives the judge prompts).
PIM and SOM
- PIM (parallel input monitoring): while the main thread executes speculatively, a second model thread checks whether the latest lower-privilege message conflicts with a higher-privilege instruction; if a conflict is detected, the speculative output is discarded, a warning is injected, and the main thread restarts (Figure 5). It covers only the input side and cannot catch realization failures.
- SOM (serial output monitoring): the model first drafts a response, then checks whether the draft violates a higher-privilege instruction; if a violation is detected, feedback is given and the model rewrites (Figure 6). It covers all three failure modes but adds one serial call per query.
- Both use the same model and shared context rather than a separate guardrail model, which the authors state allows reuse of the KV-cache; Appendix H gives the full monitoring prompts.
Success determination
- Compliance uses the programmatic checkers of IHEval/IHChallenge; PAIR attack success is defined as the defender's final response violating the protected higher-privilege instruction; monitor quality is measured by TPR on conflict samples and unnecessary warning rate UWR on aligned control samples.
What experiments did the paper conduct?
Diagnose failure modes of three models on IHEval-Long, then evaluate PIM/SOM on four models under static attacks, adaptive attacks, and AgentDojo.
Experimental Setup
- Models tested: Diagnostic experiments use Gemma-4-31B-IT, Qwen3.6-35B-A3B, and Claude Sonnet 4.6; intervention experiments additionally include GPT-5.3.
- Benchmarks: IHEval-Long (541 rule-following items per depth, 1,860 safety items per depth, with 0/4/8 inserted turns); IHChallenge-Long (10 items from each of 16 categories for PAIR); AgentDojo (Appendix F).
- Baselines: Baseline (no defense) and Warn (fixed hierarchy reminder).
- Metrics: compliance rate/violation rate, three-stage failure distribution, monitor TPR and UWR, AgentDojo utility and ASR, latency.
- Evaluation method: a programmatic checker judges compliance; validity adjudication and failure-mode diagnosis are done by structured review prompts (Appendix I); the paper does not state which model was used for review.
- Number of repetitions: main experiments run each sample once; latency measurement repeats each sample 5 times (Appendix G).
Main Results
Figure 3 gives the failure counts for the three models under 0/4/8 inserted turns (numbers on bars are diagnosed failure counts, normalized over all samples):
Swipe horizontally to read the table
Model Task 0 turns 4 turns 8 turns Gemma-4-31B-IT Rule following 5 59 105 Gemma-4-31B-IT Safety 10 13 21 Claude Sonnet 4.6 Rule following 93 173 181 Claude Sonnet 4.6 Safety 58 74 88 Qwen3.6-35B-A3B Rule following 300 390 406 Qwen3.6-35B-A3B Safety 154 194 232 (According to Figure 3; denominators are 541 and 1,860 respectively)
- The authors state that increasing the spacing of conflicting instructions generally raises the violation rate, more noticeably on rule-following tasks.
- The authors state that the dominant failure mode varies by model, task, and context length: Gemma shifts toward identification failure on rule following as context grows longer; Qwen shifts from predominantly resolution failure at 0 turns to predominantly identification failure under long context; Claude's safety violations are predominantly realization failures, while Qwen's safety violations are predominantly resolution failures.
- The authors give a safety sample: the model writes in its trace that the response must not contain the access code, yet the final response still translates it into pseudocode, which is a realization failure.
Interventions under Static Attacks (Figure 7)
- On rule following, the authors state that all interventions reduce violations: Warn already cuts them substantially, PIM reduces them further, and SOM is strongest, reducing them by 81–99% relative to baseline (three models).
- The composition of residual failures shifts toward realization failures; on safety tasks the results are more mixed: on Claude Sonnet 4.6, Warn may actually be harmful, and although PIM/SOM outperform baseline they still leave many failures, which the authors attribute to the monitor often accepting refusals that still cite the protected phrase.
Adaptive PAIR Attacks (Figure 8, IHChallenge-Long)
- Gemma-4-31B-IT: PIM reduces attack success by 56%, SOM by 49%; GPT-5.3: PIM reduces it by 45%, SOM by 30%; Claude Sonnet 4.6 gains less, and Warn actually makes it worse.
- The detection bars show: PIM triggered on almost all residual successful attacks, from which the authors conclude that many PIM failures are failures after detection; SOM triggered on only a smaller proportion of successful attacks, from which the authors conclude that many adaptive successes are because drafts were accepted as compliant.
AgentDojo and Monitor Quality
- AgentDojo (Table 4): Gemma-4-31B-IT baseline ASR 3.69%, utility 89.46%; both PIM and SOM reduce ASR to 0.00%, utility 89.99%; GPT-5.3 baseline ASR 0.53%, 0.00% after PIM and 0.42% after SOM; Claude Sonnet 4.6 baseline ASR is already 0.00%.
- Monitor trigger rates (Table 2): on rule following, PIM TPR is 98.2%–99.6% and SOM TPR is 88.7%–97.6%; on safety, Claude Sonnet 4.6's SOM TPR is 73.5% and UWR is 20.8% (330/1590), while the other models' UWR is mostly 0.0%–2.4%.
- Alignment utility (Table 3, Gemma, 8 turns): PIM reduces alignment utility by 0.52 percentage points, SOM by 0.14 percentage points.
Other Ablations and Analyses
- Motivation experiment (Figure 4): Gemma's compliance rate on the language conflict task drops from 61.7% (1 turn) to 0.0% (8 turns), while the Detect-input and Detect-output curves remain near-perfect detection (the authors call it near-perfect).
- Latency (Appendix G, Gemma, 96 alignment samples, vLLM, 8×H100): median latency is 46.8s for baseline, 54.8s for PIM (+17%), and 69.4s for SOM (+48%); the 95th percentile rises from 116.5s to 125.9s (PIM) and 154.5s (SOM).
- Exceptions and negative results: Claude Sonnet 4.6 gets worse under Warn and has many residual failures on safety tasks; Qwen has the highest failure counts among the three models at every depth on rule following (Figure 3).
What are some points that can be further explored?
The authors list limitations of the monitor and evaluation scope; experiments cover four models and three benchmarks, and the judge model and some settings are not reported.
Limitations and future directions noted by the authors
- PIM relies on the monitor reliably following the conflict-detection prompt and may miss failures visible only in the final response (Section 6).
- SOM adds serial latency and may accept responses that satisfy the monitor but violate string-level or safety constraints (Section 6).
- Evaluation is limited to the benchmarks and models studied in the paper; stronger adaptive attacks, different chat-template behaviors, or deployment-specific tool interfaces may expose more failure modes (Section 6).
Experimental coverage
- Diagnostic experiments cover 3 models (Gemma-4-31B-IT, Qwen3.6-35B-A3B, Claude Sonnet 4.6); intervention experiments add GPT-5.3 for a total of 4 (Sections 3, 4).
- Benchmarks are IHEval-Long, IHChallenge-Long, and AgentDojo; IHEval-Long has 541 rule-following items per depth and 1,860 safety items per depth, and the PAIR experiment has 10 items each across 16 categories (Section 3, Appendix A).
- The only adaptive attack is PAIR, with the attacker fixed as Gemma-4-31B-IT and at most 8 iterations per sample (Appendix A).
- Each sample is rolled out only once; latency measurements are repeated 5 times on 96 aligned samples (Section 3, Appendix G).
- The paper does not report the judge model used for validity adjudication and failure-mode diagnosis, nor the agreement between the judge and human annotation (Appendix I gives only the prompts).
Summarize the main content of the paper
A three-stage diagnostic framework localizes instruction hierarchy failures, and PIM/SOM training-free self-monitoring substantially reduces violations, but failure modes vary by model and task.
A paper on diagnosis and defense for instruction hierarchy (IH) compliance: it decomposes end-to-end violation determination into interpretable stage failures and uses the model's own detection capability for training-free repair.
- Problem: existing IH benchmarks only judge whether the final response obeys the highest-privilege instruction, and cannot distinguish which stage a violation comes from, making it hard to guide improvement.
- Method: formalizes IH compliance into three stages—instruction recognition, conflict resolution, and response realization—and uses reasoning traces to localize violations to the first failing stage; constructs IHEval-Long and IHChallenge-Long, inserting 0/4/8 turns of benign dialogue between conflicting instructions; proposes parallel input monitoring PIM and serial output monitoring SOM.
- Diagnostic findings: the authors state that the dominant failure mode varies with model, task, and context length—Qwen3.6-35B-A3B shifts on rule following from predominantly resolution failures to predominantly recognition failures (406/541 failures at 8 turns), and Claude Sonnet 4.6's safety violations are predominantly realization failures (Figure 3).
- Intervention effects: SOM reduces rule-following violations for three models by 81–99% relative to baseline; under adaptive PAIR attacks, PIM reduces GPT-5.3 attack success by 45%; on AgentDojo, Gemma-4-31B-IT's ASR drops from 3.69% to 0.00% while utility is maintained (Table 4).
- Costs and exceptions: SOM increases median latency by 48% and PIM by 17% (Appendix G); Claude Sonnet 4.6 gets worse under Warn, and on safety tasks the monitor often accepts refusals that still cite the protected phrase.
- Authors' conclusion: decomposing aggregated IH errors into stage failures can indicate which model capability should be strengthened; no single training-free mechanism can uniformly repair all hierarchy failures.