Significance-Gain Pair Encoding for LLMs: A Statistical Alternative to Frequency-Based Subword Merging
Organizations: Department of Science, Technology & Mathematics, Lincoln University
Abstract
Subword tokenization is a key design choice for modern language models, including large language models (LLMs), with byte- and character-level BPE serving as a widely used baseline. Standard BPE selects merges by raw pair frequency, which favors compression but can conflate true adjacency cohesion with pairs that are frequent due to high marginal counts. This paper introduces Significance-Gain BPE, a drop-in alternative merge criterion that measures cohesion via a z-statistic under an independence null model and combines it with an explicit compression-aware gain term. Significance-Gain BPE is evaluated on WikiText-103 (raw) character slices using a small causal Transformer language model, reporting both token-dependent perplexity and the tokenizer-invariant metric bits per character (BPC). At a representative operating point, Significance-Gain BPE reduces validation and test perplexity by 13% and 12%, respectively, and improves validation and test BPC by about 0.9 to 1.0%. A vocabulary-size sweep further shows lower BPC in most closest-compression comparisons, suggesting that statistically grounded merge selection can improve predictive efficiency per unit of raw text across a range of compression regimes.
Figures & tables
| Tokenizer | Val PPL | Test PPL | Val BPC | Test BPC |
|---|---|---|---|---|
| Standard (freq) BPE | 312.78 | 323.71 | 3.6176 | 3.5915 |
| Significance-Gain BPE ( ) | 271.47 | 283.85 | 3.5818 | 3.5580 |
| Improvement (%) | 13.21 | 12.31 | 0.99 | 0.93 |
| V | TPC (SigGain) | BPC (SigGain) | TPC (Freq) | BPC (Freq – SigGain) |
|---|---|---|---|---|
| 300 | 0.5430 | 3.8903 | 0.5295 | +0.0186 |
| 400 | 0.4949 | 3.8271 | 0.4848 | +0.0228 |
| 600 | 0.4430 | 3.7739 | 0.4364 | +0.0042 |
| 800 | 0.4170 | 3.7295 | 0.4072 | -0.0220 |
| 1200 | 0.3831 | 3.6621 | 0.3715 | +0.0231 |
Subword Tokenization
Subword tokenization divides text into reusable units smaller than words to support efficient and flexible language modeling.
See all 83 papers