arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.19730cs.CLcs.AI
收藏

大语言模型的计数能力及分词(Tokenization)的影响

Counting Ability of Large Language Models and Impact of Tokenization

University of British Columbia(不列颠哥伦比亚大学);Stony Brook University(纽约州立大学石溪分校)

Xiang Zhang, Juntai Cao, Chenyu You

AI总结:

本研究针对通用大语言模型计数能力受架构限制的问题,探究分词方式对其计数能力的影响,通过理论与实验分析揭示分词选择对模型理论可计算性的作用,为优化分词以提升大模型推理能力提供思路。

摘要:

作为现代大语言模型(LLM)核心架构的Transformer存在固有的架构局限性,会阻碍其推理能力。与循环网络不同,Transformer缺乏循环连接,被限制在恒定深度的计算中。这一限制使其处于复杂度类TC⁰中,理论上无法解决那些随着输入长度增长而需要越来越深推理的任务。计数作为众多推理任务的基础组成部分,若要以归纳方式执行,同样需要推理深度线性增长。尽管此前的研究已经确定了基于Transformer的专家模型(即专门针对计数任务训练的模型)计数能力的上限,但由于推理机制的差异,这些发现无法直接推广到通用大语言模型。近期研究表明,思维链(Chain of Thought, CoT)推理有助于缓解Transformer在计数任务中的部分架构局限。然而,人们很少关注分词在这些模型中的作用。专家模型通常使用字符级分词,而大语言模型一般依赖字节级(BPE)分词器,这从根本上改变了推理的处理方式。本研究探究了分词对大语言模型计数能力的影响,发现输入分词方式的差异会导致性能出现显著波动。我们提供了理论与实验分析,揭示了分词选择如何削弱模型的理论可计算性,从而为设计新的分词方法以增强大语言模型的推理能力提供启发。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑