RoPE at the End of Its Rope? Theory, Diagnosis, and Mitigation of Long-Context Failures
TL;DR - This paper develops a theory and lightweight diagnostic toolkit for identifying why RoPE-based language models fail at long contexts. It distinguishes semantic reversal from positional insensitivity and shows that targeted frequency rescaling can substantially improve accuracy without retraining.
- The theory models unequal query-key scales across RoPE frequencies, matching behavior observed in trained models.
- RoPE Profiler reuses cached query and key activations, adding two diagnostic scores with no extra forward passes.
- Across 49 settings, reasoning tasks mainly suffered from semantic reversal, while retrieval tasks were more affected by positional insensitivity.
- Targeted high-frequency rescaling improved accuracy by up to 20 percentage points on Qwen3-8B and 25 points on Llama-3.1-8B-Instruct.