Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Training LLMs to Enforce Multi-Level Instruction Hierarchies via Gravity-Weighted Direct Preference Optimization

About

Production LLMs receive instructions from sources with very different levels of trust, yet attend to every token with uniform architectural privilege. This is the structural vulnerability that enables malicious prompt injections and, more broadly, leaves models without a principled way to resolve conflicts between legitimate but competing instructions. A common training-based response is to teach models an explicit instruction hierarchy; existing approaches, however, formalize hierarchies of only three or four levels, treat all violations as equally severe, and rarely evaluate the full set of pairwise level interactions. We formalize a k-level instruction hierarchy problem and instantiate it for k=5, yielding ten pairwise priority relations that a compliant model must enforce. We then introduce Gravity-Weighted DPO (GW-DPO), a preference-optimization objective whose per-sample offset scales with the structural distance between conflicting levels under a linear or bilateral schedule, the latter weighting severity by both the privilege gap and the privilege of the victim level. Combined with hierarchy-specific delimiter tokens (Chen et al., 2025) and Instructional Segment Embeddings (ISE; Wu et al., 2025), GW-DPO with the bilateral schedule Pareto-improves over standard DPO and the linear variant on Llama-3.1-8B-Instruct, raising macro pairwise priority adherence while keeping over-refusal at half the standard DPO rate. Ablations isolate ISE as a refusal-threshold calibrator and recast five- versus three-level training as a generality-specialization tradeoff.

Lena S. Bolliger, Lena A. J\"ager• 2026

Related benchmarks

TaskDatasetResultRank
Multi-turn Instruction FollowingMT-Bench
MT-Bench Score (GPT-4)7.425
137
Prompt Injection RobustnessTensorTrust hijacking and extraction (full dataset)
HRR98.1
8
Instruction-data separationSEP
Probe Execution Rate47.2
8
Instruction hierarchy resolution5-level evaluation suite 1.0 (full)
PPA (Macro)83.8
7
Safety EvaluationXSTest
Compliance (Safe)83.1
7
Showing 5 of 5 rows

Other info

Follow for update