[Paper Review] Where to Attend: A Principled Vision-Centric Position Encoding with Parabolas
The paper introduces Parabolic Position Encoding (PaPE) and PaPE-RI, parabola-based attention biases for vision transformers, showing strong performance across 8 datasets in 4 modalities and exceptional extrapolation on ImageNet-1K.
We propose Parabolic Position Encoding (PaPE), a parabola-based position encoding for vision modalities in attention-based architectures. Given a set of vision tokens-such as images, point clouds, videos, or event camera streams-our objective is to encode their positions while accounting for the characteristics of vision modalities. Prior works have largely extended position encodings from 1D-sequences in language to nD-structures in vision, but only with partial account of vision characteristics. We address this gap by designing PaPE from principles distilled from prior work: translation invariance, rotation invariance (PaPE-RI), distance decay, directionality, and context awareness. We evaluate PaPE on 8 datasets that span 4 modalities. We find that either PaPE or PaPE-RI achieves the top performance on 7 out of 8 datasets. Extrapolation experiments on ImageNet-1K show that PaPE extrapolates remarkably well, improving in absolute terms by up to 10.5% over the next-best position encoding. Code is available at https://github.com/DTU-PAS/parabolic-position-encoding.
Motivation & Objective
- Develop a vision-specific position encoding guided by principles from prior work (translation invariance, rotation invariance, distance decay, directionality, context awareness).
- Design PaPE to encode relative token positions via a sum of parabolas, enabling efficient attention with compatible query/key transformations.
- Evaluate PaPE and PaPE-RI across multiple vision modalities (images, point clouds, videos, event cameras) and large-scale datasets.
- Demonstrate PaPE’s generality and strong extrapolation capabilities beyond training resolutions.
Proposed method
- Define relative position Delta r_ij using a learnable projection W_p.
- Compute parabola coefficients a_i and b_i from token representations via W_a and W_b with a_i constrained to be negative for concavity.
- Form attention logits S_ij as a sum of parabola terms plus a semantic term: S_ij = sum_l (a_i,ℓ * Δr_ij,ℓ^2) + (b_i,ℓ * Δr_ij,ℓ) + (q_i · k_j)/m.
- Provide PaPE-RI as a rotation-invariant variant by setting b_i = 0 and constraining W_p and a_i.
- Ensure compatibility with efficient attention kernels by introducing f_q and f_k transformations that embed position into queries/keys while preserving the PaPE equation (Equation 9).
- Conduct extensive evaluations across eight datasets spanning four vision modalities (images, point clouds, spatio-temporal data, multi-modal) and perform ablations, extrapolation tests, and efficiency analyses.

Experimental results
Research questions
- RQ1How can a principled position encoding be designed to capture translation invariance, rotation invariance (where appropriate), distance decay, directionality, and context awareness for vision modalities?
- RQ2Does a parabola-based encoding (PaPE) offer superior generalization and extrapolation across diverse vision tasks and modalities compared to existing encodings?
- RQ3Can PaPE be implemented compatibly with efficient attention kernels without sacrificing performance?
- RQ4What is the impact of PaPE and PaPE-RI on large-scale datasets and multi-modal settings?
Key findings
- PaPE or PaPE-RI achieve top performance on 7 of 8 evaluated datasets across 4 vision modalities.
- PaPE attains the highest average score (66.3) across 8 datasets, outperforming RoPE by 1 point on average.
- PaPE demonstrates strong extrapolation, improving ImageNet-1K accuracy up to 1% at resolutions up to 512^2 and maintaining robustness to higher resolutions.
- Ablations show all components (distance decay, directionality, context awareness, and W_p) contribute to accuracy; removing any reduces performance.
- PaPE maintains compatibility with efficient attention kernels via query/key transformations, with modest overhead in parameters and runtime.
- On nuScenes (multi-modal), PaPE-PREMIER variants achieve top or near-top performance, highlighting rotation invariance benefits in multi-modal settings.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.