How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs

Guhao Feng, Kai Yang, Yuntian Gu, Xinyue Ai, Shengjie Luo +4 more
10/17/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Despite the remarkable success of Transformer-based large language models (LLMs) across various domains, understanding and enhancing their mathematical capabilities remains a significant challenge. In this paper, we conduct a rigorous theoretical analysis of LLMs' mathematical abilities, with a specific focus on their arithmetic performances. We identify numerical precision as a key factor that influences their effectiveness in arithmetical tasks. Our results show that Transformers operating with low numerical precision fail to address arithmetic tasks, such as iterated addition and integer multiplication, unless the model size grows super-polynomially with respect to the input length. In contrast, Transformers with standard numerical precision can efficiently handle these tasks with significantly smaller model sizes. We further support our theoretical findings through empirical experiments that explore the impact of varying numerical precision on arithmetic tasks, providing valuable insights for improving the mathematical reasoning capabilities of LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{feng2024numerical,
  title  = {How Numerical Precision Affects Arithmetical Reasoning Capabilities of LLMs},
  author = {Guhao Feng and Kai Yang and Yuntian Gu and Xinyue Ai and Shengjie Luo and Jiacheng Sun and Di He and Zhenguo Li and Liwei Wang},
  year   = {2024},
  eprint = {2410.13857},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.13857v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.13857.svg)](https://codeofpaper.com/paper/2410.13857)

Discussion