HIPO: Instruction Hierarchy via Constrained Reinforcement Learning
Organizations: School of ECEE Arizona State University · Department of ECE The Ohio State University · Computer Science Department University of Houston · College of Engineering & Applied Science CU Boulder ·
Abstract
Hierarchical Instruction Following (HIF) refers to the problem of prompting large language models with a priority-ordered stack of instructions. Standard methods like RLHF and DPO typically fail in this problem since they mainly optimize for a single objective, failing to explicitly enforce system prompt compliance. Meanwhile, supervised fine-tuning relies on mimicking filtered, compliant data, which fails to establish the priority asymmetry at the algorithmic level. In this paper, we introduce HIPO, a novel alignment framework that formulates HIF as a Constrained Markov Decision Process. HIPO elevates system prompts from mere input context to strict algorithmic boundaries. Using a primal-dual safe reinforcement learning approach, the algorithm dynamically enforces system prompt compliance as an explicit constraint, maximizing user utility strictly within this feasible region. Extensive evaluations across diverse model architectures (e.g., Qwen, Phi, Llama) demonstrate that HIPO significantly improves both system compliance and user utility. Furthermore, mechanistic analysis reveals that this constrained optimization autonomously drives the model to shift its attention toward long-range system tokens, providing a principled foundation for reliable LLM deployment in complex workflows.
Figures & tables
| Method | Conflicting Split | Aligned Split | ||||||||
| QW-1.7B | QW-4B | Phi-3.8B | LL-3B | QW-8B | QW-1.7B | QW-4B | Phi-3.8B | LL-3B | QW-8B | |
| Base | 0.56 / 0.26 | 0.64 / 0.32 | 0.58 / 0.28 | 0.61 / 0.35 | 0.60 / 0.27 | 0.59 / 0.35 | 0.68 / 0.39 | 0.64 / 0.43 | 0.67 / 0.39 | 0.67 / 0.37 |
| SFT | 0.60 / 0.36 | 0.61 / 0.41 | 0.59 / 0.45 | 0.63 / 0.38 | 0.66 / 0.38 | 0.65 / 0.55 | 0.70 / 0.61 | 0.69 / 0.61 | 0.64 / 0.56 | 0.67 / 0.56 |
| DPO | 0.57 / 0.32 | 0.65 / 0.37 | 0.63 / 0.36 | 0.64 / 0.31 | 0.65 / 0.33 | 0.63 / 0.37 | 0.65 / 0.42 | 0.67 / 0.47 | 0.64 / 0.39 | 0.68 / 0.38 |
| S-SM | 0.57 / 0.21 | 0.65 / 0.31 | 0.52 / 0.33 | 0.62 / 0.35 | 0.61 / 0.30 | 0.60 / 0.27 | 0.66 / 0.39 | 0.63 / 0.49 | 0.64 / 0.46 | 0.64 / 0.36 |
| FL | 0.55 / 0.22 | 0.60 / 0.25 | 0.51 / 0.14 | 0.52 / 0.18 | 0.58 / 0.29 | 0.61 / 0.27 | 0.61 / 0.37 | 0.54 / 0.18 | 0.51 / 0.21 | 0.63 / 0.37 |
| Method | MMLU-Redux ( ) | WildJailbreak | DirectRequest | HumanJailbreaks | |
| ASR ( ) | Over-refusal ( ) | ASR ( ) | ASR ( ) | ||
| Base | 0.5946 | 0.4845 0.3060 | 0.0238 0.0762 | 0.1625 0.1000 | 0.3581 0.2725 |
| SFT | 0.5784 | 0.5685 0.3250 | 0.0190 0.2809 | 0.2219 0.0531 | 0.2806 0.1938 |
| DPO | 0.5882 | 0.4485 0.2765 | 0.0142 0.0762 | 0.1750 0.1000 | 0.3544 0.2831 |
| FL | 0.5923 | 0.4630 0.3005 | 0.0333 0.0667 | 0.1563 0.1094 | 0.3394 0.2719 |
| HIPO | 0.5916 | 0.4230 0.2255 | 0.0286 0.0857 | 0.1375 0.0656 | 0.2538 0.1944 |
| Metric | Base | HIPO |
| Attention Decay Metrics | ||
| Centroid | 0.7159 | 0.7210 +0.0051 |
| FarMass | 0.6362 | 0.6418 +0.0056 |
| NearMass | 0.2083 | 0.2034 -0.0049 |
| FarNearRatio | 3.1703 | 3.2746 +0.1043 |
| Span Attention Quality | ||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | DeepSeek | Claude | GPT-4o | Qwen-Plus |
| Base | 0.575 / 0.302 | 0.301 / 0.233 | 0.531 / 0.163 | 0.399 / 0.207 |
| SFT | 0.624 / 0.466 | 0.527 / 0.420 | 0.659 / 0.427 | 0.570 / 0.397 |
| DPO | 0.597 / 0.344 | 0.293 / 0.243 | 0.549 / 0.138 | 0.384 / 0.233 |
| Split-Softmax | 0.583 / 0.236 | 0.299 / 0.159 | 0.583 / 0.236 | 0.368 / 0.130 |
| FocalLoRA | 0.582 / 0.240 | 0.297 / 0.184 | 0.474 / 0.096 | 0.365 / 0.166 |
| Sys-only | 0.745 / 0.232 | 0.504 / 0.219 | 0.572 / 0.040 | 0.549 / 0.132 |
| DS | G4o | G4o-M | Grk | Qw-P | |
| DS | 1.000 | 0.793 | 0.686 | 0.753 | 0.840 |
| G4o | 0.793 | 1.000 | 0.856 | 0.836 | 0.920 |
| G4o-M | 0.686 | 0.856 | 1.000 | 0.760 | 0.770 |
| Grk | 0.753 | 0.836 | 0.760 | 1.000 | 0.829 |
| Qw-P | 0.840 | 0.920 | 0.770 | 0.829 | 1.000 |
| Hyperparameter | Value |
| Training & Hardware Setup | |
| Base Models | Open-weight LLMs |
| Reference Model | Frozen |
| Quantization | 4-bit NF4 |
| Hardware | NVIDIA A100 / H100 GPUs |
| Precision | bfloat16 |
LLM Alignment
Large language model alignment studies methods for making models follow human intentions, values, and safety constraints across contexts.
See all 611 papers