NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings

Anand Gopalakrishnan, Róbert Csordás, Jürgen Schmidhuber, Michael C. MozerarXiv 2025 · DOI

Abstract

Current state-of-the-art Transformer models rely on Rotary Position Embeddings (RoPE) to incorporate sequence order. However, RoPE suffers from a mathematical entanglement where content and position information are mixed, limiting performance and length extrapolation. We introduce Polar Coordinate Position Embedding (PoPE), a modification that explicitly separates feature magnitude ("what") from positional phase ("where"). PoPE demonstrates significant improvements in complex reasoning tasks, language modeling perplexity, and zero-shot length extrapolation up to 10x the training window.

The Entanglement Problem in RoPE

Transformers require an attention mechanism that can distinguish both content (the "what") and relative position (the "where"). RoPE, the current standard used in models like Llama 3, achieves this by rotating 2D vector components in a plane based on their position. While effective, this approach creates a mathematical "confound": the final attention score is influenced by an interaction between the content-based phase of the vectors and the position-based rotation.

This entanglement forces the model to struggle when indexing information purely by position or content because the two are mathematically glued together. Consequently, models often fail to generalize to sequences significantly longer than those encountered during training, a phenomenon known as poor length extrapolation.

Polar Coordinate Position Embedding (PoPE)

To address this, PoPE re-imagines the query-key relationship through polar coordinates, effectively decoupling the two factors.

Comparison of RoPE and PoPE architectures. RoPE entangles content and position in 2D rotations, while PoPE separates them into magnitudes (content) and pure positional phases.

The "What" (Magnitude)

In PoPE, individual elements of the query and key vectors are transformed into non-negative magnitudes ($\mu$) using a softplus activation. These magnitudes represent the strength or importance of specific content features.

The "Where" (Phase)

Unlike RoPE, where content influences the rotation phase, PoPE sets the phase purely as a function of the token's position ($t\theta_c$). The attention score is then calculated as the real part of the complex dot product. This ensures that content (magnitudes) and position (relative distance via cosine) are multiplied but remain mathematically distinct.

Learnable Bias

A fixed, learnable bias ($\delta_c$) is introduced for each frequency. This allows the model to learn optimal relative offsets for different types of information, further refining the "pointer" capability of the attention mechanism. Crucially, PoPE is a minor modification to the RoPE architecture, making it easy to implement in existing Transformer pipelines.

Experimental Evaluation

PoPE was evaluated across several domains to test its robustness:

  • Indirect Indexing: A diagnostic task requiring the model to locate a character at a specific relative offset (e.g., "Find the character 3 places to the left of 'z'").
  • Symbolic Music & Genomics: Domains where precise local ordering and relative timing are critical (e.g., JSB Chorales, MAESTRO, and Human Reference Genome).
  • Natural Language Pretraining: Models ranging from 124M to 774M parameters were trained on OpenWebText.
  • Extrapolation: Performance was tested on the PG-19 dataset with sequences up to 10x the training length (10,240 tokens).

Key Results and Insights

The decoupling of content and position yields several critical advantages:

  1. Superior Reasoning: On the Indirect Indexing task, PoPE achieved 94.82% accuracy, compared to just 11.16% for RoPE. This suggests PoPE enables much more effective "pointer arithmetic."
  2. Seamless Extrapolation: PoPE allows models trained on 1,024 tokens to generalize to 10,240 tokens with minimal perplexity increase. It outperforms specialized methods like YaRN without requiring complex frequency interpolation or fine-tuning.
  3. Higher Information Density: Visual analysis indicates that RoPE often ignores high-frequency channels to mitigate "noise" from entanglement. PoPE utilizes the full frequency spectrum, leading to more efficient representation.
  4. Consistent LM Gains: PoPE consistently achieved lower perplexity than RoPE across all tested model scales and improved mean accuracy on zero-shot downstream tasks such as LAMBADA, Blimp, and CBT.

Limitations and Future Directions

While PoPE offers clear benefits, some challenges remain. The current implementation uses complex-valued tensors in Cartesian form, which increases memory usage during the attention step. Future optimizations could involve loading magnitudes directly to reduce this overhead. Additionally, while PoPE shows promise at the 774M parameter scale, its stability and performance in "frontier" models (70B+ parameters) require further validation. Finally, the trade-off between in-distribution performance and length generalization based on bias initialization ($\delta_c$) warrants deeper investigation.

Summary updated

BibTeX
@misc{gopalakrishnan2025decoupling,
  author = {Anand Gopalakrishnan and Róbert Csordás and Jürgen Schmidhuber and Michael C. Mozer},
  title = {{Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings}},
  year = {2025},
  eprint = {2509.10534},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.10534},
}
Figure