# NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning

Source: [NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning](<https://www.sota2.com/research/paper/68fa74fb1e209131cea65129>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-27T06:40:01.134Z

Authors: Eli Schwartz, Leshem Choshen, Joseph Shtok, Sivan Doveh, Leonid Karlinsky, Assaf Arbelle

Published: 2024-03-30T19:46:59.000Z

## Abstract

Language models struggle with handling numerical data and performing arithmetic operations. We hypothesize that this limitation can be partially attributed to non-intuitive textual numbers representation. When a digit is read or generated by a causal language model it does not know its place value (e.g. thousands vs. hundreds) until the entire number is processed. To address this issue, we propose a simple adjustment to how numbers are represented by including the count of digits before each number. For instance, instead of "42", we suggest using "{2:42}" as the new format. This approach, which we term NumeroLogic, offers an added advantage in number generation by serving as a Chain of Thought (CoT). By requiring the model to consider the number of digits first, it enhances the reasoning process before generating the actual number. We use arithmetic tasks to demonstrate the effectiveness of the NumeroLogic formatting. We further demonstrate NumeroLogic applicability to general natural language modeling, improving language understanding performance in the MMLU benchmark.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Numerical Generation on NUPA](<https://www.sota2.com/research/sota/numerical-generation-on-nupa.md>): Numerical Generation; NUPA; Exact Match: 83.7.

- [Numerical Reasoning on NUPA (aggregated)](<https://www.sota2.com/research/sota/numerical-reasoning-on-nupa-aggregated.md>): Numerical Reasoning; NUPA (aggregated); Exact Match: 63.3.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2404.00459>)

[PDF](<https://arxiv.org/pdf/2404.00459.pdf>)
