# Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets

二値文字列でのPair-Mergeトークン化の近似困難性と単項データセット上の強NP困難性

Kundan Baliga, Aiden Xie, Aditya Byju · arXiv · 2026年11月10日

- **課題** BPE型のマージをk回行った後に残る長さを、多項式時間で近似する問題の難しさを扱います。
- **手法** マージを文法規則とみなし、頂点被覆gadgetにおける文法サイズの差を圧縮長の差へ移します。そのうえで、二値文字列とunaryデータセットで困難性の構成を作ります。
- **結果** 二値文字列では、P≠NPの仮定のもとで定数倍近似が不可能だと示します。unaryデータセット全体のマージ問題は強NP完全として示します。

![Table 2: Notation for Sections 2 to 4](https://refivu.com/papers/7b59982c-1b8e-455b-a8a8-a893b6f95b07/figures/figure-217baf58aa202c4e7fb32210f1a7b7b7.png?thumb=512)

**Table 2** : Notation for Sections 2 to 4.

[出典](https://arxiv.org/abs/2611.13568v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kundan Baliga, Aiden Xie, Aditya Byju · Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets · 論文の図を引用 · 元のPDFの5ページ目から図の部分を抽出しています。

## トークン化マージの近似問題

BPEのようなトークナイザは、文字列中で隣接する一組の記号を新しい記号に繰り返しマージし、トークン数を減らします。本論文は、マージ予算kが与えられたとき、k回のマージ後に残る長さを最小化する問題が多項式時間で近似できるかを問いています。ベースラインである何もマージしない方法は、n倍の近似になります。著者らはこの問いを二値文字列とunaryデータセットで扱います。論文はfull merge（すべての出現をマージ）とpartial merge（選んだ出現のみマージ）を区別し、2種類の最適化問題をOMSとOPEという名前で示しています。

## マージと文法サイズの対応

中心となる考え方は、k回のマージをk個の規則を持つ文法とみなせる点です。各マージ(a,b)→Xは規則X→abに対応します。したがって、文法サイズg(s)が十分大きければ、k回のマージ後にも長さは大きく残ります。論文のLemma 1はg(s)≤k+ℓ−1を示し、ここからLEN\_part(s,k)≥g(s)−k+1が導かれます。反対に、Lemma 2はpartial mergeが任意の文法を実現できることを示します。full mergeは望ましくない出現まで一緒にマージしてしまうため、この逆は成り立たず、明示的なスケジュールを直接設計する必要があります。

## 二値文字列の増幅とfull mergeのスケジュール

二値の困難性は、頂点被覆gadget文字列をaffine複製t個に増幅し、各文字をアンカーを持つ二値符号語で符号化して構成します。複製どうしの隣接ペアは重ならないため、文法サイズの差は複製数の分だけ加算されます。予算はC\_codeとt(R(\|S\|)+3)−1の和として与えられます。

## unaryデータセットのscaffoldとAND gadget

unary部分では、数を長さで表すデータセットを構成します。各頂点にSidon集合の元を割り当て、scaffoldの数を複数回繰り返すことで、最適解がまずscaffoldを作るように強制します。辺の文字列は両端点の被覆トークンの和で表され、コストが2に達するのは両端点が両方とも選ばれた場合のみ可能になるよう設計されています。論文ではこれをOPE-seg設定で到達可能なマージ（二つの部分がすでにトークンになっている）として解釈しています。full mergeの側では、bit構造とAND gadgetを用い、balanced bicliqueから帰着させます。

## Karp帰着の障壁と近似の上界

partial mergeの場合、ブロックベースのtrieアルゴリズムはO(n/log log n)近似を達成します。著者らは、full mergeについてはこれより弱いO(n/(log log n)^{log3 2})近似を示しています。さらに、Karp帰着によってn/log nより大きい割合の困難性を証明すると、coNP⊆NP/polyになるという障壁結果を示しています。論文はこの障壁がKarp帰着にのみ適用され、チューリング帰着や他の仮定には適用されないと明記しています。

## 適用範囲と限界

困難インスタンスはk=Θ(n/log n)の規模の大きなマージ予算で構成され、その場合yesの事例では文字列全体が一つのトークンに減ります。論文では、これが実際の自然言語でBPEがうまく動作しないことを意味するわけではないと明記しています。また、unaryの結果は反復文字列を含むデータセットを前提としており、事前トークン化されたコーパスや直接トークン化（direct tokenisation）は扱っていません。定数c⋆は明示されていない定数です。

## 論文情報

- **著者**: Kundan Baliga, Aiden Xie, Aditya Byju
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2026年11月10日
- **登録日**: 2026年11月11日
- **更新日**: 2026年11月10日
- **バージョン**: v1
- **arXiv**: 2611.13568
- **カテゴリ**: cs.DS · cs.CC · cs.CL
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2611.13568v1) · [PDF ↗](https://arxiv.org/pdf/2611.13568v1)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

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 $k$ merges that leave a string of length $n$ almost as short as possible; doing nothing is already within a factor $n$. We prove that, unless P = NP, no polynomial-time algorithm comes within a factor $c\\,n/\\log n$, for some constant $c\>0$, already for one binary string and for BPE-style merges that replace every occurrence. The key idea is that $k$ merges form a grammar with $k$ 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 $O(n/\\log\\log n)$, and no Karp reduction can prove hardness beyond order $n/\\log n$ unless coNP $\\subseteq$ 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.

## この論文を引用

Kundan Baliga, Aiden Xie, Aditya Byju (2026). Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets. arXiv:2611.13568v1. https://arxiv.org/abs/2611.13568v1

**BibTeX**

```
@misc{baliga2026pair,
  title = {{Pair-Merge Tokenisation Is Hard to Approximate on Binary Strings and Strongly NP-Hard on Unary Datasets}},
  author = {Kundan Baliga and Aiden Xie and Aditya Byju},
  year = {2026},
  eprint = {2611.13568},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.13568v1}
}
```

## この論文の用語

- [byte-pair encoding](https://refivu.com/ja/terms/597b3d437095-byte-pair-encoding)
- [Vertex Cover](https://refivu.com/ja/terms/a5583d6606ae-vertex-cover)

## ほかの論文解説

- [Are Dense Rewards Worth Their Tokens in GRPO?](https://refivu.com/ja/papers/abf8fc47-48da-4cd4-a432-583d9b836d54-are-dense-rewards-worth-their-tokens-in-grpo.md)
- [The Indic Token Tax in 2026: Measuring Tokenizer. Disparity and Its Cost for the Languages of India](https://refivu.com/ja/papers/94ad0eca-69d1-49c3-a2dd-49e3e35883a8-the-indic-token-tax-in-2026-measuring-tokenizer.md)
- [The Left Ripple of Byte-Pair Encoding: Certified Lookbehind for Every Dictionary](https://refivu.com/ja/papers/8d3f090d-d15c-460b-8290-9facad800903-the-left-ripple-of-byte-pair-encoding-certified.md)
- [Can Frontier Auto Researchers Reconstruct Human Research Decisions in AI?](https://refivu.com/ja/papers/0c85bfc9-bf64-4283-91a0-a827acd3a1ad-can-frontier-auto-researchers-reconstruct-human-research.md)
- [Language processing in the autistic brain: A meta-analysis of neuroimaging studies across modalities and age](https://refivu.com/ja/papers/f3e93a2c-c934-46c5-a3c7-db0f41ecb61e-language-processing-in-the-autistic-brain-a-meta.md)
- [Vietnamese Legal Ontology: Every legal answer, traced to the article that grounds it](https://refivu.com/ja/papers/39e9b155-49f6-418a-8ba0-f2d1078d32ea-vietnamese-legal-ontology-every-legal-answer-traced-to.md)
- [Deterministic, Reproducible Inference in Exact Integer Arithmetic, and Verifiable Distributed Inference as Its Consequence](https://refivu.com/ja/papers/bbc05d6a-b90f-48ab-8b5d-837eb7a6793f-deterministic-reproducible-inference-in-exact-integer.md)
- [How Post-Training Influences Verbalized Algorithmic Computation in Language Models](https://refivu.com/ja/papers/c2f0c796-ac4e-4e6c-bad7-290457e1c07c-how-post-training-influences-verbalized-algorithmic.md)
- [Agent Benchmarks Stop Ranking Before They Run Out of Tasks](https://refivu.com/ja/papers/42042bb7-8dd7-415d-a486-d8889c934fed-agent-benchmarks-stop-ranking-before-they-run-out.md)
- [Exploiting Feature-invariant Scaling Laws for Efficient A/B Experimentation in Recommendation Systems](https://refivu.com/ja/papers/6e38f1ed-f74b-4d73-bc72-ca40a3366223-exploiting-feature-invariant-scaling-laws-for-efficient-a.md)
- [A Functional Preservation Score for Auditing Connectome Operations: Compression, Alignment, Transport, and Local-Rule Writing](https://refivu.com/ja/papers/544d626f-a968-4489-9915-c3d496900508-a-functional-preservation-score-for-auditing-connectome.md)
- [Metamorphic testing of learned AC optimal power flow surrogates reveals representation dependence](https://refivu.com/ja/papers/fa665462-dba3-45c9-a6d2-bbeac44186f3-metamorphic-testing-of-learned-ac-optimal-power-flow.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/7b59982c-1b8e-455b-a8a8-a893b6f95b07-pair-merge-tokenisation-is-hard-to-approximate-on)
