Manuscript Offprint
arXiv:2610.06229SO(3)-RoPE for Spherical Transformers
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 to the rotation group , 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)-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 -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 , 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 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.
A key property of the spherical geometry is its rotational symmetry. Our networks are designed to be SO(3) rotation equivariant – this ensures that they respect the spherical geometry, treating tokens at any locations equivalently, independent from their absolute positions. Intuitively, SO(3)-equivariance means that moving a spherical input signal results in an equivalent movement of the predicted output. Formally, such movements are given by SO(3) group actions on spherical signals, where . An operator or network is called SO(3) equivariant if it commutes with these actions, that is, if for any .
As in standard ViTs, we tokenise the sphere via convolutional patch embeddings. Following spherical CNNs, we embed spherical signals via so-called lifting convolutions (Def. 4) [12, 30, 49]. Applying a spherical kernel in any SO(3)-pose, these convolutions result in tokens on the group SO(3). In our implementation, we sample a discrete set of SO(3) poses for patch tokenisation. All our tokens are therefore defined on the lifted domain SO(3) rather than the input signal domain .
To inform the attention operation about spherical geometry we positionally embed our tokens. Following RoPE, we multiply token features at by a position-dependent unitary matrix . In standard RoPE one uses position-dependent rotation matrices, corresponding to the unitary representations of the 1D translational group. Analogously, -RoPE acts via unitary representations . Due to unitarity and the composition property we get
Definition 1 (SO(3)-RoPE). Let be tokens on and any unitary -representation (Def. 6). Our -RoPE embedding operator is given by
(2)
As in conventional RoPE, we embed our queries and keys, however, in our case on SO(3). The attention inner product between query at U and key at V depends then only on their relative SO(3)-position :
As a result, rotating the queries and keys leads to accordingly rotated attention scores:
(4)
Therefore our SO(3)-RoPE embedding produces a rotation-equivariant attention.
Theorem 2 (SO(3)-RoPE Attention is equivariant). Let be query, key and value functions, and be the dot-product attention operator (Def. 3). Then
for any . (5)
Theorem 2 is proved in Appendix E.
3 Implementation
Patch embedding & Lifting. Our spherical input signals are sampled on an icosphere, constructed by recursively subdividing the triangular faces of an icosahedron [13, 24, 56]. This produces a hierarchical, nearly uniform discretisation of .
To embed patches, we convolve triangular kernels on the icospherical grid, reducing resolution to a few tokens and lifting to SO(3). Specifically, we use the grid's hierarchical structure to divide it into non-overlapping triangle patches and pick the corresponding SO(3)-poses such that triangle kernels land exactly on every patch in each of three possible directions, thus resulting in 3M tokens. Assuming our triangle patches are roughly equilateral allows us to compute this lifting convolution without interpolation. We store the tokens' SO(3) positions via their Euler angles .
Unpatchification. For dense predictions on the original icospherical grid we apply a final transposed convolution. It unpatchifies tokens via resolution-increasing triangular kernels (Def. 5).
SO(3) RoPE. As unitary representation for token embedding we use a block-diagonal operator built from Wigner D-matrices [49, 51]. We pick each order with multiplicity one, choosing as many blocks as our embedding dimension allows:
Irreducible representations are the smallest possible building blocks, allowing for a cheap encoding. After applying SO(3)-RoPE, we use the standard FlashAttention [17] implementation in PyTorch to compute self-attention [38].
Equivariance. Only attention layers mix information between tokens; all other layers act token-wise. With SO(3)-RoPE, attention depends only on relative poses and is therefore equivariant to continuous rotations in SO(3) (Theorem 2). The lifting layer, however, relies on the icosphere, so the full model is exactly equivariant only to the icosahedral subgroup of SO(3), which is commonly used to discretize rotations [10, 13]. We verify numerically that a randomly initialised model is equivariant to all 60 rotations up to floating-point precision (Appendix C).
Symmetry breaking by longitude encoding. Not all spherical problems are fully SO(3)-equivariant – instead, the symmetry might be broken to rotations around the z-axis [1, 2, 4]. In such cases, we use an additive absolute position embedding of the longitude, summed to spherical input signals. Specifically, the longitude angle is encoded via Legendre polynomials .

point area #parameters label = network depth
mean L1 error
Figure 2: The error of predicting the next simulation Figure 3: SO3ViT has lower and more timestep vs. the median epoch time. SO3ViT outperforms homogeneously distributed prediction S2Transformer [5] given the same computational budget. errors than S2Transformer.
4 Experiments
4.1 Setup
Dataset. We choose the shallow water equation on a rotating sphere as our benchmark, using the same on-the-fly data generation and evaluation metrics proposed in [5]. Due to the sphere’s rotation there is a Coriolis force. It breaks the full SO(3) symmetry of the sphere down to the subgroup of SO(2) rotations around the z-axis.
Baseline. As a baseline model we pick the S2Transformer [5] with local neighborhood attention. DISCO convolutions [37] patchify the sphere to tokens that lie on an equiangular grid. Positions are embedded via additive spherical harmonics embeddings — this is an absolute position encoding, thus breaking equivariance.
Training. We train for 100 epochs, using the Adam optimiser [27] and a ReduceOnPlateau scheduler, as in Bonev et al. [5]. In addition, we test the models also with a cosine scheduler. We do a grid search for the number of layers [4,8,16,32,64], the number of heads [1,2,4,8] and the embedding dimension [128,256,512]. Per layer and embedding dimension we pick the number of heads and scheduler based on the best error. We train on a single A100 with 40GB memory and a batch size of 16. Configuration consuming too much memory are skipped.
4.2 Results
Accuracy-Efficiency Trade-off. We train multiple configurations of S2Transformer and SO3ViT. Figure 2 plots the trained models’ prediction errors versus their median epoch times. Our models achieve lower errors at comparable wall-clock times, and lower wall-clock times at each error level, forming a significantly improved Pareto frontier. This is despite the fact that the S2Transformer uses the torch-harmonics [4, 5] implementations with customised CUDA kernels. We attribute the efficiency of SO3ViT to the use of FlashAttention and the icosphere discretisation. The equiangular discretisation of the S2Transformer oversamples the poles resulting in wasted tokens, whereas our icosphere discretisation samples the sphere uniformly, allowing us to use fewer tokens. SO3ViT also requires less memory and achieves faster inference than S2Transformer. We provide a detailed analysis in Appendix B.
Both models benefit from scaling parameters, although S2Transformer saturates at higher parameter counts. SO3ViT benefits more from scaling its embedding dimension rather than scaling its depth. This might be due to larger embedding dimensions allowing for a higher maximal order of Wigner D-matrices, and therefore positional resolution in our SO(3)-RoPE embeddings.
Error distribution. Next we investigate the spatial structure of prediction errors, visualized in Figure 3. For each point and model, we compute the average error over 200 simulations. S2Transformer shows an inhomogeneous error distribution, peaking around the poles. This is caused by two design choices: First, they operate on an equirectangular grid, which is inhomogeneous with diverging sampling density towards the poles. Moreover, their patch embedding utilizes a variant of DISCO convolutions which is merely SO(2)-equivariant rather than SO(3)-equivariant. As discussed in [49], this approach suffers inevitably from topological discontinuities around the poles. Our SO3ViT, on the other hand, shows a more symmetric error distribution. One can discern the icosahedral grid pattern, which is due to slight triangle distortions when mapping the icosahedron to an icosphere. Note that the two plots use a different color range, with the largest error magnitude of SO3ViT corresponding roughly to the smallest error magnitude of S2Transformer. These results underline the importance of building an architecture that truly respects the geometry of the data domain.
5 Conclusion
We proposed SO(3)-RoPE, a relative position encoding for spherical transformers, acting via unitary SO(3)-irreps. It is FlashAttention-compatible and outperforms S2Transformer at equal compute.
Acknowledgements
This research is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation), project number 501927736, within the DFG Priority Programme 2353: Daring More Intelligence - Design Assistants in Mechanics and Dynamics'. This project has received funding from the European Research Council (ERC) under the European Union's Horizon Europe research and innovation programme (Grant agreement No. 101041669). The authors gratefully acknowledge the computing time granted by the Resource Allocation Board and provided on the supercomputer Emmy/Grete at NHR-Nord@Göttingen as part of the NHR infrastructure. The calculations for this research were conducted with computing resources under the project nii00194.
References
[1] James Amato, Yu Xie, Leonel Medina-Varela, Ammar Aljerwi, Adam McCutcheon, T. Seth Rippentrop, Kristian Gonzalez, Jacques Delabrouille, Mustapha Ishak, and Nicholas Ruozzi. Cmb-ml: A cosmic microwave background dataset for the oldest possible computer vision task. 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pages 9418–9430, 2025.
[2] Iro Armeni, Sasha Sax, Amir R Zamir, and Silvio Savarese. Joint 2d-3d-semantic data for indoor scene understanding. arXiv preprint arXiv:1702.01105, 2017.
[3] Yaniv Benny and Lior Wolf. Sphereuformer: A u-shaped transformer for spherical 360 perception. 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 940–950, 2024.
[4] Boris Bonev, Thorsten Kurth, Christian Hundt, Jaideep Pathak, Maximilian Baust, Karthik Kashinath, and Anima Anandkumar. Spherical fourier neural operators: Learning stable dynamics on the sphere. In International Conference on Machine Learning, 2023.
[5] Boris Bonev, Max Rietmann, Andréanne Paris, Alberto Carpentieri, and Thorsten Kurth. Attention on the sphere. ArXiv, abs/2505.11157, 2025.
[6] Wouter Boomsma and Jes Frellsen. Spherical convolutions and their application in molecular modelling. Advances in neural information processing systems, 30, 2017.
[7] Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18–42, 2017.
[8] Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Veličković. Geometric deep learning: Grids, groups, graphs, geodesics, and gauges. arXiv preprint arXiv:2104.13478, 2021.
[9] Oscar Carlsson, Jan E. Gerken, Hampus Linander, Heiner Spiess, Fredrik Ohlsson, Christoffer Petersson, and Daniel Persson. Heal-swin: A vision transformer on the sphere. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 6067–6077, 2023.
[10] Gabriele Cesa, Leon Lang, and Maurice Weiler. A program to build E(N)-equivariant steerable CNNs. In International Conference on Learning Representations (ICLR), 2022. URL https://openreview.net/forum?id=WE4qe9xlnQw.
[11] Taco Cohen and Max Welling. Group equivariant convolutional networks. In International conference on machine learning, pages 2990–2999. PMLR, 2016.
[12] Taco Cohen, Mario Geiger, Jonas Köhler, and Max Welling. Spherical cnns. ArXiv, abs/1801.10130, 2018.
[13] Taco Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge equivariant convolutional networks and the icosahedral cnn. ArXiv, abs/1902.04615, 2019.
[14] Taco S Cohen and Max Welling. Steerable cnns. arXiv preprint arXiv:1612.08498, 2016.
[15] Taco S Cohen, Mario Geiger, and Maurice Weiler. A general theory of equivariant cnns on homogeneous spaces. Advances in neural information processing systems, 32, 2019.
[16] Benjamin Coors, Alexandru Paul Condurache, and Andreas Geiger. Spherenet: Learning spherical representations for detection and classification in omnidirectional images. In European conference on computer vision, pages 525–541. Springer, 2018.
[17] Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in neural information processing systems, 35:16344–16359, 2022.
[18] Michaël Defferrard, Martino Milani, Frédéric Gusset, and Nathanael Perraudin. Deepsphere: a graph-based spherical cnn. ArXiv, abs/2012.15000, 2020.
[19] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
[20] James R Driscoll and Dennis M Healy. Computing fourier transforms and convolutions on the 2-sphere. Advances in applied mathematics, 15(2):202–250, 1994.
[21] Carlos Esteves, Christine Allen-Blanchette, Ameesh Makadia, and Kostas Daniilidis. Learning so (3) equivariant representations with spherical cnns. In Proceedings of the european conference on computer vision (ECCV), pages 52–68, 2018.
[22] Krzysztof M Gorski, Eric Hivon, Anthony J Banday, Benjamin D Wandelt, Frode K Hansen, Mstvos Reinecke, and Matthia Bartelmann. Healpix: A framework for high-resolution discretization and fast analysis of data distributed on the sphere. The Astrophysical Journal, 622(2):759–771, 2005.
[23] Mohammad Mohaiminul Islam, Rishabh Anand, David R. Wessels, Friso de Kruiff, Thijs P. Kuipers, Rex Ying, Clara I. S'anchez, Sharvaree P. Vadgama, Georg Bökman, and Erik J. Bekkers. Platonic transformers: A solid choice for equivariance. ArXiv, abs/2510.03511, 2025.
[24] Chiyu Max Jiang, Jingwei Huang, Karthik Kashinath, Prabhat, Philip Marcus, and Matthias Niessner. Spherical CNNs on unstructured grids. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=Bkl-43C9FQ.
[25] John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Žídek, Anna Potapenko, et al. Highly accurate protein structure prediction with alphafold. nature, 596(7873):583–589, 2021.
[26] Amirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das, and Siva Reddy. The impact of positional encoding on length generalization in transformers. In Advances in Neural Information Processing Systems (NeurIPS), volume 36, 2023.
[27] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
[28] Konstantinos Kogkalidis, Jean-Philippe Bernardy, and Vikas Garg. Algebraic positional encodings. Advances in Neural Information Processing Systems, 37:34824–34845, 2024.
[29] Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In International conference on machine learning, pages 2747–2755. PMLR, 2018.
[30] Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2747–2755. PMLR, 10–15 Jul 2018. URL https://proceedings.mlr.press/v80/kondor18a.html.
[31] Risi Kondor, Zhen Lin, and Shubhendu Trivedi. Clebsch–gordan nets: a fully fourier space spherical convolutional neural network. Advances in neural information processing systems, 31, 2018.
[32] Peter J Kostelec and Daniel N Rockmore. Ffts on the rotation group. Journal of Fourier analysis and applications, 14(2):145–179, 2008.
[33] Yeonkun Lee, Jaeseok Jeong, Jongseob Yun, Wonjune Cho, and Kuk-Jin Yoon. Spherephd: Applying cnns on a spherical polyhedron representation of 360° images. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9173–9181. IEEE, 2019.
[34] Zhixin Ling, Zhen Xing, Xiangdong Zhou, Manliang Cao, and Guichun Zhou. Panoswin: a pano-style swin transformer for panorama understanding. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 17755–17764. IEEE, 2023.
[35] Haiping Liu, Lijing Lin, Jingyuan Sun, Zhegong Shangguan, Mauricio A Alvarez, and Hongpeng Zhou. Rethinking rope: A mathematical blueprint for n-dimensional positional embedding. arXiv preprint arXiv:2504.06308, 2025.
[36] Takeru Miyato, Bernhard Jaeger, Max Welling, and Andreas Geiger. Gta: A geometry-aware attention mechanism for multi-view transformers. In International Conference on Learning Representations, volume 2024, pages 8172–8208, 2024.
[37] Jeremy Ocampo, Matthew Alexander Price, and Jason D. McEwen. Scalable and equivariant spherical cnns by discrete-continuous (disco) convolutions. ArXiv, abs/2209.13603, 2022.
[38] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017.
[39] Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. Robust speech recognition via large-scale weak supervision. In International conference on machine learning, pages 28492–28518. PMLR, 2023.
[40] Stephan Rasp, Stephan Hoyer, Alexander Merose, Ian Langmore, Peter Battaglia, Tyler Russell, Alvaro Sanchez-Gonzalez, Vivian Yang, Rob Carver, Shreya Agrawal, et al. Weatherbench 2: A benchmark for the next generation of data-driven global weather models. Journal of Advances in Modeling Earth Systems, 16(6):e2023MS004019, 2024.
[41] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 464–468, 2018.
[42] Zhijie Shen, Chunyu Lin, Kang Liao, Lang Nie, Zishuo Zheng, and Yao Zhao. Panoformer: Panorama transformer for indoor 360° depth estimation. In European Conference on Computer Vision, 2022.
[43] Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024.
[44] Yu-Chuan Su and Kristen Grauman. Learning spherical convolution for fast features from 360 imagery. Advances in neural information processing systems, 30, 2017.
[45] Chase van de Geijn, Timo Lüddecke, Polina Turishcheva, and Alexander Ecker. A circular argument: Does rope need to be equivariant for vision? Advances in Neural Information Processing Systems, 38:20388–20424, 2026.
[46] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
[47] Maurice Weiler and Gabriele Cesa. General e (2)-equivariant steerable cnns. Advances in neural information processing systems, 32, 2019.
[48] Maurice Weiler, Mario Geiger, Max Welling, Wouter Boomsma, and Taco Cohen. 3d steerable cnns: Learning rotationally equivariant features in volumetric data. Advances in Neural information processing systems, 31, 2018.
[49] Maurice Weiler, Patrick Forré, Erik Verlinde, and Max Welling. Equivariant and Coordinate Independent Convolutional Networks. 2023. URL https://maurice-weiler.gitlab.io/cnn_book/EquivariantAndCoordinateIndependentCNNs.pdf.
[50] Maurice Weiler, Patrick Forré, Erik Verlinde, and Max Welling. Equivariant and Coordinate Independent Convolutional Networks: A Gauge Field Theory of Neural Networks. World Scientific, 2026.
[51] Eugen Wigner. Gruppentheorie und ihre anwendung auf die quantenmechanik der atomspektren. 1931.
[52] Bichen Wu, Alvin Wan, Xiangyu Yue, and Kurt Keutzer. Squeezeseg: Convolutional neural nets with recurrent crf for real-time road-object segmentation from 3d lidar point cloud. In 2018 IEEE international conference on robotics and automation (ICRA), pages 1887–1893. IEEE, 2018.
[53] Qingsong Yan, Qiang Wang, Kaiyong Zhao, Bo Li, Xiaoweo Chu, and Fei Deng. Spheredepth: Panorama depth estimation from spherical domain. In 2022 International Conference on 3D Vision (3DV), pages 1–10. IEEE, 2022.
[54] Senthil Yogamani, Ciarán Hughes, Jonathan Horgan, Ganesh Sistu, Padraig Varley, Derek O'Dea, Michal Uricár, Stefan Milz, Martin Simon, Karl Amende, et al. Woodscape: A multitask, multi-camera fisheye dataset for autonomous driving. In Proceedings of the IEEE/CVF international conference on computer vision, pages 9308–9318, 2019.
[55] Ilwi Yun, Chanyong Shin, Hyunku Lee, Hyuk-Jae Lee, and Chae Eun Rhee. Egformer: Equirectangular geometry-biased transformer for 360 depth estimation. In 2023 IEEE/CVF International Conference on Computer Vision (ICCV), pages 6078–6089. IEEE, 2023.
[56] Chao Zhang, Stephan Liwicki, William Smith, and Roberto Cipolla. Orientation-aware semantic segmentation on icosahedron spheres. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pages 3532–3540. IEEE, 2019.
[57] Maksim Zhdanov, Ana Lucic, Max Welling, and Jan-Willem van de Meent. (sparse) attention to the details: Preserving spectral fidelity in ml-based weather forecasting models. ArXiv, abs/2604.16429, 2026.
Appendix
A Related Work / Background
Signals that naturally live on the sphere arise throughout the sciences and engineering, from climate and weather fields defined over the globe [40] and the cosmic microwave background in cosmology [22], to omnidirectional and panoramic imagery [16, 44], molecular surfaces [6], and data from fish-eye or LiDAR sensors [52, 54]. Processing such data faithfully requires the spherical geometry to be encoded into the model itself, rather than treated as an afterthought. In this section, we review three strands of work: the established theory of spherical CNNs, recent efforts to bring transformers to the sphere, and general advances in encoding geometry into transformers through positional encodings.
Spherical convolutions. Geometric Deep Learning (GDL)[7, 50] studies how to incorporate data geometry into deep learning models. The guiding principle of GDL is that of the Erlangen programme[8] which characterizes geometries through group theory and symmetries. Thus, to faithfully represent the geometry, a model should respect the symmetries of its data.
For a domain which is a sequence or line, such as in language, the most relevant symmetry is translation. Convolutions are the only linear operators that are translation-equivariant[29]. On the sphere, , the relevant symmetries are 3D rotations; any rotation – or more formally any element of , i.e. the space of special (unit determinant) orthogonal matrices – leaves invariant. Thus, the translations of the common convolution are replaced by rotations. The operator we seek is a linear map that is rotation-equivariant, which turns out to be a spherical convolution [12, 20]. A well-known obstacle is that a linear operator mapping a signal on back to a signal on can only be -equivariant when its kernel is isotropic, i.e. depends solely on the geodesic distance between points. Such zonal kernels are blind to orientation and therefore limit a model's expressivity.
Spherical CNNs overcome this by lifting features from the sphere to the rotation group[12, 13, 21]: the first layer maps a signal on to a signal on , after which subsequent layers convolve on itself, where anisotropic and far more expressive kernels remain equivariant. Two complementary realisations of this idea are common. Group convolutions[11] enforce equivariance directly in the spatial domain by correlating over transformed copies of the kernel. Steerable convolutions[14, 15, 47, 48] instead operate in the spectral domain and are the group-theoretic counterpart of computing a convolution through the (generalized) Fourier transform, representing signals through the irreducible representations of the symmetry group. For these irreps are the Wigner-D matrices, with the corresponding transform expanding signals in spherical harmonics [31, 32].
We leverage both the early works’ insights on lifting and the latter works’ insights on irreps of to construct our positional encoding.
Spherical Transformers. Just as transformers have largely displaced convolutions in vision, a growing line of work adapts them to spherical data. Before extending a transformer to the sphere, one must first decide how to discretize and represent it. While planar images allow for regular pixel grids at arbitrary resolutions, the only regular grids on the sphere correspond to Platonic solids and are of rather coarse resolution. To achieve higher resolutions, one needs to fall back to irregular sampling schemes: equirectangular (latitude–longitude) grids, icospheres obtained by repeatedly subdividing an icosahedron, or the equal-area HEALPix pixelisation [22] are all common choices. Each carries a different trade-off between sampling uniformity, hierarchical structure, and ease of implementation. In our work, we choose to operate on icosphere subdivisions.
For each sampling scheme, several transformer architectures have been proposed. On the equirectangular grid, the main challenge is counteracting the projection's polar distortion within the attention mechanism itself: PanoFormer [42] attends over tangent patches with a learnable token flow, EGformer [55] biases local attention along the panorama's vertical and horizontal directions, and PanoSwin [34] adapts the shifted-window design of the Swin transformer to the wrap-around topology. These methods keep the convenience of a rectangular tensor, but must spend architectural effort to undo the distortion it introduces.
Icosphere-based transformers avoid this distortion at the source by operating on a near-uniform mesh. SphereUFormer [3] builds a U-shaped hierarchy of local self-attention modules directly on the icosphere, using the recursive subdivision of the mesh to define the pooling and unpooling operations between resolutions. This continues a line of icosahedral networks [13, 18, 24, 33, 53, 56] that exploit the icosahedron's high degree of symmetry, which we likewise build upon.
Others adopt the HEALPix grid, an equal-area, hierarchically nested pixelization, which several transformer-based methods exploit [9, 57]. We do not follow this route: while HEALPix offers equal-area sampling and a convenient hierarchical layout, its pixelization lacks the symmetry of the icosphere, which we favor in this work to simplify lifting.
Local attention A common thread across these architectures is a reliance on local attention, which restricts each query to a neighborhood of nearby tokens rather than the full sphere—both to control the quadratic cost of attention and to supply an inductive bias for locality. On the equirectangular grid this appears as deformable pixel neighborhoods in PanoFormer [42] and geometry-biased windows in EGformer [55], while PanoSwin [34], HEAL-SWIN [9]. SphereUFormer [3] likewise attends within mesh neighborhoods on the icosphere.
By contrast, we control the cost by patchifying analogous to the vanilla ViT. This patchification is one of the reasons we must lift to . The benefit is that the model captures local dependencies through the patches while the attention focuses on long range.
Positional encodings. In a transformer, self-attention is permutation-equivariant and carries no intrinsic notion of position; geometry can therefore enter only through the positional encoding [28] or through geometry-dependent masking such as local or causal attention [26]. Most modern transformers rely on some form of relative positional encoding (RPE) [41], which in language corresponds to encoding a translational symmetry [23, 36, 45]. The dominant instance is the Rotary Positional Encoding (RoPE) [43], which has been shown to arise axiomatically from a small set of desirable assumptions on sequential data [28, 35].
A practical virtue of RoPE is that it is applied to the query and key vectors independently, without materializing a position-dependent attention matrix; this separability is what makes it cheap to compute and easy to extend. Extensions beyond one dimension have, however, focused almost exclusively on toric domains, yielding the widely used axial RoPE for N-dimensional inputs [28, 35, 45]. The irreps perspective that explains RoPE's success has not been carried beyond this setting. We take up this perspective and use it to extend RoPE to the sphere—to our knowledge the first positional encoding to do so.
This gap is also visible in existing spherical transformers. Because they typically resort to local attention for tractability [3], they must pair it with a local positional encoding, but these either fall back on an isotropic kernel—echoing the limited expressivity of the zonal kernels of spherical convolutions—or ignore the sphere’s gauge problem and thereby cause problems at the poles [13]. Local attention is moreover hardware-inefficient and restricted in expressivity, making such models both slower and less accurate than the patchification scheme we propose.
B Memory & Inference speed
We compare memory consumption and inference speed of the S2Transformer and SO3ViT (Tab. 1). At matched accuracy, SO3ViT uses less memory and runs faster, despite having more parameters.
SO3ViT tokenises the input on an icosphere with two subdivisions (320 faces). The lifting layer then produces tokens. The S2Transformer instead discretises the input on a equirectangular grid, which gives 8,192 tokens. Coarser patchification was not possible for the S2Transformer. Otherwise, it exceeded the 40 GB memory limit at a batch size of 16. The reason is the torch-harmonics implementation. It first upsamples and then applies DISCO convolutions at full output resolution. These convolutions store an interpolation matrix for every latitude, and its size grows with the kernel size. Our patchification and unpatchification avoid this cost, since they require no interpolation. This is possible because our attention mechanism allows a free choice of discretisation of SO(3) (Sec. 3) and our assumption of equilateral triangles of the icosphere.
Table 1: Peak GPU memory during training and inference time. For every S2Transformer configuration, some SO3ViT configuration performs better in error, error, memory, and inference speed.
| Model | Depth | Width | Params | Memory | Inference Time | ||
|---|---|---|---|---|---|---|---|
| S2Transformer | 4 | 128 | 0.53 M | 0.031 | 0.040 | 8.01 GB | 141.4 ms |
| S2Transformer | 4 | 256 | 2.12 M | 0.031 | 0.040 | 15.96 GB | 198.8 ms |
| S2Transformer | 4 | 512 | 8.43 M | 0.027 | 0.035 | 31.92 GB | 282.1 ms |
| S2Transformer | 8 | 256 | 4.22 M | 0.031 | 0.039 | 21.99 GB | 471.0 ms |
| SO3ViT | 4 | 128 | 0.98 M | 0.045 | 0.058 | 0.74 GB | 6.1 ms |
| SO3ViT | 4 | 256 | 3.54 M | 0.034 | 0.043 | 1.28 GB | 9.3 ms |
| SO3ViT | 4 | 512 | 13.37 M | 0.028 | 0.036 | 2.40 GB | 16.2 ms |
| SO3ViT | 16 | 512 | 51.12 M | 0.023 | 0.029 | 8.82 GB | 55.2 ms |
| SO3ViT | 32 | 512 | 101.45 M | 17.37 GB | 109.9 ms |
C Equivariance Test
Our SO(3)-RoPE attention mechanism is equivariant to continuous rotations in SO(3). We discretize our data on an icospherical grid, which breaks continuous symmetries to the subgroup of icosahedral symmetries. This preserves exact icosahedral group equivariance and approximate continuous SO(3)-equivariance of the full model.
To verify this, we sample a random input for a randomly initialised model and permute it according to each rotation of the icosahedral group. We then compare the output for the rotated input with the rotated output for the original input. For all 60 rotations, the two agree up to floating-point precision.
D Definitions
In order to avoid discretization artifacts and preserve symmetries, all of our definitions are formulated in the continuous setting. We use scaled dot product attention [46], replacing discrete sums over tokens by continuous integrals over SO(3).
Definition 3 (Continuous Attention). Let . We define scaled dot-product attention on SO(3) as:
with and the attention score between the query at and key at given by
Note that we absorb the -dependent scaling factor into the queries and keys; in the implementation we scale the attention scores by it as usual.
Our patch embedding from spherical signals to tokens on SO(3) is done via usual lifting group convolutions.
Definition 4 (Lifting convolution ). Let be a spherical signal and an arbitrary filter. The lifting convolution of with is given by:
Intuitively, this operation applies a spherical kernel in every SO(3)-rotated pose.
Similarly, we use projection convolutions to map tokens on SO(3) back to spherical signals:
Definition 5 (Projection convolution ). Let be a signal over the group and a filter. The projection convolution of with is the map
We define SO(3)-RoPE as acting via unitary representations of the rotation group. For completeness, the following definition establishes what it means for a representation to be unitary:
Definition 6 (Unitary SO(3) representation). We call a unitary group representation if:
(I) for all
(unitary);
(II) for all
(group homomorphism).
where is the identity matrix.
E Proofs
Proof of Theorem 2. Let be the query, key and value functions, and let be a unitary representation (Def. 6).
We first record two elementary properties of unitary representations. The identity element is represented by the identity matrix :
Consequently, the inverse element is represented by the inverse matrix :
Together, unitarity (I) and the composition property (II) give the main ingredient of the proof: the product depends on only through their relative rotation ,
In particular, the product is unchanged when both U and V are rotated by the same :
With this, the embedded attention score is rotation-equivariant: for all and all ,
(15)
The softmax inherits this equivariance. Its denominator integrates over all of SO(3), so we may substitute without changing the integral.
Similar, the RoPE-embedded attention is SO(3)-equivariant in its argument :