paper-with-me

Papers

Tokenisation over Bounded Alphabets is Hard

2025-11-19 · Violeta Kastreva, Philip Whittington, Dennis Komm, Tiago Pimentel 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 $n$-ary alphabets, considering two natural variants: bottom-up tokenisation and direct tokenisation, where we must, respectively, select a sequence of merge operations or a vocabulary whose application optimally compresses a dataset. First, we note that proving hardness results for an $n$-ary alphabet proves the same results for alphabets of any larger size. We then prove that even with binary alphabets, both variants are not only NP-complete, but admit no polynomial-time approximation scheme (unless P=NP). We further show that direct tokenisation remains NP-complete even when applied to unary alphabets. While unary alphabets may not be practically useful, this result establishes 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 practical algorithms such as BPE and UnigramLM are heuristic, and points toward approximation algorithms being an important path going forward for tokenisation research.

📄 PDF Abstract BibTeX arXiv:2511.15709

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Shannon Entropy Estimation in $\infty$-Alphabets from Convergence Results

2017-08-27 · Jorge F. Silva

The problem of Shannon entropy estimation in countable infinite alphabets is addressed from the study and use of convergence results of the entropy functional, which is known to be discontinuous with respect to the total…

Stochasticity in Tokenisation Improves Robustness

2026-04-17 · Sophie Steger, Rui Li, Sofiane Ennadir, Anya Sims 외 arxiv

The widespread adoption of large language models (LLMs) has increased concerns about their robustness. Vulnerabilities in perturbations of tokenisation of the input indicate that models trained with a deterministic canon…

Tokenisation is NP-Complete

2024-12-19 · Philip Whittington, Gregor Bachmann, Tiago Pimentel

In this work, we prove the NP-completeness of two variants of tokenisation, defined as the problem of compressing a dataset to at most $\delta$ symbols by either finding a vocabulary directly (direct tokenisation), or se…

You should evaluate your language model on marginal likelihood over tokenisations

2021-09-06 · EMNLP 2021 11 · Kris Cao, Laura Rimell

Neural language models typically tokenise input text into sub-word units to achieve an open vocabulary. The standard approach is to use a single canonical tokenisation at both train and test time. We suggest that this ap…

Language ModelingLanguage Modelling

Improving Tokenisation by Alternative Treatment of Spaces

2022-04-08 · Edward Gow-Smith, Harish Tayyar Madabushi, Carolina Scarton, Aline Villavicencio

Tokenisation is the first step in almost all NLP tasks, and state-of-the-art transformer-based language models all use subword tokenisation algorithms to process input text. Existing algorithms have problems, often produ…

Natural Language Understanding