跳到正文
arXiv cs.CL· Nicklas Nidh\"ogg·· 10 小时前AI 评分31

字节对编码的左侧涟漪:为每个词典给出可认证的回看范围

The Left Ripple of Byte-Pair Encoding: Certified Lookbehind for Every Dictionary

AI 导读

该论文为任意词典判定字节对编码(BPE)的“起源半径”,即左侧前置字符串能改变覆盖跨度的最大距离,并用半径证书在词典规模的多项式时间内完成计算。半径无限当且仅当存在一个周期词具有两种无公共边界的规范铺砌;在 Berglund 等人的排序条件下,这等价于某条规则 (t, t) 在自身阶段出现两个相邻副本。

正文 · 原文

View PDF HTML (experimental)

Abstract:Berglund and van der Merwe formalized byte-pair encoding and bounded how far an appended string can change a tokenization, leaving the converse open: how far can a string prepended on the left change it, which dictionaries make that ripple infinite, and can it be computed efficiently when finite? We answer all three for every dictionary. The origin radius, how far a prepend can change covering spans, is decided with radius certificates by a product of two runs of the automaton that guesses the final tokens, in time polynomial in the dictionary written out, and it is infinite exactly when one periodic word has two canonical tilings with no common boundary. Under their ordering condition it is infinite exactly when some rule (t, t) finds its two copies adjacent at its own stage, and such a rule makes any dictionary infinite. A finite radius makes every window of a width read off the radii have a cut, and the radius is finite exactly when such cuts are dense. The token machine completes for every dictionary, and the tokenization is subsequential, extending what Berglund, Martens and van der Merwe proved for proper ones under one pass per rule. A streaming tokenizer emits after every symbol exactly the tokens that no continuation changes, in polynomial time, answering a question of Dalirrooyfard and Ye. Boundedness of the label measure, the edit distance of the token sequences, is decided for every dictionary in polynomial time as well, and under the ordering condition the largest distance one edit causes over dictionaries of m rules lies asymptotically between m^2/10 and m^2/2. GPT-2's merge table carries 244 effective self-pairs, so its origin radius is infinite from the forty-second merge on, and that of cl100k, o200k and Llama 3 from their first. Every measured number is its program's output, and what is not executed is named.
Comments: 87 pages, 13 tables. Artifact: this https URL . The programs and their outputs are in the artifact, with a verifier that reruns every program and holds each reported number to the output line it rests on. Companion to arXiv:2608.03473, arXiv:2608.09761, arXiv:2609.10600, arXiv:2610.08854 and arXiv:2610.30168
Subjects: Formal Languages and Automata Theory (cs.FL); Computation and Language (cs.CL); Data Structures and Algorithms (cs.DS); Programming Languages (cs.PL)
Cite as: arXiv:2611.13061 [cs.FL]
  (or arXiv:2611.13061v1 [cs.FL] for this version)
  https://doi.org/10.48550/arXiv.2611.13061

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Nicklas Nidhögg [view email]
[v1] Mon, 9 Nov 2026 17:48:27 UTC (152 KB)

来源:arXiv cs.CL · arxiv.org