Tokenization as Finite-State Transduction
Not on the map. Why?
Abstract (arXiv)
Tokenization is the first step in modern neural language model pipelines where an input text is converted to a sequence of subword tokens. We introduce from first principles a finite-state transduction framework which can efficiently encode all possible tokenizations of a regular language. We then constructively show that Byte-Pair Encoding (BPE) and MaxMatch (WordPiece), two popular tokenization schemes, fit within this framework. For BPE, this is particularly surprising given its resemblance to context-free grammar and the fact that it does not tokenize strings from left to right. An application of this is to guided generation, where the outputs of a language model are constrained to match some pattern. Here, patterns are encoded at the character level, which creates a mismatch between the constraints and the model's subword vocabulary. While past work has focused only on constraining outputs without regard to the underlying tokenization algorithm, our framework allows for simultaneously constraining the model outputs to match a specified pattern while also adhering to the underlying tokenizer's canonical tokenization.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 14 of its 34 references that are in the map. First posted on arXiv 21 Oct 2024.
Builds on
14 of 34 references.
References · 14
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2021Between words and characters: A Brief History of Open-Vocabulary Modeling and Tokenization in NLPcited by 130
- 2020Fast WordPiece Tokenizationcited by 85
- 2024Automata-based constraints for language model decodingcited by 49
- 2023A Formal Perspective on Byte-Pair Encodingcited by 35
- 2024Toward a Theory of Tokenization in LLMscited by 28
- 2024Where is the signal in tokenization space?cited by 21
2 more
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2025UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-8cited by 3
- 2026NCO: A Versatile Plug-in for Handling Negative Constraints in Decodingcited by 0
- 2026Beyond Perplexity: UTF-8 Validity in Byte-aware Language Modelscited by 0
- 2026Trie Automata for Constrained Decoding over Large Finite Setscited by 0
- 2026Component-Weighted Centroid Search for Exact Incremental BPEcited by 0
- 2026Component-Weighted Centroid Search for Exact Incremental BPE30 Sep 2026
- 2026Trie Automata for Constrained Decoding over Large Finite Sets12 Aug 2026
- 2026Beyond Perplexity: UTF-8 Validity in Byte-aware Language Models12 Jun 2026
- 2026NCO: A Versatile Plug-in for Handling Negative Constraints in Decoding11 May 2026
- 2025UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-85 Nov 2025