arXiv:2410.19730cs.CLcs.AI2024-10被引 33

研究分词方式如何影响大模型的计数能力,揭示了当前分词方法可能限制模型推理。

Counting Ability of Large Language Models and Impact of Tokenization

  • 对比字符级与字节级分词对模型计数能力的影响
  • 发现字节级分词使模型在长输入下计数准确率下降超40%
  • 适合关注大模型推理机制与分词设计的研究者

Transformer作为现代大语言模型的核心架构,因其缺乏循环连接而存在固有的计算深度限制,被归类于TC⁰复杂度类,理论上无法处理随输入长度增长需深层推理的任务。计数作为许多推理任务的基础,需要线性增长的推理深度才能实现归纳式计算。尽管已有研究界定了基于Transformer的专用计数模型的上限,但这些结论未必适用于通用大模型,因二者推理机制不同。近期工作表明,思维链(Chain of Thought)可缓解部分架构限制,但分词方式的作用仍被忽视。不同于专用模型常采用字符级分词,通用大模型普遍使用字节级(BPE)分词,这从根本上改变了推理过程。本文通过理论与实验分析,揭示了不同输入分词方式导致显著性能差异,证明字节级分词可能削弱模型的理论可计算性,为提升大模型推理能力的新分词方法设计提供启示。

原文摘要 · Abstract (English)

Transformers, the backbone of modern large language models (LLMs), face inherent architectural limitations that impede their reasoning capabilities. Unlike recurrent networks, Transformers lack recurrent connections, confining them to constant-depth computation. This restriction places them in the complexity class TC$^0$, making them theoretically incapable of solving tasks that demand increasingly deep reasoning as input length grows. Counting, a fundamental component of many reasoning tasks, also requires reasoning depth to grow linearly to be performed inductively. While previous studies have established the upper limits of counting ability in Transformer-based expert models (i.e., models specifically trained for counting tasks), these findings do not directly extend to general-purpose LLMs due to differences in reasoning mechanisms. Recent work has highlighted how Chain of Thought (CoT) reasoning can help alleviate some of the architectural limitations of Transformers in counting tasks. However, little attention has been paid to the role of tokenization in these models. Unlike expert models that often use character-level tokenization, LLMs typically rely on byte-level (BPE) tokenizers, which fundamentally alters the way reasoning is processed. Our work investigates the impact of tokenization on the counting abilities of LLMs, uncovering substantial performance variations based on input tokenization differences. We provide both theoretical and experimental analyses, offering insights into how tokenization choices can undermine models' theoretical computability, thereby inspiring the design of new tokenization methods to enhance reasoning in LLMs.

大模型推理分词策略计数能力

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