The Left Ripple of Byte-Pair Encoding: Certified Lookbehind for Every Dictionary
Not on the map. Why?
Abstract (arXiv)
Berglund and van der Merwe formalized byte-pair encoding and bounded how far an appended string can change a tokenization, leaving the converse open: how far can a string prepended on the left change it, which dictionaries make that ripple infinite, and can it be computed efficiently when finite? We answer all three for every dictionary. The origin radius, how far a prepend can change covering spans, is decided with radius certificates by a product of two runs of the automaton that guesses the final tokens, in time polynomial in the dictionary written out, and it is infinite exactly when one periodic word has two canonical tilings with no common boundary. Under their ordering condition it is infinite exactly when some rule (t, t) finds its two copies adjacent at its own stage, and such a rule makes any dictionary infinite. A finite radius makes every window of a width read off the radii have a cut, and the radius is finite exactly when such cuts are dense. The token machine completes for every dictionary, and the tokenization is subsequential, extending what Berglund, Martens and van der Merwe proved for proper ones under one pass per rule. A streaming tokenizer emits after every symbol exactly the tokens that no continuation changes, in polynomial time, answering a question of Dalirrooyfard and Ye. Boundedness of the label measure, the edit distance of the token sequences, is decided for every dictionary in polynomial time as well, and under the ordering condition the largest distance one edit causes over dictionaries of m rules lies asymptotically between m^2/10 and m^2/2. GPT-2's merge table carries 244 effective self-pairs, so its origin radius is infinite from the forty-second merge on, and that of cl100k, o200k and Llama 3 from their first. Every measured number is its program's output, and what is not executed is named.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 8 of its 38 references that are in the map. Submitted 9 Nov 2026.
Builds on
8 of 38 references.
References · 8
- 2025Sampling from Your Language Model One Byte at a Timecited by 16
- 2025Language Models over Canonical Byte-Pair Encodingscited by 14
- 2024Constructing a BPE Tokenization DFAcited by 8
- 2026Certified Split Windows for Parallel Lexing: Recovering Boundaries Where No Byte Certifiescited by 2
- 2026Certified Panic Mode: Repair-Invariant Error Recovery for Maximal-Munch Lexingcited by 2
- 2026Certified Split Points for Parallel Lexing: Exact and Modulo Discarded Tokenscited by 1
- 2026Online Tokenization with Optimal Delay in Linear Timecited by 1
- 2026Finitely Verifiable Segmentation: Decidability for Every Tokenizer with a Finite-State Verifiercited by 1
Built on by
Not cited yet.