[論文レビュー] Why Do Large Language Models (LLMs) Struggle to Count Letters?
この論文は、大規模言語モデル(LLMs)が 'strawberry' の 'r' を数えるような簡単な文字数え作業で失敗する理由を調査する。10,000語にわたる8つのLLMを用いた実証的評価を通じて、誤りの主な原因は、単語内で複数回出現する文字の数えにくさであり、トークン化や学習頻度によるものではないことが判明した。モデルの根本的な制限は、個々の文字を正しく特定できても、複数回出現する文字の集計ができないことにある。
Large Language Models (LLMs) have achieved unprecedented performance on many complex tasks, being able, for example, to answer questions on almost any topic. However, they struggle with other simple tasks, such as counting the occurrences of letters in a word, as illustrated by the inability of many LLMs to count the number of "r" letters in "strawberry". Several works have studied this problem and linked it to the tokenization used by LLMs, to the intrinsic limitations of the attention mechanism, or to the lack of character-level training data. In this paper, we conduct an experimental study to evaluate the relations between the LLM errors when counting letters with 1) the frequency of the word and its components in the training dataset and 2) the complexity of the counting operation. We present a comprehensive analysis of the errors of LLMs when counting letter occurrences by evaluating a representative group of models over a large number of words. The results show a number of consistent trends in the models evaluated: 1) models are capable of recognizing the letters but not counting them; 2) the frequency of the word and tokens in the word does not have a significant impact on the LLM errors; 3) there is a positive correlation of letter frequency with errors, more frequent letters tend to have more counting errors, 4) the errors show a strong correlation with the number of letters or tokens in a word and 5) the strongest correlation occurs with the number of letters with counts larger than one, with most models being unable to correctly count words in which letters appear more than twice.
研究の動機と目的
- LLMsが 'strawberry' のような簡単な文字数えタスクで失敗する根本的要因を調査すること。
- 学習データにおける語またはトークンの頻度が、LLMsの数え誤りに与える影響を評価すること。
- トークン化および注目メカニズムが文字数えパフォーマンスに果たす役割を分析すること。
- 数え作業の複雑さ、特に文字の重複度(出現回数)が誤りを引き起こす要因であるかどうかを特定すること。
- LLMsが文字を検出できないのか、それとも正しく数えられないのかを、重複度ごとの誤り分解を用いて特定すること。
提案手法
- 本研究では、8つのLLMを10,000語にわたって評価し、各文字の出現回数を数える際の正確性を測定した。
- 文字数え誤りは、語の頻度、トークンの頻度、および文字の重複度(単語内での文字の出現回数)と関連づけて分析した。
- 誤りの内訳として、実際にあるより多い(過剰推定)か、少ない(不足推定)かを、特に重複度が1、2、3の場合に分けて分析した。
- 同じトークン内に2回出現する文字と、異なるトークンに分散して出現する文字の誤り率を比較することで、トークン化の影響を評価した。
- 文字が単語内に存在しないにもかかわらず、非ゼロのカウントを報告する傾向を測定し、検出能力を評価した。
- 誤り率と、文字頻度、語長、文字の重複度などの要因との間の統計的相関を計算した。

実験結果
リサーチクエスチョン
- RQ1学習データにおける語またはその部分の頻度が、LLMsの文字数え正確性に影響を与えるか?
- RQ2トークン化がLLMsの文字数え誤りの主な原因であるか?
- RQ3文字の重複度(つまり、単語内での出現回数)が数え誤りとどの程度相関するか?
- RQ4文字が複数回出現する場合、LLMsは文字を検出できないのか、それとも正しく数えられないのか?
- RQ5重複度に応じて、LLMsの回答に系統的なバイアス(過剰推定や不足推定)があるか?
主な発見
- LLMsは、単語内で2回以上出現する文字の数えに一貫して失敗しており、文字の重複度が高くなるほど誤り率が顕著に上昇する。
- 語の頻度またはトークンの頻度と、数え誤りの頻度との間に有意な相関は認められない。
- 誤りの最も強い予測要因は、文字が単語内で何回出現するかという数であり、特に3回以上出現する場合に顕著である。
- 重複度が1の文字では、モデルが最も頻繁に過剰推定を行う(例:実際に1つなのに2以上と答える)。一方、重複度が2および3の場合は、不足推定が主な誤りタイプである。
- モデルはトークン内で文字の存在を正しく特定しているため、根本的な失敗は検出ではなく集計にあることが示され、特に繰り返し出現する文字に対して顕著である。
- GPT-4o や Llama 3 70B のような大規模モデルは、小規模モデルに比べて顕著に低い誤り率を示しており、スケーリングが有効であるものの、根本的な数えの制限を解消するものではない。

この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。