Manuscript Offprint

arXiv:2609.39737

A library for differentiable signal processing and machine learning on the sphere

Thorsten Kurth, Max Rietmann, Mauro Bisson, Andrea Paris, Alberto Carpentieri, Jean Kossaifi, Anima Anandkumar, Christian Hundt, Boris Bonev

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The two-dimensional sphere embedded in three-dimensional Euclidean space S2S^{2}, plays a central role in a variety of scientific and engineering domains, including geophysics, planetary science, geodesy, atmospheric physics, quantum chemistry, cosmology, and virtual reality, among many others. As machine learning increasingly permeates these fields, the demand grows for robust tools that process and model functions on the sphere, while respecting the inherent topological and symmetry properties of the domain. We present torch-harmonics, a comprehensive library that offers efficient, differentiable implementations of advanced signal processing and machine learning (ML) methods for spherical data. These include the spherical harmonic transform (SHT), the spherical analogue of the Fourier transform, vector spherical harmonics, discrete-continuous and spectral convolutions, as well as both global and neighborhood spherical attention mechanisms. Beyond traditional representations, torch-harmonics provides the building blocks for state-of-the-art spherical ML architectures such as spherical transformers in order to enable scalable, rotationally-aware learning and inference in modern scientific and engineering applications.

Keywords: spherical signal-processing, geometric machine learning, spherical harmonics, scientific machine learning, differentiable computing

1 Introduction

The two-dimensional sphere S2S^{2} plays a central role in many scientific domains, including geophysics, atmospheric physics, cosmology, and computer graphics. As machine learning becomes increasingly prevalent in these fields, there is growing demand for tools that process spherical signals while respecting the sphere’s topological and symmetry properties.

Standard deep learning operations designed for Euclidean domains do not naturally extend to the sphere without introducing distortions or singularities. Geometric deep learning approaches such as graph neural networks on spherical meshes and equivariant networks based on spherical harmonics have been proposed, but their practical adoption has been hindered by the lack of efficient, differentiable, and scalable implementations (Bronstein et al., 2021; Cohen and Welling, 2016; Cohen et al., 2018; Esteves et al., 2017, 2020, 2023; Ocampo et al., 2022; Cobb et al., 2020; Defferrard et al., 2020; Brehmer et al., 2025).

We present torch-harmonics, a PyTorch (Paszke et al., 2019) library for differentiable signal processing on the sphere. The library provides efficient implementations of spherical harmonic transforms (SHT), vector spherical harmonic transforms (Schaeffer, 2013), discrete-continuous (DISCO) convolutions, spherical attention mechanisms and other im-

©2026 Thorsten Kurth, Max Rietmann, Mauro Bisson, Andrea Paris, Alberto Carpentieri, Jean Kossaifi, Anima Anandkumar, Christian Hundt and Boris Bonev.

License: CC-BY 4.0, see https://creativecommons.org/licenses/by/4.0/.

Figure

Figure 1: Overview of torch-harmonics: Spherical signal processing fundamentals enable high-level models such as spherical neural operators and differentiable PDE solvers. Applications include weather prediction, molecular simulations and more.

portant operations on the spherical domain. Through custom CUDA (Nickolls et al., 2008) kernels and distributed computing strategies, torch-harmonics enables training of high-resolution models that were previously computationally prohibitive. The library serves as the foundation for architectures such as the Spherical Fourier Neural Operator (SFNO) (Bonev et al., 2023) and FourCastNet3 (FCN3) (Bonev et al., 2025a).

References (32)