让大模型学会按步骤推理规则,解决复杂任务中的逻辑混乱问题。
Beyond Factual Knowledge: Benchmarking and Learning Step-Level Procedural Rule Reasoning in Large Language Models

- 将规则抽象为可复用单元,通过动态注意力机制实现逐步推理。
- 在1万条规则下达到85%以上召回率,准确率提升最高达19点。
- 适合需要精确逻辑推理的AI系统开发与评测人员。
大型语言模型在文本理解与生成方面表现优异,但在大规模应用外部程序性规则时仍存在可靠性不足的问题。为此,我们提出RuleWorld——一个大规模基准测试集,将规则重构为全局可复用的抽象单元,涵盖单规则、并行多规则和多跳推理等多种场景。我们进一步提出DynaRule,一种端到端框架,通过将规则注入键值缓存,将检索过程转化为可学习的、分步进行的内部操作。DynaRule采用带特殊<search>标记的堆叠步骤级注意力训练,使模型在推理过程中能动态重关注并更新最相关规则,替换过时信息以支持更稳定的多步推理。在RuleWorld上的实验表明,现有模型在大规模规则池中表现不佳,而DynaRule将平均问答准确率提升最高达19个百分点,在10,000条规则下实现超过85%的Recall@1,显著优于强基线。代码与数据集已开源:https://github.com/SharkSpicy-NLP/Beyond-Factual-Knowledge。
原文摘要 · Abstract (English)
Large language models (LLMs) excel at text understanding and generation, yet still struggle to reliably understand and apply externally provided procedural rules at scale. To evaluate this capability, we introduce RuleWorld, a large-scale benchmark that reformulates rules as globally reusable abstract units rather than instance-specific facts. In RuleWorld, several scenarios, including single-rule, parallel multi-rule, and multi-hop reasoning, are settled for comprehensive evaluation. We further propose DynaRule, an end-to-end framework that injects the given rules into the KV cache and turns retrieval into an internal, learnable, step-wise process. Specifically, DynaRule employs Stacked Step-Level Attention Training with a special <search> token to enable dynamic rule re-attention and updating during inference. In this way, the model can re-attend to the most relevant rules at each step, dynamically replacing outdated ones to support more stable multi-step reasoning. Experiments on RuleWorld show that existing LLMs face challenges under large rule pools, while DynaRule improves average QA accuracy by up to 19 points and achieves over 85% Recall@1 at 10K rules, outperforming strong baselines by large margins. We make our code and dataset available here: https://github.com/SharkSpicy-NLP/Beyond-Factual-Knowledge.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。