arXiv:2412.18626cs.CL2024-12被引 46

大模型数字母出错,主要因重复字母多,而非词频或分词问题。

Why Do Large Language Models (LLMs) Struggle to Count Letters?

  • 分析大模型在数字母时的错误模式,聚焦词频与计数复杂度影响。
  • 高频字母反而错误更多,重复字母超过两次时几乎全错。
  • 错误核心是计数能力不足,非识别或训练数据缺失。

大型语言模型在复杂任务上表现优异,但在统计单词中字母出现次数等简单任务上表现不佳,例如无法正确计算"strawberry"中"r"的个数。本文通过实验研究模型错误与训练数据中词及其成分频率、计数操作复杂度的关系。对代表性模型在大量单词上的评估显示:1)模型能识别字母但无法准确计数;2)词频及子词频对错误无显著影响;3)字母频率越高,错误越多;4)错误与单词长度或子词数量正相关;5)最显著的相关性来自重复出现超过一次的字母数量,多数模型无法正确处理此类单词。

原文摘要 · Abstract (English)

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.

大模型缺陷字母计数语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。