mlsanityData to 14 Oct 2026

Randomized YaRN Improves Length Generalization for Long-Context Reasoning

arXiv 2606.23687 ↗First posted 22 Jun 2026cs.CLcited by 1

On the map: LLM reasoning → Test-time compute and efficient thinking

Abstract (arXiv)

Large language models (LLMs) are typically pretrained on short sequences and then extended to work on longer sequences with additional training. However, such LLMs still struggle to further generalize to very long sequences. We propose Randomized YaRN, a training method that improves length generalization by combining YaRN-based positional extrapolation with randomized positional encoding and a length curriculum. During training on short context data, tokens are assigned YaRN positional encodings sampled from a larger position range, exposing the model to out-of-distribution positional representations even on short-context inputs. We evaluate Randomized YaRN on three challenging long-context reasoning benchmarks, BABILong, Multi-Round Coreference Resolution (MRCR), and LongBench v2. When training on data with short context, Randomized YaRN consistently improves reasoning performance on context lengths from 16K to 128K and outperforms standard fine-tuning, with the largest gains appearing at far out-of-distribution lengths. Our results suggest that progressively exposing models to OOD positional distributions provides an effective recipe for generalizable long-context reasoning.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Test-time compute and efficient thinking, one of 17 directions in LLM reasoning. Builds on 15 of its 17 references that are in the map. First posted on arXiv 22 Jun 2026.

Builds on

15 of 17 references.

References · 15

  1. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  2. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
  3. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  4. 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 379
  5. 2015Towards AI-Complete Question Answering: A Set of Prerequisite Toy Taskscited by 314
  6. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 313
  7. 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
  8. 2024How to Train Long-Context Language Models (Effectively)cited by 146
  9. 2024LongAlign: A Recipe for Long Context Alignment of Large Language Modelscited by 106
  10. 2024Michelangelo: Long Context Evaluations Beyond Haystacks via Latent Structure Queriescited by 88
  11. 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
  12. 2025LongProc: Benchmarking Long-Context Language Models on Long Procedural Generationcited by 29
3 more
  1. 2024A Controlled Study on Long Context Extension and Generalization in LLMscited by 26
  2. 2024An Efficient Recipe for Long Context Extension via Middle-Focused Positional Encodingcited by 16
  3. 2024Understanding Synthetic Context Extension via Retrieval Headscited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025InftyThink: Breaking the Length Limits of Long-Context Reasoning in Large Language Models
  2. 2024Large Language Models Can Self-Improve in Long-context Reasoning
  3. 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs
  4. 2025LongReason: A Synthetic Long-Context Reasoning Benchmark via Context Expansion
  5. 2026A Decomposition Perspective to Long-context Reasoning for LLMs
  6. 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Models
  7. 2026Positional Failures in Long-Context LLMs: A Blind Spot in Reasoning Benchmarks
  8. 2025Generalizing From Short to Long: Effective Data Synthesis for Long-Context Instruction Tuning