AlgoTrace: Algorithmic Primitives and Compositional Geometry of Reasoning in Language Models
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
How do inference time and latent computations enable large language models (LLMs) to solve multi-step reasoning problems? We introduce AlgoTrace, a framework for tracing and steering algorithmic operations in the model latent space for multi-step reasoning. We operationalize primitives by clustering latent activations of the model when solving four benchmarks: Traveling Salesperson Problem (TSP), 3SAT, AIME, and Graph Navigation. We annotate the clusters using their corresponding tokens in the reasoning trace. We then apply function vector methods to extract primitive vectors as reusable compositional building blocks of reasoning. We find that a) injecting a primitive vector into models (Phi, Qwen, Llama) elicits the associated algorithmic operation in the reasoning trace, b) injecting primitives can steer behavior across tasks, c) primitive vectors can be composed through algebraic operations, revealing a geometric logic in activation space, and d) a fine-tuned model exhibits improved composition of primitives (Phi-4-Reasoning vs. Phi-4). These findings demonstrate that LLM reasoning can be understood as a walk through algorithmic primitives in the latent space governed by compositional geometry. These primitives transfer across tasks, and reasoning finetuning strengthens algorithmic generalization and composition across domains.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 9 of its 69 references that are in the map. First posted on arXiv 13 Oct 2025.
Builds on
9 of 69 references.
Closest ancestors · 3
Same direction, newest first
- 2025Phi-4-reasoning Technical Report30 Apr
- 2024When a language model is optimized for reasoning, does it still show embers of autoregression? An analysis of OpenAI o12 Oct
- 2023Can Large Language Models Explain Themselves? A Study of LLM-Generated Self-Explanations17 Oct
Other references · 6
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024Phi-4 Technical Reportcited by 711
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2025Persona Vectors: Monitoring and Controlling Character Traits in Language Modelscited by 345
- 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Processcited by 108
- 2025Inference-Time Scaling for Complex Tasks: Where We Stand and What Lies Aheadcited by 44
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026Zipping the Thought: When and How Compressed Reasoning Data Works in LLM Post-Trainingcited by 2
- 2026A Compositional Framework for Open-ended Intelligencecited by 2
- 2026Reasoning Models Know What's Important, and Encode It in Their Activationscited by 1
- 2026Evolutionary Task Discovery: Advancing Reasoning Frontiers via Skill Composition and Complexity Scalingcited by 0
- 2026Distributed Sparse Interventions in Language Modelscited by 0
- 2026A Calibrated Test of Internal Action Maps: State Signals Without Global Affine Closurecited by 0
- 2026A Pre-Specified Construction-Confirmation Test of Operation-Level Causal Transfer Across Finite Isomorphic Symbolic Domainscited by 0
- 2026A Pre-Specified Construction-Confirmation Test of Operation-Level Causal Transfer Across Finite Isomorphic Symbolic Domains16 Aug 2026
- 2026A Calibrated Test of Internal Action Maps: State Signals Without Global Affine Closure13 Aug 2026
- 2026Distributed Sparse Interventions in Language Models8 Jul 2026
- 2026A Compositional Framework for Open-ended Intelligence13 Jun 2026
- 2026Zipping the Thought: When and How Compressed Reasoning Data Works in LLM Post-Training27 May 2026
- 2026Evolutionary Task Discovery: Advancing Reasoning Frontiers via Skill Composition and Complexity Scaling12 May 2026
- 2026Reasoning Models Know What's Important, and Encode It in Their Activations20 Apr 2026
Similar, not cited
Close in wording, no citation either way
- 2026Opening the Black Box: A Survey on the Mechanisms of Multi-Step Reasoning in Large Language Models
- 2025Implicit Reasoning in Large Language Models: A Comprehensive Survey
- 2026Geometric Latent Reasoning Induces Shorter Generations in LLMs
- 2025AgentCoMa: A Compositional Benchmark Mixing Commonsense and Mathematical Reasoning in Real-World Scenarios
- 2026Beyond Input Understanding: Diagnosing Multilingual Mathematical Reasoning with Directed Acyclic Trace Graphs
- 2026Thinking in Latents: Adaptive Anchor Refinement for Implicit Reasoning in LLMs
- 2024Reasoning in Large Language Models: A Geometric Perspective
- 2026Revealing Algorithmic Deductive Circuits for Logical Reasoning