Manuscript Offprint
arXiv:2608.12218Information Abundance Paradox: Long-Context Training Undermines Parametric Knowledge
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Large language models are increasingly trained and deployed with long contexts that span documents, code repositories, and interaction histories. This scaling reflects the implicit assumption that training on longer contexts will only help the model by exposing it to richer evidence. We challenge this view by studying how the context window shapes a model’s mode of learning, shifting it between parametric internalization and contextualization. We propose the Information Abundance Paradox, which hypothesizes that abundant relevant information in the training context can reduce the incentive to encode that information parametrically, thereby increasing reliance on context. In pretraining with long documents, increasing the context window improves language modeling, natural language understanding, and closed-book MCQA only up to an intermediate optimum, after which performance consistently declines. In supervised fine-tuning, more task-relevant train-time context improves performance with supporting context, but reduces robustness when context is absent or misleading at test time. Our analysis suggests that this behavior arises when longer context provides a lower complexity solution. Mechanistically, training with informative context shifts gradient pressure from feed-forward networks, often linked to parametric knowledge, toward attention modules, and causal interventions show that this shift increases reliance on context during inference. Overall, these findings support the Information Abundance Paradox and suggest that scaling toward near-infinite context is not simply a matter of supplying more data, even when high-quality long-context data is abundant.
1 Introduction
Large language models (LLMs) are increasingly deployed in settings where useful evidence spans long documents (Bai et al., 2024), codebases (Liu et al., 2023c; Jimenez et al., 2024), and extended interaction histories (Zhou et al., 2024). In response, training practices have extended context windows to increasingly large scales (Peng et al., 2026; Chen et al., 2023), in some cases reaching millions of tokens (Team, 2024; Ding et al., 2024). Yet it remains unclear what, if anything, fundamentally limits this trajectory. This raises a basic question:
Are near-infinite context models simply a matter of more long-context data?
The empirical trajectory of long-context scaling reflects an implicit assumption that sufficiently plentiful long-context data will provide the signal needed for continued progress. Therefore, when long-context training underperforms, prior work often attributes the bottleneck to the scarcity of naturally long, high-quality documents (Chen et al., 2025) and focuses on data-driven recipes as the path forward (Xiong et al., 2024; Fu et al., 2024; Gao et al., 2025b; Gao et al., 2025a).
Figure 1: Longer-context Phi-3 and OLMo 3 variants underperform, providing a motivating observation. Across benchmarks, 128K and 65K variants consistently lag behind 4K and 8K variants in few-shot and zero-shot evaluation settings (App. A). Error bars denote 95% confidence intervals.
Two modes of learning.
Training a language model by minimizing next token cross-entropy can be viewed as a form of compression (Witten et al., 1987; Delétang et al., 2024), whereby reusable regularities in the training corpus are distilled into the model parameters (Grünwald and Roos, 2019).
Critically, such regularities enable two sources of predictive power: knowledge stored in the parameters (Petroni et al., 2019; Roberts et al., 2020), and information supplied in context (Lewis et al., 2021; Brown et al., 2020). This distinction suggests two modes of learning (Pan et al., 2023; Lin and Lee, 2024; Fang et al., 2025), in which a model either internalizes task-relevant information by encoding it in its parameters or contextualizes that information by learning to use evidence supplied in context. These two sources of predictive power can offer alternative channels for prediction, with their relative use shaped by the training dynamics (Wang et al., 2023) and the informativeness of the available context (Anand et al., 2025; Chan et al., 2022).
Our hypothesis.
Building on this view, we propose Information Abundance Paradox, which posits that information-rich long-context training can shift a model’s learned strategy away from internalization and toward contextualization. As a result, when context is absent, missing, or insufficient at inference time, performance can degrade relative to models trained with less informative context, whether shorter or equally long but less relevant (§2).
Our evidence.
We test Information Abundance Paradox in pretraining and supervised fine-tuning. In pretraining, longer context windows yield inverted-U performance, with language modeling, natural language understanding, and closed-book MCQA improving up to an intermediate optimum before performance degrades (§3.1). In supervised fine-tuning, task-relevant context improves accuracy under informative context, but reduces robustness when context is absent or misleading (§3.2). We then provide a theoretical account of these findings, showing that longer contexts can reduce the amount of task information that must be stored in the weights to attain the same risk threshold (§4). Lastly, our mechanistic analyses reveal that this phenomenon arises when longer context provides a lower complexity solution (§5.1), shifts update pressure from feed-forward networks to attention modules (§5.2), and increases reliance on context tokens during inference (§5.3). Together, our findings show that continued scaling of the context window cannot be understood solely as a data problem: longer training contexts can fundamentally alter what models internalize and how strongly they depend on information supplied at inference time.
2 The Information Abundance Paradox
The train-time context window controls information available to a model during training. Increasing the context window is intended to expand the information a model can exploit, while ideally preserving short-context or context independent competence (Xiong et al., 2023; Ding et al., 2024).
We argue that this goal can face a competing effect: when task-relevant information is available in context during training, the model can reduce loss by using it directly rather than by encoding the same information in its weights. We call this hypothesis the Information Abundance Paradox:
The Information Abundance Paradox. When task-relevant information is made available through the training context, the model can reduce loss by using that information directly rather than by encoding it in its parameters. Consequently, this can shift the model’s mode of learning away from parametric internalization and toward contextualization.
Here, information abundance refers to task-relevant information available within a context, and not the amount of training data or the entropy of the corpus. The central implication is that context length is not merely a data-delivery mechanism. It can also determine whether the model learns to rely on information stored parametrically or on information supplied through the context.
We refer to the behavioral manifestation of this shift in models as context addiction, where a model trained with informative context performs well when useful context is available but deteriorates when that context is absent or misleading. Thus, context addiction provides an observable test of the Information Abundance Paradox through robustness under absent or misleading context.
3 Main Experiments: Testing the Information Abundance Paradox
Our hypothesis concerns the amount of task-relevant information available in the training context. We operationalize information abundance differently across the two training regimes. In pretraining, where relevance is difficult to control, we vary the length of coherent document spans as a proxy for information availability (§3.1). In supervised fine-tuning, where relevance can be controlled directly, we fix the context length and vary the amount of task-relevant information to isolate its role (§3.2).
3.1 Pretraining with Varying Context Length
We first test the Information Abundance Paradox in pretraining, where the context window controls how much within-document evidence is available during next token prediction. We vary the training context window while fixing the token budget, data, model configuration and optimization setup. We then evaluate how the training context window affects downstream task performance.
Model architecture.
We pretrain language models at four scales, 20M, 55M, 259M, and 750M parameters. All models use the Llama-2 architecture and tokenizer (Touvron et al., 2023), RoPE (Su et al., 2023) for positional encoding, a standard causal attention mask, and the next token cross-entropy objective. We verify that our findings are robust to alternative positional encodings in App. B.
Data.
We train on 10B tokens drawn from a subset of Project Gutenberg (Rae et al., 2019). We retain documents containing at least 65536 tokens, so that increasing the training context window exposes longer coherent within-document spans rather than merely increasing cross-document packing.
Training setup.
For each model scale, we sweep the training context window over seven choices, {}, in powers of two. For each , the corpus is partitioned into non-overlapping sequences of exactly tokens, with documents concatenated only as needed to fill complete sequences. Loss is computed over every token in the sequence. The global batch size is fixed at approximately 1.05M tokens, corresponding to 9537 optimization steps for every variant. Longer-context variants therefore use fewer sequences per batch. Within each model scale, all context window variants share the same model initialization, random seed, optimizer, and training hyperparameters. We train all models using the nanotron framework (Tazi et al., 2025), with full model configurations and hyperparameters provided in App. C.1. Our comparison is therefore token-and-update-matched, isolating context window effects under a fixed token budget.
Evaluation.
We evaluate the final checkpoint of each model in the zero-shot setting across three complementary testbeds: (i) a language modeling suite (e.g., LAMBADA (Paperno et al., 2016), WikiSPAN (Cheng et al., 2024), and Penn Treebank (Marcus et al., 1993)), measuring next token prediction over natural language text; (ii) SuperGLUE (Wang et al., 2020), measuring general language understanding; and (iii) a suite of closed-book MCQA benchmarks (e.g., ARC (Clark et al., 2018), CommonsenseQA (Talmor et al., 2019), PIQA (Bisk et al., 2019)), targeting parametric knowledge. Evaluation uses each benchmark as provided, with no context beyond the task input. We report cross-entropy loss on the language modeling suite and accuracy on SuperGLUE and MCQA tasks. For multiple-choice benchmarks, answers are selected by length-normalized log probability of the candidate answer text tokens, excluding the option label. We provide the complete benchmark list in App. D and motivate their inclusion in our evaluation.
Figure 2: Performance improves up to an intermediate optimum as pretraining context window grows. Across model sizes, SuperGLUE and MCQA follow an inverted-U pattern, while language modeling shows a corresponding U-shaped loss curve. Dataset breakdowns are provided in App. E.
Results.
As shown in Figure 2, performance on SuperGLUE and MCQA follows an inverted-U pattern as the pretraining context window grows, while language modeling loss follows a corresponding U-shaped pattern. Models initially benefit from longer contexts up to a testbed-dependent inflection point, as performance peaks around 2048 tokens for SuperGLUE and MCQA and around 8192 tokens for language modeling. Beyond these points, further increases in context length progressively erode the earlier gains. The presence of an inflection point across all three testbeds suggests that the effect reflects a systematic effect of pretraining context length, with statistically significant inflections confirmed across evaluation suites and model scales (App. F.2). Importantly, greater model capacity does not eliminate the long-context degradation, as the same qualitative pattern persists across all four model scales, from 20M to 750M parameters. One possible explanation for the earlier optimum on SuperGLUE and MCQA is that the optimal train-time context length depends partly on the length distribution of the evaluation instances, for which we provide supporting evidence in App. E. Taken together, these results show that, under matched token budgets, context length is not a free scaling axis, since longer training windows can degrade performance beyond an intermediate optimum.
3.2 Supervised Fine-Tuning with Varying Context Informativeness
We now test the Information Abundance Paradox in supervised fine-tuning for knowledge-rich tasks, where we fix the context budget and vary the task-relevant information in context. This setting isolates the role of informative train-time context while holding the task, model, and training process fixed.
Setup.
We fine-tune Qwen3-0.6B, 1.7B, 4B, 8B, 14B (Yang et al., 2025) with LoRA (Hu et al., 2021) on four MMLU-Pro domains (Wang et al., 2024): Health, Economics, Law, and Psychology. Since MMLU-Pro provides only test splits, we partition the examples within each domain into 80% training and 20% evaluation sets. For each question, we construct a fixed context budget of documents and vary the number of target-domain documents , where the remaining documents are drawn from the other domains (see App. G for details). Therefore, we only change the domain composition of the eight documents across , controlling the fraction of informative context while holding the other aspects of fine-tuning fixed. We report document length statistics in App. G. We apply LoRA adapters to both attention modules and feed-forward networks, and compute the loss only on answer text tokens. Training details are provided in App. C.2.
Evaluation.
We evaluate each model on held-out questions from the domain used for its fine-tuning, without in-context demonstrations. While training varies the number of target-domain documents, evaluation fixes documents to the target domain and varies whether they support the correct or an incorrect answer (see Table 14 in App. G). Accordingly, we conduct evaluation under three test-time context conditions: (i) supporting context, where the prepended documents support the correct answer; (ii) conflicting context, where the prepended documents support an incorrect answer; and (iii) no context, where the model receives only the question and answer choices. We use deterministic generation without sampling and report exact-match accuracy against the ground truth answer.
Figure 3: Task-relevant train-time context induces context addiction. Increasing target-domain documents from to improves Qwen3 models with supporting context, but reduces robustness without context (left) and with conflicting context (right), with the right subplot annotating the supporting–conflicting accuracy gap. Error bars denote 95% confidence intervals.
Results.
Figure 3 reports domain-averaged results, with domain-specific breakdowns deferred to App. H.1. The results reveal that train-time context affects model behavior primarily through its relevance to the task. Comparing fine-tuning runs with , we find that increasing the number of target-domain documents strengthens performance when supporting context is available at test time. However, this improvement comes with significantly reduced no-context accuracy and significantly greater vulnerability to conflicting context across model sizes and domains (App. F.3). This suggests that the observed shift is driven not by additional tokens alone, but by the task-relevant information they provide. Taken together, these results show that train-time context is not neutral background information, since its relevance can determine whether models internalize the task or contextualize it through the in-context evidence.
4 A Theoretical Account of Information Abundance Paradox
Our experiments (§3.2) show that increasing train-time context can improve performance when useful context is available at test time, while reducing robustness when that context is absent or misleading. We now formalize why this tradeoff is possible. The key idea is that context and weights can act as alternative carriers of task-relevant information. A longer context gives the predictor an additional channel through which task information can be accessed, and therefore can reduce the minimum amount of task information that must be stored in the weights.
Setup.
Let denote a discrete latent task variable indexing the data-generating distribution, treating the observed corpus as one realization from a broader population of all possible corpora. For each context size , let denote an input-output pair with input of context size . Let denote the learned weights induced by training on data from task , with randomness due to data sampling and optimization. A language model with context size defines a conditional predictor , which induces predictions according to . Let be a task loss (e.g., binary token error) between the target and prediction . We define the risk where the expectation is over , , and . Thus, measures the expected task loss of the predictor given access to context of size . We quantify task-specific information stored in the weights by computed under the joint distribution induced by and . Equivalently, , so it measures the reduction in uncertainty about the task after observing the learned weights. While we vary the context size , we hold fixed the latent task distribution, the underlying data-generating process, and the model architecture.
4.1Parametric information frontier.
For risk threshold , define
Thus, is the minimum task information that must be stored in the weights to attain risk at most when prediction has access to the input corresponding to context size .
Without loss of generality, we assume the inputs are nested across context sizes through the packed token stream, where for each , a shorter-context sequence is an aligned subwindow of a longer-context sequence. Accordingly, there exists a measurable projection map with almost surely. Here, selects the corresponding -token block within the -token window, matching standard pretraining pipelines that partition the same token stream into fixed-length windows at different context sizes (Tazi et al., 2025).
4.2Monotonicity of the parametric information frontier.
If almost surely for , then
Proof sketch.
A predictor with access to can simulate any -context predictor by first applying the projection map to recover , and then using the resulting input in the -context predictor. Therefore, every feasible weight-predictor pair for the optimization problem defining induces a feasible pair for the corresponding problem at context size with the same weight channel. Thus, enlarging the context weakly expands the feasible set of the constrained optimization problem without increasing the task information stored in the weights. Taking the infimum over feasible solutions yields . ∎
This is an achievability statement, showing that longer context can reduce the minimum amount of task information stored in the weights to achieve a target risk threshold. If longer train-time context reduces the task information encoded in the weights, then removing or corrupting context leaves the predictor with less parametric knowledge to fall back on. This can cause performance to deteriorate when context is absent or misleading, yielding the behavioral signature of context addiction (§2).
5 Mechanisms Behind the Information Abundance Paradox
5.1 Solution Complexity
We conduct a controlled synthetic pretraining study to identify when longer context induces context addiction. By holding fixed the task, objective, and data-generating process while varying the number of in-context demonstrations, we test whether context addiction emerges selectively when additional demonstrations provide a lower complexity training trajectory.
Setup.
We test this prediction in a synthetic pretraining setting with four tasks: (i) unary bitwise operations, (ii) string operations, (iii) mod10 arithmetic, and (iv) Caesar cipher. For each task, we train language models at three scales (0.3M, 1.5M, and 7.5M parameters), varying the number of in-context demonstrations while holding fixed the task, objective, and data-generating process. Figure 4 reports results for the largest model, with the full model-scale breakdown provided in App. H.2. Task definitions and training details are provided in App. C.3.
Evaluation.
We evaluate each model under supporting and conflicting context, paralleling the setup used in §3.2. Test-time context contains the same number of in-context demonstrations as the model observed during training. In the supporting condition, in-context examples follow the correct task rule, while in the conflicting condition, they follow a consistent but incorrect rule. For example, in a bitwise-negation task, supporting examples map and , whereas conflicting examples consistently map and . The supporting–conflicting gap therefore measures reliance on supplied context rather than on a parametrically internalized rule.
Results.
Figure 4 (top row) shows that longer train-time context does not affect all tasks uniformly. For bitwise and string operations, the gap grows steadily with context length, indicating increasing dependence on the demonstrations as conflicting-context performance approaches the random baseline. In contrast, mod10 remains unchanged across context lengths, while Caesar cipher shows only a localized deviation at the longest context length.
To distinguish these regimes, we use average training gradient norm as a comparative proxy for optimization path and learned function complexity, following connections between gradient magnitude, implicit regularization, and function complexity (Barrett and Dherin, 2022; Smith et al., 2021; Dherin et al., 2022). For context length , with parameters at step , we compute average gradient norm where is the training batch and is the final-query loss. At each step, we compute the global norm before gradient clipping by concatenating the gradients of all trainable parameters.

Figure 4: Context addiction emerges when longer train-time context enables lower complexity solutions. Top row: Supporting–conflicting gaps grow for bitwise and string tasks, but remain stable for mod10 arithmetic and Caesar cipher tasks, with each -axis scaled to the task-specific random baseline. Bottom row: Average training gradient norms decrease only in the context-addicted tasks, consistent with longer context enabling simpler context-based solutions.
Figure 4aligns the gradient norm proxy (bottom row) with the behavioral results (top row). Tasks with growing supporting–conflicting gaps also show decreasing average gradient norms as train-time context increases, whereas robust tasks show only noise-level changes or slight increases (see App. F.4 for significance tests). This pattern supports the interpretation that context addiction emerges when demonstrations provide an easier optimization path than parametric internalization of the task rule.
5.2 Module-Level Gradient Allocation
Prior work suggests that feed-forward networks (FFNs) and self-attention (SA) heads play distinct roles in transformer language models, associating FFNs with factual and task-relevant knowledge stored in parameters, and SA heads with the selection and routing of information from context (Geva et al., 2021; Dai et al., 2022; Meng et al., 2023). Motivated by this distinction and prior work that uses relative gradient magnitudes to characterize transformer optimization dynamics (Zhang et al., 2019; Liu et al., 2023a; Noci et al., 2022), we analyze module-level gradient allocation using the FFN-to-SA gradient ratio to measure whether training updates concentrate more strongly in FFNs or SA heads as context length increases.
Module-wise gradient ratios.
For pretraining, we follow the setup in §3.1 and vary the context window size. For SFT, we follow the setup in §3.2 and compare training with task-relevant documents against an additional no-context baseline that fine-tunes only on question-answer pairs. In both setups, for each training step, we first average the gradient norm within each module type across layers, compute the FFN-to-SA ratio, and then average this ratio across training steps. Because the architecture and parameterization are fixed, the FFN and SA gradient vectors have fixed dimensionality, and, therefore, changes in the ratio reflect changes in relative gradient magnitude. Accordingly, this ratio tracks the relative allocation of optimization pressure between FFN-mediated internalization and SA-mediated contextualization.
(a) SFT with task-relevant context shifts gradient pressure toward attention. With target-domain documents, the FFN-to-SA gradient norm ratio is consistently lower than in no-context tuning across model sizes and domains.
(b) Pretraining with longer context shifts gradient pressure toward attention. The FFN-to-SA gradient norm ratio declines with context length.
Figure 5: Informative train-time context lowers the FFN-to-SA gradient norm ratio in both SFT and pretraining, consistent with increased contextualization.
5(a)first shows this shift in supervised fine-tuning. When models are trained with target-domain documents, the FFN-to-SA gradient norm ratio is lower than in the no-context baseline across model sizes and domains. This indicates that adding task-relevant train-time context shifts relative gradient pressure away from FFNs and toward self-attention. 5(b) shows the analogous pattern in pretraining. As the training context window increases, the FFN-to-SA gradient norm ratio decreases across model scales, with the largest reductions appearing at longer context windows. Thus, both the controlled SFT setting and the pretraining setting point to the same qualitative change in module-level optimization dynamics. Taken together, these results show that context-rich training shifts gradient pressure from FFN-mediated internalization toward SA-mediated contextualization, supporting the view that longer train-time context changes the model’s mode of learning. These shifts are statistically significant in 19 out of 20 SFT model-domain comparisons and at every pretraining model scale (App. F.5).
Figure 6: FFN and SA updates causally control context reliance. FFN-only tuning improves no-context robustness, while SA-only tuning strengthens supporting-context performance but increases sensitivity to conflicting context. Error bars denote 95% confidence intervals.
Module-restricted fine-tuning.
We further test this interpretation with module-restricted fine-tuning, in which models are trained with task-relevant documents while updating only FFN or only SA heads. To reduce compute, we perform these interventions on smaller Qwen3 models.
Figure 6shows that FFN-only tuning yields stronger no-context performance and smaller degradation under conflicting context. In contrast, SA-only fine-tuning achieves significantly stronger performance with supporting context and significantly greater vulnerability to conflicting context across all three model sizes (App. F.6). This module-restricted intervention provides causal evidence for the gradient analysis, showing that FFN-directed updates improve parametric robustness, whereas SA-directed updates increase reliance on the supplied context.
5.3 Token-Level Attention Allocation
Prior work has shown that transformer layers exhibit functional specialization, where early layers encode local and syntactic features, middle layers support contextual integration and retrieval, and later layers refine representations for prediction (Tenney et al., 2019; Jin et al., 2024). Motivated by this layer-wise structure, we ask whether the train-time shift in gradient allocation (§5.2) is reflected in inference-time attention to context tokens. We compare the fine-tuned models analyzed in §5.2 under supporting-context evaluation. For a layer , head , and answer-token query position , let denote the normalized attention weight from query position to key position . We define the attention mass assigned to context tokens as , where is the set of tokens in the prepended documents, excluding the question, answer choices, and generated answer tokens. For each layer and head, we average this quantity over generated answer-token positions and evaluation examples, and then report the maximum over heads within each layer. Our choice to report the maximum attention mass over heads is motivated by prior work using context-attention ratios to diagnose contextual grounding and showing that retrieval and in-context processing can be concentrated in sparse, specialized heads (Voita et al., 2019; Olsson et al., 2022; Chuang et al., 2024; Wu et al., 2024).

Figure 7: SFT with task-relevant context increases inference-time attention to context. Qwen3-1.7B fine-tuned with target-domain documents assign more attention mass to context tokens.
Figure 7reports results for Qwen3-1.7B, while the additional model results in App. H.3 show the same pattern. Models trained with task-relevant context allocate significantly more attention to context tokens at test time across all four domains (App. F.7). The shift is concentrated in middle layers, consistent with their role in contextual integration. This shows that increased train-time context availability changes the test-time computation, where the resulting models rely more heavily on the supplied context at prediction time.
6 Related Work
Long-context training.
Recent work has made long-context language modeling increasingly practical by extending usable context through positional extrapolation and RoPE scaling (Press et al., 2022; Chen et al., 2023; Peng et al., 2026; Ding et al., 2024), sparse or recurrent attention (Dai et al., 2019; Beltagy et al., 2020; Child et al., 2019), and retrieval or memory augmentation (Borgeaud et al., 2022; Wu et al., 2022; Munkhdalai et al., 2024). Other work adapts pretrained models to longer windows using continued pretraining and long-document upsampling (Xiong et al., 2024), domain and length balanced data mixtures (Fu et al., 2024), and instruction tuning to shape long-context use (Gao et al., 2025b; Zhao et al., 2024). These methods primarily ask how models can acquire and use long-context capabilities while preserving existing performance. Short-to-long curricula recover long-context ability more efficiently than training at maximum length throughout (Jin et al., 2023; Pouransari et al., 2025; Zhu et al., 2025), suggesting that the training window may affect not only the attainable context length, but also the training dynamics used to acquire it. Relatedly, prior work explains non-monotonic context scaling as a tradeoff between the predictive value of additional context and the difficulty of learning to use it with limited data and model capacity (Shi et al., 2026). This account is complementary to ours, which focuses on how informative training context shifts learning from parametric knowledge toward context reliance.
Beyond effects on training efficiency and approximation difficulty, long-context adaptation can degrade short-context performance through representation drift and catastrophic forgetting (Dong et al., 2025), suggesting that naive context extension may trade one capability for another. A longer nominal window also does not by itself imply effective use of the added context, since nominal context length can overstate effective context length when long-range relative positions are undertrained (An et al., 2024). Relatedly, models systematically underuse information in the middle of long prompts (Liu et al., 2023b), and long-context benchmarks reveal persistent failures in retrieval, aggregation, and reasoning over extended inputs (Bai et al., 2024; Hsieh et al., 2024; Zhang et al., 2024b; Bianchi et al., 2025; Byerly and Khashabi, 2026). Prior work thus primarily asks how to obtain, preserve, or evaluate long-context capability, but does not characterize how the training context window shapes the model’s mode of learning. We address this gap by studying whether the training context window governs the allocation of task information between parameters and context, thereby shifting models from parametric internalization toward context-dependent computation.
Two modes of learning with context.
A growing body of work studies how language models balance parametric and contextual strategies for solving tasks. This distinction is often framed as task retrieval, in which demonstrations activate task structure already encoded in the model’s weights (Pan et al., 2023; Lin and Lee, 2024), versus task learning, in which the model infers a new input-output rule from examples in context (Pan et al., 2023; Fang et al., 2025). These modes can coexist and compete during pretraining (Wang et al., 2023), and their relative use depends on the training process, task distribution, and informativeness of the context (Anand et al., 2025; Chan et al., 2022; Raventós et al., 2023). Empirical evidence further supports this view. Corrupted-label demonstrations can still improve performance, suggesting that demonstrations may identify a latent task rather than fully specify a new mapping (Min et al., 2022). Other probes measure when models retrieve internal knowledge versus learn from demonstrations in regression tasks (Nafar et al., 2025), substitution-cipher tasks (Fang et al., 2025), and many-shot prompting settings (Bertsch et al., 2025). These studies establish that language models can interpolate between parametric and contextual solutions. However, they primarily vary inference-time prompts, demonstration distributions, task families, or model scale. The role of the training context window in governing this bi-modal tradeoff remains largely unstudied, motivating our focus in this work.
We further discuss related work on language modeling as compression in App. J.
7 Discussion and Conclusion
Implications.
The Information Abundance Paradox challenges the assumption that scaling toward near-infinite context requires only more data. Our findings instead show that the context window can govern the model’s mode of learning, with longer windows shifting models toward context-supplied information and away from reusable parametric knowledge. Whether this shift is beneficial depends on the application.
Limitations.
Our pretraining experiments are limited up to 750M parameters in pretraining. Testing the same phenomenon at larger scale remains an important next step for determining how the location and severity of the observed inflection points change with model size, data scale, and compute.
Conclusion.
Long-context processing is a powerful capability, but it is not a neutral scaling axis for language models. Our findings show that increasing train-time context can change the model’s mode of learning, shifting it from parametric internalization toward contextualization. The takeaway is therefore not that long-context processing is undesirable, but that it should be understood through its role in mediating the tradeoff between context use and context independent competence.
Acknowledgment
AU is supported by JHU PURA (the Provost’s Undergraduate Research Award) and Pistritto Research Fellowship. DK and BVD are in part supported by Defense Advanced Research Projects Agency (DARPA) under Contract No. HR001125C0304, ONR grant (N0001424-1-2089) and JHU Provost Discovery Award (2025–2027). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of DARPA. We acknowledge the use of computational resources on the Johns Hopkins Data Science and AI Institute (DSAI) cluster. We sincerely thank Zhengping Jiang and Sungwon Kim for their helpful feedback on an earlier version of this work.
References
M. Abdin, J. Aneja, H. Awadalla, A. Awadallah, A. A. Awan, N. Bach, A. Bahree, A. Bakhtiari, J. Bao, H. Behl, A. Benhaim, M. Bilenko, J. Bjorck, S. Bubeck, M. Cai, Q. Cai, V. Chaudhary, D. Chen, D. Chen, W. Chen, Y. Chen, Y. Chen, H. Cheng, P. Chopra, X. Dai, M. Dixon, R. Eldan, V. Fragoso, J. Gao, M. Gao, M. Gao, A. Garg, A. D. Giorno, A. Goswami, S. Gunasekar, E. Haider, J. Hao, R. J. Hewett, W. Hu, J. Huynh, D. Iter, S. A. Jacobs, M. Javaheripi, X. Jin, N. Karampatziakis, P. Kauffmann, M. Khademi, D. Kim, Y. J. Kim, L. Kurilenko, J. R. Lee, Y. T. Lee, Y. Li, Y. Li, C. Liang, L. Liden, X. Lin, Z. Lin, C. Liu, L. Liu, M. Liu, W. Liu, X. Liu, C. Luo, P. Madan, A. Mahmoudzadeh, D. Majercak, M. Mazzola, C. C. T. Mendes, A. Mitra, H. Modi, A. Nguyen, B. Norick, B. Patra, D. Perez-Becker, T. Portet, R. Pryzant, H. Qin, M. Radmilac, L. Ren, G. de Rosa, C. Rosset, S. Roy, O. Ruwase, O. Saarikivi, A. Saied, A. Salim, M. Santacroce, S. Shah, N. Shang, H. Sharma, Y. Shen, S. Shukla, X. Song, M. Tanaka, A. Tupini, P. Vaddamanu, C. Wang, G. Wang, L. Wang, S. Wang, X. Wang, Y. Wang, R. Ward, W. Wen, P. Witte, H. Wu, X. Wu, M. Wyatt, B. Xiao, C. Xu, J. Xu, W. Xu, J. Xue, S. Yadav, F. Yang, J. Yang, Y. Yang, Z. Yang, D. Yu, L. Yuan, C. Zhang, C. Zhang, J. Zhang, L. L. Zhang, Y. Zhang, Y. Zhang, Y. Zhang, and X. Zhou Phi-3 technical report: a highly capable language model locally on your phone. External Links: 2404.14219, Link Cited by: Appendix A, Appendix A, §1.
J. Ainslie, J. Lee-Thorp, M. de Jong, Y. Zemlyanskiy, F. Lebrón, and S. Sanghai GQA: training generalized multi-query transformer models from multi-head checkpoints. External Links: 2305.13245, Link Cited by: §C.1.
C. An, J. Zhang, M. Zhong, L. Li, S. Gong, Y. Luo, J. Xu, and L. Kong Why does the effective context length of llms fall short?. External Links: 2410.18745, Link Cited by: §6.
S. Anand, M. A. Lepori, J. Merullo, and E. Pavlick Dual process learning: controlling use of in-context vs. in-weights strategies with weight forgetting. External Links: 2406.00053, Link Cited by: §1, §6.
Y. Bai, X. Lv, J. Zhang, H. Lyu, J. Tang, Z. Huang, Z. Du, X. Liu, A. Zeng, L. Hou, Y. Dong, J. Tang, and J. Li LongBench: a bilingual, multitask benchmark for long context understanding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), L. Ku, A. Martins, and V. Srikumar (Eds.), Bangkok, Thailand, pp. 3119–3137. External Links: Link, Document Cited by: §1, §6.
D. G. T. Barrett and B. Dherin Implicit gradient regularization. External Links: 2009.11162, Link Cited by: §5.1.
I. Beltagy, M. E. Peters, and A. Cohan Longformer: the long-document transformer. External Links: 2004.05150, Link Cited by: §6.
A. Bertsch, M. Ivgi, E. Xiao, U. Alon, J. Berant, M. R. Gormley, and G. Neubig In-context learning with long-context models: an in-depth exploration. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), L. Chiruzzo, A. Ritter, and L. Wang (Eds.), Albuquerque, New Mexico, pp. 12119–12149. External Links: Link, Document, ISBN 979-8-89176-189-6 Cited by: §6.
O. Bianchi, M. J. Koretsky, M. Willey, C. X. Alvarado, T. Nayak, A. Asija, N. Kuznetsov, M. A. Nalls, F. Faghri, and D. Khashabi Hidden in the haystack: smaller needles are more difficult for llms to find. arXiv preprint arXiv:2505.18148 abs/2505.18148. External Links: Link, 2505.18148 Cited by: §6.
Y. Bisk, R. Zellers, R. L. Bras, J. Gao, and Y. Choi PIQA: reasoning about physical commonsense in natural language. External Links: 1911.11641, Link Cited by: §D.3, §3.1.
L. Blier and Y. Ollivier The description length of deep learning models. External Links: 1802.07044, Link Cited by: Appendix J.
S. Borgeaud, A. Mensch, J. Hoffmann, T. Cai, E. Rutherford, K. Millican, G. van den Driessche, J. Lespiau, B. Damoc, A. Clark, D. de Las Casas, A. Guy, J. Menick, R. Ring, T. Hennigan, S. Huang, L. Maggiore, C. Jones, A. Cassirer, A. Brock, M. Paganini, G. Irving, O. Vinyals, S. Osindero, K. Simonyan, J. W. Rae, E. Elsen, and L. Sifre Improving language models by retrieving from trillions of tokens. External Links: 2112.04426, Link Cited by: §6.
J. Bornschein, Y. Li, and M. Hutter Sequential learning of neural networks for prequential mdl. ArXiv abs/2210.07931. External Links: Link Cited by: Appendix J.
T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei Language models are few-shot learners. External Links: 2005.14165, Link Cited by: §1.
A. Byerly and D. Khashabi Self-consistency falls short! the adverse effects of positional bias on long-context problems. External Links: Link Cited by: §6.
S. C. Y. Chan, I. Dasgupta, J. Kim, D. Kumaran, A. K. Lampinen, and F. Hill Transformers generalize differently from information stored in context vs in weights. External Links: 2210.05675, Link Cited by: §1, §6.
J. Chen, J. Wu, Y. Xu, and J. Zhang LADM: long-context training data selection with attention-based dependency measurement for llms. External Links: 2503.02502, Link Cited by: §1.
S. Chen, S. Wong, L. Chen, and Y. Tian Extending context window of large language models via positional interpolation. External Links: 2306.15595, Link Cited by: §1, §6.
J. Cheng, M. Marone, O. Weller, D. Lawrie, D. Khashabi, and B. V. Durme Dated data: tracing knowledge cutoffs in large language models. External Links: 2403.12958, Link Cited by: §D.1, §3.1.
R. Child, S. Gray, A. Radford, and I. Sutskever Generating long sequences with sparse transformers. External Links: 1904.10509, Link Cited by: §6.
Y. Chuang, L. Qiu, C. Hsieh, R. Krishna, Y. Kim, and J. R. Glass Lookback lens: detecting and mitigating contextual hallucinations in large language models using only attention maps. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Y. Al-Onaizan, M. Bansal, and Y. Chen (Eds.), Miami, Florida, USA, pp. 1419–1436. External Links: Link, Document Cited by: §5.3.
C. Clark, K. Lee, M. Chang, T. Kwiatkowski, M. Collins, and K. Toutanova BoolQ: exploring the surprising difficulty of natural yes/no questions. External Links: 1905.10044, Link Cited by: §D.2.
P. Clark, I. Cowhey, O. Etzioni, T. Khot, A. Sabharwal, C. Schoenick, and O. Tafjord Think you have solved question answering? try arc, the ai2 reasoning challenge. External Links: 1803.05457, Link Cited by: §D.3, §3.1.
J. Cordonnier, A. Loukas, and M. Jaggi Multi-head attention: collaborate instead of concatenate. External Links: 2006.16362, Link Cited by: §C.1.
I. Dagan, O. Glickman, and B. Magnini The pascal recognising textual entailment challenge. In Machine Learning Challenges. Evaluating Predictive Uncertainty, Visual Object Classification, and Recognising Tectual Entailment, J. Quiñonero-Candela, I. Dagan, B. Magnini, and F. d’Alché-Buc (Eds.), Berlin, Heidelberg, pp. 177–190. External Links: ISBN 978-3-540-33428-6 Cited by: §D.2.
D. Dai, L. Dong, Y. Hao, Z. Sui, B. Chang, and F. Wei Knowledge neurons in pretrained transformers. External Links: 2104.08696, Link Cited by: §5.2.
Z. Dai, Z. Yang, Y. Yang, J. Carbonell, Q. V. Le, and R. Salakhutdinov Transformer-xl: attentive language models beyond a fixed-length context. External Links: 1901.02860, Link Cited by: §6.
T. Dao FlashAttention-2: faster attention with better parallelism and work partitioning. External Links: 2307.08691, Link Cited by: §C.1.
G. Delétang, A. Ruoss, P. Duquenne, E. Catt, T. Genewein, C. Mattern, J. Grau-Moya, L. K. Wenliang, M. Aitchison, L. Orseau, M. Hutter, and J. Veness Language modeling is compression. External Links: 2309.10668, Link Cited by: Appendix J, §1.
B. Dherin, M. Munn, M. Rosca, and D. G. T. Barrett Why neural networks find simple solutions: the many regularizers of geometric complexity. External Links: 2209.13083, Link Cited by: §5.1.
Y. Ding, L. L. Zhang, C. Zhang, Y. Xu, N. Shang, J. Xu, F. Yang, and M. Yang LongRoPE: extending llm context window beyond 2 million tokens. External Links: 2402.13753, Link Cited by: Appendix B, §1, §2, §6.
Z. Dong, J. Li, J. Jiang, M. Xu, W. X. Zhao, B. Wang, and W. Chen LongReD: mitigating short-text degradation of long-context large language models via restoration distillation. External Links: 2502.07365, Link Cited by: §6.
E. Elmoznino, T. Marty, T. Kasetty, L. Gagnon, S. Mittal, M. Fathi, D. Sridhar, and G. Lajoie In-context learning and occam’s razor. External Links: 2410.14086, Link Cited by: Appendix J.
Z. Fang, A. Mishra, M. Gao, A. Liu, and D. Khashabi ICL CIPHERS: quantifying “learning” in in-context learning via substitution ciphers. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, C. Christodoulopoulos, T. Chakraborty, C. Rose, and V. Peng (Eds.), Suzhou, China, pp. 25912–25933. External Links: Link, Document, ISBN 979-8-89176-332-6 Cited by: §1, §6.
Y. Fu, R. Panda, X. Niu, X. Yue, H. Hajishirzi, Y. Kim, and H. Peng Data engineering for scaling language models to 128k context. External Links: 2402.10171, Link Cited by: §1, §6.
C. Gao, X. Wu, Z. Lin, D. Zhang, and S. Hu NExtLong: toward effective long-context training without long documents. External Links: 2501.12766, Link Cited by: §1.
T. Gao, A. Wettig, H. Yen, and D. Chen How to train long-context language models (effectively). External Links: 2410.02660, Link Cited by: §1, §6.
M. Geva, R. Schuster, J. Berant, and O. Levy Transformer feed-forward layers are key-value memories. External Links: 2012.14913, Link Cited by: §5.2.
Google DeepMind Gemini 3.1 flash-lite. Model card Google DeepMind. External Links: Link Cited by: Appendix G.
P. Grünwald and T. Roos Minimum description length revisited. International Journal of Mathematics for Industry 11 (01). External Links: ISSN 2661-3344, Link, Document Cited by: §1.
D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt Measuring massive multitask language understanding. External Links: 2009.03300, Link Cited by: Appendix A.
G. E. Hinton and D. van Camp Keeping the neural networks simple by minimizing the description length of the weights. In Annual Conference Computational Learning Theory, External Links: Link Cited by: Appendix J.
C. Hsieh, S. Sun, S. Kriman, S. Acharya, D. Rekesh, F. Jia, Y. Zhang, and B. Ginsburg RULER: what’s the real context size of your long-context language models?. External Links: 2404.06654, Link Cited by: §6.
E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, and W. Chen LoRA: low-rank adaptation of large language models. External Links: 2106.09685, Link Cited by: §3.2.
Y. Huang, J. Zhang, Z. Shan, and J. He Compression represents intelligence linearly. External Links: 2404.09937, Link Cited by: Appendix J.
M. Hutter The hutter prize. Note: http://prize.hutter1.netAccessed: 2026-04-30 Cited by: Appendix J.
N. Jiang and M. de Marneffe Evaluating BERT for natural language inference: a case study on the CommitmentBank. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), K. Inui, J. Jiang, V. Ng, and X. Wan (Eds.), Hong Kong, China, pp. 6086–6091. External Links: Link, Document Cited by: §D.2.
C. E. Jimenez, J. Yang, A. Wettig, S. Yao, K. Pei, O. Press, and K. Narasimhan SWE-bench: can language models resolve real-world github issues?. External Links: 2310.06770, Link Cited by: §1.
D. Jin, E. Pan, N. Oufattole, W. Weng, H. Fang, and P. Szolovits What disease does this patient have? a large-scale open domain question answering dataset from medical exams. External Links: 2009.13081, Link Cited by: §D.3.
H. Jin, X. Han, J. Yang, Z. Jiang, C. Chang, and X. Hu GrowLength: accelerating llms pretraining by progressively growing training length. External Links: 2310.00576, Link Cited by: §6.
Z. Jin, P. Cao, H. Yuan, Y. Chen, J. Xu, H. Li, X. Jiang, K. Liu, and J. Zhao Cutting off the head ends the conflict: a mechanism for interpreting and mitigating knowledge conflicts in language models. External Links: 2402.18154, Link Cited by: §5.3.
D. Khashabi, S. Chaturvedi, M. Roth, S. Upadhyay, and D. Roth Looking beyond the surface: a challenge set for reading comprehension over multiple sentences. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 252–262. Cited by: §D.2.
W. Kwon, Z. Li, S. Zhuang, Y. Sheng, L. Zheng, C. H. Yu, J. E. Gonzalez, H. Zhang, and I. Stoica Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, Cited by: Appendix A.
P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W. Yih, T. Rocktäschel, S. Riedel, and D. Kiela Retrieval-augmented generation for knowledge-intensive nlp tasks. External Links: 2005.11401, Link Cited by: §1.
S. Lin, J. Hilton, and O. Evans TruthfulQA: measuring how models mimic human falsehoods. External Links: 2109.07958, Link Cited by: §D.3.
Z. Lin and K. Lee Dual operating modes of in-context learning. External Links: 2402.18819, Link Cited by: §1, §6.
L. Liu, X. Liu, J. Gao, W. Chen, and J. Han Understanding the difficulty of training transformers. External Links: 2004.08249, Link Cited by: §5.2.
N. F. Liu, K. Lin, J. Hewitt, A. Paranjape, M. Bevilacqua, F. Petroni, and P. Liang Lost in the middle: how language models use long contexts. External Links: 2307.03172, Link Cited by: §6.
T. Liu, C. Xu, and J. McAuley RepoBench: benchmarking repository-level code auto-completion systems. External Links: 2306.03091, Link Cited by: §1.
I. Loshchilov and F. Hutter Decoupled weight decay regularization. External Links: 1711.05101, Link Cited by: §C.1.
M. V. Mahoney Text compression as a test for artificial intelligence. In AAAI/IAAI, External Links: Link Cited by: Appendix J.
M. P. Marcus, B. Santorini, and M. A. Marcinkiewicz Building a large annotated corpus of English: the Penn Treebank. Computational Linguistics 19 (2), pp. 313–330. External Links: Link Cited by: §D.1, §3.1.
K. Meng, D. Bau, A. Andonian, and Y. Belinkov Locating and editing factual associations in gpt. External Links: 2202.05262, Link Cited by: §5.2.
T. Mihaylov, P. Clark, T. Khot, and A. Sabharwal Can a suit of armor conduct electricity? a new dataset for open book question answering. External Links: 1809.02789, Link Cited by: §D.3.
S. Min, X. Lyu, A. Holtzman, M. Artetxe, M. Lewis, H. Hajishirzi, and L. Zettlemoyer Rethinking the role of demonstrations: what makes in-context learning work?. External Links: 2202.12837, Link Cited by: §6.
F. Mittu, Y. Bu, A. Gupta, A. Devireddy, A. E. Ozdarendeli, A. Singh, and G. Anumanchipalli FineZip : pushing the limits of large language models for practical lossless text compression. External Links: 2409.17141, Link Cited by: Appendix J.
T. Munkhdalai, M. Faruqui, and S. Gopal Leave no context behind: efficient infinite context transformers with infini-attention. External Links: 2404.07143, Link Cited by: §6.
A. Nafar, K. B. Venable, and P. Kordjamshidi Learning vs retrieval: the role of in-context examples in regression with large language models. External Links: 2409.04318, Link Cited by: §6.
L. Noci, S. Anagnostidis, L. Biggio, A. Orvieto, S. P. Singh, and A. Lucchi Signal propagation in transformers: theoretical perspectives and the role of rank collapse. External Links: 2206.03126, Link Cited by: §5.2.
T. Olmo, :, A. Ettinger, A. Bertsch, B. Kuehl, D. Graham, D. Heineman, D. Groeneveld, F. Brahman, F. Timbers, H. Ivison, J. Morrison, J. Poznanski, K. Lo, L. Soldaini, M. Jordan, M. Chen, M. Noukhovitch, N. Lambert, P. Walsh, P. Dasigi, R. Berry, S. Malik, S. Shah, S. Geng, S. Arora, S. Gupta, T. Anderson, T. Xiao, T. Murray, T. Romero, V. Graf, A. Asai, A. Bhagia, A. Wettig, A. Liu, A. Rangapur, C. Anastasiades, C. Huang, D. Schwenk, H. Trivedi, I. Magnusson, J. Lochner, J. Liu, L. J. V. Miranda, M. Sap, M. Morgan, M. Schmitz, M. Guerquin, M. Wilson, R. Huff, R. L. Bras, R. Xin, R. Shao, S. Skjonsberg, S. Z. Shen, S. S. Li, T. Wilde, V. Pyatkin, W. Merrill, Y. Chang, Y. Gu, Z. Zeng, A. Sabharwal, L. Zettlemoyer, P. W. Koh, A. Farhadi, N. A. Smith, and H. Hajishirzi Olmo 3. External Links: 2512.13961, Link Cited by: Appendix A, §1.
C. Olsson, N. Elhage, N. Nanda, N. Joseph, N. DasSarma, T. Henighan, B. Mann, A. Askell, Y. Bai, A. Chen, T. Conerly, D. Drain, D. Ganguli, Z. Hatfield-Dodds, D. Hernandez, S. Johnston, A. Jones, J. Kernion, L. Lovitt, K. Ndousse, D. Amodei, T. Brown, J. Clark, J. Kaplan, S. McCandlish, and C. Olah In-context learning and induction heads. External Links: 2209.11895, Link Cited by: §5.3.
J. Pan, T. Gao, H. Chen, and D. Chen What in-context learning "learns" in-context: disentangling task recognition and task learning. External Links: 2305.09731, Link Cited by: §1, §6.
D. Paperno, G. Kruszewski, A. Lazaridou, Q. N. Pham, R. Bernardi, S. Pezzelle, M. Baroni, G. Boleda, and R. Fernández The lambada dataset: word prediction requiring a broad discourse context. External Links: 1606.06031, Link Cited by: §D.1, §3.1.
B. Peng, J. Quesnelle, H. Fan, and E. Shippole YaRN: efficient context window extension of large language models. External Links: 2309.00071, Link Cited by: §1, §6.
F. Petroni, T. Rocktäschel, P. Lewis, A. Bakhtin, Y. Wu, A. H. Miller, and S. Riedel Language models as knowledge bases?. External Links: 1909.01066, Link Cited by: §1.
M. T. Pilehvar and J. Camacho-Collados WiC: the word-in-context dataset for evaluating context-sensitive meaning representations. External Links: 1808.09121, Link Cited by: §D.2.
H. Pouransari, C. Li, J. R. Chang, P. K. A. Vasu, C. Koc, V. Shankar, and O. Tuzel Dataset decomposition: faster llm training with variable sequence length curriculum. External Links: 2405.13226, Link Cited by: §6.
O. Press, N. A. Smith, and M. Lewis Train short, test long: attention with linear biases enables input length extrapolation. External Links: 2108.12409, Link Cited by: Appendix B, §6.
J. W. Rae, A. Potapenko, S. M. Jayakumar, C. Hillier, and T. P. Lillicrap Compressive transformers for long-range sequence modelling. arXiv preprint. External Links: Link Cited by: §3.1.
A. Raventós, M. Paul, F. Chen, and S. Ganguli Pretraining task diversity and the emergence of non-bayesian in-context learning for regression. External Links: 2306.15063, Link Cited by: §6.
J. Rissanen Modeling by shortest data description*. Autom. 14, pp. 465–471. External Links: Link Cited by: Appendix J.
A. Roberts, C. Raffel, and N. Shazeer How much knowledge can you pack into the parameters of a language model?. External Links: 2002.08910, Link Cited by: §1.
M. Roemmele, C. A. Bejan, and A. S. Gordon Choice of plausible alternatives: an evaluation of commonsense causal reasoning.. In AAAI spring symposium: logical formalizations of commonsense reasoning, pp. 90–95. Cited by: §D.2.
K. Sakaguchi, R. L. Bras, C. Bhagavatula, and Y. Choi WinoGrande: an adversarial winograd schema challenge at scale. External Links: 1907.10641, Link Cited by: §D.2.
K. Sakaguchi, R. L. Bras, C. Bhagavatula, and Y. Choi WinoGrande: an adversarial winograd schema challenge at scale. External Links: 1907.10641, Link Cited by: §D.3.
M. Sap, H. Rashkin, D. Chen, R. LeBras, and Y. Choi SocialIQA: commonsense reasoning about social interactions. External Links: 1904.09728, Link Cited by: §D.3.
C. E. Shannon A mathematical theory of communication. The Bell System Technical Journal 27, pp. 379–423. External Links: Link Cited by: Appendix J.
N. Shazeer GLU variants improve transformer. External Links: 2002.05202, Link Cited by: §C.1.
G. Sheng, C. Zhang, Z. Ye, X. Wu, W. Zhang, R. Zhang, Y. Peng, H. Lin, and C. Wu HybridFlow: a flexible and efficient rlhf framework. arXiv preprint arXiv: 2409.19256. Cited by: §C.2.
J. Shi, Q. Ma, H. Liu, H. Zhao, J. Hwang, and L. Li Intrinsic entropy of context length scaling in llms. External Links: 2502.01481, Link Cited by: §6.
S. L. Smith, B. Dherin, D. G. T. Barrett, and S. De On the origin of implicit regularization in stochastic gradient descent. External Links: 2101.12176, Link Cited by: §5.1.
J. Su, Y. Lu, S. Pan, A. Murtadha, B. Wen, and Y. Liu RoFormer: enhanced transformer with rotary position embedding. External Links: 2104.09864, Link Cited by: Appendix B, §C.1, §3.1.
M. Suzgun, N. Scales, N. Schärli, S. Gehrmann, Y. Tay, H. W. Chung, A. Chowdhery, Q. V. Le, E. H. Chi, D. Zhou, and J. Wei Challenging big-bench tasks and whether chain-of-thought can solve them. External Links: 2210.09261, Link Cited by: Appendix A.
A. Talmor, J. Herzig, N. Lourie, and J. Berant CommonsenseQA: a question answering challenge targeting commonsense knowledge. External Links: 1811.00937, Link Cited by: §D.3, §3.1.
N. Tazi, F. Mom, H. Zhao, P. Nguyen, M. Mekkouri, L. Werra, and T. Wolf The ultra-scale playbook: training llms on gpu clusters. Cited by: §3.1, §4.
G. Team Gemini 1.5: unlocking multimodal understanding across millions of tokens of context. External Links: 2403.05530, Link Cited by: §1.
I. Tenney, D. Das, and E. Pavlick BERT rediscovers the classical nlp pipeline. External Links: 1905.05950, Link Cited by: §5.3.
H. Touvron, L. Martin, K. Stone, P. Albert, A. Almahairi, Y. Babaei, N. Bashlykov, S. Batra, P. Bhargava, S. Bhosale, D. Bikel, L. Blecher, C. C. Ferrer, M. Chen, G. Cucurull, D. Esiobu, J. Fernandes, J. Fu, W. Fu, B. Fuller, C. Gao, V. Goswami, N. Goyal, A. Hartshorn, S. Hosseini, R. Hou, H. Inan, M. Kardas, V. Kerkez, M. Khabsa, I. Kloumann, A. Korenev, P. S. Koura, M. Lachaux, T. Lavril, J. Lee, D. Liskovich, Y. Lu, Y. Mao, X. Martinet, T. Mihaylov, P. Mishra, I. Molybog, Y. Nie, A. Poulton, J. Reizenstein, R. Rungta, K. Saladi, A. Schelten, R. Silva, E. M. Smith, R. Subramanian, X. E. Tan, B. Tang, R. Taylor, A. Williams, J. X. Kuan, P. Xu, Z. Yan, I. Zarov, Y. Zhang, A. Fan, M. Kambadur, S. Narang, A. Rodriguez, R. Stojnic, S. Edunov, and T. Scialom Llama 2: open foundation and fine-tuned chat models. External Links: 2307.09288, Link Cited by: §C.1, §3.1.
C. S. K. Valmeekam, K. Narayanan, D. Kalathil, J. Chamberland, and S. Shakkottai LLMZip: lossless text compression using large language models. External Links: 2306.04050, Link Cited by: Appendix J.
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin Attention is all you need. External Links: 1706.03762, Link Cited by: footnote 1.
E. Voita, D. Talbot, F. Moiseev, R. Sennrich, and I. Titov Analyzing multi-head self-attention: specialized heads do the heavy lifting, the rest can be pruned. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, A. Korhonen, D. Traum, and L. Màrquez (Eds.), Florence, Italy, pp. 5797–5808. External Links: Link, Document Cited by: §5.3.
E. Voita and I. Titov Information-theoretic probing with minimum description length. External Links: 2003.12298, Link Cited by: Appendix J.
A. Wang, Y. Pruksachatkun, N. Nangia, A. Singh, J. Michael, F. Hill, O. Levy, and S. R. Bowman SuperGLUE: a stickier benchmark for general-purpose language understanding systems. External Links: 1905.00537, Link Cited by: §D.2, §3.1.
H. Wang, E. Miahi, M. White, M. C. Machado, Z. Abbas, R. Kumaraswamy, V. Liu, and A. White Investigating the properties of neural network representations in reinforcement learning. External Links: 2203.15955, Link Cited by: §1, §6.
Y. Wang, X. Ma, G. Zhang, Y. Ni, A. Chandra, S. Guo, W. Ren, A. Arulraj, X. He, Z. Jiang, T. Li, M. Ku, K. Wang, A. Zhuang, R. Fan, X. Yue, and W. Chen MMLU-pro: a more robust and challenging multi-task language understanding benchmark. External Links: 2406.01574, Link Cited by: §3.2.
J. Welbl, N. F. Liu, and M. Gardner Crowdsourcing multiple choice science questions. In Proceedings of the 3rd Workshop on Noisy User-generated Text, L. Derczynski, W. Xu, A. Ritter, and T. Baldwin (Eds.), Copenhagen, Denmark, pp. 94–106. External Links: Link, Document Cited by: §D.3.
I. H. Witten, R. M. Neal, and J. G. Cleary Arithmetic coding for data compression. Commun. ACM 30 (6), pp. 520–540. External Links: ISSN 0001-0782, Link, Document Cited by: §1.
W. Wu, Y. Wang, G. Xiao, H. Peng, and Y. Fu Retrieval head mechanistically explains long-context factuality. External Links: 2404.15574, Link Cited by: §5.3.
Y. Wu, M. N. Rabe, D. Hutchins, and C. Szegedy Memorizing transformers. External Links: 2203.08913, Link Cited by: §6.
W. Xiong, J. Liu, I. Molybog, H. Zhang, P. Bhargava, R. Hou, L. Martin, R. Rungta, K. A. Sankararaman, B. Oguz, M. Khabsa, H. Fang, Y. Mehdad, S. Narang, K. Malik, A. Fan, S. Bhosale, S. Edunov, M. Lewis, S. Wang, and H. Ma Effective long-context scaling of foundation models. External Links: 2309.16039, Link Cited by: §2.
W. Xiong, J. Liu, I. Molybog, H. Zhang, P. Bhargava, R. Hou, L. Martin, R. Rungta, K. A. Sankararaman, B. Oguz, M. Khabsa, H. Fang, Y. Mehdad, S. Narang, K. Malik, A. Fan, S. Bhosale, S. Edunov, M. Lewis, S. Wang, and H. Ma Effective long-context scaling of foundation models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), K. Duh, H. Gomez, and S. Bethard (Eds.), Mexico City, Mexico, pp. 4643–4663. External Links: Link, Document Cited by: §1, §6.
A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, C. Zheng, D. Liu, F. Zhou, F. Huang, F. Hu, H. Ge, H. Wei, H. Lin, J. Tang, J. Yang, J. Tu, J. Zhang, J. Yang, J. Yang, J. Zhou, J. Zhou, J. Lin, K. Dang, K. Bao, K. Yang, L. Yu, L. Deng, M. Li, M. Xue, M. Li, P. Zhang, P. Wang, Q. Zhu, R. Men, R. Gao, S. Liu, S. Luo, T. Li, T. Tang, W. Yin, X. Ren, X. Wang, X. Zhang, X. Ren, Y. Fan, Y. Su, Y. Zhang, Y. Zhang, Y. Wan, Y. Liu, Z. Wang, Z. Cui, Z. Zhang, Z. Zhou, and Z. Qiu Qwen3 technical report. External Links: 2505.09388, Link Cited by: §3.2.
M. Yin, C. Wu, Y. Wang, H. Wang, W. Guo, Y. Wang, Y. Liu, R. Tang, D. Lian, and E. Chen Entropy law: the story behind data compression and llm performance. External Links: 2407.06645, Link Cited by: Appendix J.
B. Yu The minimum description length principle in coding and modeling. IEEE transactions on information theory 44 (6), pp. 2743–2760. Cited by: Appendix J.
R. Zellers, A. Holtzman, Y. Bisk, A. Farhadi, and Y. Choi HellaSwag: can a machine really finish your sentence?. External Links: 1905.07830, Link Cited by: §D.3.
B. Zhang and R. Sennrich Root mean square layer normalization. External Links: 1910.07467, Link Cited by: §C.1.
B. Zhang, I. Titov, and R. Sennrich Improving deep transformer with depth-scaled initialization and merged attention. External Links: 1908.11365, Link Cited by: §5.2.
J. Zhang, Z. Cheng, Y. Zhao, S. Wang, D. Zhou, G. Lu, and L. Song L3TC: leveraging rwkv for learned lossless low-complexity text compression. External Links: 2412.16642, Link Cited by: Appendix J.
S. Zhang, X. Liu, J. Liu, J. Gao, K. Duh, and B. V. Durme ReCoRD: bridging the gap between human and machine commonsense reading comprehension. External Links: 1810.12885, Link Cited by: §D.2.
X. Zhang, Y. Chen, S. Hu, Z. Xu, J. Chen, M. K. Hao, X. Han, Z. L. Thai, S. Wang, Z. Liu, and M. Sun bench: Extending long context evaluation beyond 100k tokens. External Links: 2402.13718, Link Cited by: §6.
L. Zhao, T. Wei, L. Zeng, C. Cheng, L. Yang, P. Cheng, L. Wang, C. Li, X. Wu, B. Zhu, Y. Gan, R. Hu, S. Yan, H. Fang, and Y. Zhou LongSkywork: a training recipe for efficiently extending context length in large language models. External Links: 2406.00605, Link Cited by: §6.
S. Zhou, F. F. Xu, H. Zhu, X. Zhou, R. Lo, A. Sridhar, X. Cheng, T. Ou, Y. Bisk, D. Fried, U. Alon, and G. Neubig WebArena: a realistic web environment for building autonomous agents. External Links: 2307.13854, Link Cited by: §1.
T. Zhu, Q. Liu, H. Wang, S. Chen, X. Gu, T. Pang, and M. Kan SkyLadder: better and faster pretraining via context window scheduling. External Links: 2503.15450, Link Cited by: §6.
Appendix A Evaluation of Phi-3 and OLMo 3 Models
We evaluate long and short-context variants from two model families, Phi-3 [Abdin et al., 2024] and OLMo 3 [Olmo et al., 2026]. For Phi-3, we consider four instruction-tuned variants spanning two model scales, mini (3.8B parameters) and medium (14B parameters). Specifically, we evaluate Phi-3-mini-4k-instruct, Phi-3-mini-128k-instruct, Phi-3-medium-4k-instruct, and Phi-3-medium-128k-instruct. The short-context 4K variants correspond to the instruction-tuned checkpoints, whereas the long-context 128K variants are obtained through LongRoPE-based context extension with additional post-training [Abdin et al., 2024]. For OLMo 3, we consider four base-model variants spanning two model scales, 7B and 32B parameters. Specifically, we evaluate the 8K and 65K variants for each scale. The short-context 8K variants correspond to checkpoints from the end of Stage 2 pretraining, whereas the long-context 65K variants correspond to checkpoints from the end of Stage 3 pretraining [Olmo et al., 2026]. We evaluate these models on MMLU [Hendrycks et al., 2021], BBH [Suzgun et al., 2022], and the suite of MCQA benchmarks described in App. D.3. We report accuracy as the evaluation metric for all tasks, along with the binomial standard errors.
We use a generation-based evaluation protocol for both few-shot and zero-shot settings using vLLM [Kwon et al., 2023]. The model is prompted to generate an answer, and we extract the predicted option letter from the generated output. For few-shot evaluation, we follow the Phi-3 paper [Abdin et al., 2024] and use the same task-specific number of demonstrations: MMLU 5, BBH 3, ARC-Easy 10, ARC-Challenge 10, CommonsenseQA 10, BoolQ 0, OpenBookQA 10, PIQA 5, SocialIQA 5, SciQ 5, HellaSwag 5, MedQA 2, TruthfulQA 10, and WinoGrande 5. For zero-shot evaluation, we set for all tasks. All evaluations use deterministic decoding.
We use the following multiple-choice prompt template:
Question: <question> Options: A. <choice A> B. <choice B> ... Answer:
Appendix B Positional Encoding Ablations
Our main pretraining experiments (§3.1) use RoPE [Su et al., 2023] for positional encoding. Because the choice of positional encoding may influence performance across context lengths, we test whether the observed trends depend on this architectural choice. To this end, we compare RoPE with ALiBi [Press et al., 2022] and LongRoPE [Ding et al., 2024] using the 259M parameter model under the pretraining setting of §3.1. For ALiBi, we replace RoPE with distance dependent attention biases while retaining the same training setup. For LongRoPE, we continue pretraining the 512 token RoPE checkpoints for 2.5B tokens at each extended context length using position dependent rescaling.
As shown in Figure 8, all three positional encoding schemes exhibit the same qualitative trend. Language modeling performance improves up to an intermediate context length and subsequently degrades, while SuperGLUE and MCQA peak at shorter context lengths before declining. ALiBi yields somewhat weaker absolute performance than RoPE, whereas LongRoPE closely follows the RoPE results. Taken together, these experiments show that the observed context length trend is robust to the choice of positional encoding and is not an artifact of RoPE.
Figure 8: The context length trend is robust to positional encoding choice. Results for RoPE, ALiBi, and LongRoPE across language modeling, SuperGLUE, and closed-book MCQA. Each positional encoding exhibits the same qualitative pattern, where performance improves up to an intermediate context length and degrades as the training window increases further.
Appendix C Training Details
C.1 Natural Language Pretraining
This section provides training details for the natural language pretraining experiments in §3.1. All models follow a Llama-2 architecture [Touvron et al., 2023] with SwiGLU activations [Shazeer, 2020], RoPE positional embeddings [Su et al., 2023], RMSNorm [Zhang and Sennrich, 2019], and a shared vocabulary of 32000 tokens (Llama-2 tokenizer). The 259M and 750M models use grouped-query attention [Ainslie et al., 2023], while the 20M and 55M models use multi-head attention [Cordonnier et al., 2021]. All models have untied input and output embeddings.
| 20M | 55M | 259M | 750M | |
|---|---|---|---|---|
| Architecture | ||||
| Hidden size | 256 | 512 | 1024 | 1536 |
| Intermediate size | 896 | 1792 | 3072 | 4608 |
| Layers | 4 | 6 | 16 | 24 |
| Attn. heads (Q) | 4 | 8 | 16 | 24 |
| Attn. heads (KV) | 4 | 8 | 4 | 6 |
| Tied embeddings | ||||
| Optimization | ||||
| 0.9, 0.95 | ||||
| Weight decay | 0.1 | |||
| Peak LR | ||||
| Min LR |
Table 1: Hyperparameters per model scale.
All models are trained for 9537 optimization steps on 10B tokens (4 epochs of a 2.5B-token corpus), with approximately 1.05M tokens per step. Optimization uses AdamW [Loshchilov and Hutter, 2019] with gradient clipping at 1.0, a linear warmup of 2000 steps, and cosine decay thereafter. All models are trained in bfloat16 with FlashAttention-2 [Dao, 2023]. The 20M, 55M, and 259M models use data parallelism across two NVIDIA A100 80GB GPUs, whereas the 750M models are trained on four NVIDIA H100 80GB GPUs. Remaining hyperparameters are provided in Table 1. For each configuration, we run multiple random seeds. We use five seeds for the 20M model and three seeds for the 55M, 259M, and 750M models. The seeds shared across all model scales are 42, 2026, and 1000. For the 20M model, we additionally use seeds 9999 and 12151. All reported evaluation results are averaged across seeds. Shaded standard error bands denote the standard error computed across seed-level means.
Context Length (tokens) Model 512 1K 2K 4K 8K 16K 32K 20M 4.77 4.74 4.91 5.12 5.52 6.40 8.17 55M 8.23 8.34 8.49 9.19 10.53 13.22 18.54 259M 27.90 28.66 30.13 33.57 40.72 55.04 83.44 750M 35.87 37.26 35.81 40.85 53.72 73.36 118.13
Table 2: Average pretraining cost in GPU hours across model sizes and context lengths.
Table 2reports the average pretraining cost in GPU hours for each model scale and context length. Training cost is relatively stable at short context lengths but grows noticeably at longer contexts, particularly beyond 8K tokens. For instance, the 259M model requires 27.90 GPU hours at 512 tokens and 83.44 GPU hours at 32K tokens. Other models show the same qualitative trend. Because the 20M, 55M, and 259M models are trained on A100 GPUs whereas the 750M model is trained on H100 GPUs, absolute GPU hours should not be compared directly across model scales. These measurements make explicit the compute tradeoff associated with extending the context length during pretraining.
C.2 Supervised Fine-Tuning
This section provides training details for the SFT experiments in §3.2. We perform supervised fine-tuning using the verl infrastructure [Sheng et al., 2024]. For each model and domain, we fine-tune for 5 epochs with a learning rate of , cosine learning-rate decay, and gradient clipping at 1.0. We use a maximum sequence length of 1024 tokens and apply right truncation to examples exceeding this length.
We use LoRA with rank and scaling parameter . Training is performed in bfloat16 precision with gradient checkpointing.
C.3 Synthetic Pretraining
This section provides training details for the synthetic pretraining experiments in §5.1.
Task format.
Each example consists of a sequence of input-output demonstrations followed by a final query. Models are trained to predict only the output tokens of the final query. For a training context length , the prompt contains demonstrations sampled from the same task family, followed by one held-out query from that task.
A generic prompt has the form where are in-context demonstrations and is the final query. The supervised loss is computed only on . This setup makes the context useful for solving the final query while allowing us to vary the amount of useful context independently of the task family.
Task families.
We use four deterministic task families.
- Unary bitwise operations. Inputs are 16-bit binary strings. Each task applies a unary bitwise operation to the input string, such as NOT, which maps each bit to its complement. The valid output tokens are 0 and 1. We train each model for 25 epochs.
- String transformations. Inputs are 8-letter strings over a fixed alphabet. Each task applies a deterministic string transformation, such as REVERSE. The output is another string over the same alphabet. We train each model for 25 epochs.
- Digit-wise mod10 arithmetic. Inputs are 5-digit strings. Each task applies a digit-wise arithmetic operation modulo 10. For example, a task may add a fixed digit-wise offset to each input digit, with all arithmetic performed modulo 10. We train each model for 10 epochs.
- Caesar cipher. Inputs are 5-digit strings. Each task shifts every digit by a global offset modulo 10. Importantly, the same offset is applied to all positions. We train each model for 10 epochs.
0.3M 1.5M 7.5M Architecture Layers 4 6 8 Hidden size 64 128 256 Attn. heads (Q) 2 4 8 Attn. heads (KV) 1 2 4 Intermediate size 256 512 1024 Optimization Optimizer AdamW Peak LR Min LR Batch size 32 64 128 Training steps 25,000 12,500 6,250 Warmup steps 1,250 625 312 Weight decay 0.001 Gradient clipping 1.0
Table 3: Synthetic pretraining model configurations and hyperparameters.
Data generation.
For each task family, datasets are generated deterministically from the corresponding input-output rule. We generate approximately 33K training examples and 10K test examples per task. Training and test inputs are disjoint. Each task uses a task-specific tokenizer with fewer than 30 tokens, including symbols for digits or letters, operation delimiters, separators, and special tokens. For each context length , we construct examples by sampling demonstrations and one final query from the same task. The final query does not appear among the demonstrations. The training set size is held fixed across context lengths so that changes in performance reflect the amount of useful context available per example rather than the number of optimization examples.
Architecture and optimization.
We train decoder-only transformer language models at three scales: 0.3M, 1.5M, and 7.5M parameters. All models are trained from scratch on each task family separately. The architecture follows the same causal language modeling setup as the natural language pretraining experiments in §3.1, but uses smaller widths, depths, and task-specific vocabularies. All models are trained with a causal attention mask and next token prediction objective, but the loss is applied only to the final-query output tokens. We vary the number of in-context demonstrations available during training and hold the task family, data-generating process, optimizer, and model scale fixed.
Evaluation conditions.
We evaluate each trained model under two context conditions.
- Supporting context. The context contains demonstrations generated by the correct task rule. This condition measures performance when the model can rely on useful in-context evidence.
- Conflicting context. The context contains demonstrations generated by a consistent but incorrect rule from the same task family. This condition measures whether the model follows the supplied context even when it conflicts with the parametrically correct rule.
We report the gap between supporting-context and conflicting-context performance as a measure of context addiction. A larger gap indicates that the model is more sensitive to the correctness of the provided context and therefore relies less robustly on a parametrically internalized task rule. We omit no-context evaluation in this synthetic setting because models are trained only on final-query losses following in-context demonstrations. Removing the demonstrations at test time changes the input format and sequence distribution, making no-context prompts out-of-distribution for these models.
Appendix D Evaluation Benchmarks
D.1 Language Modeling Suite
The language modeling suite consists of LAMBADA, Penn Treebank (PTB), and WikiSPAN. LAMBADA evaluates word prediction in passages where the target word depends on broad discourse context rather than only local syntax [Paperno et al., 2016]. PTB provides a standard corpus-level benchmark for measuring next token prediction on natural text [Marcus et al., 1993]. WikiSPAN evaluates language modeling over time-indexed Wikipedia documents, providing an additional testbed for factual and distributional variation in naturally occurring text [Cheng et al., 2024]. These benchmarks are well suited to our evaluation because they directly measure the pretraining objective. They therefore test whether increasing the train-time context window improves objective-aligned compression or degrades general next token prediction beyond an intermediate optimum.
D.2 SuperGLUE
SuperGLUE is a suite of natural language understanding tasks that measure capabilities such as entailment, coreference, causal reasoning, and word-sense disambiguation [Wang et al., 2020]. The suite aggregates several benchmarks, including BoolQ [Clark et al., 2019], CommitmentBank [Jiang and de Marneffe, 2019], COPA [Roemmele et al., 2011], MultiRC [Khashabi et al., 2018], ReCoRD [Zhang et al., 2018], RTE [Dagan et al., 2006], WiC [Pilehvar and Camacho-Collados, 2019], and WSC [Sakaguchi et al., 2019a]. We include SuperGLUE as an intermediate evaluation between language modeling and closed-book multiple-choice question answering. Unlike the language modeling suite, SuperGLUE probes whether representations learned during pretraining transfer to structured language understanding tasks. Unlike the MCQA suite, it does not primarily target factual recall. This makes it well suited for testing whether train-time context length affects general linguistic and reasoning competence rather than only the model’s ability to store task-specific knowledge.
D.3 Closed-Book MCQA Suite
The closed-book MCQA suite consists of ARC-Easy and ARC-Challenge [Clark et al., 2018], CommonsenseQA [Talmor et al., 2019], HellaSwag [Zellers et al., 2019], OpenBookQA [Mihaylov et al., 2018], PIQA [Bisk et al., 2019], SocialIQA [Sap et al., 2019], MedQA [Jin et al., 2020], TruthfulQA [Lin et al., 2022], SciQ [Welbl et al., 2017], and WinoGrande [Sakaguchi et al., 2019b]. These benchmarks cover complementary forms of knowledge and reasoning, including grade-school science, general commonsense, physical commonsense, social commonsense, medical knowledge, truthfulness, and commonsense coreference. We evaluate them in a closed-book setting, using only the question and answer choices without auxiliary retrieval or supporting documents. This protocol directly supports our goal of measuring parametric knowledge. If longer-context training shifts predictive structure from weights toward context-conditioned computation, the effect should be visible when the model must answer without context at test time.
Appendix E Per-Dataset Evaluation Results
We report evaluation results for each individual dataset underlying the aggregate results in Figure 2. This per-dataset analysis tests whether the observed inverted-U pattern is driven by a small number of benchmarks or is visible across the underlying tasks.
Figure 9: Language modeling results by dataset. Across LAMBADA, PTB, and WikiSPAN, longer pretraining windows initially improve next token prediction but eventually degrade performance at longer windows. The dataset-level trends mirror the aggregate language modeling curve in Figure 2, with the strongest performance generally occurring at intermediate context lengths.
Figure 10: Closed-book MCQA results by dataset. Per-benchmark multiple-choice accuracy shows the same qualitative pattern as the aggregate MCQA result, where performance improves up to intermediate context windows and declines for longer ones. This indicates that the degradation is not an artifact of averaging, but appears across diverse forms of closed-book knowledge and reasoning.
| Dataset | Mean | Inflection Point | ||||
|---|---|---|---|---|---|---|
| PTB | 7 | 18 | 28 | 37 | 54 | 512 |
| LAMBADA | 71 | 78 | 88 | 95 | 113 | 2048 |
| WikiSPAN | 216 | 311 | 504 | 668 | 793 | 8192 |
Table 4: Longer language modeling examples favor longer pretraining context windows. Token-length statistics for each language modeling dataset and the training window yielding the lowest evaluation loss. Token counts are measured with the Llama-2-7b tokenizer.
This decomposition provides suggestive evidence that the preferred train-time context length partly tracks the effective length of the evaluation distribution. As shown in Table 4, PTB contains the shortest examples and attains its lowest loss at , LAMBADA is longer and attains its lowest loss at , and WikiSPAN contains the longest examples and attains its lowest loss at . This trend is consistent with the hypothesis that shorter evaluation tasks saturate at shorter training windows, while longer language modeling contexts benefit from longer train-time context before the long-context degradation appears. The downstream results in Table 5 follow the same broad pattern: MCQA and SuperGLUE have mean lengths of and tokens, respectively, and both exhibit an inflection point at . Across all five benchmarks, the inflection point, therefore, is consistently on the order of – times the mean example length.
| Dataset | Mean | Inflection Point | ||||
|---|---|---|---|---|---|---|
| MCQA | 35 | 48 | 65 | 77 | 110 | 2048 |
| SuperGLUE | 72 | 101 | 135 | 160 | 221 | 2048 |
Table 5: The trend observed for language modeling benchmarks continues on MCQA and SuperGLUE. Token-length statistics for each benchmark and the training window at which performance begins to degrade. Both MCQA and SuperGLUE statistics are weighted equally per benchmark.
For example, , , , , and . Although this relationship is only approximate and the selected context windows are discretized, it suggests a simple scaling rule, where performance tends to saturate, or begin to degrade, once the train-time context window exceeds the mean evaluation length by roughly one to two orders of magnitude.
Overall, the dataset-level decompositions (Figure 9 and Figure 10) support the conclusion that context length acts as a systematic training variable. While individual benchmarks vary in their sensitivity to window size, the broad trend remains consistent: increasing train-time context helps only up to an intermediate regime, after which longer windows reduce both objective-aligned language modeling performance and closed-book downstream accuracy.
Appendix F Statistical Significance Tests
This section reports statistical significance tests for the main empirical results in Figs. 1, 2, 3, 4, 5, 6, and 7. Throughout, we use a significance level of .
F.1 Long and Short Context Phi-3 and OLMo 3 Variants (Figure 1)
Model Evaluation MMLU BBH MCQA Phi-3 3.8B Few-shot 0.0048 0.1920 3.8B Zero-shot 14B Few-shot 0.0028 0.0155 14B Zero-shot OLMo 3 7B Few-shot 0.1204 0.0189 7B Zero-shot 0.0071 32B Few-shot 0.0305 0.2669 32B Zero-shot —
Table 6: Significance tests for the comparisons in Figure 1. We report -values from one-sided two-proportion score tests comparing Phi-3 128K against 4K variants and OLMo 3 65K against 8K variants.
We compare each long-context model with its corresponding short-context variant using a one-sided two-proportion score test in the hypothesized direction that the long-context variant performs worse. For Phi-3, we compare the 128K variants against their corresponding 4K variants; for OLMo 3, we compare the 65K variants against their corresponding 8K variants. We apply Holm correction within each model-family comparison set.
Phi-3.
The 128K variants perform significantly worse than their corresponding 4K variants in 11 of the 12 comparisons.
OLMo 3.
The 65K variants perform significantly worse than their corresponding 8K variants in 9 of the 11 comparisons. We do not conduct a test for 32B zero-shot MMLU comparison, since OLMo 3 65K performs better.
Taken together, the long-context variants are significantly worse in 20 of the 23 reported Phi-3 and OLMo 3 comparisons, providing statistical support for the motivating pattern in Figure 1.
F.2 Pretraining Context Length Inflection Tests (Figure 2)
Model Language Modeling SuperGLUE MCQA 20M 0.016 0.041 0.022 55M 0.032 0.012 0.013 259M 0.043 0.003 0.005 750M 0.021 0.004 0.004
Table 7: Segmented regression inflection tests for Figure 2. We report -values for the corresponding inflection test.
We apply segmented regression tests to assess whether performance exhibits a statistically significant inflection as training context length increases. Degradation begins after 8K tokens for language modeling and after 2K tokens for SuperGLUE and MCQA, consistent with the intermediate optima observed in Figure 2. The inflection is statistically significant for all three evaluation suites at every model scale, indicating that the post-optimum degradation persists as model capacity increases.
F.3 Ordered SFT Trends (Figure 3)
Model No Ctx. Supporting Ctx. – Conflicting Ctx. 0.6B 0.0074 0.0067 1.7B 0.0068 0.0084 4B 0.0097 0.0087 8B 0.0645 0.0074 14B 0.0062 0.0096
Table 8: Ordered trend tests for Figure 3. is the change from to for the corresponding evaluation quantity; is the one-sided ordered trend test -value.
We use blocked ordered trend tests over train-time , treating the four domains as equally weighted repeated blocks. For no-context accuracy, the one-sided alternative is a decreasing trend with ; for the supporting–conflicting accuracy gap, the one-sided alternative is an increasing trend. The ordered effect is significant in 9 of 10 comparisons, as no-context accuracy decreases significantly for every model except Qwen3-8B, while the supporting–conflicting gap increases significantly for all five model sizes. These results show that the qualitative trends in Figure 3 are consistent across domains rather than being driven by a small subset of them.
F.4 Gradient Norm Trends in the Synthetic Study (Figure 4)
| Task | Kendall | |
|---|---|---|
| Bitwise Ops. | 0.0037 | |
| String Ops. | ||
| Mod10 | 0.9912 | |
| Caesar | 0.0704 |
Table 9: Gradient norm trend tests for Figure 4. The one-sided alternative is decreasing gradient norm with increasing numbers of demonstrations.
We apply a one-sided Kendall rank trend test to the mean gradient norm of each independent training run, testing whether gradient norm decreases as the number of in-context demonstrations increases. Gradient norms decrease significantly for bitwise operations and string operations, whereas mod10 and Caesar exhibit nonsignificant trends. Thus, significantly decreasing gradient norm is observed specifically for the tasks that exhibit context addiction.
F.5 Module-Level Gradient Allocation (Figure 5)
Model Economics Law Health Psychology 0.6B 0.0706 0.0014 1.7B 0.0195 0.0155 4B 0.0087 0.0024 8B 14B 0.0040 0.0002 0.0093
Table 10: SFT gradient allocation tests for 5(a). We report two-sided HAC-normal test -values for the paired difference in FFN-to-SA gradient norm ratio between and no-context training.
Supervised fine-tuning (5(a)). At each model-domain pair, we match FFN-to-SA gradient norm ratios by training step and test the mean paired difference between and no-context training using a two-sided normal test with Newey–West heteroskedasticity- and autocorrelation-consistent (HAC) standard errors. The trajectory has a lower mean ratio in all 20 comparisons, and 19 of 20 comparisons are significant.
Model Mean Slope per Context Doubling 20M 0.0013 55M 0.0051 259M 0.0016 750M 0.0074
Table 11: Pretraining gradient allocation trend tests for 5(b). The slope is the mean change in FFN-to-SA gradient norm ratio per context length doubling.
Pretraining (5(b)). We compute the mean change in the FFN-to-SA gradient norm ratio per doubling of the training context length and test whether this slope is negative. The ratio decreases significantly with increasing context length at every model scale. This consistent negative trend indicates that the shift in gradient pressure toward self-attention persists as model capacity increases.
F.6 Module-Restricted Supervised Fine-Tuning (Figure 6)
Model No Ctx. () Supporting Ctx. () Conflicting Ctx. () 0.6B 0.0733 0.0036 0.0005 1.7B 0.0739 0.0001 4B 0.0015 0.0135
Table 12: Module-restricted fine-tuning tests for Figure 6. denotes SA-only minus FFN-only accuracy, and is the one-sided two-proportion score test -value. Arrows indicate the hypothesized direction for SA-only relative to FFN-only.
For each model size and evaluation setting, we use a one-sided two-proportion score test in the hypothesized direction, using the independence approximation. The predicted direction holds in all nine comparisons, with seven of nine being significant. SA-only tuning is significantly better than FFN-only tuning under supporting context and significantly worse under conflicting context for all three models. Under no-context evaluation, SA-only tuning is significantly worse only for Qwen3-4B.
| Domain | Layers | |
|---|---|---|
| Law | 4–16 | |
| Health | 4–16 | 0.0040 |
| Psychology | 4–16 | |
| Economics | 4–16 | 0.0180 |
Table 13: Permutation tests for Figure 7. We report cluster-level permutation -value after max-cluster correction over layers.
F.7 Inference-Time Attention to Context (Figure 7)
For each domain, we use a one-sided cluster-based permutation test to determine whether SFT increases attention to context tokens relative to no-context SFT. For each question, the layer-wise difference curve is sign-flipped during permutation, thereby preserving dependence across layers. Positive differences across contiguous layers are grouped into clusters, and the maximum cluster statistic controls for multiple comparisons over layers. The checkpoint assigns significantly greater attention mass to context tokens in layers 4–16 across all four domains.
Appendix G Context Construction for Supervised Fine-Tuning
We construct the supervised fine-tuning data from four MMLU-Pro domains, namely Health, Economics, Law, and Psychology. Since MMLU-Pro provides only a test split, we create an 80/20 split within each domain. The 80% portion is used for supervised fine-tuning, and the remaining 20% portion is reserved for held-out evaluation.
For each question, we generate two sets of documents. The first set is supporting context, which is intended to support the correct answer. The second set is conflicting context, which is intended to plausibly steer the model toward an incorrect answer. We generate both sets using gemini-3.1-flash-lite-preview [Google DeepMind, 2026] through the Gemini API. We use the model’s default generation hyperparameters, with temperature=1.0, topP=0.95, topK=64, and candidateCount=1. The maximum output length is set by the model limit of 65536 tokens. The system prompt used for generation is provided below:
System prompt.
You are an expert question analyst. Given a multiple choice question, you will generate context and reasoning in JSON format only, with no extra text or markdown.
Your output must be a JSON object with exactly these four keys.
- supporting_context: Exactly 8 sentences of factual background information that directly supports arriving at the correct answer. Each sentence must be fully self-contained and independent. No sentence should reference, depend on, or follow logically from any other sentence. Avoid discourse connectives like “furthermore”, “however”, “therefore”, and “this means”.
- conflicting_context: Exactly 8 sentences that sound plausible and relevant but subtly steer reasoning toward the second most likely incorrect answer, without explicitly mentioning any answer choice. Each sentence must be fully self-contained and independent. No sentence should reference, depend on, or follow logically from any other sentence. Avoid discourse connectives.
- trick_answer: The single answer option letter, such as A, B, or C, that the conflicting_context is designed to steer toward.
- reasoning: A concise 1 to 3 sentence explanation of why the correct answer is correct.
Question: Which of the following is most likely to produce symptoms similar to anxiety? Options: A) Hyperthyroidism B) Addison’s disease
| Target Domain (Psychology) | Other Domain (e.g. Economics) | |
|---|---|---|
Table 14: Illustration of the SFT context conditions. Training uses supporting documents from the target or other domains. Testing uses target-domain documents that either support the correct answer or conflict with it. This allows us to vary the informativeness of context during training, and evaluate how it may impact models’ dependency on context during testing.
Table 14summarizes these context conditions. During training, supporting documents may come from either the target domain or the paired source domain, whereas evaluation uses only target-domain documents and varies whether they support the correct answer or conflict with it. The conflicting other-domain condition is not used, since the evaluation is intended to isolate the effect of context correctness within the target domain.
Using these generated documents, we construct train-time context-relevance conditions under a fixed budget of eight documents. The variable denotes the number of target-domain documents, while the remaining documents are drawn from a paired source domain. We pair Law with Health and Economics with Psychology. Thus, Law uses Health as the source of irrelevant documents, Health uses Law, Economics uses Psychology, and Psychology uses Economics. The condition contains only target-domain context, the condition contains mixed context, and the condition contains only irrelevant context. We also include a no-context condition in which all prepended documents are removed. All conditions use the same question set and answer supervision.
| Split | Domain | Context | |||
|---|---|---|---|---|---|
| Train | Econ. | Supp. | 152.0 | 170.5 | 186.0 |
| Econ. | Conf. | 148.0 | 163.0 | 176.0 | |
| Health | Supp. | 174.2 | 201.0 | 225.0 | |
| Health | Conf. | 166.0 | 186.0 | 204.0 | |
| Law | Supp. | 173.0 | 198.0 | 219.0 | |
| Law | Conf. | 167.0 | 186.0 | 202.0 | |
| Psych. | Supp. | 157.0 | 176.0 | 192.2 | |
| Psych. | Conf. | 153.0 | 168.0 | 183.0 | |
| Test | Econ. | Supp. | 158.0 | 170.5 | 186.2 |
| Econ. | Conf. | 154.8 | 163.0 | 176.0 | |
| Health | Supp. | 181.0 | 201.0 | 218.0 | |
| Health | Conf. | 173.0 | 190.0 | 208.0 | |
| Law | Supp. | 182.0 | 201.0 | 216.5 | |
| Law | Conf. | 175.0 | 190.0 | 203.0 | |
| Psych. | Supp. | 161.5 | 179.0 | 193.5 | |
| Psych. | Conf. | 155.0 | 168.0 | 186.0 |
Table 15: SFT contexts have similar total token lengths. Total tokens in the prepended context per question, measured with the Llama-2-7b tokenizer.
As shown in Table 15, supporting and conflicting contexts occupy the same few-hundred-token regime across domains and splits. On the held-out test split, the interquartile ranges largely overlap, where supporting contexts have medians between 170.5 and 201.0 tokens, while conflicting contexts have medians between 163.0 and 190.0 tokens. Supporting contexts are slightly longer overall, but their interquartile ranges remain comparable to those of conflicting contexts within each domain. Thus, the SFT comparison primarily varies the relevance and composition of a fixed eight-document context budget, rather than varying the context length.
Appendix H Full Results
H.1 Supervised Fine-Tuning Full Results
Table 16reports the complete supervised fine-tuning results underlying Figure 3. The table breaks down performance by domain, model size, train-time context condition, and test-time context condition. Across domains, the same qualitative pattern appears. Increasing the amount of target-domain context during fine-tuning improves accuracy when supporting context is available at test time. However, it generally reduces robustness when context is absent or when the supplied context conflicts with the correct answer. These domain-level results show that the context-reliance trend in Figure 3 is not driven by a single domain or model size. Instead, it appears consistently across Health, Economics, Law, and Psychology, as well as across the Qwen3 model scales.
Qwen3-0.6B Qwen3-1.7B Qwen3-4B Qwen3-8B Qwen3-14B Domain Eval – Train No-SFT No Ctx. No-SFT No Ctx. No-SFT No Ctx. No-SFT No Ctx. No-SFT No Ctx. Law No Ctx. Supporting Ctx. Conflicting Ctx. Health No Ctx. Supporting Ctx. Conflicting Ctx. Economics No Ctx. Supporting Ctx. Conflicting Ctx. Psychology No Ctx. Supporting Ctx. Conflicting Ctx. Average No Ctx. Supporting Ctx. Conflicting Ctx.
Table 16: Performance across domains, context conditions, and retrieval settings for Qwen3 models. Average denotes the mean over Law, Health, Economics, and Psychology.
H.2 Solution Complexity Full Results

Figure 11: Lower complexity solutions and context addiction co-occur across model sizes. Across synthetic tasks and model scales, tasks with larger supporting–conflicting gaps also show lower average training gradient norms as the number of in-context demonstrations increases. This pattern is strongest for bitwise and string operations, while mod10 arithmetic and Caesar cipher remain comparatively stable. Context addiction becomes stronger as model size grows.
Figure 11provides the full model-scale breakdown for the complexity analysis (§5.1). The same qualitative pattern holds across model sizes. Tasks that exhibit stronger context addiction also show decreasing average training gradient norms as train-time demonstrations increase. For bitwise and string operations, longer contexts produce lower gradient norm solutions and larger supporting–conflicting gaps. In contrast, mod10 arithmetic and Caesar cipher show comparatively stable gaps and no consistent decrease in the gradient norm proxy.
The effect also strengthens with model size. Larger models show larger growth in the supporting–conflicting gap under longer train-time context. This suggests that increased capacity does not prevent context addiction in these settings. Instead, when demonstrations provide a lower complexity route to reducing loss, larger models appear even more able to exploit that contextual solution. These results support our conclusion that lower complexity solutions and context addiction emerge together, and show that this relationship is consistent across model scales.
H.3 Token-Level Attention Allocation Full Results
In this section, we provide additional inference-time attention allocation results for other Qwen3 model sizes. As in Figure 7, we compare models fine-tuned without context against models fine-tuned with task-relevant documents, and evaluate both under supporting context. The same qualitative pattern appears for Qwen3-0.6B in Figure 12, Qwen3-8B in Figure 13, and Qwen3-14B in Figure 14: task-relevant fine-tuning increases attention mass on context tokens, with the largest differences appearing in middle layers. These results support the conclusion that context-rich training changes inference-time computation by making models rely more strongly on supplied context.
Figure 12: Attention allocation for Qwen3-0.6B. Fine-tuning with task-relevant context increases attention mass on context tokens, especially in middle layers.
Figure 13: Attention allocation for Qwen3-8B. The context-trained model assigns more attention to context tokens than the no-context model under supporting-context evaluation.
Figure 14: Attention allocation for Qwen3-14B. Task-relevant fine-tuning shifts inference-time attention toward supplied context across tasks, with strongest effects in middle layers.
Appendix I Proof of Parametric Information Monotonicity
Let denote the pointwise task loss and denote the corresponding population risk. The risk threshold denotes an upper bound on this population risk. We reuse the notation from §4, where denotes the input available at context size , is the measurable projection from a longer input to its aligned -token subwindow, is the task-conditional weight channel, and is the predictor at context size , inducing predictions .
Proof.
Fix , and take any feasible pair for , so that
We construct a feasible pair at context size by using the same weight channel and defining the longer-context predictor by first projecting the input to the corresponding -token subwindow:
By the nested-input assumption, almost surely. Therefore, under the constructed pair , the induced joint law of is the same as under . Hence the population risk is preserved:
Moreover, because the weight channel is unchanged, the task information stored in the weights is also unchanged. Thus every feasible pair at context size induces a feasible pair at context size with the same parametric information. Taking the infimum over all feasible gives
∎
Appendix J Language Modeling as Compression
The idea that prediction, compression, and intelligence are linked predates modern LMs. Classical source coding connects probabilistic prediction to lossless coding [Shannon, 1948], while the MDL frames learning as compression without overfitting [Rissanen, 1978, Yu, 1998]. This view also motivates compression-based evaluations of AI models, from text-compression tests as intelligence benchmarks [Mahoney, 1999] to the Hutter Prize’s Wikipedia-compression objective [Hutter, 2006]. In machine learning, description length and prequential coding have been used to measure what neural models learn [Hinton and van Camp, 1993, Blier and Ollivier, 2018] and how efficiently representations support downstream labels [Voita and Titov, 2020, Bornschein et al., 2022]. Recent work revisits these ideas for modern language models. Delétang et al. [2024] demonstrate that autoregressive LMs can be paired with entropy coding to form strong general-purpose compressors, and use this lens to study scaling, tokenization, and in-context learning. Compression also serves as an empirical diagnostic, correlating with downstream performance [Huang et al., 2024] and guiding data selection [Yin et al., 2024]. Relatedly, Elmoznino et al. [2025] interprets in-context learning through prequential coding, showing that next token prediction can favor simple predictors inferred from examples in the prompt. Practical neural compressors similarly build on LM predictions, including LLMZip [Valmeekam et al., 2023], FineZip [Mittu et al., 2024], and low-complexity learned compressors such as L3TC [Zhang et al., 2024a]. These works establish compression as an evaluation criterion, a data-selection signal, or a mechanism for building compressors. Our use of compression is different, since we ask how the availability of context during training changes the location of compressed task information. Rather than measuring whether a model compresses well overall, we study whether longer train-time contexts shift predictive structure away from parametric storage and toward context-conditioned computation.