Shuffle the Context: RoPE-Perturbed Self-Distillation for Long-Context Adaptation
On the map: Retrieval-augmented generation → Generation and context integration
Abstract (arXiv)
Large language models (LLMs) increasingly operate in settings that require reliable long-context understanding, such as retrieval-augmented generation and multi-document reasoning. A common strategy is to fine-tune pretrained short-context models at the target sequence length. However, we find that standard long-context adaptation can remain brittle: model accuracy depends strongly on the absolute placement of relevant evidence, exhibiting high positional variance even when controlling for task format and difficulty. We propose RoPE-Perturbed Self-Distillation, a training regularizer that improves positional robustness. The core idea is to form alternative "views" of the same training sequence by perturbing its RoPE indices -- effectively moving parts of the context to different positions -- and to train the model to produce consistent predictions across views via self-distillation. This encourages reliance on semantic signals instead of brittle position dependencies. Experiments on long-context adaptation of Llama-3-8B and Qwen-3-4B demonstrate consistent gains on long-context benchmarks, including up to 12.04% improvement on RULER-64K for Llama-3-8B and 2.71% on RULER-256K for Qwen-3-4B after SFT, alongside improved length extrapolation beyond the training context window.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Generation and context integration, one of 15 directions in Retrieval-augmented generation. Builds on 36 of its 42 references that are in the map. First posted on arXiv 15 Apr 2026.
Builds on
36 of 42 references.
References · 36
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2024Qwen2 Technical Reportcited by 2,076
- 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,800
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
24 more
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2024LongBench v2: Towards Deeper Understanding and Reasoning on Realistic Long-context Multitaskscited by 367
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2024How to Train Long-Context Language Models (Effectively)cited by 141
- 2023LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Modelscited by 120
- 2024HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughlycited by 119
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 114
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
- 2024LongRAG: Enhancing Retrieval-Augmented Generation with Long-context LLMscited by 104
- 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 97
- 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2025Rope to Nope and Back Again: A New Hybrid Attention Strategycited by 46
- 2024Resonance RoPE: Improving Context Length Generalization of Large Language Modelscited by 25
- 2024LongRecipe: Recipe for Efficient Long Context Generalization in Large Language Modelscited by 23
- 2024Long Context Alignment with Short Instructions and Synthesized Positionscited by 22
- 2024An Efficient Recipe for Long Context Extension via Middle-Focused Positional Encodingcited by 16
- 2025From 128K to 4M: Efficient Training of Ultra-Long Context Large Language Modelscited by 13
- 2023GrowLength: Accelerating LLMs Pretraining by Progressively Growing Training Lengthcited by 11
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026OPSDL: On-Policy Self-Distillation for Long-Context Language Models
- 2024Large Language Models Can Self-Improve in Long-context Reasoning
- 2024Self-Consistency Falls Short! The Adverse Effects of Positional Bias on Long-Context Problems
- 2026Doc-to-LoRA: Learning to Instantly Internalize Contexts
- 2024ACER: Automatic Language Model Context Extension via Retrieval
- 2025LongPO: Long Context Self-Evolution of Large Language Models through Short-to-Long Preference Optimization
- 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs
- 2024LongAlign: A Recipe for Long Context Alignment of Large Language Models