用有向无环图建模数学推理过程,精准评估大模型的逻辑一致性。
DAG-Math: Graph-of-Thought Guided Mathematical Reasoning in LLMs
- 将思维链建模为基于规则的随机过程,节点代表推导状态,边表示规则应用。
- 提出逻辑贴近度指标,发现不同模型在相同准确率下推理质量差异显著。
- 提供可复现的评测基准,适合研究大模型数学推理可靠性的学者使用。
大型语言模型(LLMs)在链式思维(CoT)提示下对数学问题表现优异,但其成功源于搜索、死记硬背还是符合规则的推理尚不明确。为此,我们提出将CoT建模为有向无环图(DAG)上的规则性随机过程,其中节点代表中间推导状态,边表示规则的应用。在此框架下,我们引入【逻辑贴近度】这一指标,量化模型的CoT轨迹与DAG结构的一致性,实现超越传统PASS@$k$的评估。基于此,我们设计了DAG-MATH CoT格式,并构建了相应基准,引导模型生成符合该格式的推理轨迹,从而实现对推理能力的系统评估。在标准数学推理数据集上,分析揭示了代表性LLM家族间推理保真度存在统计显著差异——即使在PASS@$k$相近时亦然,暴露出最终答案准确率与规则一致推导之间的鸿沟。本框架在自由形式思维链与形式化证明系统间取得平衡,为大模型推理评估提供可操作的诊断工具。基准与代码已开源:https://github.com/YuanheZ/DAG-MATH。
原文摘要 · Abstract (English)
Large Language Models (LLMs) demonstrate strong performance on mathematical problems when prompted with Chain-of-Thought (CoT), yet it remains unclear whether this success stems from search, rote procedures, or rule-consistent reasoning. To address this, we propose modeling CoT as a certain rule-based stochastic process over directed acyclic graphs (DAGs), where nodes represent intermediate derivation states and edges encode rule applications. Within this framework, we introduce \textbf{logical closeness}, a metric that quantifies how well a model's CoT trajectory (i.e., the LLM's final output) adheres to the DAG structure, providing evaluation beyond classical PASS@$k$ metrics. Building on this, we introduce the \emph{DAG-MATH} CoT format and construct a benchmark that guides LLMs to generate CoT trajectories in this format, thereby enabling the evaluation of their reasoning ability under our framework. Across standard mathematical reasoning datasets, our analysis uncovers statistically significant differences in reasoning fidelity among representative LLM families-even when PASS@$k$ is comparable-highlighting gaps between final-answer accuracy and rule-consistent derivation. Our framework provides a balance between free-form CoT and formal proofs systems, offering actionable diagnostics for LLMs reasoning evaluation. Our benchmark and code are available at https://github.com/YuanheZ/DAG-MATH.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。