GraphGhost: Tracing Structures Behind Large Language Models
Xinnan Dai, Kai Guo, Chung-Hsiang Lo, Shenglai Zeng, Jiayuan Ding, Dongsheng Luo, Subhabrata Mukherjee, Jiliang Tang
TL;DR
GraphGhost introduces a graph-based framework that represents neuron activations and their signal propagation as attribution graphs, aggregated into a unified GraphGhost to study reasoning in decoder-only LLMs. By applying graph algorithms such as PageRank and conducting targeted structural interventions (e.g., muting nodes or editing edges), the approach reveals both shared and model-specific reasoning patterns across diverse datasets and models, and demonstrates causal influence of key neurons on semantic and logical flow. The authors provide case studies and quantitative analyses showing how perturbations to tokens or graph structure can alter reasoning trajectories, including potential prompting and domain generalization implications. Across GSM8K, MAWPS, ProntoQA, BoolQA, ARC-Easy, and QASC, GraphGhost yields insights into semantic merging, logic shifts, and the distribution of influential tokens, establishing a principled framework for analyzing, debugging, and potentially guiding LLM reasoning. Overall, GraphGhost offers a rigorous, graph-centric tool for understanding the structural foundations of reasoning in LLMs and for exploring targeted interventions to shape their outputs.
Abstract
Large Language Models (LLMs) demonstrate remarkable reasoning capabilities, yet the structural mechanisms underlying these abilities remain under explored. In this work, we introduce GraphGhost, a unified framework that represents neuron activations and their signal propagation as graphs, explaining how LLMs capture structural semantics from sequential inputs and generate outputs through structurally consistent mechanisms. This graph-based perspective enables us to employ graph algorithms such as PageRank to characterize the properties of LLMs, revealing both shared and model-specific reasoning behaviors across diverse datasets. We further identify the activated neurons within GraphGhost and evaluate them through structural interventions, showing that edits to key neuron nodes can trigger reasoning collapse, altering both logical flow and semantic understanding. Together, these contributions position GraphGhost as a powerful tool for analyzing, intervening in, and ultimately understanding the structural foundations of reasoning in LLMs.
