A Library for Learning Neural Operators

Jean Kossaifi, Nikola B. Kovachki, Zongyi Li, David Pitt, Miguel Liu-Schiaffini, Robert Joseph George, Boris Bonev, Kamyar Azizzadenesheli, Julius Berner, Anima Anandkumar · DOI

Abstract

The NeuralOperator library is an open-source PyTorch-based toolkit designed to bring the power of operator learning to the broader scientific computing community. Unlike standard neural networks that map between fixed-size vectors, this library enables models to learn mappings between infinite-dimensional function spaces. This allows researchers to solve complex partial differential equations (PDEs) with models that remain accurate regardless of the underlying grid resolution, providing a robust framework for resolution-agnostic scientific machine learning.

Introduction

Most scientific and engineering challenges, from weather forecasting to aerodynamics, are governed by partial differential equations (PDEs). Traditionally, these are solved using numerical methods that require a fine mesh (discretization) of the domain. These methods are computationally expensive and "resolution-locked"—changing the mesh size often requires restarting the entire computation.

Standard deep learning models, such as CNNs or MLPs, suffer from a similar limitation: they are tied to the specific discretization they were trained on. The NeuralOperator library addresses this by providing a standardized framework for Neural Operators (NOs). These models learn the underlying operator between function spaces, making them "resolution-agnostic." A model trained on low-resolution data can be directly applied to high-resolution data (super-resolution) while maintaining mathematical consistency.

Methods and Architecture

The library is built as an extension of the PyTorch ecosystem, following the familiar torch.nn.Module convention. Its core innovation lies in its modular implementation of Integral Transforms, the mathematical foundation of neural operators.

The modular architecture of the NeuralOperator library, illustrating the pipeline from datasets to meta-algorithms.

As shown in the architecture overview, the library decomposes the learning pipeline into five distinct stages:

  • Datasets: Automated interfaces for benchmark PDEs like Darcy Flow and Navier-Stokes.
  • Transforms: Utilities for normalization, data processing, and multi-grid support.
  • Layers: Core building blocks including Spectral Convolutions, Local Integrals, and NO Blocks.
  • Models: High-level architectures such as Fourier Neural Operators (FNO), Tensor FNOs (TFNO), Geometry-Informed NOs (GINO), and Spherical FNOs (SFNO).
  • Meta-algos: Training utilities, multi-process units (MPU), and specialized loss functions (e.g., Sobolev, PINO).

Datasets

The library provides convenient, automated interfaces to several benchmark PDE datasets hosted on Zenodo, facilitating reproducible research:

  • Darcy Flow: A classic benchmark for flow through porous media.
  • 1D Viscous Burger’s Equation: A fundamental PDE for fluid mechanics.
  • 2D Navier-Stokes: Modeling fluid turbulence.
  • 3D Navier-Stokes over Car Surfaces (Car-CFD): A complex dataset for aerodynamic design.

Key Insights and Ideas

  • Discretization Convergence: A critical property of NOs is that as the input function's mesh is refined, the output converges to the true solution of the operator. This provides stability that standard CNNs lack.
  • Batteries-Included Modularity: By breaking down complex mathematical operators into modular layers and transforms, the library allows researchers to easily mix and match components, such as adding physics-informed constraints (PINOs) to a standard FNO.
  • Computational Efficiency: Learning in infinite-dimensional spaces is taxing. The library focuses on tensor decomposition and mixed-precision training to ensure these models are usable on standard GPU hardware.

Key Results

The NeuralOperator library is now an official part of the PyTorch Ecosystem. It provides performance tools including native support for multi-grid domain decomposition and incremental learning, allowing for the training of larger-scale operators than previously possible. The library lowers the barrier to entry through detailed documentation and tutorials that bridge the gap between abstract functional analysis and practical implementation.

Limitations and Future Work

While the library simplifies the implementation of neural operators, ensuring discretization convergence remains a non-trivial task for beginners. Future work focuses on scaling the library for even larger GPU clusters, expanding community contributions for new architectures, and developing tools for Recurrent Neural Operators (RNOs) to handle long-term temporal dependencies in dynamic systems.

Summary updated

BibTeX
@misc{kossaifi2024library,
  author = {Jean Kossaifi and Nikola B. Kovachki and Zongyi Li and David Pitt and Miguel Liu-Schiaffini and Robert Joseph George and Boris Bonev and Kamyar Azizzadenesheli and Julius Berner and Anima Anandkumar},
  title = {{A Library for Learning Neural Operators}},
  year = {2024},
  eprint = {2412.10354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.10354},
}
Figure