Intrinsic Entropy of Context Length Scaling in LLMs
Jingzhe Shi (Tsinghua University), Qinwei (Martin) Ma (Tsinghua), Hongyi Liu (CMU), Hang Zhao (Professor), Jenq-Neng Hwang (Professor), Lei Li (Dr)
International Conference on Learning Representations 2026 · Oral
Overview
Large Language Models (LLMs) have revolutionized many applications, yet their performance often paradoxically degrades when presented with excessively long, even relevant, contexts. This counter-intuitive phenomenon, where providing "more information" leads to "stupider" agents, is a significant challenge for practitioners and a puzzle for researchers. This talk, presented by Jingzhe Shi from Tsinghua University and co-authored with a team from Tsinghua, CMU, and other institutions, delves into the fundamental reasons behind this limitation.

Key moments
- 0:00 LLMs performance degrades with long, relevant contexts.
- 2:00 Explaining performance drop: Bayes risk and approximation loss tradeoff.
- 2:40 Introducing intrinsic entropy to measure context information content.
- 6:40 Experimental results: Optimal context length varies by task, model.
- 8:00 Conclusion and future work on LLM context length scaling.
- 10:10 Q&A: Optimal context length dependence on model and task.
- 12:50 Q&A: Performance drop with too much relevant context.
Intrinsic Entropy of Context Length Scaling in LLMs
Speakers: Jingzhe Shi (Tsinghua University); Qinwei (Martin) Ma (Tsinghua); Hongyi Liu (CMU); Hang Zhao (Professor); Jenq-Neng Hwang (Professor); Lei Li (Dr)
Conference: ICLR 2026
YouTube: https://slideslive.com/39062091
Overview
Large Language Models (LLMs) have revolutionized many applications, yet their performance often paradoxically degrades when presented with excessively long, even relevant, contexts. This counter-intuitive phenomenon, where providing "more information" leads to "stupider" agents, is a significant challenge for practitioners and a puzzle for researchers. This talk, presented by Jingzhe Shi from Tsinghua University and co-authored with a team from Tsinghua, CMU, and other institutions, delves into the fundamental reasons behind this limitation.
The core contribution of this work is a novel theoretical framework that explains the existence of an optimal context length by decomposing the total loss into Bayes risk and approximation loss. The authors introduce the concept of intrinsic entropy to quantify the information embedded in a given context length, demonstrating its linear relationship with the cross-entropy loss. Through both theoretical analysis and empirical validation on real and synthetic datasets, this research offers critical insights into LLM behavior and provides potential avenues for designing more robust and efficient long-context models and agents.
This research is particularly relevant for anyone working with LLMs in scenarios requiring extensive contextual information, such as coding assistants, document analysis, or complex reasoning tasks. Understanding the intrinsic limits of context scaling is crucial for developing future LLM architectures, training methodologies, and prompting strategies that can effectively leverage vast amounts of information without suffering from performance bottlenecks or degradation.
Background
▶ Watch: LLMs performance degrades with long, relevant contexts. (0:00)
The problem addressed in this talk stems from a common experience with LLMs: while we expect models to improve with more relevant context, they frequently falter. This is observed in various settings, from coding agents struggling with extensive documentation to general-purpose LLMs showing increased validation loss or decreased downstream task performance when presented with contexts beyond a certain length. The speakers illustrate this with pre-training experiments where validation loss begins to rise past a certain context length, particularly for models trained on smaller datasets. Similarly, downstream tasks exhibit a performance drop with longer visible context, even when the additional information is highly relevant.
Existing research and practical observations point to the challenges of long-context processing in LLMs. Traditional Transformer architectures, while powerful, face quadratic complexity with respect to sequence length, making very long contexts computationally expensive. However, even with architectural innovations that address this, the presented phenomenon suggests a deeper, more fundamental limitation that goes beyond mere computational constraints. The issue isn't just about processing long contexts, but about effectively utilizing them without information overload or "forgetting." This work seeks to provide a theoretical underpinning for why this problem exists in the ML/systems space, moving beyond empirical observation to a more principled explanation.
Key Findings
▶ Watch: Introducing intrinsic entropy to measure context information content. (2:40)
The central finding of this research is that the degradation of LLM performance with increasing context length can be explained by a fundamental tradeoff between Bayes risk and approximation loss. The authors propose that as context length increases, the Bayes risk (the irreducible error of an optimal predictor) generally decreases or stays constant, as more information should lead to better predictions. However, simultaneously, the approximation loss (the gap between a real trained model and the optimal Bayes model) increases. This increase is attributed to the growing difficulty for a finite-capacity model to learn and generalize from an ever-expanding input space. The balance between these two opposing forces leads to an optimal context length, beyond which the increase in approximation loss outweighs the potential decrease in Bayes risk, causing overall performance degradation.
A critical contribution is the introduction of intrinsic entropy, defined as the information entropy of the minimum task-specific intrinsic space. This metric quantifies the amount of relevant information contained within a given context length for a specific task. The authors demonstrate an intriguing linear relationship between this intrinsic entropy and the cross-entropy loss for the next token prediction task across various model families. This linearity is supported by an analysis of the eigenvalue spectrum of hidden states, suggesting that representation distributions for different context lengths form a "self-similar family" in the intrinsic space.
Furthermore, the research identifies several factors that influence this optimal context length:
- Task Locality: Tasks that depend more on nearby tokens (higher locality) tend to have smaller optimal context lengths, as distant information provides diminishing returns. Conversely, tasks requiring information from far-away tokens benefit from longer contexts.
- Model Size: Larger or "stronger" models exhibit reduced approximation loss, leading to a larger optimal context length. This suggests that models with greater capacity are better equipped to handle and integrate more information.
- Training Data Quantity: Training with more data also reduces approximation loss, thereby extending the optimal context length. More data allows models to learn more robust representations and generalize better, even with longer inputs.
Technical Deep Dive
▶ Watch: Experimental results: Optimal context length varies by task, model. (6:40)
The theoretical foundation of this work lies in a loss decomposition for the next token prediction task, where the total cross-entropy loss is broken down into two components:
$L_{total} = L_{Bayes} + L_{approx}$
- Bayes Risk ($L_{Bayes}$): This represents the irreducible error of the optimal Bayes predictor. Conceptually, as more relevant information (context) is provided, the optimal predictor should have more data to work with, leading to a lower or constant Bayes risk. The authors introduce intrinsic entropy to measure the informational content influencing this term.
- Intrinsic Entropy Definition: It is defined as the information entropy of the minimum task-specific intrinsic space. For the next token prediction task, this is operationalized by taking the final layer hidden states of an LLM as the intrinsic representation. The rationale is that the final layer acts as an information bottleneck and is most directly related to the next token prediction.
- Measurement: To bridge the conceptual definition with practice, the entropy of these feature vectors is estimated using Gaussian Kernel Density Estimation (KDE).
- Linear Relationship: A key discovery is the empirically observed linear relationship between this intrinsic entropy and the cross-entropy loss. This suggests that the entropy of the representation space directly correlates with the task difficulty.
- Eigenvalue Spectrum Analysis: To understand this linearity, the authors analyzed the eigenvalue spectrum of hidden states using Llama-3-8B. They found that for different context lengths, the eigenvalues increase approximately at the same scale. This led to the hypothesis that the representation distributions for multiple context lengths are scaled proportionally to each other, forming a "self-similar family" in the intrinsic space. If the next token prediction task corresponds to a subspace within this intrinsic space, then the entropy calculated within that subspace would scale linearly with the overall intrinsic space entropy.
- Approximation Loss ($L_{approx}$): This term quantifies the gap between a real, trained model and the optimal Bayes model. The authors demonstrate that this loss increases with longer context lengths, both in training and inference settings.
- Training Setting: Higher context lengths lead to a slower data scaling mechanism, implying that models require disproportionately more data to effectively learn from longer sequences, thus increasing approximation loss for a given dataset size.
- Inference Setting: Even well-trained models, particularly those not specifically designed for extreme long contexts (like certain RNN-like models), may struggle to effectively utilize all provided information. They might "forget" distant tokens or find the sheer volume of information "too messy," leading to a larger gap between their predictions and the optimal predictor.
Optimal Context Length Condition: Putting these pieces together, an optimal context length $L_{opt}$ exists when the Bayes risk converges slower than the approximation loss increases, and specifically when the partial derivative of the total loss with respect to context length ($\partial L_{total} / \partial L$) becomes zero. This balance point signifies where the benefit of additional information (decreasing Bayes risk) is perfectly offset by the increasing difficulty for the model to learn and utilize that information (increasing approximation loss).
The theoretical framework also explains how various factors modulate this optimal point:
- Task Locality: Tasks requiring information from nearby tokens will have a smaller $L_{opt}$ because their Bayes risk quickly converges, and further context rapidly increases approximation loss without much benefit. Tasks relying on distant tokens will have a larger $L_{opt}$.
- Model Capacity: Larger models inherently have lower approximation loss due to their increased capacity to learn complex mappings, thus shifting $L_{opt}$ to longer contexts.
- Data Quantity: More training data reduces approximation loss by allowing the model to learn more robust representations, also leading to a larger $L_{opt}$.
Experimental Setup & Results
▶ Watch: Q&A: Optimal context length dependence on model and task. (10:10)
The authors conducted a series of experiments on both real-world and synthetic datasets to validate their theoretical claims.
Initial Validation:
- Pre-training: Experiments were performed where LLMs were pre-trained with varying context lengths. The results clearly showed that beyond a certain context length, the validation loss, particularly for models trained with smaller datasets, began to increase. This empirical observation directly motivated the loss decomposition hypothesis.
- Downstream Tasks: Similar trends were observed on downstream tasks, where longer visible context lengths led to a degradation in performance, even when the additional context was relevant.
Intrinsic Entropy and Cross-Entropy Relationship:
- The linear relationship between the proposed intrinsic entropy (calculated via Gaussian KDE on final layer hidden states) and the output cross-entropy loss was validated across several model families. This supports the idea that intrinsic entropy effectively measures the task-specific information content.
- The eigenvalue spectrum of hidden states was analyzed using Llama-3-8B on samples of different lengths. The observation that eigenvalues scale approximately similarly for different context lengths provided empirical evidence for the "self-similar family" hypothesis of representation distributions.
Factors Influencing Optimal Context Length:
- Task Locality: Experiments on an inference/downstream testing setting varied "task locality" (how much a task depends on closer tokens). It was found that tasks with higher locality (relying on nearby tokens) exhibited smaller optimal context lengths, while tasks requiring information from farther tokens had larger optimal context lengths. The Ruler benchmark, specifically its CWE subtask, and document QA tasks were utilized for these evaluations.
- Model Size: By testing different model sizes on downstream tasks, the authors confirmed that larger, more capable models reduced the approximation loss, consequently leading to larger optimal context lengths.
- Training Data: In a training setting, increasing the amount of training data was shown to reduce approximation loss, thereby resulting in a larger optimal context length.
Synthetic Datasets:
- To gain better control over experimental conditions and isolate specific phenomena, synthetic datasets were constructed. These datasets were instrumental in validating both the linear entropy relationship and the existence of an optimal context length, especially evident for models trained with smaller datasets. The lower figure in the presentation (08:00 mark) provides an intuition for the construction and task design of these synthetic datasets.
Overall, the experiments consistently supported the theoretical framework, demonstrating that the interplay between decreasing Bayes risk and increasing approximation loss robustly explains the observed optimal context length in LLMs. The results underscore that performance degradation with long contexts is not merely an architectural or computational issue but a fundamental challenge of information utilization by finite-capacity models.
Practical Implications
▶ Watch: Q&A: Performance drop with too much relevant context. (12:50)
The findings of this research have significant practical implications for anyone developing, deploying, or utilizing LLMs:
- Prompt Engineering and Context Management: Practitioners should be aware that simply providing more relevant information does not guarantee better performance. There is an inherent limit to how much context an LLM can effectively utilize. For models not specifically optimized for extreme long contexts, providing "too much information" can lead to performance degradation because the model might find it "too messy" or "forget" distant, relevant tokens. This suggests the need for intelligent context summarization, filtering, or hierarchical processing strategies rather than brute-force context stuffing.
- Model Selection and Training: The optimal context length is not a fixed value; it depends heavily on the model's capacity and the amount of training data.
- Larger Models: Investing in larger, more capable models can extend the effective context window, as they exhibit lower approximation loss.
- More Data: Training models with significantly more data can also improve their ability to handle longer contexts.
- Targeted Training: If an application critically depends on very long contexts, training or fine-tuning models specifically for that regime, potentially with techniques like curriculum learning or specialized architectures, becomes even more important.
- Task Design and Locality: Understanding the "locality" of a task is crucial. For tasks where relevant information is typically found within a short window (high locality), shorter, more focused contexts might be optimal, leading to more efficient inference and potentially better performance. For tasks requiring integration of information across very long spans, careful consideration of context length and model capabilities is paramount.
- Beyond Architectural Fixes: While architectural innovations like Mamba or advanced Transformer variants (e.g., with linear attention or recurrent mechanisms) aim to process longer sequences efficiently, this work highlights that a fundamental information processing challenge remains. Even if a model can process a context of N tokens, it doesn't mean it will effectively use all N tokens without performance degradation. This suggests that future research needs to focus not just on computational efficiency but also on how models learn to utilize information across varying scales.
- Limitations: The current work does not provide a quantitative, predictive method for estimating the optimal context length for any given model and task without empirical simulation. This remains an interesting and important area for future research. Practitioners currently need to empirically determine the optimal context length for their specific model and task.
In summary, this research provides a theoretical lens to understand why "more is not always better" with LLM context. It encourages a more nuanced approach to context management, model development, and task design, emphasizing the critical balance between information availability and a model's capacity to effectively process and utilize it.
Key Takeaways
- Optimal Context Length Exists: LLMs exhibit an optimal context length, beyond which performance paradoxically degrades, even when provided with relevant information.
- Bayes Risk vs. Approximation Loss: This phenomenon is explained by a fundamental tradeoff: Bayes risk (irreducible error) decreases with more context, while approximation loss (model's inability to learn from complex context) increases, leading to a performance peak.
- Intrinsic Entropy as a Metric: The concept of intrinsic entropy, derived from final layer hidden states, quantifies task-specific information and shows a linear relationship with cross-entropy loss.
- Factors Influencing Optimality: Optimal context length is not static; it increases with larger model sizes, more training data, and for tasks requiring less "locality" (i.e., relying on information far apart).
- "Self-Similar" Representations: Analysis of eigenvalue spectrum suggests that representation distributions for different context lengths form a "self-similar family" in the intrinsic space.
- Practical Context Management: Practitioners should not blindly increase context length but consider intelligent context filtering, summarization, or model selection based on task locality and model capacity.
About the Speaker(s)
The primary presenter for this work was Jingzhe Shi from Tsinghua University. He collaborated with Qinwei (Martin) Ma, also from Tsinghua University, and Hongyi Liu from Carnegie Mellon University (CMU). The research team also included senior academics and researchers: Professor Hang Zhao, Professor Jenq-Neng Hwang, and Dr. Lei Li. Their collective expertise from leading academic institutions highlights a strong foundation in machine learning research and deep learning systems.
Reviews
- Maya Iyer (Theoretical ML Researcher) — MUST SEE ★★★★★
- Chen Zhao (Applied ML Researcher & Empiricist) — MUST SEE ★★★★★
→ Top-rated talks at International Conference on Learning Representations 2026
All talks from International Conference on Learning Representations 2026