菜单

关于 🐙 GitHub
arXiv 提交日期: 2026-05-13
📄 Abstract - Effective Context in Transformers: An Analysis of Fragmentation and Tokenization

Transformers predict over a representation of a sequence. The same data can be written as bytes, characters, or subword tokens, and these representations may be lossless. Yet, under a fixed context window, they need not expose the same information to the model. This raises a basic question: how does the choice of representation change what a finite-context predictor can achieve? We study this question on Markov sources and uncover two complementary phenomena. First, we observe that moving to smaller representation units can hurt prediction even when the context window is enlarged to cover the relevant source history. To explain this, we introduce fragmentation: a lossless recoding that replaces each source symbol by several smaller units. We prove that fragmentation can strictly increase the optimal finite-context log-loss, showing that the gap is not merely an optimization or capacity issue, but can be intrinsic to the representation. This gives a theoretical account of the finite-context gap observed in byte- and character-level models such as ByT5 and CANINE relative to subword-tokenized models. Second, we study the opposite direction: greedy tokenization -- BPE, WordPiece, and related methods -- which groups source symbols into larger units. We show that tokenization can make a short token window behave like a longer source-context window, and we give a loss guarantee describing when this is achievable. The guarantee depends on how reliably token windows span the needed source history, together with the compression rate of the tokenizer. This also yields a simple diagnostic for real tokenizers: measuring how much source context a fixed token window reliably contains. Together, the two directions establish a finite-context information-theoretic framework for reasoning about representation choices in Transformers.

顶级标签: llm natural language processing
详细标签: tokenization fragmentation context window information theory transformers 或 搜索:

Transformers中的有效上下文:碎片化与分词效应的分析 / Effective Context in Transformers: An Analysis of Fragmentation and Tokenization


1️⃣ 一句话总结

这篇论文研究了文本表示方式(如字节、字符或子词)如何影响Transformer模型在有限上下文窗口下的预测能力,提出了“碎片化”会损害性能而“分词化”能增强有效上下文的理论框架,并用信息论解释了字节级模型表现不如子词模型的内在原因。

源自 arXiv: 2605.13485