arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2601.17593cs.CL
收藏

从链到DAG:探测语言模型推理中的图结构

LLMs Think with DAGs: Probing the Latent Graph Structure of Reasoning

Columbia University(哥伦比亚大学)

Tianjun Zhong, Linyang He, Ziyang Li, Nima Mesgarani

AI总结:

研究探讨语言模型内部推理是否以有向无环图形式存在,通过设计探针验证DAG结构在各层的出现,并发现中间层具有最强的结构恢复能力。

摘要:

近年来,大语言模型的进步重新激发了对多步骤推理内部表示的关注。尽管先前研究常将推理视为线性链,但许多推理问题更自然地建模为有向无环图(DAG),其中中间结论可分支、合并和重用。模型内部是否反映此类图结构尚不清楚。本文引入了推理DAG探测框架,用于测试LLM隐藏状态是否线性编码底层推理DAG的属性,并探讨该结构在各层的出现情况。我们为每个推理节点分配文本实现,并训练轻量级探针预测节点深度、成对距离和邻接关系。通过这些探针,我们分析各层DAG结构的出现,重建近似推理图,并评估破坏推理相关结构但保持表层文本的控制条件。在多个推理基准测试中,发现DAG结构在LLM表示中被有意义地编码,恢复能力在中间层达到峰值,系统性地受节点深度、边跨度和模型规模影响,并能够实现非平凡的依赖图恢复。这些发现表明,LLM推理并非纯粹顺序,而是表现出可测量的内部图结构。

英文摘要:

Large language models often externalize reasoning as linear chains, but 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 to answer this question. 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 LLM hidden states. Across logical, mathematical, and code reasoning benchmarks, we find that DAG structure is meaningfully encoded in LLM representations: it peaks in intermediate layers, with later layers preferentially recover deeper nodes and longer-range reasoning dependencies, and becomes stronger with model scale. DAG structure also progressively emerges during autoregressive generation in ways that anticipate answer correctness, while steering activations toward the ground-truth DAG structure can convert some originally incorrect generations into correct ones. These results suggest that LLM reasoning is not purely sequential, but reflects measurable latent graph structure.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑