paper-with-me

홈 › Papers

Interpreting and Improving Large Language Models in Arithmetic Calculation

2024-09-03 · Wei zhang, Chaoqun Wan, Yonggang Zhang, Yiu-ming Cheung, Xinmei Tian, Xu Shen, Jieping Ye

Large language models (LLMs) have demonstrated remarkable potential across numerous applications and have shown an emergent ability to tackle complex reasoning tasks, such as mathematical computations. However, even for the simplest arithmetic calculations, the intrinsic mechanisms behind LLMs remain mysterious, making it challenging to ensure reliability. In this work, we delve into uncovering a specific mechanism by which LLMs execute calculations. Through comprehensive experiments, we find that LLMs frequently involve a small fraction (< 5%) of attention heads, which play a pivotal role in focusing on operands and operators during calculation processes. Subsequently, the information from these operands is processed through multi-layer perceptrons (MLPs), progressively leading to the final solution. These pivotal heads/MLPs, though identified on a specific dataset, exhibit transferability across different datasets and even distinct tasks. This insight prompted us to investigate the potential benefits of selectively fine-tuning these essential heads/MLPs to boost the LLMs' computational performance. We empirically find that such precise tuning can yield notable enhancements on mathematical prowess, without compromising the performance on non-mathematical tasks. Our work serves as a preliminary exploration into the arithmetic calculation abilities inherent in LLMs, laying a solid foundation to reveal more intricate mathematical tasks.

📄 PDF Abstract BibTeX arXiv:2409.01659

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Arithmetic Reasoning with LLM: Prolog Generation & Permutation

2024-05-28 · Xiaocheng Yang, Bingsen Chen, Yik-Cheung Tam

Instructing large language models (LLMs) to solve elementary school math problems has shown great success using Chain of Thought (CoT). However, the CoT approach relies on an LLM to generate a sequence of arithmetic calc…

Arithmetic ReasoningData AugmentationGSM8KMath

Neural Arithmetic Expression Calculator

2018-09-23 · Kaiyu Chen, Yihan Dong, Xipeng Qiu, Zitian Chen

This paper presents a pure neural solver for arithmetic expression calculation (AEC) problem. Previous work utilizes the powerful capabilities of deep neural networks and attempts to build an end-to-end model to solve th…

Hierarchical Reinforcement LearningReinforcement Learning

OccamLLM: Fast and Exact Language Model Arithmetic in a Single Step

2024-06-04 · Owen Dugan, Donato Manuel Jimenez Beneto, Charlotte Loh, Zhuo Chen 외

Despite significant advancements in text generation and reasoning, Large Language Models (LLMs) still face challenges in accurately performing complex arithmetic operations. Language model systems often enable LLMs to ge…

Language ModelingLanguage ModellingMathematical Problem-SolvingText Generation

Interpreting Arithmetic Mechanism in Large Language Models through Comparative Neuron Analysis

2024-09-21 · Zeping Yu, Sophia Ananiadou

We find arithmetic ability resides within a limited number of attention heads, with each head specializing in distinct operations. To delve into the reason, we introduce the Comparative Neuron Analysis (CNA) method, whic…

Model EditingPrediction

RevOrder: A Novel Method for Enhanced Arithmetic in Language Models

2024-02-06 · Si Shen, Peijun Shen, Danhao Zhu

This paper presents RevOrder, a novel technique aimed at improving arithmetic operations in large language models (LLMs) by reversing the output digits in addition, subtraction, and n-digit by 1-digit (nD by 1D) multipli…

GSM8KMath