What is Wrong with Perplexity for Long-context Language Modeling?
Not on the map. Why?
Abstract (arXiv)
Handling long-context inputs is crucial for large language models (LLMs) in tasks such as extended conversations, document summarization, and many-shot in-context learning. While recent approaches have extended the context windows of LLMs and employed perplexity (PPL) as a standard evaluation metric, PPL has proven unreliable for assessing long-context capabilities. The underlying cause of this limitation has remained unclear. In this work, we provide a comprehensive explanation for this issue. We find that PPL overlooks key tokens, which are essential for long-context understanding, by averaging across all tokens and thereby obscuring the true performance of models in long-context scenarios. To address this, we propose LongPPL, a novel metric that focuses on key tokens by employing a long-short context contrastive method to identify them. Our experiments demonstrate that LongPPL strongly correlates with performance on various long-context benchmarks (e.g., Pearson correlation of -0.96), significantly outperforming traditional PPL in predictive accuracy. Additionally, we introduce LongCE (Long-context Cross-Entropy) loss, a re-weighting strategy for fine-tuning that prioritizes key tokens, leading to consistent improvements across diverse benchmarks. In summary, these contributions offer deeper insights into the limitations of PPL and present effective solutions for accurately evaluating and enhancing the long-context capabilities of LLMs. Code is available at https://github.com/PKU-ML/LongPPL.
Key facts. Cited by 68 papers in the map (data through 13 Oct 2026). Builds on 57 of its 66 references that are in the map. First posted on arXiv 31 Oct 2024.
Builds on
57 of 66 references.
References · 57
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,223
- 2024The Llama 3 Herd of Modelscited by 14,486
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,979
- 2020Measuring Massive Multitask Language Understandingcited by 7,876
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,798
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,628
- 2023Qwen Technical Reportcited by 3,310
- 2023Mistral 7Bcited by 3,123
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,949
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,379
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,137
- 2024Qwen2 Technical Reportcited by 2,102
38 more
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,908
- 2024Mixtral of Expertscited by 1,811
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,805
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,785
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,386
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,302
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,093
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 854
- 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 813
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 727
- 2024Yi: Open Foundation Models by 01.AIcited by 715
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 707
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 589
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 429
- 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 361
- 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 357
- 2021Efficient Attentions for Long Document Summarizationcited by 342
- 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 303
- 2023Effective Long-Context Scaling of Foundation Modelscited by 302
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
- 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 244
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 209
- 2024Many-Shot In-Context Learningcited by 205
- 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 202
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 192
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 176
- 2023BooookScore: A systematic exploration of book-length summarization in the era of LLMscited by 137
- 2024Rho-1: Not All Tokens Are What You Needcited by 132
- 2022A Length-Extrapolatable Transformercited by 125
- 2024Make Your LLM Fully Utilize the Contextcited by 118
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
- 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 98
- 2021Do Long-Range Language Models Actually Use Long-Range Context?cited by 92
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 85
- 2020Balancing Training for Multilingual Neural Machine Translationcited by 71
- 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
- 2023CLEX: Continuous Length Extrapolation for Large Language Modelscited by 44
- 2023Meta-Learning Online Adaptation of Language Modelscited by 43
50 most cited of 57 All 57 (JSON)
Built on by
Citing papers per year: 2024: 2; 2025: 29; 2026: 37.
68 papers.
Sort:
By area:
- 2025Learning to Reason without External Rewardscited by 203
- 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Modelscited by 81
- 2025No Prompt Left Behind: Exploiting Zero-Variance Prompts in LLM Reinforcement Learning via Entropy-Guided Advantage Shapingcited by 49
- 2025MesaNet: Sequence Modeling by Locally Optimal Test-Time Trainingcited by 41
- 2025InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptationcited by 31
- 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 22
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
- 2024A Silver Bullet or a Compromise for Full Attention? A Comprehensive Study of Gist Token-based Context Compressioncited by 15
- 2025Beyond Exponential Decay: Rethinking Error Accumulation in Large Language Modelscited by 11
- 2025Short window attention enables long-term memorizationcited by 11
- 2025SoLoPO: Unlocking Long-Context Capabilities in LLMs via Short-to-Long Preference Optimizationcited by 10
- 2025Gated KalmaNet: A Fading Memory Layer Through Test-Time Ridge Regressioncited by 10
38 more
- 2026The Roots of Performance Disparity in Multilingual Language Models: Intrinsic Modeling Difficulty or Design Choices?cited by 10
- 2026Perplexity Cannot Always Tell Right from Wrongcited by 9
- 2025A Controllable Examination for Long-Context Language Modelscited by 7
- 2025PRELUDE: A Benchmark Designed to Require Global Comprehension and Reasoning over Long Contextscited by 7
- 2025Can Pre-training Indicators Reliably Predict Fine-tuning Outcomes of LLMs?cited by 6
- 2025RWKV-X: A Linear Complexity Hybrid Language Modelcited by 6
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correctioncited by 6
- 2025EVOREFUSE: Evolutionary Prompt Optimization for Evaluation and Mitigation of LLM Over-Refusal to Pseudo-Malicious Instructionscited by 6
- 2025Skill-Targeted Adaptive Trainingcited by 6
- 2026Process-Verified Reinforcement Learning for Theorem Proving via Leancited by 6
- 2025EntropyLong: Effective Long-Context Training via Predictive Uncertaintycited by 5
- 2025Revisiting Long-context Modeling from Context Denoising Perspectivecited by 5
- 2026Learning to Explore with Parameter-Space Noise: A Deep Dive into Parameter-Space Noise for Reinforcement Learning with Verifiable Rewardscited by 5
- 2026Pretraining Recurrent Networks without Recurrencecited by 5
- 2025ConSens: Assessing context grounding in open-book question answeringcited by 4
- 2025Long-Short Alignment for Effective Long-Context Modeling in LLMscited by 4
- 2025In Good GRACEs: Principled Teacher Selection for Knowledge Distillationcited by 4
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancingcited by 4
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignmentcited by 4
- 2025Zero-RAG: Towards Retrieval-Augmented Generation with Zero Redundant Knowledgecited by 3
- 2026Effective Reasoning Chains Reduce Intrinsic Dimensionalitycited by 3
- 2026Eval4Sim: An Evaluation Framework for Persona Simulationcited by 3
- 2026Rethinking Personalization in Large Language Models at the Token Levelcited by 3
- 2026Prune-then-Quantize or Quantize-then-Prune? Understanding the Impact of Compression Order in Joint Model Compressioncited by 3
- 2026Multi-Stream LLMs: Unblocking Language Models with Parallel Streams of Thoughts, Inputs and Outputscited by 3
- 2025Discrete Diffusion Models for Language Generationcited by 2
- 2025Review of Hallucination Understanding in Large Language and Vision Modelscited by 2
- 2025Controllably Efficient Language Modelscited by 2
- 2025Multimodal Language Models with Modality-Specific Experts for Financial Forecasting from Interleaved Sequences of Text and Time Seriescited by 1
- 2025IRIS: Intrinsic Reward Image Synthesiscited by 1
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?cited by 1
- 2026HE-SNR: Uncovering Latent Logic via Entropy for Guiding Mid-Training on SWE-benchcited by 1
- 2026Towards Compressive and Scalable Recurrent Memorycited by 1
- 2026DMAP: A Distribution Map for Textcited by 1
- 2026A Theoretical Framework for Statistical Evaluability of Generative Modelscited by 1
- 2026Scale-Sensitive Shattering: Learnability and Evaluability at Optimal Scalecited by 1
- 2026Self-Pruned Key-Value Attention: Learning When to Write by Predicting Future Utilitycited by 1
- 2026The Architecture of Errors: From Universal Impossibility to Patch-Local LLM Reliabilitycited by 1
50 most cited of 68 All 68 (JSON)
- 2026Mechanics of Long-Context Hybrid Models Part 1.1: From Hybrid Attention to Hybrid Position7 Oct 2026
- 2026From Checkpoint Variation to Selection Gains in Supervised Fine-Tuning29 Sep 2026
- 2026Decoupling Token Roles in Autoregressive Pretraining27 Sep 2026
- 2026What Should Data Teach? Moving Bottlenecks Across Circuit, Store, and Use26 Sep 2026
- 2026HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing22 Sep 2026
- 2026On-Demand Attention: Language Models Know When to Recall17 Sep 2026
- 2026Learning Length-Extrapolatable Recurrent Models8 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026Parameter-free Adaptive Sparse Attention via Compression-Based Content Selection23 Jul 2026
- 2026Copy Less, Ground More: Overcoming Repetitive Copying in Long-Context Reasoning via Evidence-Aware Reinforcement Learning21 Jul 2026
- 2026How Data Shapes RoPE Frequency Usage: From Positional Scale Matching to Length Generalization8 Jul 2026
- 2026Beyond Activation Alignment:The Alignment-Diversity Tradeoff in Task-Aware LLM Quantization1 Jul 2026
38 more
- 2026Process-Verified Reinforcement Learning for Theorem Proving via Lean18 Jun 2026
- 2026Pretraining Recurrent Networks without Recurrence4 Jun 2026
- 2026The Architecture of Errors: From Universal Impossibility to Patch-Local LLM Reliability28 May 2026
- 2026When Mean CE Fails: Median CE Can Better Track Language Model Quality23 May 2026
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignment19 May 2026
- 2026Self-Pruned Key-Value Attention: Learning When to Write by Predicting Future Utility13 May 2026
- 2026Scale-Sensitive Shattering: Learnability and Evaluability at Optimal Scale13 May 2026
- 2026Multi-Stream LLMs: Unblocking Language Models with Parallel Streams of Thoughts, Inputs and Outputs12 May 2026
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancing11 May 2026
- 2026On the Importance and Evaluation of Narrativity in Natural Language AI Explanations20 Apr 2026
- 2026PolicyLong: Towards On-Policy Context Extension9 Apr 2026
- 2026A Theoretical Framework for Statistical Evaluability of Generative Models7 Apr 2026
- 2026Prune-then-Quantize or Quantize-then-Prune? Understanding the Impact of Compression Order in Joint Model Compression19 Mar 2026
- 2026Understanding the Performance Plateau in Text-to-Video Retrieval: A Comprehensive Empirical and Linguistic Analysis7 Mar 2026
- 2026Eval4Sim: An Evaluation Framework for Persona Simulation3 Mar 2026
- 2026DMAP: A Distribution Map for Text12 Feb 2026
- 2026Towards Compressive and Scalable Recurrent Memory11 Feb 2026
- 2026Effective Reasoning Chains Reduce Intrinsic Dimensionality9 Feb 2026
- 2026Rethinking Personalization in Large Language Models at the Token Level4 Feb 2026
- 2026Rethinking Perplexity: Revealing the Impact of Input Length on Perplexity Evaluation in LLMs4 Feb 2026
- 2026Learning to Explore with Parameter-Space Noise: A Deep Dive into Parameter-Space Noise for Reinforcement Learning with Verifiable Rewards30 Jan 2026
- 2026Perplexity Cannot Always Tell Right from Wrong30 Jan 2026
- 2026HE-SNR: Uncovering Latent Logic via Entropy for Guiding Mid-Training on SWE-bench28 Jan 2026
- 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Models12 Jan 2026
- 2026The Roots of Performance Disparity in Multilingual Language Models: Intrinsic Modeling Difficulty or Design Choices?12 Jan 2026
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?8 Dec 2025
- 2025Gated KalmaNet: A Fading Memory Layer Through Test-Time Ridge Regression26 Nov 2025
- 2025Controllably Efficient Language Models7 Nov 2025
- 2025In Good GRACEs: Principled Teacher Selection for Knowledge Distillation4 Nov 2025
- 2025Zero-RAG: Towards Retrieval-Augmented Generation with Zero Redundant Knowledge1 Nov 2025
- 2025Skill-Targeted Adaptive Training11 Oct 2025
- 2025Revisiting Long-context Modeling from Context Denoising Perspective7 Oct 2025
- 2025On the Limitations and Capabilities of Position Embeddings for Length Generalization5 Oct 2025
- 2025IRIS: Intrinsic Reward Image Synthesis29 Sep 2025
- 2025InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptation29 Sep 2025
- 2025Short window attention enables long-term memorization29 Sep 2025
- 2025EntropyLong: Effective Long-Context Training via Predictive Uncertainty26 Sep 2025
- 2025Review of Hallucination Understanding in Large Language and Vision Models26 Sep 2025
50 newest of 68 All 68 (JSON)
- 2025Learning to Reason without External Rewardscited by 203
- 2025No Prompt Left Behind: Exploiting Zero-Variance Prompts in LLM Reinforcement Learning via Entropy-Guided Advantage Shapingcited by 49
- 2025Beyond Exponential Decay: Rethinking Error Accumulation in Large Language Modelscited by 11
- 2025PRELUDE: A Benchmark Designed to Require Global Comprehension and Reasoning over Long Contextscited by 7
- 2026Learning to Explore with Parameter-Space Noise: A Deep Dive into Parameter-Space Noise for Reinforcement Learning with Verifiable Rewardscited by 5
- 2026Effective Reasoning Chains Reduce Intrinsic Dimensionalitycited by 3
- 2026Rethinking Personalization in Large Language Models at the Token Levelcited by 3
- 2026Multi-Stream LLMs: Unblocking Language Models with Parallel Streams of Thoughts, Inputs and Outputscited by 3
- 2026Self-Pruned Key-Value Attention: Learning When to Write by Predicting Future Utilitycited by 1
- 2026Copy Less, Ground More: Overcoming Repetitive Copying in Long-Context Reasoning via Evidence-Aware Reinforcement Learningcited by 1
- 2026Rethinking Perplexity: Revealing the Impact of Input Length on Perplexity Evaluation in LLMscited by 0
- 2026Copy Less, Ground More: Overcoming Repetitive Copying in Long-Context Reasoning via Evidence-Aware Reinforcement Learning21 Jul 2026
- 2026Self-Pruned Key-Value Attention: Learning When to Write by Predicting Future Utility13 May 2026
- 2026Multi-Stream LLMs: Unblocking Language Models with Parallel Streams of Thoughts, Inputs and Outputs12 May 2026
- 2026Effective Reasoning Chains Reduce Intrinsic Dimensionality9 Feb 2026
- 2026Rethinking Personalization in Large Language Models at the Token Level4 Feb 2026
- 2026Rethinking Perplexity: Revealing the Impact of Input Length on Perplexity Evaluation in LLMs4 Feb 2026
- 2026Learning to Explore with Parameter-Space Noise: A Deep Dive into Parameter-Space Noise for Reinforcement Learning with Verifiable Rewards30 Jan 2026
- 2025No Prompt Left Behind: Exploiting Zero-Variance Prompts in LLM Reinforcement Learning via Entropy-Guided Advantage Shaping26 Sep 2025
- 2025PRELUDE: A Benchmark Designed to Require Global Comprehension and Reasoning over Long Contexts13 Aug 2025
- 2025Beyond Exponential Decay: Rethinking Error Accumulation in Large Language Models30 May 2025
- 2025Learning to Reason without External Rewards26 May 2025
- 2025SoLoPO: Unlocking Long-Context Capabilities in LLMs via Short-to-Long Preference Optimizationcited by 10
- 2025EVOREFUSE: Evolutionary Prompt Optimization for Evaluation and Mitigation of LLM Over-Refusal to Pseudo-Malicious Instructionscited by 6
- 2025IRIS: Intrinsic Reward Image Synthesiscited by 1
- 2025IRIS: Intrinsic Reward Image Synthesis29 Sep 2025
- 2025EVOREFUSE: Evolutionary Prompt Optimization for Evaluation and Mitigation of LLM Over-Refusal to Pseudo-Malicious Instructions29 May 2025
- 2025SoLoPO: Unlocking Long-Context Capabilities in LLMs via Short-to-Long Preference Optimization16 May 2025
- 2026On-Demand Attention: Language Models Know When to Recallcited by 0
- 2026On-Demand Attention: Language Models Know When to Recall17 Sep 2026
- 2025Discrete Diffusion Models for Language Generationcited by 2
- 2025Discrete Diffusion Models for Language Generation2 Jul 2025
- 2025MesaNet: Sequence Modeling by Locally Optimal Test-Time Trainingcited by 41
- 2025InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptationcited by 31
- 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 22
- 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
- 2025Short window attention enables long-term memorizationcited by 11
- 2025Gated KalmaNet: A Fading Memory Layer Through Test-Time Ridge Regressioncited by 10
- 2026The Roots of Performance Disparity in Multilingual Language Models: Intrinsic Modeling Difficulty or Design Choices?cited by 10
- 2026Perplexity Cannot Always Tell Right from Wrongcited by 9
- 2025A Controllable Examination for Long-Context Language Modelscited by 7
- 2025Can Pre-training Indicators Reliably Predict Fine-tuning Outcomes of LLMs?cited by 6
- 2025RWKV-X: A Linear Complexity Hybrid Language Modelcited by 6
- 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correctioncited by 6
12 most cited of 45 All 45 (JSON)
- 2026Mechanics of Long-Context Hybrid Models Part 1.1: From Hybrid Attention to Hybrid Position7 Oct 2026
- 2026From Checkpoint Variation to Selection Gains in Supervised Fine-Tuning29 Sep 2026
- 2026Decoupling Token Roles in Autoregressive Pretraining27 Sep 2026
- 2026What Should Data Teach? Moving Bottlenecks Across Circuit, Store, and Use26 Sep 2026
- 2026Learning Length-Extrapolatable Recurrent Models8 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026Parameter-free Adaptive Sparse Attention via Compression-Based Content Selection23 Jul 2026
- 2026How Data Shapes RoPE Frequency Usage: From Positional Scale Matching to Length Generalization8 Jul 2026
- 2026Beyond Activation Alignment:The Alignment-Diversity Tradeoff in Task-Aware LLM Quantization1 Jul 2026
- 2026Pretraining Recurrent Networks without Recurrence4 Jun 2026
- 2026The Architecture of Errors: From Universal Impossibility to Patch-Local LLM Reliability28 May 2026
- 2026When Mean CE Fails: Median CE Can Better Track Language Model Quality23 May 2026
12 newest of 45 All 45 (JSON)