arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.08671cs.DScs.CL
收藏

贪心字节对编码(BPE)至少达到最优压缩的0.361

Greedy BPE with Replacement Counts Achieves the Tight Approximation Ratio $(1-e^{-2})/2$

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Georgia Institute of Technology(佐治亚理工学院)

Kundan Baliga, Aiden Xie, Aditya Byju

AI总结:

该研究改进了贪心BPE压缩的理论下界,证明其至少达到最优压缩的0.361,解释了原三分之一界限的成因,并确定了相关合并比率的最坏情况。

摘要:

字节对编码(BPE)通过反复合并最频繁的相邻符号对来构建分词器,其效用是k次合并实现的字符串总长度缩减。此前已知该贪心规则至少达到最优缩减的三分之一,我们证明对于任意字符串、任意预算和任意打破平局规则,它始终至少达到最优字符串长度缩减的0.361,这是对三分之一这一界限的首次改进。我们还解释了三分之一为何是一个障碍:其背后的配对松弛是紧的,因此更好的界限必须利用最优解的更多结构。当贪心算法一次性破坏最优解的三个合并点时,其中一个通常可以移到相邻位置,因为最优解的所有规则副本都相似;剩余情况会在后续得到补偿。在此过程中,我们精确确定了两次合并的最坏情况比率,对三次合并的比率进行了界定,并分离出一个可解决该问题的单一不等式。

英文摘要:

Byte-Pair Encoding (BPE) builds the tokenisers of many language models by repeatedly merging a most frequent adjacent pair of symbols. Kozma and Voderholzer showed that $k$ greedy merges save, in the worst case, between $1/3$ and $(1-e^{-2})/2 \approx 0.43233$ of what the best $k$ merges save, and asked for the exact constant. We resolve this question for the replacement-count rule they analyse. For every string and weighted word table, every budget $k$, and every tie-breaking rule, greedy saves at least $\frac12(1-(1-2/k)^k)$ of the optimum. This establishes the exact worst-case approximation ratio $(1-e^{-2})/2$, approached as $k\to\infty$ but never attained. The proof is based on a shadow inequality: after $i$ greedy steps, the optimum is at most $2G_i+kg_{i+1}$, where $G_i$ is greedy's saving so far and $g_{i+1}$ its next gain. We also show that the worst-case ratio at budget $k$ exceeds the limiting constant by $Θ(k^{-1/2})$. For the overlapping-count rule used by deployed trainers, we prove a lower bound greater than $0.38954$ and an asymptotic upper bound of approximately $0.40407$; determining its exact constant remains open.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑