Table of Contents
Fetching ...

The Geometry of Reasoning: Flowing Logics in Representation Space

Yufa Zhou, Yixiao Wang, Xunjian Yin, Shuyan Zhou, Anru R. Zhang

TL;DR

The paper introduces a differential-geometric framework for understanding LLM reasoning as smooth flows in the embedding space $\mathcal{R}$, with logic acting as a local controller of flow velocity. By separating logical structure from semantic carriers via a concept space $\mathcal{C}$ and a canonical alignment between semantic and representation trajectories, it provides formal definitions and tools to analyze reasoning dynamics. Empirical results on a controlled dataset show that velocity and curvature invariants align with the same logical skeleton across topics and languages, validating the claim that logic governs reasoning flows beyond surface semantics. The work offers a conceptual foundation and practical tools for interpretability, steering, and analysis of LLM reasoning, with implications for retrieval, alignment, and architecture design that parameterize latent flows.

Abstract

We study how large language models (LLMs) ``think'' through their representation space. We propose a novel geometric framework that models an LLM's reasoning as flows -- embedding trajectories evolving where logic goes. We disentangle logical structure from semantics by employing the same natural deduction propositions with varied semantic carriers, allowing us to test whether LLMs internalize logic beyond surface form. This perspective connects reasoning with geometric quantities such as position, velocity, and curvature, enabling formal analysis in representation and concept spaces. Our theory establishes: (1) LLM reasoning corresponds to smooth flows in representation space, and (2) logical statements act as local controllers of these flows' velocities. Using learned representation proxies, we design controlled experiments to visualize and quantify reasoning flows, providing empirical validation of our theoretical framework. Our work serves as both a conceptual foundation and practical tools for studying reasoning phenomenon, offering a new lens for interpretability and formal analysis of LLMs' behavior.

The Geometry of Reasoning: Flowing Logics in Representation Space

TL;DR

The paper introduces a differential-geometric framework for understanding LLM reasoning as smooth flows in the embedding space , with logic acting as a local controller of flow velocity. By separating logical structure from semantic carriers via a concept space and a canonical alignment between semantic and representation trajectories, it provides formal definitions and tools to analyze reasoning dynamics. Empirical results on a controlled dataset show that velocity and curvature invariants align with the same logical skeleton across topics and languages, validating the claim that logic governs reasoning flows beyond surface semantics. The work offers a conceptual foundation and practical tools for interpretability, steering, and analysis of LLM reasoning, with implications for retrieval, alignment, and architecture design that parameterize latent flows.

Abstract

We study how large language models (LLMs) ``think'' through their representation space. We propose a novel geometric framework that models an LLM's reasoning as flows -- embedding trajectories evolving where logic goes. We disentangle logical structure from semantics by employing the same natural deduction propositions with varied semantic carriers, allowing us to test whether LLMs internalize logic beyond surface form. This perspective connects reasoning with geometric quantities such as position, velocity, and curvature, enabling formal analysis in representation and concept spaces. Our theory establishes: (1) LLM reasoning corresponds to smooth flows in representation space, and (2) logical statements act as local controllers of these flows' velocities. Using learned representation proxies, we design controlled experiments to visualize and quantify reasoning flows, providing empirical validation of our theoretical framework. Our work serves as both a conceptual foundation and practical tools for studying reasoning phenomenon, offering a new lens for interpretability and formal analysis of LLMs' behavior.

Paper Structure

This paper contains 34 sections, 5 theorems, 36 equations, 7 figures, 2 tables, 1 algorithm.

Key Result

Corollary 4.7

On a domain where $\Gamma$ is injective and $\widetilde{\Psi}$ is defined, there exists a canonical alignment

Figures (7)

  • Figure 1: Reasoning Flow. (a–b) Visualizations on a selected problem from MATH500 with six distinct answers. (c) Our geometric framework of mapping relationships among input space $\mathcal{X}$, concept space $\mathcal{C}$, logic space $\mathcal{L}$, and representation space $\mathcal{R}$. See \ref{['sec:reasoning_flow']} for more details.
  • Figure 2: Similarity of reasoning flows on Qwen3 0.6B. Blocks correspond to logic templates (L:A–E) instantiated with different topics and languages. (a) Position similarity (mean cosine): diagonals correspond to topics (e.g., Network Security), showing that positions are dominated by surface semantics. (b) Velocity similarity (mean cosine): semantic effects diminish, and flows with the same logical skeleton align while differing logics diverge. (c) Curvature similarity (Pearson): separation is further amplified, with logic emerging as the principal invariant and revealing close similarity between logics B and C. See \ref{['sec:llms']} for more details.
  • Figure 3: Similarity of reasoning flows on Qwen3 1.7B.
  • Figure 4: Similarity of reasoning flows on Qwen3 4B.
  • Figure 5: Similarity of reasoning flows on Llama3 8B.
  • ...and 2 more figures

Theorems & Definitions (24)

  • Definition 3.1: Chain-of-Thought Reasoning
  • Definition 3.2: Representation Operator
  • Definition 3.3: Representation Space
  • Definition 3.4: Menger Curvature
  • Definition 4.1: Concept Space
  • Definition 4.2: Semantic Subspace as Cognitive Trajectories
  • Definition 4.3: Formal Logical Space
  • Definition 4.5: Reasoning Trajectory / Context Cumulative Flow
  • Corollary 4.7: Canonical Alignment
  • Definition 4.8: Representation-Logic Space
  • ...and 14 more