NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Schwartz, Eli, Choshen, Leshem, Shtok, Joseph, Doveh, Sivan, Karlinsky, Leonid, Arbelle, Assaf
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866916411323973632
author Schwartz, Eli
Choshen, Leshem
Shtok, Joseph
Doveh, Sivan
Karlinsky, Leonid
Arbelle, Assaf
author_facet Schwartz, Eli
Choshen, Leshem
Shtok, Joseph
Doveh, Sivan
Karlinsky, Leonid
Arbelle, Assaf
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_00459
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning
Schwartz, Eli
Choshen, Leshem
Shtok, Joseph
Doveh, Sivan
Karlinsky, Leonid
Arbelle, Assaf
Computation and Language
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.
title NumeroLogic: Number Encoding for Enhanced LLMs' Numerical Reasoning
topic Computation and Language
url https://arxiv.org/abs/2404.00459