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

Byte-Pair Encoding的理论分析

Theoretical Analysis of Byte-Pair Encoding

Freie Universität Berlin(柏林自由大学)

László Kozma, Johannes Voderholzer

AI总结:

本文分析了Byte-Pair Encoding (BPE)的优化问题,证明其APX完全性,并给出0.333至0.625的近似因子,首次为BPE的压缩效用提供严格理论保证。

摘要:

Byte-Pair Encoding (BPE)是一种广泛使用的子词分词方法,起源于基于语法的文本压缩。它被用于各种语言处理任务,如机器翻译或大型语言模型(LLM)预训练,以创建规定大小的词表。迄今为止,对BPE的评估大多是经验性的,其良好实际性能的原因尚不清楚。在本文中,我们关注BPE背后的优化问题:寻找实现最佳压缩效用的配对编码。我们证明该问题是APX完全的,表明它不太可能存在多项式时间近似方案。这更强有力地回答了Zouhar等人最近提出的问题。在积极方面,我们证明BPE将最佳配对编码的压缩效用近似到最坏情况因子介于0.333和0.625之间。我们的结果旨在解释BPE的持续成功,并据我们所知,是首个对所有输入均成立的压缩效用严格保证。

英文摘要:

Byte-Pair Encoding (BPE) is a widely used method for subword tokenization, with origins in grammar-based text compression. It is employed in a variety of language processing tasks such as machine translation or large language model (LLM) pretraining, to create a token dictionary of a prescribed size. Most evaluations of BPE to date are empirical, and the reasons for its good practical performance are not well understood. In this paper we focus on the optimization problem underlying BPE: finding a pair encoding that achieves optimal compression utility. We show that this problem is APX-complete, indicating that it is unlikely to admit a polynomial-time approximation scheme. This answers, in a stronger form, a question recently raised by Zouhar et al. On the positive side, we show that BPE approximates the compression utility of the optimal pair encoding to a worst-case factor between $1/3$ and $(1-e^{-2})/2 \approx 0.4324$. Our results aim to explain the ongoing success of BPE and are, to our knowledge, the first rigorous guarantees on its compression utility that hold for all inputs.

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

↑