The AI community is currently locked in a debate: are Large Language Models (LLMs) merely "stochastic parrots" predicting the next token based on surface-level statistics, or do they possess a deeper, internalized understanding of logic? While previous research has explored the idea that concepts are directions in representation space, these views are often static. They fail to capture the dynamic process of reasoning—how a model’s internal state evolves as it works through a multi-step argument.
This paper seeks to bridge that gap by providing a formal, differential-geometric language to describe how LLMs "think." By disentangling logic from semantic content, the authors demonstrate that while raw embeddings cluster by topic, higher-order geometric properties are invariant across different subjects and languages. This suggests LLMs internalize universal logical laws rather than just mimicking surface-level patterns.
Modeling Reasoning as Continuous Flows
To analyze how models process arguments, the authors introduce a framework that treats reasoning as a Context Cumulative Flow. Instead of looking at isolated tokens, they record the model's hidden states as a reasoning prefix grows, creating a continuous trajectory in high-dimensional space.
To analyze these trajectories, the researchers borrow tools from classical differential geometry:
- Velocity ($v$): The first-order difference between consecutive reasoning steps. The authors hypothesize that logic acts as a "local controller" for this velocity.
- Menger Curvature ($\kappa$): A second-order metric that measures the "tightness" of a turn by calculating the reciprocal of the radius of a circle passing through three consecutive points. This quantifies the intensity of a reasoning transition.
Disentangling Logic from Semantics
A major challenge in studying LLM reasoning is separating the underlying logical structure of an argument from its "semantic carrier" (the specific topic or language used). To solve this, the authors created the Reasoning-Flow Dataset.
This benchmark contains 30 distinct logical structures based on natural deduction, each with 8 to 16 reasoning steps. To isolate logic, each template is instantiated across 20 topical domains (e.g., weather vs. finance) and realized in 4 languages (English, Chinese, German, and Japanese), resulting in a corpus of 2,430 reasoning sequences.
Key Insights: Logic as a Geometric Controller
The most striking finding of the paper is that logic doesn't determine where you are in the embedding space, but how you move through it.
- Position (0-order): Dominated by surface semantics. Embeddings for "Weather in English" cluster together, regardless of the underlying logic used.
- Velocity (1st-order): Logical structure emerges as a dominant factor. Similarity scores for flows sharing the same logic (but different topics) are significantly higher than those sharing the same topic (but different logic).
- Curvature (2nd-order): Logic separation is further amplified. Curvature similarity remains highly consistent across unrelated topics, providing a unique "fingerprint" for specific logical operations.
The importance of sequential logic is further proven by a "random shuffle" experiment. Permuting the order of logical steps destroys the velocity and curvature patterns while preserving positional similarity. This confirms that reasoning is encoded in the dynamics of the flow, not just the static presence of certain concepts.
Furthermore, these geometric patterns are remarkably consistent across different model families (Qwen and LLaMA) and sizes (ranging from 0.5B to 8B parameters). This consistency supports a "Platonic Representation Hypothesis," suggesting that different models, trained on different data, are converging toward a universal way of representing logic.
Limitations and Future Directions
While this framework provides a powerful new lens for interpretability, it currently focuses exclusively on the internal representation during understanding rather than explicitly linking these geometric measures to the accuracy of the model's generated answers. Additionally, because the study looks at fully trained models post-hoc, it does not yet explain how or when these geometric flows form during the training process.
Future work could leverage this framework to develop new ways of detecting out-of-distribution (OOD) reasoning or to build more efficient "latent reasoning" models that operate directly in the continuous flow space rather than relying solely on discrete token generation.
Summary updated