An Analysis of Tokenization: Transformers under Markov Data
Nived Rajaraman, Jiantao Jiao, Kannan Ramchandran
摘要
While there has been a large body of research attempting to circumvent tokenization for language modeling (Clark et al., 2022; Xue et al., 2022) , the current consensus is that it is a necessary initial step for designing state-of-the-art performant language models. In this paper, we investigate tokenization from a theoretical point of view by studying the behavior of transformers on simple data generating processes. When trained on data drawn from certain simple k th -order Markov processes for k > 1, transformers exhibit a surprising phenomenon -in the absence of tokenization, they empirically are incredibly slow or fail to learn the right distribution and predict characters according to a unigram model (Makkuva et al., 2024) . With the addition of tokenization, however, we empirically observe that transformers break through this barrier and are able to model the probabilities of sequences drawn from the source near-optimally, achieving small cross-entropy loss. With this observation as starting point, we study the end-to-end cross-entropy loss achieved by transformers with and without tokenization. With the appropriate tokenization, we show that even the simplest unigram models (over tokens) learnt by transformers are able to model the probability of sequences drawn from k thorder Markov sources near optimally. Our analysis provides a justification for the use of tokenization in practice through studying the behavior of transformers on Markovian data.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Exploiting Vocabulary Frequency Imbalance in Language Model Pre-training 引用了 Causal Estimation of Tokenisation Bias
- Exploiting Vocabulary Frequency Imbalance in Language Model Pre-training 引用了 Language Models are Few-Shot Learners
- Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-context 引用了 Language Models are Few-Shot Learners
- How Transformers Learn Causal Structure with Gradient Descent 引用了 Language Models are Few-Shot Learners
- From Bytes to Ideas: Language Modeling with Autoregressive U-Nets 引用了 Language Models are Few-Shot Learners
- From Bytes to Ideas: Language Modeling with Autoregressive U-Nets 引用了 Dynamic Chunking for End-to-End Hierarchical Sequence Modeling
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling 引用了 From Bytes to Ideas: Language Modeling with Autoregressive U-Nets
- Dynamic Chunking for End-to-End Hierarchical Sequence Modeling 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper7
- Dynamic Chunking for End-to-End Hierarchical Sequence ModelingSukjun Hwang, Brandon Wang, Albert GuICLR 2026 · 76 次引用
- From Bytes to Ideas: Language Modeling with Autoregressive U-NetsMathurin Videau, Badr Youbi Idrissi, Alessandro Ferreira Leite, Marc Schoenauer 等NeurIPS 2025 · 14 次引用
- Exploiting Vocabulary Frequency Imbalance in Language Model Pre-trainingWoojin Chung, Jeonghoon KimNeurIPS 2025 · 6 次引用
- Pre-trained Large Language Models Learn to Predict Hidden Markov Models In-contextYijia Dai, Zhaolin Gao, Yahya Sattar, Sarah Dean 等NeurIPS 2025 · 2 次引用
- Causal Estimation of Tokenisation BiasPietro Lesci, Clara Meister, Thomas Hofmann, Andreas Vlachos 等ACL 2025
它引用的 Paper8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- How Transformers Learn Causal Structure with Gradient DescentEshaan Nichani, Alex Damian, Jason D. LeeICML 2024 · 117 次引用
- Rare Tokens Degenerate All Tokens: Improving Neural Text Generation via Adaptive Gradient Gating for Rare Token EmbeddingsSangwon Yu, Jongyoon Song, Heeseung Kim, Seongmin Lee 等ACL 2022 · 42 次引用
- Outline, Then Details: Syntactically Guided Coarse-To-Fine Code GenerationWenqing Zheng, S. P. Sharan, Ajay Kumar Jaiswal, Kevin Wang 等ICML 2023 · 35 次引用
- A Formal Perspective on Byte-Pair EncodingVilém Zouhar, Clara Meister, Juan Luis Gastaldi, Li Du 等ACL Findings 2023 · 28 次引用
相关 Paper
- Transformers on Markov data: Constant depth sufficesNived Rajaraman, Marco Bondaschi, Ashok Vardhan Makkuva, Kannan Ramchandran 等NeurIPS 2024 · 33 次引用
- Attention with Markov: A Curious Case of Single-layer TransformersAshok Vardhan Makkuva, Marco Bondaschi, Adway Girish, Alliot Nagle 等ICLR 2025
- Local to Global: Learning Dynamics and Effect of Initialization for TransformersAshok Vardhan Makkuva, Marco Bondaschi, Adway Girish, Alliot Nagle 等NeurIPS 2024 · 16 次引用
- Over-Tokenized Transformer: Vocabulary is Generally Worth ScalingHongzhi Huang, Defa Zhu, Banggu Wu, Yutao Zeng 等ICML 2025
- The Foundations of Tokenization: Statistical and Computational ConcernsJuan Luis Gastaldi, John Terilla, Luca Malagutti, Brian DuSell 等ICLR 2025 · 1 次引用
