Abstract
In the field of Natural Language Processing (NLP), a dominant design philosophy suggests that the most effective tokenizer is the one that achieves the highest text compression. This study challenges that "fewer is better" mantra by introducing PATHPIECE, a tokenizer designed for optimal compression, and evaluating it against standard methods. By training 64 language models ranging from 350M to 2.4B parameters, the authors demonstrate that raw compression (Corpus Token Count) correlates weakly with downstream performance. Instead, structural design choices like pre-tokenization and vocabulary initialization emerge as the true drivers of model success.
The Compression Hypothesis
Tokenization serves as the critical bridge between raw text and the numerical representations processed by language models. Most modern tokenizers, such as Byte-Pair Encoding (BPE), were originally adapted from data compression algorithms. This has led to a widespread hypothesis: if a tokenizer can represent a document using fewer tokens (lowering the Corpus Token Count, or CTC), the model will perform better because it can process more information within its fixed context window.
However, evidence for this has remained largely anecdotal. This paper sets out to rigorously test whether "more compression = better performance" by isolating the three distinct stages of the tokenization pipeline:
- Pre-tokenization: The initial rules for splitting text (e.g., splitting on whitespace).
- Vocabulary Construction: How the list of available tokens is selected.
- Segmentation: How a specific document is sliced into tokens from that vocabulary.
Methodology: The PATHPIECE Approach
To test the limits of compression, the authors developed PATHPIECE. Unlike BPE, which makes local, "greedy" decisions, PATHPIECE uses a shortest-path algorithm via a Directed Acyclic Graph (DAG) to find the absolute minimum number of tokens required to represent any text for a given vocabulary. By definition, it is the most efficient possible compressor for a fixed vocabulary.
Using the MosaicML MPT architecture, the researchers trained 64 different language models. They systematically varied pre-tokenization rules, vocabulary construction methods (BPE, Unigram, WordPiece, SaGe, and PATHPIECE), and segmentation strategies. These models were pre-trained on The Pile (825GB) and evaluated across 10 diverse multiple-choice benchmarks, including SciQ, ARC, PIQA, and COPA.
Key Insights
1. The Compression Myth
While PATHPIECE successfully achieved the lowest token counts, this did not lead to superior performance. The correlation between compression (CTC) and downstream accuracy was found to be very weak (Pearson $r = 0.241$). This suggests that optimizing for the shortest sequence length is a poor proxy for model quality.
2. The Primacy of Pre-tokenization
Rules that prevent tokens from crossing word boundaries (such as whitespace splitting) proved vital. Without these constraints, tokenizers often create "morphologically messy" tokens—units that combine the end of one word with the start of the next. Even if these messy tokens compress the text more efficiently, they obscure the underlying structure of the language, making it significantly harder for the model to learn.
3. Vocabulary Initialization and Parity
For top-down vocabulary methods like SaGe or PATHPIECE, initializing the vocabulary with tokens found by BPE performed significantly better than starting with simple n-grams. Furthermore, at the 350M parameter scale, the study found no "magic" tokenizer; the top five variants (including standard BPE and Unigram) were statistically tied in performance.
4. Scale and Invariance
Within the range of 32k to 50k tokens, the exact size of the vocabulary had very little impact on performance. However, as models grew to 2.4B parameters, the relative rankings of tokenizers began to shift. This indicates that the "optimal" tokenization strategy may change as model capacity increases.
Conclusion and Future Directions
The findings suggest that the NLP community should move away from viewing tokenization purely as a compression problem. The structural integrity of tokens and their alignment with linguistic boundaries are more important than the total token count.
While this study provides a comprehensive look at English-centric multiple-choice tasks, the authors acknowledge that the importance of these rules may differ for non-alphabetic languages (like Chinese) or highly agglutinative languages (like Turkish). Future work is needed to determine if these findings hold for generative tasks and at the trillion-parameter scale of frontier models.
Summary updated