Torch harmonics library enables machine learning on spherical data

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

Machine Learning

Summary

Many scientific and engineering fields work with data on the surface of a sphere, like Earth or planets. The authors created torch-harmonics, a software library that helps computers analyze and learn from spherical data efficiently and accurately. It includes tools similar to the Fourier transform but adapted for spheres, and supports complex neural network methods that respect the sphere’s unique shape. This makes it easier for developers to build machine learning models that understand data wrapped around a ball-like surface.

What this means in practice

  • For geophysics teams: Process and analyze global Earth data respecting spherical geometry for better weather and climate models.
  • For virtual reality developers: Create improved spherical models and neural networks for immersive environments that react correctly to rotations.

Authors

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

Abstract

The two-dimensional sphere embedded in three-dimensional Euclidean space S2, 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.