Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLM
Zhen XiongYujun Cai ‡, Zhecheng LiYiwei Wang † · 2025
Read Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLM by Zhen XiongYujun Cai ‡, Zhecheng LiYiwei Wang † (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-13890.txt.
Introduction
Zhen Xiong and co-authors wrote a paper from 2025 on mapping the reasoning of large language models as a graph. New reasoning models think out loud in long chains, yet their behavior can be odd and unstable, dipping when given examples that help other models. The authors convert those chains into maps: first they cluster the wordy output into clean steps, then they draw arrows for the logical links between steps.
Across models and prompting styles, the maps' shapes tracked accuracy closely. How densely a model explored, how much it branched, and how often it converged all carried signal. Prompting choices visibly reshaped the graph, which in turn moved the score. That gives prompt designers a gauge beyond final answers. The team offers the framework as a tool for judging reasoning quality and for studying how these models think.
Catalog record
| CREATOR | Zhen XiongYujun Cai ‡, Zhecheng LiYiwei Wang † |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 42 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2505-13890
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLM Zhen XiongYujun Cai ‡, Zhecheng LiYiwei Wang † 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 potential, these Reasoning LLMs (RLMs) often demonstrate counterintuitive and unstable behaviors, such as performance degradation under few-shot prompting, that challenge our current understanding of RLMs. In this work, we introduce a unified graph-based analytical framework for better modeling the reasoning processes of RLMs. 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 comprehensive analysis across models and prompting regimes, we reveal that structural properties, such as exploration density, branching, and convergence ratios, strongly correlate with reasoning accuracy. Our findings demonstrate how prompting strategies substantially reshape the internal reasoning structure of RLMs, directly affecting task outcomes. The proposed framework not only enables quantitative evaluation of reasoning quality beyond conventional metrics but also provides practical insights for prompt engineering and the cognitive analysis of LLMs. Code and resources will be released to facilitate future research in this direction. 1 Introduction Recent LLMs equipped with test-time scaling capabilities, such as OpenAI’s o-series OpenAI et al. (2024) ; OpenAI (2025) , DeepSeek-R1 DeepSeek-AI et al. (2025) , and Gemini-2.5 Kavukcuoglu (2025) , employ a system II, think-slow-before-answer , pipeline that transforms how these models approach complex problems during test time. Rather than producing outputs directly after the input with normally limited token length, these reasoning models engage in explicit and free extended reasoning through Chain-of-Thought Wei et al. (2022) mechanisms. This innovation enables reasoning models to decompose intricate challenges in various domains, explore multiple possible solutions, and self-assess intermediate conclusions before synthesizing final responses during their extended inference time. In general, these reasoning models currently outperform conventional LLMs on various types of benchmarks, which require advanced math Patel et al. (2024) and coding Jimenez et al. (2024) capability. Despite these promising advancements, reasoning models exhibit undesire Chen et al. (2024) and unstable Yang et al. (2025b) behaviors that challenge the established understanding of large language models. One of the particularly striking phenomena is the performance degradation associated with few-shot learning, which in most cases improves the performance of conventional LLMs. Recent technique reports also documented that these RLMs are somehow more sensitive to prompts DeepSeek-AI et al. (2025) . We believe these existing unclear behaviors of RLM call for deeper investigations into how RLMs operate and reason. Our research proposes a novel framework to trace the reasoning processes from a graph perspective. While some work has previously examined the correlation between the quantity of reasoning tokens and RLM’s accuracy Sui et al. (2025) ; Ballon et al. (2025) ; Yang et al. (2025b) , our approach goes beyond the token perspective and focuses on the semantic organization of the model’s reasoning processes. Specifically, our analytical frameworks first cluster raw and verbose reasoning tokens into coherent logic steps and then map their inter-dependencies as a graph, enabling globally semantical insights into how reasoning models reason at a higher level (Figure 1 ). After a comprehensive analysis of derived reasoning graphs, we identify specific quantifiable features that are associated with advanced reasoning behavior, which is often linked to higher problem-solving performance. Figure 1: A conceptual overview of our framework for modeling the long reasoning CoT with a graph structure. This graph-based representation enables stronger readability for human researchers, systematic interpretability of the global structure, and quantifiable graph metrics for in-depth analysis. To summarize, our contributions in this paper include: • a novel reasoning-graph toolkit that converts natural language long Chain-of-Thought into analyzable graph structures, enabling quantification of reasoning through topological and semantic metrics. • comprehensive analysis of how different prompting strategies may influence reasoning LLMs, establishing quantitative boundaries for prompt engineering optimization. • quantifiable indicators of reasoning quality beyond task accuracy, providing a higher-level cognitive understanding of reasoning in LLMs. 2 Related Works Test-Time Scaling Similar to human dual-processing hypothesis of the mind Da Silva (2023) , augmenting the computational budget at test-time has been shown to substantially enhance the reasoning capabilities of large language models (LLMs) OpenAI et al. (2024) ; OpenAI (2025) ; Kavukcuoglu (2025) ; Anthropic (2025) . These reasoning LLMs (RLMs) show highly advanced self-reflection, backtracking, and cross-validation behavior during the extended chain-of-thought (CoT) responses, enabling them to tackle intricate reasoning challenges and outperform previous conventional base LLMs Li et al. (2025) ; Chen et al. (2025) . Few-Shot Learning Few-shot prompting once emerged as a crucial technique for enhancing the performance and adaptability of large language models (LLMs) by providing limited yet highly informative demonstrations Song et al. (2023) . In detail, it leverages a minimal number of illustrative examples embedded directly into the input context, enabling models to rapidly generalize across diverse tasks without explicit parameter updates Brown et al. (2020) . However, many researchers and practitioners have reported that few-shot prompting could instead degrade the model’s performance DeepSeek-AI et al. (2025) , signaling the instability of current reasoning LLMs. In this paper, we will examine the impact of zero/few-shot prompting on RLM’s reasoning, assessing both the quality of internal reasoning and overall performance in in-context learning scenarios. Provide more valuable insights for future prompt engineering and model optimization. Long CoT Analysis Some previous studies have identified a negative relationship between an RLM’s accuracy and the number of reasoning tokens it generates Ballon et al. (2025) ; Yang et al. (2025b) . However, their analyses of RLMs mainly relied on a one-dimensional metric: the length of CoT token sequences. It still remains unclear and counterintuitive why even longer system II thinking could lead to performance degradation, suggesting a gap in our understanding of how RLMs work in general. In this work, we introduce a comprehensive structured framework to formulate the chain-of-thought process, offering deeper insights into the underlying reasoning behavior. 3 Constructing Reasoning Graph from Raw Reasoning Tokens Figure 2: Our pipeline for building the graph structure from reasoning large language models’ output. Starting from raw token perspective , we first use "\n\n" as natural delimiters to split the raw reasoning tokens into an ordered list of reasoning units. Then we perform logical clustering to combine logically cohesive reasoning units into a reasoning step ( node ), shifting into intermediate step perspective . Lastly, we detect semantical relationships ( edge ) between steps ( node ) to reveal the high-level graph perspective from reasoning LLM’s output. Given more computational resources at inference time, Reasoning Language Models (RLMs) can autonomously explore feasible solutions, perform cross-validations, actively access intermediate steps, and synthesize consolidations through extended chain-of-thought tokens. This critical feature allows RLMs to fully release their internal reasoning potential under sophisticated challenges. However, current test-time scaling is also a double-edged sword: as models are encouraged to elaborate and reflect, their behavior often becomes unreliable and less predictable. Counterintuitively, the “thinking out loud” style of RLM should, in theory, offer richer data for LLM interpretability research and help us understand how LLM actually reasons. Yet, to the best of our knowledge, there is still a lack of effective methods to systematically