用图结构解析大模型推理过程,揭示其内部思维路径。
GraphGhost: Tracing Structures Behind Large Language Models
- 将令牌互动与神经元激活建模为图,追踪跨层依赖关系。
- 关键节点扰动导致推理行为明显变化,验证结构意义。
- 适合研究模型可解释性、推理机制的AI研究人员。
大型语言模型(LLMs)在结构化任务中表现出强大的推理能力,但其内部工作机制仍不清晰。现有解释方法多聚焦于标记级归因,难以深入理解模型内部的多步推理过程。本文提出 GraphGhost,一种基于图的框架,将 LLM 中的内部标记交互与神经元激活建模为图结构。通过聚合跨层的标记依赖关系,GraphGhost 能捕捉支撑模型预测的全局信息流。我们从两个互补视角形式化该框架:样本视图用于追踪单个预测中的标记依赖,数据集视图则聚合训练中学习到的重复结构模式。通过图分析和定量实验,我们发现图结构特性与重要标记及神经元节点密切相关,且对结构关键节点的扰动会引发推理行为的可测量变化。这些结果表明,GraphGhost 所捕捉的结构模式反映了 LLM 推理的有意义内部组织。代码已公开,数据集仅限研究使用。
原文摘要 · Abstract (English)
Large Language Models (LLMs) exhibit strong reasoning capabilities on structured tasks, yet the internal mechanisms underlying such behaviors remain poorly understood. Existing interpretation methods mainly focus on token-level attributions, which provide limited insight into multi-step reasoning inside the model. We propose GraphGhost, a graph-based framework that models internal token interactions and neuron activations in LLMs as graphs. By aggregating token dependencies traced across layers, GraphGhost captures global information flow underlying model predictions. We formalize GraphGhost from two complementary perspectives: a sample view, which traces token dependencies for individual predictions, and a dataset view, which aggregates recurring structural patterns learned during training. Through graph analytics and quantitative experiments, we show that graph structural properties are closely associated with influential tokens and neuron nodes, and that perturbations to structurally critical nodes lead to measurable changes in reasoning behavior. These results indicate that the structural patterns captured by GraphGhost reflect meaningful internal organization of LLM reasoning. The codes are available at software part. Artifacts will be made available for research use only.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。