arXiv:2610.06229cs.LGOct 2026

Manuscript Offprint

arXiv:2610.06229

SO(3)-RoPE for Spherical Transformers

Christian Libner, Chase van de Geijn, Alexander S. Ecker, Maurice Weiler

Abstract

Spherical data arise in many scientific applications. Often spherical transformers disregard the geometry of the underlying spherical domain, causing distortions and coordinate singularities near the poles. We introduce SO(3)-RoPE, a relative positional embedding that incorporates spherical geometry into transformer attention through unitary SO(3) representations. Our formulation is SO(3)-equivariant and compatible with FlashAttention, retaining efficiency of vanilla transformers. On shallow water dynamics prediction over a rotating sphere, our SO3ViT outperforms an S2Transformer baseline with lower errors and reduced runtime.

1 Introduction

Transformers have become a standard architecture across machine learning [19, 25, 39, 46]. Unlike convolutional networks, pure attention operations are not informed about spatial locations of their input tokens. Positional encodings provide this missing information. A widely used approach for encoding relative positions in sequences and Euclidean spaces are Rotary Positional Embeddings (RoPE) [28, 43]. We extend this idea to spherical transformers with SO(3)-RoPE, a relative positional encoding that incorporates the geometry of spherical data into attention.

Our approach builds on the established line of work on spherical convolutional neural networks [12, 50]. A common operation in spherical CNNs is to lift feature maps from S2S^{2} to the rotation group SO(3)\mathrm{SO}(3), where features depend both on their spatial location and orientation. We employ such lifting convolutions as patch-embeddings of dense spherical data to tokens on SO(3)\mathrm{SO}(3).

SO(3)-RoPE incorporates the geometry of these tokens into self-attention, analogously to how conventional RoPE incorporates Euclidean geometry. Euclidean RoPE acts via complex phase modulation (or rotations of 2×22 \times 2-blocks of features), which are unitary translation group representations. Analogously, SO(3)-RoPE acts via unitary representations of the rotation group, specifically via Wigner D-matrices Dℓ(g)D^{\ell}(g), the irreducible representations of SO(3).

Because SO(3)-RoPE modifies queries and keys independently, our method can take advantage of hardware-optimised attention kernels like FlashAttention [17] out of the box. As a consequence, it preserves similar throughput, memory efficiency and scalability as vanilla transformers.

We evaluate our model SO3ViT (Fig. 1) on next-timestep prediction for shallow water dynamics on a rotating sphere. Compared to an S2Transformer [5] baseline — a non-SO(3)-equivariant spherical transformer architecture — we are able to scale to larger models and achieve significantly lower prediction errors, while drastically reducing runtime. Moreover, S2Transformer suffers from high errors due to geometry distortion around the poles. Incorporating the correct spherical geometry, our SO3ViT model shows a more uniform error distribution.

The following sections introduce SO(3)-RoPE (Sec. 2), our implementation (Sec. 3), and experiments (Sec. 4). More related work, mathematical definitions, and theorems are in the Appendix.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: Representations for the Physical Sciences. Correspondence to: christian.libner@uni-goettingen.de

Figure

Figure 1: SO3ViT. We patchify the sphere and process those patches with a transformer. In the attention we embed the queries and keys with our SO(3) RoPE.

References (55)