Analytic-Walk Rotary Positional Encodings for Graphs
Jiaqing Xie, Yuxin Wang, Xipeng Qiu
Key points
From the paper's conclusion- We introduce \textit{Analytic-Walk Rotary Positional Encodings} (AW-RoPE), which place the rotations on edges and sum the transported features over all walks, so contributions along different routes can reinforce or cancel.
Abstract
Rotary position encodings make attention sensitive to relative position, but extending them to graphs requires choosing how graph structure enters the rotation. Previous works assign each node a rotation from spectral coordinates, so the rotary factor between two nodes depends only on their endpoints and cannot distinguish the routes connecting them. We introduce \textit{Analytic-Walk Rotary Positional Encodings} (AW-RoPE), which place the rotations on edges and sum the transported features over all walks, so contributions along different routes can reinforce or cancel. An exact variant evaluates the complete sum by a differentiable linear solve, and a sparse variant truncates it at a finite depth. We prove forward and parameter-derivative truncation bounds at fixed inputs and parameters. Both variants act on projected queries and keys, and the sparse recurrence also augments message-passing networks. Across five synthetic tasks both variants reduce nRMSE by $15$--$58\%$ relative to the strongest baseline, and on real superpixel, peptide and OGB benchmarks the sparse recurrence attains the best mean on every dataset with Performer kernels and on twelve of thirteen datasets with GIN. Analysis shows that AW-RoPE can distinguish routes whose only cue is how two endpoints are connected, while node-wise rotary encodings cannot.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- WavePrune: One period is often enough for RoPEarXiv · 2026
- Disentangling the Expressivity of RoPEarXiv · 2026
- A Geometric Invariant of Attention Predicts Head Specialization from Weights AlonearXiv · 2026
- LayerRoPE: Dynamic Depth-wise Magnitude & Angular SuperpositionarXiv · 2026
- POD-RoPE: Rotary Position Encoding over Physical Observation Distributions for Embodied AIarXiv · 2026
- MeRoTune: RoPE-Safe Merging with a Tunable DialarXiv · 2026