mlsanityData to 7 Oct 2026

Language Models Encode the Value of Numbers Linearly

arXiv 2401.03735 ↗First posted 8 Jan 2024cs.CLcited by 19

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have exhibited impressive competence in various tasks, but their internal mechanisms on mathematical problems are still under-explored. In this paper, we study a fundamental question: how language models encode the value of numbers, a basic element in math. To study the question, we construct a synthetic dataset comprising addition problems and utilize linear probes to read out input numbers from the hidden states. Experimental results support the existence of encoded number values in LLMs on different layers, and these values can be extracted via linear probes. Further experiments show that LLMs store their calculation results in a similar manner, and we can intervene the output via simple vector additions, proving the causal connection between encoded numbers and language model outputs. Our research provides evidence that LLMs encode the value of numbers linearly, offering insights for better exploring, designing, and utilizing numeric information in LLMs.

Key facts. Cited by 19 papers in the map (data through 7 Oct 2026). Builds on 15 of its 32 references that are in the map. First posted on arXiv 8 Jan 2024.

Builds on

15 of 32 references.

References · 15

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
  5. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  6. 2016Understanding intermediate layers using linear classifier probescited by 1,279
  7. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  8. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  9. 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
  10. 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 417
  11. 2023Emergent Linear Representations in World Models of Self-Supervised Sequence Modelscited by 313
  12. 2021Implicit Representations of Meaning in Neural Language Modelscited by 179
3 more
  1. 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 157
  2. 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 145
  3. 2023Verify-and-Edit: A Knowledge-Enhanced Chain-of-Thought Frameworkcited by 139

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 10; 2026: 8.

19 papers.

Sort:

By area:

  1. 2025Probing for Arithmetic Errors in Language Modelscited by 17
  2. 2025What is a Number, That a Large Language Model May Know It?cited by 14
  3. 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMscited by 13
  4. 2024LLMs Faithfully and Iteratively Compute Answers During CoT: A Systematic Analysis With Multi-step Arithmeticscited by 11
  5. 2025Modular Arithmetic: Language Models Solve Math Digit by Digitcited by 6
  6. 2026LLMs Know More About Numbers than They Can Saycited by 6
  7. 2025Number Representations in LLMs: A Computational Parallel to Human Perceptioncited by 4
  8. 2025Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMscited by 3
  9. 2025Pre-trained Language Models Learn Remarkably Accurate Representations of Numberscited by 3
  10. 2025On Representational Dissociation of Language and Arithmetic in Large Language Modelscited by 1
  11. 2025Language Models Learn Universal Representations of Numbers and Here's Why You Should Carecited by 1
  12. 2026Categorical Perception in Large Language Model Hidden States: Structural Warping at Digit-Count Boundariescited by 1
7 more
  1. 2025Univariate to Multivariate: LLMs as Zero-Shot Predictors for Time-Series Forecastingcited by 0
  2. 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Drivingcited by 0
  3. 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Modelscited by 0
  4. 2026Language Models Compare Quantities Using Number-specific and Unit-specific Heuristicscited by 0
  5. 2026Prime Fourier Embeddings: A Principled Basis for Modular Arithmeticcited by 0
  6. 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priorscited by 0
  7. 2026The Advantages of Fresh Sketching for Ridge Regressioncited by 0