← 研踪 PaperTrailarXiv:2611.13568 · v1
Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets
首次提交 2026-11-10 12:37
版本更新 2026-11-10 12:37
雷达观测 2026-11-11 11:04
摘要
Tokenisers such as Byte-Pair Encoding (BPE) shorten text by repeatedly merging an adjacent pair of symbols into a new one; fewer tokens mean less computation. We ask whether an efficient algorithm can choose merges that leave a string of length almost as short as possible; doing nothing is already within a factor . We prove that, unless P = NP, no polynomial-time algorithm comes within a factor , for some constant , already for one binary string and for BPE-style merges that replace every occurrence. The key idea is that merges form a grammar with rules: a vertex-cover gap becomes a grammar-size gap, which we amplify with relabelled copies, encode in binary and realise with explicit merges. For merges that may skip occurrences, a simple algorithm achieves , and no Karp reduction can prove hardness beyond order unless coNP NP/poly. Over a one-letter alphabet, both tokenisation problems left open by Kastreva et al. are strongly NP-complete on datasets with repeated strings.
作者备注:34 pages, 11 figures. Code and certificates: https://doi.org/10.5281/zenodo.24023730
观测到的版本
相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。
v1 · 2026-11-10 12:37 · 最新观测版本
Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets
Tokenisers such as Byte-Pair Encoding (BPE) shorten text by repeatedly merging an adjacent pair of symbols into a new one; fewer tokens mean less computation. We ask whether an efficient algorithm can choose merges that leave a string of length almost as short as possible; doing nothing is already within a factor . We prove that, unless P = NP, no polynomial-time algorithm comes within a factor , for some constant , already for one binary string and for BPE-style merges that replace every occurrence. The key idea is that merges form a grammar with rules: a vertex-cover gap becomes a grammar-size gap, which we amplify with relabelled copies, encode in binary and realise with explicit merges. For merges that may skip occurrences, a simple algorithm achieves , and no Karp reduction can prove hardness beyond order unless coNP NP/poly. Over a one-letter alphabet, both tokenisation problems left open by Kastreva et al. are strongly NP-complete on datasets with repeated strings.
查看此版本解读 →查看此版本原文 ↗