Language Models Understand Numbers, at Least Partially

要約

大規模言語モデル (LLM) は、さまざまなテキスト関連のタスクにおいて優れた能力を示しています。
ただし、それらの不透明な内部メカニズムは、数学的問題でそれらを活用する際の障害となります。
この論文では、言語モデルが数学的問題の基本要素となる数値を理解できるかどうかという基本的な問題を研究します。
数学的問題を解決するには、言語モデルが数値を理解し、これらの数値を隠れた状態で圧縮できる必要があると想定します。
加算問題を含む合成データセットを構築し、線形プローブを利用してモデルの隠れ状態から入力数値を読み取ります。
実験結果は、初期層の LLaMA-2 モデル ファミリに圧縮された数値が存在することを裏付ける証拠を示しています。
ただし、圧縮プロセスはロスレスではないようで、元の数値を正確に再構成することが困難です。
さらなる実験では、言語モデルがエンコードされた数値を利用して算術計算を実行できること、および計算能力がモデルのサイズに応じてスケールアップすることが示されました。
私たちの予備調査では、言語モデルが数値を部分的に理解していることが示唆されており、数学的問題を解決するモデルの能力についての将来の研究への洞察が得られます。

要約(オリジナル)

Large language models (LLMs) have exhibited impressive competency in various text-related tasks. However, their opaque internal mechanisms become a hindrance to leveraging them in mathematical problems. In this paper, we study a fundamental question: whether language models understand numbers, which play a basic element in mathematical problems. We assume that to solve mathematical problems, language models should be capable of understanding numbers and compressing these numbers in their hidden states. We construct a synthetic dataset comprising addition problems and utilize linear probes to read out input numbers from the hidden states of models. Experimental results demonstrate evidence supporting the existence of compressed numbers in the LLaMA-2 model family from early layers. However, the compression process seems to be not lossless, presenting difficulty in precisely reconstructing the original numbers. Further experiments show that language models can utilize the encoded numbers to perform arithmetic computations, and the computational ability scales up with the model size. Our preliminary research suggests that language models exhibit a partial understanding of numbers, offering insights into future investigations about the models’ capability of solving mathematical problems.

arxiv情報

著者 Fangwei Zhu,Damai Dai,Zhifang Sui
発行日 2024-01-08 08:54:22+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク