Tokens, the oft-overlooked appetizer: Large language models, the distributional hypothesis, and meaning

📄 arXiv: 2412.10924v9 📥 PDF

作者: Julia Witte Zimmerman, Denis Hudon, Kathryn Cramer, Alejandro J. Ruiz, Calla Beauregard, Ashley Fehr, Mikaela Irene Fudolig, Bradford Demarest, Yoshi Meke Bird, Milo Z. Trujillo, Christopher M. Danforth, Peter Sheridan Dodds

分类: cs.CL, cs.AI

发布日期: 2024-12-14 (更新: 2025-11-22)


💡 一句话要点

关注Tokenization对LLM认知的影响,揭示其在语义和偏差引入中的作用

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

关键词: 大型语言模型 Tokenization 分布假设 语义表示 偏差 认知 预训练

📋 核心要点

  1. 现有LLM架构中tokenization的重要性常被忽视,其对模型认知的影响缺乏深入研究。
  2. 论文核心在于分析tokenization如何影响LLM学习人类语言的分布模式,并作为语义构建的基础。
  3. 通过分析不同tokenization方法和模型内部表示,揭示了tokenization引入偏差和影响模型认知的潜在风险。

📝 摘要(中文)

本文探讨了tokenization在大型语言模型(LLM)中的作用,认为它对模型的认知影响常被忽视。作者认为,LLM证明了分布假设(DH)足以实现相当程度的人类语言性能,尤其是在推理词汇能力方面。Token中涌现出具有人类意义的语言单元,以及当前的结构约束,促使人们对现有的、语言学上不可知的tokenization技术进行改进,特别是考虑到它们作为(1)从人类语言向模型传递显著分布模式的载体和(2)语义原语的角色。作者研究了BPE tokenizer的tokenization结果、从Hugging Face和tiktoken获得的现有模型词汇表,以及RoBERTa(large)模型中token向量在各层中的信息。研究表明,token和预训练可能成为偏差和其他不良内容的后门,而当前的对齐实践可能无法弥补。此外,tokenization算法的目标函数也会影响LLM的认知。最后,讨论了对架构选择、意义构建、语言对思想的首要地位以及LLM认知的影响。

🔬 方法详解

问题定义:现有大型语言模型通常采用 linguistically-agnostic 的 tokenization 技术,例如 BPE。这种方法虽然在工程上可行,但可能无法最佳地捕捉人类语言中的语义信息,并且可能引入偏差。现有方法没有充分考虑 tokenization 在将人类语言的分布模式传递给模型以及作为语义原语方面的作用。

核心思路:论文的核心思路是深入研究 tokenization 过程对 LLM 认知能力的影响。作者认为,tokenization 不仅仅是一个预处理步骤,而是直接影响模型如何学习和理解语言。通过分析不同 tokenization 方法生成的 token,以及这些 token 在模型内部的表示,可以揭示 tokenization 如何影响模型的语义理解和偏差引入。

技术框架:论文采用了一种多方面的研究方法,包括:1) 分析 BPE tokenizer 的 tokenization 结果;2) 研究从 Hugging Face 和 tiktoken 获得的现有模型词汇表;3) 分析 RoBERTa (large) 模型中 token 向量在各层中的信息。通过这些分析,作者旨在理解 tokenization 如何影响模型的语义表示和偏差引入。

关键创新:论文的关键创新在于强调了 tokenization 在 LLM 认知中的重要性,并揭示了 tokenization 可能引入偏差和其他不良内容的潜在风险。作者认为,现有的对齐实践可能无法完全消除这些风险,因此需要重新审视 tokenization 的设计。

关键设计:论文没有提出新的 tokenization 算法,而是侧重于分析现有 tokenization 方法的优缺点。作者分析了 BPE tokenizer 的工作原理,并研究了不同 token 在模型内部的表示。此外,作者还讨论了 tokenization 算法的目标函数如何影响 LLM 的认知。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

论文通过实验分析,揭示了tokenization方法对LLM学习语言分布模式和语义表示的关键影响。研究表明,不合理的tokenization可能导致模型性能下降,并引入偏差,而现有的对齐方法可能无法完全消除这些问题。这些发现强调了重新审视tokenization策略的必要性。

🎯 应用场景

该研究成果可应用于改进LLM的tokenization策略,提升模型语义理解能力,减少偏差引入。同时,有助于开发更安全、更可靠的LLM,并为语言学研究提供新的视角,例如,更好地理解语言的本质和人类认知。

📄 摘要(原文)

Tokenization is a necessary component within the current architecture of many language mod-els, including the transformer-based large language models (LLMs) of Generative AI, yet its impact on the model's cognition is often overlooked. We argue that LLMs demonstrate that the Distributional Hypothesis (DH) is sufficient for reasonably human-like language performance (particularly with respect to inferential lexical competence), and that the emergence of human-meaningful linguistic units among tokens and current structural constraints motivate changes to existing, linguistically-agnostic tokenization techniques, particularly with respect to their roles as (1) vehicles for conveying salient distributional patterns from human language to the model and as (2) semantic primitives. We explore tokenizations from a BPE tokenizer; extant model vocabularies obtained from Hugging Face and tiktoken; and the information in exemplar token vectors as they move through the layers of a RoBERTa (large) model. Besides creating suboptimal semantic building blocks and obscuring the model's access to the necessary distributional patterns, we describe how tokens and pretraining can act as a backdoor for bias and other unwanted content, which current alignment practices may not remediate. Additionally, we relay evidence that the tokenization algorithm's objective function impacts the LLM's cognition, despite being arguably meaningfully insulated from the main system intelligence. Finally, we discuss implications for architectural choices, meaning construction, the primacy of language for thought, and LLM cognition. [First uploaded to arXiv in December, 2024.]