Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLMs

Zhen Xiong, Yujun Cai, Zhecheng Li, Yiwei Wang2025 · DOI

Abstract

Recent advances in test-time scaling have enabled Large Reasoning Models (LRMs) to display sophisticated reasoning abilities via extended Chain-of-Thought (CoT) generation. Despite their impressive reasoning abilities, LRMs frequently display unstable behaviors, such as hallucinating unsupported premises, overthinking simple tasks, and displaying higher sensitivity to prompt variations. This raises a deeper research question: How can we represent the reasoning process of LRMs to map their minds? To address this, we propose a unified graph-based analytical framework for fine-grained modeling and quantitative analysis of LRM reasoning dynamics. Our method first clusters long, verbose CoT outputs into semantically coherent reasoning steps, then constructs directed reasoning graphs to capture contextual and logical dependencies among these steps. Through a comprehensive analysis of derived reasoning graphs, we reveal that key structural properties, such as exploration density, branching, and convergence ratios, strongly correlate with models' performance. The proposed framework enables quantitative evaluation of internal reasoning structure and quality beyond conventional metrics and provides practical insights for prompt engineering and cognitive analysis of LLMs.

1. Introduction

The emergence of Large Reasoning Models (LRMs), such as OpenAI’s o1 and DeepSeek-R1, has shifted the focus of LLM development toward test-time scaling. Unlike standard models that provide immediate responses, LRMs generate thousands of internal tokens in a "Chain-of-Thought" (CoT) process before arriving at a final answer. While this leads to superior performance on complex tasks, it also introduces a "black box" problem. These models often exhibit unstable behaviors, including overthinking or performing worse when provided with few-shot examples—a phenomenon that contradicts standard LLM behavior.

Existing evaluation methods typically focus on final accuracy or total token counts, failing to capture the underlying logical structure of the model's thoughts. This paper introduces a novel framework to "map the minds" of LRMs by transforming linear CoT traces into structured, directed graphs, allowing for a quantitative assessment of the reasoning process itself.

2. The Reasoning Graph Framework

To move beyond linear text analysis, we propose a three-stage pipeline to construct a Reasoning Graph:

  1. Context-aware Logical Units Clustering (Nodes): Raw CoT output is often fragmented. We utilize an LLM-based clustering method to group consecutive reasoning units into semantically coherent steps, such as "Problem Restatement," "Solving Equations," or "Verification."
  2. Semantic Dependency Extraction (Edges): We analyze the logical relationships between these steps. The framework determines if a step supports, contradicts, or is independent of another, creating a directed graph of logical flow.
  3. Topological Analysis: With the graph constructed, we calculate metrics to quantify reasoning quality:
  4. Exploration Density: The overall connectivity and depth of the reasoning.
  5. Branching Ratio: The model’s ability to explore parallel hypotheses or alternative paths.
  6. Convergence Ratio: The degree to which disparate reasoning threads are synthesized into a final conclusion.
  7. Linearity: The prevalence of strictly sequential, non-exploratory thinking.
The proposed framework transforms verbose, linear Chain-of-Thought text into structured Reasoning Graphs, improving interpretability and quantifiability.

3. Experimental Results and the "Few-Shot Penalty"

We evaluated our framework using the high-difficulty GPQA-Diamond benchmark across several models, including DeepSeek-R1-Distill-Qwen-14B and Qwen3-32B. Our analysis revealed several critical insights into the nature of machine reasoning.

3.1 The Structural Impact of Prompting

A striking finding was the "Few-Shot Penalty." While few-shot prompting typically improves standard LLM performance, LRMs showed a monotonic decline in accuracy as more examples were provided. For instance, DeepSeek-R1-Distill-Qwen-7B's accuracy dropped from nearly 45% in a zero-shot setting to approximately 25% in a 4-shot setting.

Our graph analysis explains this decline through structural mimicry. When provided with concise, linear human examples, the LRM mimics that structure. It stops branching, stops self-correcting, and stops exploring alternative paths. The few-shot prompt acts as a "cognitive straitjacket," suppressing the very exploratory behaviors that make LRMs effective.

3.2 Quantifying Reasoning Quality

We found that graph-based metrics are far more predictive of success than simple token counts. Exploration, branching, and convergence ratios correlate strongly with accuracy ($r \approx 0.68$). High-performing models under zero-shot conditions naturally produce complex, highly-branched graphs. Conversely, as linearity increases—often due to restrictive prompting—performance consistently decreases across all model sizes.

4. Conclusion

This research demonstrates that effective machine reasoning is a web, not a line. By representing CoT as a Reasoning Graph, we can quantify the structural properties that lead to successful outcomes. Our findings suggest that future prompt engineering should focus on encouraging "structural diversity" rather than just providing information. While the framework currently requires additional computational overhead for graph construction, it provides a vital tool for the cognitive analysis and interpretability of the next generation of reasoning models.

Summary updated

Abstract

Recent advances in test-time scaling have enabled Large Language Models (LLMs) to display sophisticated reasoning abilities via extended Chain-of-Thought (CoT) generation.Despite their impressive reasoning abilities, Large Reasoning Models (LRMs) frequently display unstable behaviors, e.g., hallucinating unsupported premises, overthinking simple tasks, and displaying higher sensitivity to prompt variations.This raises a deeper research question: How can we represent the reasoning process of LRMs to map their minds?To address this, we propose a unified graph-based analytical framework for fine-grained modeling and quantitative analysis of LRM reasoning dynamics.Our method first clusters long, verbose CoT outputs into semantically coherent reasoning steps, then constructs directed reasoning graphs to capture contextual and logical dependencies among these steps.Through a comprehensive analysis of derived reasoning graphs, we also reveal that key structural properties, such as exploration density, branching, and convergence ratios, strongly correlate with models' performance.The proposed framework enables quantitative evaluation of internal reasoning structure and quality beyond conventional metrics and also provides practical insights for prompt engineering and cognitive analysis of LLMs.Code and resources will be released to facilitate future research in this direction.
BibTeX
@misc{xiong2025mapping,
  author = {Zhen Xiong and Yujun Cai and Zhecheng Li and Yiwei Wang},
  title = {{Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLMs}},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.896},
}
Figure