Hierarchical Alignment: Enforcing Hierarchical Instruction-Following in LLMs through Logical Consistency
About
Large language models increasingly operate under multiple instructions from heterogeneous sources with different authority levels, including system policies, user requests, tool outputs, and retrieved context. While prior work on instruction hierarchy highlights the importance of respecting instruction priorities, it mainly focuses on adversarial attacks and overlooks the benign but common instruction conflicts that arise in real-world applications. In such settings, models must not only avoid security violations but also preserve task utility and behavioral consistency when instructions partially or implicitly conflict. We propose Neuro-Symbolic Hierarchical Alignment (NSHA) for hierarchical instruction-following by explicitly modeling and enforcing instruction priorities. At inference time, we introduce solver-guided reasoning that formulates instruction resolution as a constraint satisfaction problem, enabling the model to derive a maximally consistent set of applicable instructions under hierarchical constraints. At training time, NSHA distills solver-based decisions into model parameters using automatically constructed supervision. We evaluate our approach on rule following, task execution, tool use, and safety, covering both single-turn and multi-turn interactions, and show that NSHA significantly improves performance under such conflicts while maintaining competitive utility in reference settings.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Get Webpage | IHEval v1 (Reference) | Accuracy86 | 12 | |
| Prompt Extraction | IHEval Prompt Extraction 1.0 (Reference) | Accuracy96.9 | 12 | |
| Prompt Extraction | IHEval Prompt Extraction Alignment 1.0 | Accuracy83.7 | 12 | |
| Prompt Extraction | IHEval Prompt Extraction - Conflict 1.0 | Accuracy59.6 | 12 | |
| Prompt Hijacking | IHEval Prompt Hijacking 1.0 (Reference) | Accuracy97.5 | 12 | |
| Prompt Hijacking | IHEval Prompt Hijacking - Alignment 1.0 | Accuracy82.5 | 12 | |
| Prompt Hijacking | IHEval Prompt Hijacking Conflict 1.0 | Accuracy45 | 12 | |
| Safety Evaluation | IHEval Average 1.0 | Average Accuracy66.9 | 12 | |
| Get Webpage | IHEval Aligned v1 | Accuracy51.9 | 12 | |
| Get Webpage | IHEval v1 (Conflict) | Accuracy36.9 | 12 |