Anti-Periodic Positional Encoding: Möbius Boundary Conditions Make In-Context Retrieval Reliable
Abstract
Möbius RoPE is a rotary positional encoding built on the anti-periodic frequency ladder : every rotation plane advances by an odd multiple of across the training context, so the positional holonomy is and the two ends of the sequence are deterministically coupled through a closed-form Dirichlet "dipole"; to our knowledge this is the first anti-periodic boundary condition in positional encoding. We verify the theory numerically to and pretrain 48 models spanning six 160M-class and three 410M-class arms (2B FineWeb-Edu tokens each; the hybrid arm puts Möbius frequencies on 25% of heads). Hybrid perplexity is unchanged (29.66 vs. 29.72), but needle-in-a-haystack retrieval becomes reliable: versus at context 512 ( seeds), observed worst seed 86% versus 14%, robust variance tests - (unadjusted), recurring at 410M (Levene ). Matched controls isolate the mechanism: an aperiodic ladder in the same frequency band reproduces none of the effect, and a periodic (holonomy ) ladder only a fraction. Swapping trained models' frequency table back to standard RoPE (weights frozen) collapses retrieval, with damage concentrated on far needles: trained models depend on this long-range geometry. A NoPE arm is even more reliable at short context but pays a 13% perplexity tax and extrapolates worst; only the anti-periodic hybrid pairs baseline perplexity with a high reliability floor. The effect is scoped to single-needle retrieval within the training window; a one-line frequency swap thus provides zero-cost insurance against the retrieval seed lottery.
Create a lesson
Metadata
- Comments
- 30 pages, 12 figures
Related papers
ModernELECTRA: Replaced-Token Detection with Boundary-Window Reconstruction for Compact Encoders that Classify and Embed
Shared title terminologycs.CLMykhailo Shtopko, Ihor Stepanov, Dmytro Vodianytskyi et al.
DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity
Shared title terminologycs.CLHong Liu, Rui Cen, Junhan Shi et al.
Mitigating Hallucinations in Medical Question Answering on ESC Cardiology Guidelines: Evaluation and Retrieval Optimization
Shared title terminologycs.CLIlkin Masimov, Rufana Baghirli, Muhammad Rashid
Reliable User Simulation in Complex Multi-Step Workflows
Shared title terminologycs.CLPusala Pavan Teja, Jayasimha Talur, Saab Mansour et al.
Fine-Tuning Without Gradients? Closed-Form, LLM-Written Classifiers on a Frozen Encoder
Shared title terminologycs.CLMd Nasir Uddin, Musa Tur Farazi, Soumik Bhattacharjee et al.
NORMCRAFT: Cultural Norm Generation for Context-Aware Language Model Alignment
Shared title terminologycs.CLTangyuan Zhang, Zhuang Li, Fatemeh Shiri et al.