Broken Words, Broken Performance: Effect of Tokenization on Performance of LLMs

📄 arXiv: 2512.21933v1 📥 PDF

作者: Sachin Pawar, Manoj Apte, Kshitij Jadhav, Girish Keshav Palshikar, Nitin Ramrakhiyani

分类: cs.CL

发布日期: 2025-12-26

备注: International Joint Conference on Natural Language Processing & Asia-Pacific Chapter of the Association for Computational Linguistics (IJCNLP-AACL 2025)


💡 一句话要点

研究表明LLM分词方式影响性能,提出惩罚函数量化分词质量

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 分词 tokenization 自然语言处理 模型性能

📋 核心要点

  1. 现有LLM分词方式可能将自然词拆分为多个token,导致信息损失,影响模型性能。
  2. 提出一系列惩罚函数,量化特定LLM对给定文本的分词质量,评估分词对模型的影响。
  3. 实验结果表明,不良分词显著降低LLM在多个NLP任务上的性能,验证了研究假设。

📝 摘要(中文)

本文研究了大型语言模型(LLM)中分词方式对性能的影响。与传统NLP中将文本分割成“自然”词汇不同,LLM由于词汇量有限,可能将一个自然词拆分成多个token(例如,Mistral将“martial”拆分为“mart”和“ial”)。本文假设这种对自然词的拆分会对LLM在各种NLP任务上的表现产生负面影响。为了量化这种影响,作者提出了一系列惩罚函数,用于计算特定LLM对给定文本的分词惩罚,以此衡量分词的“好坏”。通过对多个不同LLM在多个NLP任务上的实验,验证了该假设的统计显著性。

🔬 方法详解

问题定义:论文旨在解决LLM中不合理的tokenization对模型性能造成的负面影响。现有方法通常采用固定的tokenization策略,忽略了tokenization质量对下游任务的影响。这种不合理的tokenization,例如将一个完整的单词拆分成多个子词,可能会导致语义信息的丢失,进而影响模型的理解和生成能力。

核心思路:论文的核心思路是通过设计一系列惩罚函数来量化tokenization的质量。这些惩罚函数能够评估特定LLM对给定文本的tokenization效果,从而衡量tokenization对模型性能的潜在影响。通过分析tokenization惩罚与模型性能之间的关系,可以揭示tokenization质量对LLM性能的影响。

技术框架:论文的技术框架主要包括以下几个步骤:1) 选择多个LLM和NLP任务;2) 对每个LLM,设计一系列惩罚函数,用于计算给定文本的tokenization惩罚;3) 使用不同的LLM在不同的NLP任务上进行实验,并记录模型的性能;4) 分析tokenization惩罚与模型性能之间的关系,验证tokenization质量对模型性能的影响。

关键创新:论文的关键创新在于提出了一系列tokenization惩罚函数,能够量化tokenization的质量。这些惩罚函数考虑了多种因素,例如token的长度、token是否为完整单词等。通过这些惩罚函数,可以更全面地评估tokenization对模型性能的影响。与现有方法相比,该方法能够更准确地衡量tokenization的质量,并为优化tokenization策略提供指导。

关键设计:论文中惩罚函数的设计是关键。具体的设计细节未知,但可以推测惩罚函数会考虑以下因素:1) 被拆分的自然词的数量;2) 拆分后子词的长度;3) 拆分后子词的频率;4) 拆分后子词的语义完整性。这些因素都会影响tokenization的质量,因此需要在惩罚函数中进行合理的权衡。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

论文通过在多个NLP任务和多个LLM上的实验,验证了tokenization质量对模型性能的显著影响。具体性能数据未知,但实验结果表明,tokenization惩罚与模型性能之间存在显著的负相关关系,即tokenization惩罚越高,模型性能越差。这为优化LLM的tokenization策略提供了有力的证据。

🎯 应用场景

该研究成果可应用于改进LLM的tokenization策略,提升模型在各种NLP任务上的性能。通过优化tokenization过程,减少自然词的拆分,可以提高模型的语义理解能力和生成质量。此外,该研究还可以用于评估不同LLM的tokenization质量,为模型选择提供参考。

📄 摘要(原文)

Tokenization is the first step in training any Large Language Model (LLM), where the text is split into a sequence of tokens as per the model's fixed vocabulary. This tokenization in LLMs is different from the traditional tokenization in NLP where the text is split into a sequence of "natural" words. In LLMs, a natural word may also be broken into multiple tokens due to limited vocabulary size of the LLMs (e.g., Mistral's tokenizer splits "martial" into "mart" and "ial"). In this paper, we hypothesize that such breaking of natural words negatively impacts LLM performance on various NLP tasks. To quantify this effect, we propose a set of penalty functions that compute a tokenization penalty for a given text for a specific LLM, indicating how "bad" the tokenization is. We establish statistical significance of our hypothesis on multiple NLP tasks for a set of different LLMs.