REVIEW
GreedTok Is a 0.3287-Approximation for Tokenization, Within 3% of the Best Possible Constant
Data Structures and Algorithms · Submitted 5 Nov 2026
Pith's verdict: Resolves the open constant-factor question for greedy tokenization with clever techniques and honest bounds.
Why Pith says this
Highlight any text to comment on it.
Referee report
The paper
The paper claims
GreedTok guarantees a constant factor of at least 0.2752 of the optimal tokenization on every corpus.
The reading
What carries the argument
The central mechanism is the shift lemma (Lemma 4), which states that if two occurrences p and q of an unchosen string x overlap by a shift δ, then a pair inside p is covered if and only if the corresponding pair inside q is covered at the same time, and consequently their gains are equal. This allows the algorithm to skip overlapping occurrences without loss, and it lets the analysis charge skipped occurrences to their blockers. The other key machinery is the concept of (α, β)-good window distributions (Definition 8), which are sub-probability distributions over substrings of a token of length L such that the expected length of the window is at least α(L−1) and each boundary or interior offset contributes at most β to the expected loss when invalidating windows. The existence of such distributions for every L is verified computationally for L ≤ 1500 and analytically for larger L using a quadratic construction (Lemma 13).
Extended reading notes
Core claim
The paper establishes that GreedTok achieves at least 0.2752 times the optimal partition-cover value on any corpus and for any vocabulary budget k. This bound holds for any tie-breaking and for both the exact greedy loop and the lazy priority-queue version of the algorithm. The proof relies on a shift lemma: if two overlapping occurrences of a not-yet-chosen token are valid, they have the same gain, so GreedTok's left-to-right scan loses nothing when an occurrence is skipped due to overlap. This lemma enables a per-occurrence charging argument where a random window (substring) of an optimal token is shown to contribute expected gain at least α per optimal pair, while covered pairs cost at most β per occurrence. Solving the recurrence gives the constant factor. The best window distributions are obtained by solving a linear program for short tokens and an explicit quadratic family for long tokens, yielding α ≈ 0.563 and β = 7/4 as a good trade-off; using an envelope of several (α, β) pairs improves the final constant to 0.2752.
Load-bearing premise
The lower bound proof requires the existence of an (α,β)-good window distribution D_L for every token length L ≥ 2; the authors verify this computationally up to L = 1500 and provide an analytic construction for larger L, but the analytic construction assumes a specific quadratic parameterization and that β > 1 + 1/√2.
Editorial extensions
If this is right
- For any corpus and any budget k, a practitioner can rely on GreedTok achieving at least 27.52% of the optimal partition-cover value, and this guarantee is independent of the tie-breaking rule.
- The shift lemma provides a general tool for analyzing greedy algorithms where overlapping occurrences of the same candidate can be compared, potentially applicable to other sequence covering problems.
- The lower bound of 0.2752 combined with the upper bound of about 0.5256 shows that the worst-case ratio of GreedTok lies in a range roughly [0.275, 0.526], leaving an open factor of nearly 2.
- The APX-hardness proof (Theorem 20) shows that no polynomial-time algorithm can approximate the problem within 1 − 1/31580 ≈ 0.999968 unless P=NP, establishing a strong inapproximability result for the first time.
Reading between the lines
- The shift lemma might be extended to analyze other greedy algorithms that build vocabularies or segmentations where occurrences of the same string can overlap, such as in phrase-based machine translation or DNA motif discovery.
- The quadratic window distribution family (Lemma 13) suggests a general method for constructing distributions that balance coverage and interference, which could be reused in other charging arguments for monotone submodular-like functions.
- The gap between the lower bound 0.2752 and the best upper bound 0.5256 indicates that GreedTok's true worst-case ratio may be closer to 0.5, motivating the search for either an improved lower bound or a tighter upper bound via a different instance family.
- The paper's computational verification (window certificates for L up to 1500, exact enumeration for small instances) sets a high standard of empirical support, and the same methodology could be applied to verify other combinatorial guarantees.
Original abstract
A tokenizer's vocabulary is chosen once and used on every input, so it matters how much compression a greedy vocabulary can lose. GreedTok (Lim et al., 2025) picks $k$ tokens one at a time, each time the string that saves the most tokens; its worst-case ratio was open. We prove that GreedTok saves at least 0.3287 of the optimal number of tokens saved, on every corpus and budget, while junction corpora show that no constant above 0.3387 is possible. The lower-bound proof is written out in full and uses no computer certificates. Its key idea is to track the order of greedy's choices: given that order, the pattern greedy leaves inside an optimal token depends on two numbers, and an induction peels off one chosen string at a time; without the order, a needed inequality fails for a 20-character token. Over 256 symbols, GreedTok's ratio exceeds 0.33861 for every $k\ge 104{,}910$, and over $k^c$ symbols with $c<1/2$ it is at least 0.4386 in the limit. We also show that the objective is APX-hard: it has no PTAS unless P = NP.
The compiled record
The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. Numbers in the tables are the authors', checked by code. No sentence in this record was written by a model.
The abstract, sentence by sentence
GreedTok (Lim, Tan, Choo and Lauw, NeurIPS 2025) builds a tokenizer vocabulary greedily for the partition-cover objective: choose $k$ tokens so as to maximize the number of adjacent character pairs merged when the corpus is segmented optimally. The objective is neither submodular nor supermodular, so the classical $1-1/e$ analysis does not apply, and a worst-case guarantee was left open. We prove that GreedTok is a constant-factor approximation: on every corpus and for every budget $k$ it achieves at least $0.2752$ of the optimum, and it is optimal for $k=1$. The bound holds for both the exact greedy loop and the lazy priority-queue loop of the published algorithm and its code. The key ingredient is a shift lemma: if two occurrences of a not-yet-chosen token overlap and both are still usable, they offer exactly the same gain, so GreedTok's left-to-right scoring loses nothing when occurrences collide. A per-occurrence charging argument, with window distributions certified in exact arithmetic or given in closed form, completes the proof. In the other direction, we construct corpora on which GreedTok, with adversarial tie-breaking, achieves at most a fraction of the optimum tending to $(7-\ln 2)/12\approx0.5256$ (below $0.5380$ when every greedy choice is unique). Finally, we show that the objective is NP-hard to approximate within $1-1/31580$, to our knowledge the first inapproximability result for it.
background contribution method result interpretation main claim
| # | sentence | role | the authors' own work | states the main conclusion | strength |
|---|---|---|---|---|---|
| s0 | GreedTok (Lim, Tan, Choo and Lauw, NeurIPS 2025) builds a tokenizer vocabulary greedily for the partition-cover objective: choose $k$ tokens so as to maximize the number of adjacent character pairs merged when the corpus is segmented optimally. | background 0.45 | 0.25 | 0.05 | asserted 1.00 |
| s1 | The objective is neither submodular nor supermodular, so the classical $1-1/e$ analysis does not apply, and a worst-case guarantee was left open. | gap 0.98 | 0.18 | 0.03 | asserted 1.00 |
| s2 | We prove that GreedTok is a constant-factor approximation: on every corpus and for every budget $k$ it achieves at least $0.2752$ of the optimum, and it is optimal for $k=1$. | result 0.94 | 0.94 | 0.92 | asserted 1.00 |
| s3 | The bound holds for both the exact greedy loop and the lazy priority-queue loop of the published algorithm and its code. | result 0.81 | 0.82 | 0.09 | asserted 1.00 |
| s4 | The key ingredient is a shift lemma: if two occurrences of a not-yet-chosen token overlap and both are still usable, they offer exactly the same gain, so GreedTok's left-to-right scoring loses nothing when occurrences collide. | method 0.70 | 0.89 | 0.04 | asserted 1.00 |
| s5 | A per-occurrence charging argument, with window distributions certified in exact arithmetic or given in closed form, completes the proof. | method 0.97 | 0.92 | 0.04 | asserted 0.99 |
| s6 | In the other direction, we construct corpora on which GreedTok, with adversarial tie-breaking, achieves at most a fraction of the optimum tending to $(7-\ln 2)/12\approx0.5256$ (below $0.5380$ when every greedy choice is unique). | result 0.96 | 0.94 | 0.06 | asserted 1.00 |
| s7 | Finally, we show that the objective is NP-hard to approximate within $1-1/31580$, to our knowledge the first inapproximability result for it. | result 0.83 | 0.94 | 0.08 | asserted 1.00 |
What was examined, and what was not
- arXiv listing abstract v1
- full text
- figures and tables
- references and citing sentences
- relations to other papers
- P abstract
- S sections
- T body sentences
- C citations
- R cross-paper relations
Figures
Figures reproduced from arXiv:2611.07346 by the authors.
References
Discussion
Disagree with the review, or know something it missed? Leave a comment, highlight any passage above to comment on it, or challenge this review formally.