arXiv:2601.06431cs.AI2026-01

让大模型更懂复杂指令的逻辑结构,提升遵循能力。

LsrIF: Enhancing Logic-Structured Instruction Following of Large Language Models

  • 按逻辑结构组织约束条件,构建更具真实性的训练数据。
  • 根据执行语义动态调整奖励,提升多约束指令遵循准确率。
  • 适合需要精确理解复杂指令的应用场景,如自动化任务规划。

指令遵循对大语言模型至关重要,但现实中的指令常包含多重约束及其逻辑结构,如并行组合、顺序依赖和条件分支。现有方法通常简单拼接约束,并在训练中平均各项约束得分,忽略了逻辑依赖关系,引入噪声信号。我们提出 LsrIF,一种面向逻辑结构化指令遵循的训练框架。LsrIF 将原子约束组织为并行、顺序、条件及嵌套结构,并采用与执行语义一致的结构感知奖励聚合策略:并行约束平均奖励,顺序结构中早期失败后衰减后续奖励,条件结构仅奖励活跃分支。实验表明,LsrIF 在域内和域外设置下均提升了指令遵循能力,同时增强逻辑推理表现。进一步分析显示,逻辑结构化训练提高了模型对约束相关标记和逻辑连接词的关注度,表明其更有效地建模了指令逻辑。我们将公开数据与代码以支持未来研究。

原文摘要 · Abstract (English)

Instruction following is critical for large language models, yet real-world instructions often involve multiple constraints with logical structures, such as parallel composition, sequential dependencies, and conditional branching. Existing methods typically construct data by simply combining constraints and aggregate rewards by averaging individual constraint scores during training, overlooking logical dependencies and introducing noisy signals. We propose LsrIF, a training framework for logic-structured instruction following. LsrIF constructs data by organizing atomic constraints into parallel, sequential, conditional, and nested structures, and applies structure-aware reward aggregation aligned with their execution semantics: averaging rewards for parallel constraints, decaying later rewards after early failures in sequential structures, and rewarding only active branches in conditional structures. Experiments show that LsrIF improves instruction following in both in-domain and out-of-domain settings while also benefiting logic reasoning. Further analysis indicates that logic-structured training increases attention to constraint-related tokens and logical connectors, suggesting improved modeling of instruction logic. We will release our data and code for future research.

指令遵循逻辑结构奖励设计大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。