Language Models Encode the Value of Numbers Linearly
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
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2016Understanding intermediate layers using linear classifier probescited by 1,279
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 436
- 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 417
- 2023Emergent Linear Representations in World Models of Self-Supervised Sequence Modelscited by 313
- 2021Implicit Representations of Meaning in Neural Language Modelscited by 179
3 more
- 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 157
- 2023The Hydra Effect: Emergent Self-repair in Language Model Computationscited by 145
- 2023Verify-and-Edit: A Knowledge-Enhanced Chain-of-Thought Frameworkcited by 139
Built on by
Citing papers per year: 2024: 1; 2025: 10; 2026: 8.
19 papers.
Sort:
By area:
- 2025Probing for Arithmetic Errors in Language Modelscited by 17
- 2025What is a Number, That a Large Language Model May Know It?cited by 14
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMscited by 13
- 2024LLMs Faithfully and Iteratively Compute Answers During CoT: A Systematic Analysis With Multi-step Arithmeticscited by 11
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digitcited by 6
- 2026LLMs Know More About Numbers than They Can Saycited by 6
- 2025Number Representations in LLMs: A Computational Parallel to Human Perceptioncited by 4
- 2025Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMscited by 3
- 2025Pre-trained Language Models Learn Remarkably Accurate Representations of Numberscited by 3
- 2025On Representational Dissociation of Language and Arithmetic in Large Language Modelscited by 1
- 2025Language Models Learn Universal Representations of Numbers and Here's Why You Should Carecited by 1
- 2026Categorical Perception in Large Language Model Hidden States: Structural Warping at Digit-Count Boundariescited by 1
7 more
- 2025Univariate to Multivariate: LLMs as Zero-Shot Predictors for Time-Series Forecastingcited by 0
- 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Drivingcited by 0
- 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Modelscited by 0
- 2026Language Models Compare Quantities Using Number-specific and Unit-specific Heuristicscited by 0
- 2026Prime Fourier Embeddings: A Principled Basis for Modular Arithmeticcited by 0
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priorscited by 0
- 2026The Advantages of Fresh Sketching for Ridge Regressioncited by 0
- 2026The Advantages of Fresh Sketching for Ridge Regression29 Sep 2026
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priors2 Sep 2026
- 2026Prime Fourier Embeddings: A Principled Basis for Modular Arithmetic22 Jun 2026
- 2026Language Models Compare Quantities Using Number-specific and Unit-specific Heuristics2 Jun 2026
- 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Models29 May 2026
- 2026Categorical Perception in Large Language Model Hidden States: Structural Warping at Digit-Count Boundaries30 Mar 2026
- 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Driving1 Mar 2026
- 2026LLMs Know More About Numbers than They Can Say8 Feb 2026
- 2025Language Models Learn Universal Representations of Numbers and Here's Why You Should Care30 Oct 2025
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digit4 Aug 2025
- 2025Probing for Arithmetic Errors in Language Models16 Jul 2025
- 2025Pre-trained Language Models Learn Remarkably Accurate Representations of Numbers10 Jun 2025
7 more
- 2025Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMs9 Jun 2025
- 2025Univariate to Multivariate: LLMs as Zero-Shot Predictors for Time-Series Forecasting3 Jun 2025
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMs27 Feb 2025
- 2025Number Representations in LLMs: A Computational Parallel to Human Perception22 Feb 2025
- 2025On Representational Dissociation of Language and Arithmetic in Large Language Models17 Feb 2025
- 2025What is a Number, That a Large Language Model May Know It?3 Feb 2025
- 2024LLMs Faithfully and Iteratively Compute Answers During CoT: A Systematic Analysis With Multi-step Arithmetics2 Dec 2024
- 2025Probing for Arithmetic Errors in Language Modelscited by 17
- 2025What is a Number, That a Large Language Model May Know It?cited by 14
- 2025The Lookahead Limitation: Why Multi-Operand Addition is Hard for LLMscited by 13
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digitcited by 6
- 2026LLMs Know More About Numbers than They Can Saycited by 6
- 2025Number Representations in LLMs: A Computational Parallel to Human Perceptioncited by 4
- 2025Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMscited by 3
- 2025Pre-trained Language Models Learn Remarkably Accurate Representations of Numberscited by 3
- 2025On Representational Dissociation of Language and Arithmetic in Large Language Modelscited by 1
- 2025Language Models Learn Universal Representations of Numbers and Here's Why You Should Carecited by 1
- 2026Categorical Perception in Large Language Model Hidden States: Structural Warping at Digit-Count Boundariescited by 1
- 2025Univariate to Multivariate: LLMs as Zero-Shot Predictors for Time-Series Forecastingcited by 0
12 most cited of 17 All 17 (JSON)
- 2026The Advantages of Fresh Sketching for Ridge Regression29 Sep 2026
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priors2 Sep 2026
- 2026Prime Fourier Embeddings: A Principled Basis for Modular Arithmetic22 Jun 2026
- 2026Language Models Compare Quantities Using Number-specific and Unit-specific Heuristics2 Jun 2026
- 2026The Shape of Addition: Geometric Structures of Arithmetic in Large Language Models29 May 2026
- 2026Categorical Perception in Large Language Model Hidden States: Structural Warping at Digit-Count Boundaries30 Mar 2026
- 2026LLMs Know More About Numbers than They Can Say8 Feb 2026
- 2025Language Models Learn Universal Representations of Numbers and Here's Why You Should Care30 Oct 2025
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digit4 Aug 2025
- 2025Probing for Arithmetic Errors in Language Models16 Jul 2025
- 2025Pre-trained Language Models Learn Remarkably Accurate Representations of Numbers10 Jun 2025
- 2025Addition in Four Movements: Mapping Layer-wise Information Trajectories in LLMs9 Jun 2025
12 newest of 17 All 17 (JSON)