Constructing a BPE Tokenization DFA
Not on the map. Why?
Abstract (arXiv)
Many natural language processing systems operate over tokenizations of text to address the open-vocabulary problem. In this paper, we give and analyze an algorithm for the efficient construction of deterministic finite automata (DFA) designed to operate directly on tokenizations produced by the popular byte pair encoding (BPE) technique. This makes it possible to apply many existing techniques and algorithms to the tokenized case, such as pattern matching, equivalence checking of tokenization dictionaries, and composing tokenized languages in various ways. The construction preserves some key properties of the automaton, and we use this to establish asymptotic bounds on the state complexity of the automata that result. Finally, we demonstrate how to construct an input-deterministic (subsequential) string-to-string transducer which precisely describes the relationship between strings and their correct tokenizations.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 3 of its 14 references that are in the map. First posted on arXiv 13 May 2024.
Builds on
3 of 14 references.
References · 3
- 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
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detectioncited by 27
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 2.
5 papers.
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlocited by 45
- 2024The Foundations of Tokenization: Statistical and Computational Concernscited by 20
- 2026Transducing Language Modelscited by 3
- 2026On the Proper Treatment of Units in Surprisal Theorycited by 2
- 2025Length-MAX Tokenizer for Language Modelscited by 1
- 2026On the Proper Treatment of Units in Surprisal Theory30 Apr 2026
- 2026Transducing Language Models5 Mar 2026
- 2025Length-MAX Tokenizer for Language Models25 Nov 2025
- 2025Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo17 Apr 2025
- 2024The Foundations of Tokenization: Statistical and Computational Concerns16 Jul 2024