Tokenisation over Bounded Alphabets is Hard
Not on the map. Why?
Abstract (arXiv)
Recent works have shown that tokenisation is NP-complete. However, these works assume tokenisation is applied to inputs with unboundedly large alphabets -- an unrealistic assumption, given that in practice tokenisers operate over fixed-size alphabets, such as bytes or Unicode-characters. We close this gap by analysing tokenisation over bounded alphabets, considering two natural variants: bottomup tokenisation and direct tokenisation, where we must, respectively, select a sequence of merge operations or a vocabulary whose application optimally compresses a dataset. We prove that even with binary alphabets, both variants are not only NP-complete, but also APX-hard and thus admit no polynomial-time approximation scheme (unless P=NP). We further show that direct tokenisation remains NP-complete even when applied to unary alphabets. These results establish that the computational intractability of tokenisation is not an artifact of large alphabets or complex constructions, but a fundamental barrier. Overall, our results explain why current practical algorithms such as BPE and UnigramLM are heuristic, and point toward approximation algorithms being an important path going forward for tokenisation research.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 10 of its 25 references that are in the map. First posted on arXiv 19 Nov 2025.
Builds on
10 of 25 references.
References · 10
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
- 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 639
- 2020How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Modelscited by 318
- 2023Tokenizer Choice For LLM Training: Negligible or Crucial?cited by 108
- 2024Unpacking Tokenization: Evaluating Text Compression and its Correlation with Model Performancecited by 61
- 2023A Formal Perspective on Byte-Pair Encodingcited by 36
- 2024Greed is All You Need: An Evaluation of Tokenizer Inference Methodscited by 34
- 2024Theoretical Analysis of Byte-Pair Encodingcited by 16
- 2024Tokenisation is NP-Completecited by 10
- 2025A Partition Cover Approach to Tokenizationcited by 5
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Tokenisation via Convex Relaxationscited by 4
- 2026Tokenization with Split Treescited by 2
- 2026Joint Optimization for Greedy Longest-match Tokenizationcited by 1
- 2026LangMAP: A Language-Adaptive Approach to Tokenizationcited by 0
- 2026Objective vs. Search: Decomposing What Makes a Good Tokenisercited by 0
- 2026Objective vs. Search: Decomposing What Makes a Good Tokeniser16 Sep 2026
- 2026Joint Optimization for Greedy Longest-match Tokenization25 Jul 2026
- 2026LangMAP: A Language-Adaptive Approach to Tokenization22 Jun 2026
- 2026Tokenisation via Convex Relaxations21 May 2026
- 2026Tokenization with Split Trees21 May 2026