Regress, Don't Guess -- A Regression-like Loss on Number Tokens for Language Models
Not on the map. Why?
Abstract (arXiv)
While language models have exceptional capabilities at text generation, they lack a natural inductive bias for emitting numbers and thus struggle in tasks involving quantitative reasoning, especially arithmetic. One fundamental limitation is the nature of the cross-entropy (CE) loss, which assumes a nominal scale and thus cannot convey proximity between generated number tokens. In response, we here present a regression-like loss that operates purely on token level. Our proposed Number Token Loss (NTL) comes in two flavors and minimizes either the Lp norm or the Wasserstein distance between the numerical values of the real and predicted number tokens. NTL can easily be added to any language model and extend the CE objective during training without runtime overhead. We evaluate the proposed scheme on various mathematical datasets and find that it consistently improves performance in math-related tasks. In a direct comparison on a regression task, we find that NTL can match the performance of a regression head, despite operating on token level. Finally, we scale NTL up to 3B parameter models and observe improved performance, demonstrating its potential for seamless integration into LLMs. We hope to inspire LLM developers to improve their pretraining objectives and distribute NTL as a minimalistic and lightweight PyPI package ntloss: https://github.com/ai4sd/number-token-loss. Development code for full paper reproduction is available separately.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 30 of its 50 references that are in the map. First posted on arXiv 4 Nov 2024.
Builds on
30 of 50 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,277
- 2020On Layer Normalization in the Transformer Architecturecited by 906
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
- 2022Making Large Language Models Better Reasoners with Step-Aware Verifiercited by 231
- 2024Tool Learning with Large Language Models: A Surveycited by 221
- 2015Semi-supervised Sequence Learningcited by 198
18 more
- 2019Do NLP Models Know Numbers? Probing Numeracy in Embeddingscited by 157
- 2024The pitfalls of next-token predictioncited by 156
- 2020Injecting Numerical Reasoning Skills into Language Modelscited by 133
- 2023Teaching Arithmetic to Small Transformerscited by 121
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 112
- 2023Unifying Molecular and Textual Representations via Multi-task Language Modellingcited by 92
- 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
- 2023Grokking modular arithmeticcited by 77
- 2023TinyGSM: achieving >80% on GSM8k with small language modelscited by 68
- 2020Do Language Embeddings Capture Scales?cited by 63
- 2022Regression Transformer: Concurrent sequence regression and generation for molecular language modelingcited by 49
- 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
- 2022Regression as Classification: Influence of Task Formulation on Neural Network Featurescited by 29
- 2023xVal: A Continuous Numerical Tokenization for Scientific Language Modelscited by 26
- 2023Recursion of Thought: A Divide-and-Conquer Approach to Multi-Context Reasoning with Language Modelscited by 24
- 2024Reverse That Number! Decoding Order Matters in Arithmetic Learningcited by 8
- 2024Salsa Fresca: Angular Embeddings and Pre-Training for ML Attacks on Learning With Errorscited by 7
- 2023Learning Label Encodings for Deep Regressioncited by 2
Built on by
Citing papers per year: 2025: 3; 2026: 9.
12 papers.
- 2026ProcVLM: Learning Procedure-Grounded Progress Rewards for Robotic Manipulationcited by 8
- 2026NaLA: A 3D Native LLM Layout Agent for High-quality 3D Scene Generationcited by 2
- 2025multivariateGPT: a decoder-only transformer for multivariate categorical and numeric datacited by 1
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learningcited by 1
- 2026REAL: Regression-Aware Reinforcement Learning for LLM-as-a-Judgecited by 1
- 2025BiomechGPT: Extending Motion-Language Models to Clinical Motion Understandingcited by 0
- 2026Value-Aware Numerical Representations for Transformer Language Modelscited by 0
- 2026CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable Semanticscited by 0
- 2026A Triadic Suffix Tokenization Scheme for Numerical Reasoningcited by 0
- 2026DEL: Digit Entropy Loss for Numerical Learning of Large Language Modelscited by 0
- 2026Enhancing Numerical Prediction in LLMs via Smooth MMD Alignmentcited by 0
- 2026MissClick: Execution-Aware Adversarial Attacks on Coordinate Generation in GUI Grounding Modelscited by 0
- 2026MissClick: Execution-Aware Adversarial Attacks on Coordinate Generation in GUI Grounding Models4 Aug 2026
- 2026NaLA: A 3D Native LLM Layout Agent for High-quality 3D Scene Generation28 Jun 2026
- 2026Enhancing Numerical Prediction in LLMs via Smooth MMD Alignment26 Jun 2026
- 2026DEL: Digit Entropy Loss for Numerical Learning of Large Language Models19 May 2026
- 2026ProcVLM: Learning Procedure-Grounded Progress Rewards for Robotic Manipulation9 May 2026
- 2026A Triadic Suffix Tokenization Scheme for Numerical Reasoning13 Apr 2026
- 2026REAL: Regression-Aware Reinforcement Learning for LLM-as-a-Judge17 Mar 2026
- 2026CONE: Embeddings for Complex Numerical Data Preserving Unit and Variable Semantics5 Mar 2026
- 2026Value-Aware Numerical Representations for Transformer Language Models14 Jan 2026
- 2025Beyond Token-level Supervision: Unlocking the Potential of Decoding-based Regression via Reinforcement Learning6 Dec 2025
- 2025multivariateGPT: a decoder-only transformer for multivariate categorical and numeric data27 May 2025
- 2025BiomechGPT: Extending Motion-Language Models to Clinical Motion Understanding24 May 2025