Interleaving Text and Number Embeddings to Solve Mathemathics Problems
Not on the map. Why?
Abstract (arXiv)
Integrating text and numbers effectively is a crucial step towards enhancing Large Language Models (LLMs) capabilities in assisting in scientific tasks. While most current approaches rely on discrete tokenization of numbers, for instance, conversion to scientific notation or base 10-decomposition, a recent approach proposed a continuous numerical encoding as an inductive bias. In this paper, we build upon this approach by introducing more expressive numerical embeddings. Our method addresses key shortcomings, including the elimination of numerical artefacts and the ability to handle a wide range of magnitudes without clipping. Our work presents two key contributions. First, we employ an MLP to assign distinct directions in the embedding space to different numbers. Our second contribution is the introduction of a routing layer that differentiates between numerical and text embeddings. We hypothesise that this combined approach enables the model to distinguish between text and number distributions while maintaining its capacity for arithmetic operations. Using only a 45 M parameter encoder-decoder architecture our method achieves a R2=0.9988 over a wide range of magnitude (10-3,108). In addition, we empirically observe a reduction of the numerical artefacts and biases observed compared to the baselines.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 15 of its 17 references that are in the map. First posted on arXiv 25 Oct 2024.
Builds on
15 of 17 references.
References · 15
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
- 2023Llemma: An Open Language Model For Mathematicscited by 388
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 335
- 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 159
- 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
- 2024Transformers Can Do Arithmetic with the Right Embeddingscited by 78
- 2020Do Language Embeddings Capture Scales?cited by 63
3 more
- 2023xVal: A Continuous Numerical Tokenization for Scientific Language Modelscited by 27
- 2023Can neural networks do arithmetic? A survey on the elementary numerical skills of state-of-the-art deep learning modelscited by 18
- 2024Benchmarking GPT-4 on Algorithmic Problems: A Systematic Evaluation of Prompting Strategiescited by 9
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 2.
5 papers.
- 2025Efficient numeracy in language models through single-token number embeddingscited by 7
- 2024DateLogicQA: Benchmarking Temporal Biases in Large Language Modelscited by 2
- 2025multivariateGPT: a decoder-only transformer for multivariate categorical and numeric datacited by 1
- 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Drivingcited by 0
- 2026CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable Semanticscited by 0
- 2026CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable Semantics5 Mar 2026
- 2026DriveCode: Domain Specific Numerical Encoding for LLM-Based Autonomous Driving1 Mar 2026
- 2025Efficient numeracy in language models through single-token number embeddings8 Oct 2025
- 2025multivariateGPT: a decoder-only transformer for multivariate categorical and numeric data27 May 2025
- 2024DateLogicQA: Benchmarking Temporal Biases in Large Language Models17 Dec 2024