Foundations to Frontier
Tests
J. Scientific Machine Learning › J4 Neural Operators

Operator learning: learning maps between functions

A PINN solves one instance of an equation; changing the source, boundary data or coefficient means training again. Operator learning instead learns the solution operator itself, the map from input functions (sources, coefficients, initial conditions) to solution functions, from many solved examples. A trained neural operator then returns solutions for new inputs in a single forward pass. Because inputs and outputs are functions, a good operator model should not depend on the grid it was trained on: it should accept inputs at any resolution and be evaluable anywhere. This page introduces the idea with the simplest case, the solution operator of −u″ = f with zero boundary values, which is a kernel integral with the Green's function G(x, y) = min(x, y)(1 − max(x, y)). You compare two learned models trained on a 33-point grid with 1% output noise. One is a grid-to-grid matrix with 1089 weights. The other is a spectral model with 16 multipliers, one per sine mode, which is a one-layer, linear Fourier neural operator. With 10 training examples the spectral model's median error was 0.002, against 0.04 for the matrix. It also ran unchanged on a 129-point grid with the same error.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Learning the solver, not one solution

Imagine you need the temperature in a metal plate for thousands of different heating patterns. You could run a slow solver every time. Or you could show a model many examples of heating pattern and resulting temperature, until it learns the solver itself: give it a new heating pattern and it returns the temperature at once. Because heating patterns and temperatures are whole functions, not lists of numbers, a good learned solver should not care how finely they are sampled. It should work on a coarse grid or a fine one. The demo compares a model tied to one grid with one that works on any grid.

Neural operator lab
Solution u of −u″ = f for a test source (black). Red dotted: a 17 × 17 grid matrix learned from 40 examples and applied through interpolation; green dashed: 16 spectral multipliers learned from the same data, applied directly on 65 points. Median test error: matrix 5.36% · spectral 2.29%.
Why engineers care

Learned operators are used as fast surrogates in weather forecasting, carbon storage and aircraft design, where the same equations are solved again and again for new inputs.

📝 Quick check (Level 0)
0/3 answered
  1. 1. An operator maps…
  2. 2. A trained neural operator solves a new instance…
  3. 3. A good operator model should work…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Setting: a family of problems 𝒩(u; a) = 0 with input function a (source, coefficient, initial or boundary data). The solution operator G† maps a ↦ u. Data: pairs (a_i, u_i) from a classical solver.
  • Goal: a model G_θ with G_θ(a) ≈ G†(a) for new a, evaluated in one pass. Training cost is high once; each prediction is cheap.
  • Discretisation invariance: a neural operator takes the input sampled at any points and returns the output at any points, with error that does not depend on the training grid. Grid-to-grid networks (CNNs, dense maps) lack this.
  • Building block, the kernel integral: v(x) = σ(W v(x) + ∫ κ_θ(x, y) v(y) dy), stacked in layers (Kovachki et al., 2023). For linear problems the true solution operator is exactly such an integral with the Green’s function as kernel.
  • Families: DeepONet (branch and trunk nets, J4-2), Fourier neural operators (kernel as a multiplier in Fourier space, J4-3), graph neural operators (integral over a neighbourhood graph, J4-4), transformer operators (attention as a learned kernel, J4-5).
  • Uses: many-query tasks such as design optimisation, uncertainty quantification, inverse problems and real-time control.
📝 Quick check (Level 1)
0/3 answered
  1. 1. The solution operator of a linear problem is a kernel integral with kernel…
  2. 2. Discretisation invariance means…
  3. 3. Neural operators pay off most for…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Solution operators as kernel integrals

Exercise 1.

  • Random smooth sources as sine series.
  • A finite-difference Poisson solver and the Green’s-function integral u(x) = ∫ G(x, y) f(y) dy by the trapezoid rule; both checked against the exact solution.
  • Sine coefficients by quadrature, shown to be the same on a 33-point and a 129-point grid.

Practice.

  • Generate data from a trusted solver over the input distribution you care about (random fields, design parameters), and keep a test set from a different resolution and a slightly different distribution.
  • Normalise inputs and outputs (per channel), and measure relative L2 errors.
  • Check resolution transfer and out-of-distribution inputs before claiming a model is an operator.
  • Count the cost honestly: data generation plus training against the number of queries you will make.
  • Tools: neuraloperator (FNO, GNO and more in PyTorch), DeepXDE (DeepONet), PDEBench and The Well for data, NVIDIA PhysicsNeMo.
import numpy as np

# a linear spectral operator (one-layer linear FNO) learned from pairs (f_i, u_i) on any grid x
def sine_coeffs(f, x, K):
    w = np.full(len(x), x[1] - x[0]); w[[0, -1]] /= 2
    return 2 * (f * w) @ np.sin(np.pi * np.outer(np.arange(1, K + 1), x)).T

a, b = sine_coeffs(F_train, x, 16), sine_coeffs(U_train, x, 16)
r = (a * b).sum(0) / (a * a).sum(0)                     # one multiplier per mode
u_new = (sine_coeffs(f_new, x_new, 16) * r) @ np.sin(np.pi * np.outer(np.arange(1, 17), x_new))
🐍 Exercise 1: the Poisson solution operator
Generate random sources, solve −u″ = f by finite differences and by the Green's-function integral, and check that sine coefficients do not depend on the grid.
📝 Quick check (Level 2)
0/3 answered
  1. 1. A PyTorch library implementing FNO and GNO:
  2. 2. Operator models should be tested on…
  3. 3. Typical error measure for operator learning:

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Green’s functions. For −u″ = f on [0, 1] with u(0) = u(1) = 0, u(x) = ∫ G(x, y) f(y) dy with G(x, y) = min(x, y)(1 − max(x, y)): continuous, symmetric, with a kink at x = y. Every linear, well-posed problem has such a kernel, and its discretisation on n points is an n × n matrix. Learning that matrix directly needs at least n independent examples per output point and ties the model to the grid.

The spectral view. The functions sin(kπx) are eigenfunctions of −d²/dx² with eigenvalues (kπ)², so G = Σ_k 2 sin(kπx) sin(kπy)/(kπ)²: the operator multiplies the k-th sine coefficient by 1/(kπ)². A model that learns one multiplier per mode has K parameters, takes coefficients computed by quadrature on any grid, and returns a function defined everywhere. This is the core of the Fourier neural operator (J4-3); for nonlinear or variable-coefficient problems FNO adds pointwise linear terms and nonlinearities between such layers.

Results in the exercise. With 1% noise in the training outputs, the 1089-weight matrix needed many more examples (error 0.04, 0.02, 0.007 for 10, 50, 200 examples) than the 16 multipliers (0.002, 0.001, 0.001). The matrix only transferred to a 129-point grid by interpolating inputs and outputs. Both lost accuracy on rougher sources than they were trained on (0.02 and 0.003 at 200 examples), a reminder that operator models also have a training distribution.

📝 Quick check (Level 3)
0/3 answered
  1. 1. The eigenvalues of −d²/dx² with zero ends for sin(kπx) are…
  2. 2. A learned n × n matrix needs at least…
  3. 3. On rougher sources than in training, both models…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How much more data-efficient and resolution-independent is an operator model than a grid-to-grid map?

History.

  • T. Chen and H. Chen (1995) proved universal approximation for nonlinear operators with neural networks, the basis of DeepONet.
  • L. Lu, P. Jin and G. Karniadakis (2021) introduced DeepONet; Z. Li et al. (2020, 2021) introduced graph and Fourier neural operators.
  • N. Kovachki et al. (2023), “Neural operator: learning maps between function spaces”, set out the general framework and discretisation invariance.
  • Large benchmarks followed: PDEBench (2022), The Well (2024).

Exercise 2. Sources f = Σ c_k sin(kπx) with c_k ~ N(0, k⁻²) (32 modes); exact solutions; training outputs with 1% Gaussian noise; training grid 33 points. Matrix: ridge least squares, applied on other grids by interpolation. Spectral: 16 multipliers by least squares. Median relative L2 error over 200 test sources.

training examples matrix (33 grid / 129 grid / rough) spectral (33 grid / 129 grid / rough)
10 0.04 / 0.04 / 0.07 0.002 / 0.002 / 0.005
50 0.02 / 0.02 / 0.06 0.001 / 0.001 / 0.004
200 0.007 / 0.006 / 0.02 0.001 / 0.001 / 0.003
  • Structure gave data efficiency. Sixteen multipliers learned from ten examples what the matrix could not learn from 200.
  • The spectral model was resolution-free: it computed coefficients on whatever grid it was given; the matrix needed interpolation.
  • Distribution shift hurt both: rougher sources than in training raised errors 1.7–3 times.
  • Seeds 1 and 2: with 10 examples, matrix 0.03 and 0.03, spectral 0.003 and 0.004; with 200, matrix 0.007 and 0.005, spectral 0.0008 and 0.0008.
🐍 Exercise 2 (research): how much more data-efficient and resolution-independent is an operator model than a grid-to-grid map?
Learn the solution operator of −u″ = f from noisy examples with a grid matrix and with spectral multipliers, and test both on new sources, a finer grid and rougher inputs.

Operator learning in practice

  • Weather and climate: FourCastNet uses Fourier neural operators; learned operators emulate expensive model components (J8).
  • Subsurface flow: operators map permeability fields to pressure and saturation for carbon storage and groundwater.
  • Aerodynamics: operators from shape parameters or geometry to surface pressure for rapid design.
  • Plasma and fusion: fast surrogates of transport and equilibrium codes for real-time control.

References

  1. T. Chen and H. Chen (1995). “Universal approximation to nonlinear operators by neural networks with arbitrary activation functions and its application to dynamical systems.” IEEE Transactions on Neural Networks.
  2. L. Lu, P. Jin, G. Pang, Z. Zhang and G. E. Karniadakis (2021). “Learning nonlinear operators via DeepONet.” Nature Machine Intelligence.
  3. Z. Li et al. (2021). “Fourier neural operator for parametric partial differential equations.” ICLR.
  4. N. Kovachki et al. (2023). “Neural operator: learning maps between function spaces.” Journal of Machine Learning Research.
  5. M. Takamoto et al. (2022). “PDEBench: an extensive benchmark for scientific machine learning.” NeurIPS Datasets and Benchmarks.