Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms

Tanja Baeumel, Josef van Genabith, Simon Ostermann
4/17/2026
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large language models (LLMs) have demonstrated impressive capabilities, yet their internal mechanisms for handling reasoning-intensive tasks remain underexplored. To advance the understanding of model-internal processing mechanisms, we present an investigation of how LLMs perform arithmetic operations by examining internal mechanisms during task execution. Using early decoding, we trace how next-token predictions are constructed across layers. Our experiments reveal that while the models recognize arithmetic tasks early, correct result generation occurs only in the final layers. Notably, models proficient in arithmetic exhibit a clear division of labor between attention and MLP modules, where attention propagates input information and MLP modules aggregate it. This division is absent in less proficient models. Furthermore, successful models appear to process more challenging arithmetic tasks functionally, suggesting reasoning capabilities beyond factual recall.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{baeumel2026disentangling,
  title  = {Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms},
  author = {Tanja Baeumel and Josef van Genabith and Simon Ostermann},
  year   = {2026},
  eprint = {2604.15842},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.15842v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.15842.svg)](https://codeofpaper.com/paper/2604.15842)

Discussion