arXiv:2601.17593cs.CL2026-01被引 2

发现大模型内部推理有图结构,非单纯线性链。

From Chains to DAGs: Probing the Graph Structure of Reasoning in LLMs

论文配图:From Chains to DAGs: Probing the Graph Structure of Reasoning in LLMs
图 1 · 摘自论文原文
  • 用轻量探测器分析隐藏状态是否编码推理图结构
  • 中间层对图结构的可恢复性最强,大模型表现更优
  • 适合研究模型推理机制或改进生成质量的人

大语言模型的多步推理表征近期引发关注。尽管以往研究常将推理视为线性链,但许多问题更适合用有向无环图(DAG)建模,其中中间结论可分支、合并与复用。当前尚不清楚此类图结构是否反映在模型内部。本文提出推理图探测框架(Reasoning DAG Probing),将前提、中间结论和最终答案形式化为图节点,并训练轻量探测器从隐藏状态预测节点深度、成对距离和邻接关系。通过该框架,我们分析了图结构在各层的涌现过程,重建近似推理图,并评估干扰推理结构的控制手段。在逻辑、数学和代码推理基准上,均发现模型表示中存在有意义的图结构:可恢复性在中间层达到峰值;后期层更擅长恢复深层节点与长程依赖;更大模型具备更强的图结构可恢复性。自回归生成过程中,微调后的模型展现出更清晰、逐步增强的图结构,其演变趋势普遍预示答案正确性。结果表明,大模型推理并非完全顺序,而是具有可观测的内部图结构。

原文摘要 · Abstract (English)

Recent progress in large language models has renewed interest in how multi-step reasoning is represented internally. While prior work often treats reasoning as a linear chain, many reasoning problems can be more naturally modeled as directed acyclic graphs (DAGs), where intermediate conclusions branch, merge, and are reused. Whether such graph structure is reflected in model internals remains unclear. We introduce Reasoning DAG Probing, a framework for testing whether LLM hidden states linearly encode properties of an underlying reasoning DAG. We formalize each premise, intermediate conclusion, and final answer as a DAG node, and train lightweight probes to predict node depth, pairwise distance, and adjacency from hidden states. Using these probes, we analyze the layerwise emergence of DAG structure, reconstruct approximate reasoning graphs, and evaluate controls that disrupt reasoning-relevant structure. Across logical, mathematical, and code reasoning benchmarks, we find that DAG structure is meaningfully encoded in LLM representations: recoverability peaks in intermediate layers; later layers preferentially recover deeper nodes and longer-range dependencies; larger models exhibit stronger DAG recoverability. During autoregressive generation, post-trained models exhibit clearer, progressively strengthening DAG structure, which broadly anticipates answer correctness trends. These findings suggest that LLM reasoning is not purely sequential, but exhibits measurable internal graph structure.

推理机制图结构大模型

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