Effective Context in Transformers: An Analysis of Fragmentation and Tokenization
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 19 of its 30 references that are in the map. First posted on arXiv 13 May 2026.
Builds on
19 of 30 references.
References · 19
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
- 2021CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representationcited by 229
- 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
- 2021Charformer: Fast Character Transformers via Gradient-based Subword Tokenizationcited by 158
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabulariescited by 113
7 more
- 2024Tokenization Is More Than Compressioncited by 87
- 2024Unpacking Tokenization: Evaluating Text Compression and its Correlation with Model Performancecited by 61
- 2023Tokenization and the Noiseless Channelcited by 58
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 26
- 2024Tokenization Falling Short: On Subword Robustness in Large Language Modelscited by 18
- 2025From Markov to Laplace: How Mamba In-Context Learns Markov Chainscited by 9
- 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limitscited by 9
Built on by
Citing papers per year: 2026: 1.
1 paper.