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

📄 arXiv: 2606.10860v1 📥 PDF

作者: Lena S. Bolliger, Lena A. Jäger

分类: cs.CR, cs.CL

发布日期: 2026-06-09


💡 一句话要点

提出重力加权直接偏好优化以解决多层指令层次问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)

关键词: 大型语言模型 指令层次 偏好优化 重力加权 自然语言处理 模型训练 安全性

📋 核心要点

  1. 现有方法在处理多层指令时,通常只考虑三到四层的层次结构,且对违规行为的严重性处理不够细致,导致模型在冲突指令下表现不佳。
  2. 本文提出了重力加权直接偏好优化(GW-DPO),通过引入 k=5 的指令层次结构和基于结构距离的偏好优化,提升模型对指令优先级的遵循能力。
  3. 实验结果表明,GW-DPO 在 Llama-3.1-8B-Instruct 上显著提高了宏观优先级遵循率,同时将过度拒绝率降低至标准 DPO 的一半。

📝 摘要(中文)

生产级大型语言模型(LLMs)接收来自不同信任级别的指令,但在处理时对每个标记的权重相同,这导致了模型在面对恶意提示注入时的结构性脆弱性。现有方法通常只 formalize 三到四层的指令层次,且对所有违规行为的严重性处理相同,缺乏对层级间交互的全面评估。本文提出了一个 k 层指令层次问题,并针对 k=5 进行了实例化,定义了十个需要遵循的优先关系。我们引入了重力加权直接偏好优化(GW-DPO),其样本偏移量根据冲突层级间的结构距离进行调整,结合特定的分隔符标记和指令段嵌入,GW-DPO 在 Llama-3.1-8B-Instruct 上实现了优于标准 DPO 的效果。

🔬 方法详解

问题定义:本文旨在解决大型语言模型在处理来自不同信任级别的指令时,缺乏有效的层次优先级管理的问题。现有方法通常只考虑少数层级,且对违规行为的严重性处理不够细致,导致模型在冲突指令下表现不佳。

核心思路:论文提出了一个 k 层指令层次问题,并针对 k=5 进行了实例化,定义了十个需要遵循的优先关系。通过引入重力加权直接偏好优化(GW-DPO),模型能够根据冲突层级间的结构距离动态调整偏好,提升对指令优先级的遵循能力。

技术框架:整体架构包括指令层次的定义、GW-DPO 优化目标的设计,以及结合特定的分隔符标记和指令段嵌入的实现。模型通过这些模块共同作用,提升对多层指令的处理能力。

关键创新:最重要的技术创新点在于引入了 k=5 的指令层次结构和重力加权的偏好优化机制,使得模型能够更细致地处理不同层级指令间的冲突,显著提升了模型的遵循能力。

关键设计:在 GW-DPO 中,样本偏移量根据冲突层级间的结构距离进行调整,采用线性或双边调度,后者根据特权差距和受害层级的特权加权严重性。此外,指令段嵌入(ISE)被用作拒绝阈值的校准器。实验中还探讨了五层与三层训练的通用性与专业化权衡。

📊 实验亮点

实验结果显示,GW-DPO 在 Llama-3.1-8B-Instruct 上实现了宏观优先级遵循率的显著提升,同时将过度拒绝率降低至标准 DPO 的一半,展现了其在多层指令处理中的有效性。

🎯 应用场景

该研究的潜在应用领域包括智能助手、自动化客服和其他需要处理多层次指令的自然语言处理任务。通过提升模型对指令优先级的遵循能力,可以显著提高用户体验和系统的安全性,减少恶意提示注入的风险。

📄 摘要(原文)

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.