AI
Large Language Models Hide Discrete Computational States in Their Internal Layers
New research reveals that LLMs perform multi-step arithmetic internally by encoding hidden discrete states, offering a window into how these models compute without showing their work.
Large language models appear to solve complex arithmetic problems through internal mechanisms that operate without generating visible step-by-step reasoning. A recent study published on arXiv suggests these models develop hidden discrete state representations—abstract computational structures embedded within their neural layers—to perform symbolic calculation work behind the scenes.
How LLMs Calculate Internally#
Researchers tested whether leading open-source models could directly compute sums of many numbers. The strongest candidates achieved accurate results on problems involving up to 15 addends, each randomly selected between 1 and 100, without relying on chain-of-thought explanations that typically make reasoning explicit. This capability hints at an internal calculation system.
The team hypothesized that models create what they call Implicit Discrete State Representations (IDSRs)—structured encodings that track computational state across the network's hidden layers. Rather than overt arithmetic steps, these representations likely work as an internal symbolic framework, allowing models to track cumulative sums and intermediate results.
Understanding the Mechanisms#
The researchers examined when and how these state encodings form across multiple dimensions:
- Layer-level patterns: IDSRs appear at specific depth points in the network
- Digit-level organization: Individual numerical digits seem to be represented distinctly
- Sequential evolution: State representations change as the model processes each new operand
By analyzing these patterns, the team mapped how information flows through the model's architecture during calculation, revealing that computation happens in stages rather than all at once.
Limits of Current Models#
Despite their abilities, existing open-source LLMs show significant losses in how cleanly they maintain these internal states. Information degrades across layers, leading to errors in final answers. This suggests the representations are fragile and imperfect—models can handle some arithmetic but lose precision as problems grow more complex.
The researchers have made their analysis code and experimental artifacts publicly available, inviting further investigation into how neural networks encode and manipulate symbolic information internally.

