Greedy Byte-Pair Encoding Achieves the Tight Constant (1-e^{-2})/2 Against the Best Merge Sequence with Short Tokens

Byte-Pair Encoding (BPE), widely used to build language-model vocabularies, repeatedly merges a most frequent adjacent pair of symbols. No constant above (1-e-2)/2 ≈ 0.432 can bound, on every input, the fraction of the optimal saving that greedy BPE achieves, and the best known general lower bound, 0.391, is from a companion paper. We prove that greedy achieves at least (1/2)(1-(1-2/k)k) ≥ (1/2)(1-e-2) of the optimum whenever some optimal sequence of k merges (partial merges allowed) builds only tokens of at most seven letters. Unconditionally, greedy achieves the same fraction of the best k merges whose tokens have at most seven letters; against this capped optimum the limiting constant is best possible, by Yang's construction, whereas for the conditional result we do not claim tightness. Both results follow from a per-step inequality, OPT ≤ 2Gi + k gi+1, where Gi is greedy's saving after i merges and gi+1 its next saving; its proof keeps, for each rule of the optimum, its merge points at one pair of symbols of greedy's current string. The proof is analytic for tokens of at most five letters and partly computer-assisted for six and seven. These results appeared, with proofs, in versions 1.0-1.2 of the authors' preprint doi:10.5281/zenodo.24023719 (now restructured); this is their self-contained account. The record includes the paper, its LaTeX source, and the code and outputs of the exhaustive computations used in the proofs; each finite lemma for token lengths six and seven is repeated by a second, separately written program.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-08
DOI
https://doi.org/10.5281/zenodo.24056289
Primary Topic
Algorithms and Data Compression
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Greedy Byte-Pair Encoding Achieves the Tight Constant (1-e^{-2})/2 Against the Best Merge Sequence with Short Tokens

Kundan Baliga, Aditya Byju, Aiden Xie
3 links
Zenodo (CERN European Organization for Nuclear Research)
Algorithms and Data Compression
preprint

Greedy Byte-Pair Encoding Achieves the Tight Constant (1-e^{-2})/2 Against the Best Merge Sequence with Short Tokens

Kundan Baliga, Aditya Byju, Aiden Xie
preprint en

Abstract

Byte-Pair Encoding (BPE), widely used to build language-model vocabularies, repeatedly merges a most frequent adjacent pair of symbols. No constant above (1-e-2)/2 ≈ 0.432 can bound, on every input, the fraction of the optimal saving that greedy BPE achieves, and the best known general lower bound, 0.391, is from a companion paper. We prove that greedy achieves at least (1/2)(1-(1-2/k)k) ≥ (1/2)(1-e-2) of the optimum whenever some optimal sequence of k merges (partial merges allowed) builds only tokens of at most seven letters. Unconditionally, greedy achieves the same fraction of the best k merges whose tokens have at most seven letters; against this capped optimum the limiting constant is best possible, by Yang's construction, whereas for the conditional result we do not claim tightness. Both results follow from a per-step inequality, OPT ≤ 2Gi + k gi+1, where Gi is greedy's saving after i merges and gi+1 its next saving; its proof keeps, for each rule of the optimum, its merge points at one pair of symbols of greedy's current string. The proof is analytic for tokens of at most five letters and partly computer-assisted for six and seven. These results appeared, with proofs, in versions 1.0-1.2 of the authors' preprint doi:10.5281/zenodo.24023719 (now restructured); this is their self-contained account. The record includes the paper, its LaTeX source, and the code and outputs of the exhaustive computations used in the proofs; each finite lemma for token lengths six and seven is repeated by a second, separately written program.

Zenodo (CERN European Organization for Nuclear Research)
Georgia Institute of Technology (US), University of Illinois Urbana-Champaign (US)
Algorithms and Data Compression
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon