Unravelling the Mechanisms of Manipulating Numbers in Language Models

Michal Štefánik, Timothee Mickus, Marek Kadlčík, Bertram Højer, Michal Spiegel +4 more
10/30/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper.

Abstract

Recent work has shown that different large language models (LLMs) converge to similar and accurate input embedding representations for numbers. These findings conflict with the documented propensity of LLMs to produce erroneous outputs when dealing with numeric information. In this work, we aim to explain this conflict by exploring how language models manipulate numbers and quantify the lower bounds of accuracy of these mechanisms. We find that despite surfacing errors, different language models learn interchangeable representations of numbers that are systematic, highly accurate and universal across their hidden states and the types of input contexts. This allows us to create universal probes for each LLM and to trace information -- including the causes of output errors -- to specific layers. Our results lay a fundamental understanding of how pre-trained LLMs manipulate numbers and outline the potential of more accurate probing techniques in addressed refinements of LLMs' architectures.

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. Any repos shown below are weak matches — 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{tefnik2025unravelling,
  title  = {Unravelling the Mechanisms of Manipulating Numbers in Language Models},
  author = {Michal Štefánik and Timothee Mickus and Marek Kadlčík and Bertram Højer and Michal Spiegel and Raúl Vázquez and Aman Sinha and Josef Kuchař and Philipp Mondorf},
  year   = {2025},
  eprint = {2510.26285},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.26285v1}
}

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/2510.26285.svg)](https://codeofpaper.com/paper/2510.26285)

Discussion