mlsanityData to 13 Oct 2026

What is Wrong with Perplexity for Long-context Language Modeling?

arXiv 2410.23771 ↗First posted 31 Oct 2024cs.CL cs.LGcited by 68

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

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,223
  2. 2024The Llama 3 Herd of Modelscited by 14,486
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,979
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,876
  5. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,798
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,628
  7. 2023Qwen Technical Reportcited by 3,310
  8. 2023Mistral 7Bcited by 3,123
  9. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,949
  10. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,379
  11. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,137
  12. 2024Qwen2 Technical Reportcited by 2,102
38 more
  1. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,908
  2. 2024Mixtral of Expertscited by 1,811
  3. 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,805
  4. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,785
  5. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,386
  6. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,302
  7. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,093
  8. 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 854
  9. 2024Evaluating Very Long-Term Conversational Memory of LLM Agentscited by 813
  10. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 727
  11. 2024Yi: Open Foundation Models by 01.AIcited by 715
  12. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 707
  13. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 589
  14. 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 429
  15. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 361
  16. 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 357
  17. 2021Efficient Attentions for Long Document Summarizationcited by 342
  18. 2023From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuningcited by 303
  19. 2023Effective Long-Context Scaling of Foundation Modelscited by 302
  20. 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
  21. 2023LongLoRA: Efficient Fine-tuning of Long-Context Large Language Modelscited by 244
  22. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 209
  23. 2024Many-Shot In-Context Learningcited by 205
  24. 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 202
  25. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 192
  26. 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 176
  27. 2023BooookScore: A systematic exploration of book-length summarization in the era of LLMscited by 137
  28. 2024Rho-1: Not All Tokens Are What You Needcited by 132
  29. 2022A Length-Extrapolatable Transformercited by 125
  30. 2024Make Your LLM Fully Utilize the Contextcited by 118
  31. 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 111
  32. 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 98
  33. 2021Do Long-Range Language Models Actually Use Long-Range Context?cited by 92
  34. 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 85
  35. 2020Balancing Training for Multilingual Neural Machine Translationcited by 71
  36. 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
  37. 2023CLEX: Continuous Length Extrapolation for Large Language Modelscited by 44
  38. 2023Meta-Learning Online Adaptation of Language Modelscited by 43

50 most cited of 57 All 57 (JSON)

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2024: 2; 2025: 29; 2026: 37.

68 papers.

Sort:

By area:

  1. 2025Learning to Reason without External Rewardscited by 203
  2. 2026Conditional Memory via Scalable Lookup: A New Axis of Sparsity for Large Language Modelscited by 81
  3. 2025No Prompt Left Behind: Exploiting Zero-Variance Prompts in LLM Reinforcement Learning via Entropy-Guided Advantage Shapingcited by 49
  4. 2025MesaNet: Sequence Modeling by Locally Optimal Test-Time Trainingcited by 41
  5. 2025InfLLM-V2: Dense-Sparse Switchable Attention for Seamless Short-to-Long Adaptationcited by 31
  6. 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 22
  7. 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
  8. 2024A Silver Bullet or a Compromise for Full Attention? A Comprehensive Study of Gist Token-based Context Compressioncited by 15
  9. 2025Beyond Exponential Decay: Rethinking Error Accumulation in Large Language Modelscited by 11
  10. 2025Short window attention enables long-term memorizationcited by 11
  11. 2025SoLoPO: Unlocking Long-Context Capabilities in LLMs via Short-to-Long Preference Optimizationcited by 10
  12. 2025Gated KalmaNet: A Fading Memory Layer Through Test-Time Ridge Regressioncited by 10
38 more
  1. 2026The Roots of Performance Disparity in Multilingual Language Models: Intrinsic Modeling Difficulty or Design Choices?cited by 10
  2. 2026Perplexity Cannot Always Tell Right from Wrongcited by 9
  3. 2025A Controllable Examination for Long-Context Language Modelscited by 7
  4. 2025PRELUDE: A Benchmark Designed to Require Global Comprehension and Reasoning over Long Contextscited by 7
  5. 2025Can Pre-training Indicators Reliably Predict Fine-tuning Outcomes of LLMs?cited by 6
  6. 2025RWKV-X: A Linear Complexity Hybrid Language Modelcited by 6
  7. 2025Delta Attention: Fast and Accurate Sparse Attention Inference by Delta Correctioncited by 6
  8. 2025EVOREFUSE: Evolutionary Prompt Optimization for Evaluation and Mitigation of LLM Over-Refusal to Pseudo-Malicious Instructionscited by 6
  9. 2025Skill-Targeted Adaptive Trainingcited by 6
  10. 2026Process-Verified Reinforcement Learning for Theorem Proving via Leancited by 6
  11. 2025EntropyLong: Effective Long-Context Training via Predictive Uncertaintycited by 5
  12. 2025Revisiting Long-context Modeling from Context Denoising Perspectivecited by 5
  13. 2026Learning to Explore with Parameter-Space Noise: A Deep Dive into Parameter-Space Noise for Reinforcement Learning with Verifiable Rewardscited by 5
  14. 2026Pretraining Recurrent Networks without Recurrencecited by 5
  15. 2025ConSens: Assessing context grounding in open-book question answeringcited by 4
  16. 2025Long-Short Alignment for Effective Long-Context Modeling in LLMscited by 4
  17. 2025In Good GRACEs: Principled Teacher Selection for Knowledge Distillationcited by 4
  18. 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancingcited by 4
  19. 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignmentcited by 4
  20. 2025Zero-RAG: Towards Retrieval-Augmented Generation with Zero Redundant Knowledgecited by 3
  21. 2026Effective Reasoning Chains Reduce Intrinsic Dimensionalitycited by 3
  22. 2026Eval4Sim: An Evaluation Framework for Persona Simulationcited by 3
  23. 2026Rethinking Personalization in Large Language Models at the Token Levelcited by 3
  24. 2026Prune-then-Quantize or Quantize-then-Prune? Understanding the Impact of Compression Order in Joint Model Compressioncited by 3
  25. 2026Multi-Stream LLMs: Unblocking Language Models with Parallel Streams of Thoughts, Inputs and Outputscited by 3
  26. 2025Discrete Diffusion Models for Language Generationcited by 2
  27. 2025Review of Hallucination Understanding in Large Language and Vision Modelscited by 2
  28. 2025Controllably Efficient Language Modelscited by 2
  29. 2025Multimodal Language Models with Modality-Specific Experts for Financial Forecasting from Interleaved Sequences of Text and Time Seriescited by 1
  30. 2025IRIS: Intrinsic Reward Image Synthesiscited by 1
  31. 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?cited by 1
  32. 2026HE-SNR: Uncovering Latent Logic via Entropy for Guiding Mid-Training on SWE-benchcited by 1
  33. 2026Towards Compressive and Scalable Recurrent Memorycited by 1
  34. 2026DMAP: A Distribution Map for Textcited by 1
  35. 2026A Theoretical Framework for Statistical Evaluability of Generative Modelscited by 1
  36. 2026Scale-Sensitive Shattering: Learnability and Evaluability at Optimal Scalecited by 1
  37. 2026Self-Pruned Key-Value Attention: Learning When to Write by Predicting Future Utilitycited by 1
  38. 2026The Architecture of Errors: From Universal Impossibility to Patch-Local LLM Reliabilitycited by 1

50 most cited of 68 All 68 (JSON)