Pablo Miralles

Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings - Gopalakrishnan et al.

Dec 29, 2025

Gopalakrishnan, A., Csordás, R., Schmidhuber, J., & Mozer, M. C. (2025). Decoupling the “What” and “Where” With Polar Coordinate Positional Embeddings (No. arXiv:2509.10534). arXiv. https://doi.org/10.48550/arXiv.2509.10534


The paper proposes Polar Coordinate Position Embedding (PoPE), an attempt at improving the RoPE positional embeddings that are most commonly used in LLMs at the time of writing. I assume here that you are familiar with the latter. Otherwise, there are many amazing blog posts and youtube videos that explain them!

Motivation. Rotary Positional Embeddings (RoPE) rotates the 2D subcomponents of the keys and queries, entangling the angle from positional information with the angle from the content itself. They are trying to disentangle content from position.

Method. PoPE can be seen as an application of RoPE with a previous transformation of the key and query vectors using the following function:

\[\begin{array}{rcl} f: & \mathbb{R}^d & \longrightarrow & \mathbb{R}^{2d} \\[10pt] & \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_d \end{bmatrix} & \longmapsto & \begin{bmatrix} \mathrm{softplus}(x_1) \\ 0 \\ \mathrm{softplus}(x_2) \\ 0 \\ \vdots \\ \mathrm{softplus}(x_d) \\ 0 \end{bmatrix} \end{array}.\]

Thus, the 2D subcomponents of the vectors always have a positive first coordinate and a zero second coordinate, that is, the angle of all 2D subcomponents is always $0$. This means that only the position-based rotation affects the angle, and not the content.

The following is a pseudocode implementation of PoPE (single head for simplicity):

# k: [B, L, D], q: [B, L, D], v: [B, L, D], theta: [D]
idxs = arange(0, L).view(1, L, 1)
angles = idxs * theta.view(1, 1, D)  # [1, L, D]

hat_k, hat_q = softplus(k), softplus(q)
hat_k = interleave(hat_k * cos(angles), hat_k * sin(angles))
hat_q = interleave(hat_q * cos(angles), hat_q * sin(angles))

return attention(hat_q, hat_k, v)

Results.

Comments.