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

Fourier neural operators

A Fourier neural operator (FNO) builds each layer from a pointwise linear map plus a convolution done in Fourier space: transform, multiply the lowest modes by learned weights, drop the rest, transform back, then apply a nonlinearity. The weights live on modes, not grid points, so a trained FNO runs on any resolution. This page learns the viscous Burgers operator with linear spectral multipliers and with a nonlinear one-layer Fourier model, and measures the effect of nonlinearity, mode truncation and changing the grid.

Level 0: Foundation

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

Convolutions done with the Fourier transform

A Fourier neural operator looks at a function the way a sound engineer looks at a recording: as a mix of waves of different frequencies. Each layer turns up or down the slow waves using learned settings, throws away the fast ones, turns the result back into a function and bends it with a simple nonlinearity. Because the settings belong to frequencies and not to pixels, the same trained model can be applied to coarse or fine grids.

Neural operator lab
A Fourier layer keeping the first 8 sine modes of f (with the exact multipliers 1/(kπ)²): median error 0.33%. Smooth sources need only a few modes.
Why engineers care

FourCastNet, one of the first machine-learning weather models to forecast at global scale, was built from adaptive Fourier neural operator layers.

📝 Quick check (Level 0)
0/3 answered
  1. 1. An FNO layer multiplies…
  2. 2. High-frequency modes in an FNO layer are…
  3. 3. A trained FNO can be applied…

Level 1: Beginner

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

By hand

  • Layer: v_(l+1)(x) = σ(W v_l(x) + ℱ⁻¹R_k · ℱ[v_l]_k + b), where ℱ is the Fourier transform, R_k is a learned complex matrix (channels × channels) for each kept mode k ≤ k_max, and W is a pointwise matrix (Li et al., 2021).
  • Architecture: lift the input to c channels pointwise, apply about 4 Fourier layers, project back pointwise to the output.
  • Mode truncation: only k_max modes per dimension carry weights; the rest of the spectrum is set to zero in the convolution branch, while W passes high frequencies pointwise.
  • Cost: one FFT and one inverse FFT per layer, O(n log n) for n grid points; parameters per layer 2c²k_max + c² + c in 1-D, independent of n.
  • Resolution: trained on one grid, applied on another by computing the FFT of the new samples; Li et al. called this zero-shot super-resolution.
  • Limits: the FFT needs a regular grid and assumes periodicity (padding helps for other boundary conditions); geometry-aware variants (Geo-FNO) and graph operators (J4-4) handle irregular domains.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Parameters of a Fourier layer depend on…
  2. 2. The cost of a Fourier layer on n points scales as…
  3. 3. The pointwise matrix W in an FNO layer…

Level 2: Intermediate

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

Burgers data and spectral operations

Exercise 1.

  • Periodic random inputs with 16 Fourier modes.
  • A pseudo-spectral Burgers solver (u_t + u u_x = ν u_xx, ν = 0.01, T = 0.5) checked against heat-equation decay for tiny inputs, conservation of the mean and agreement between 64 and 128 points.
  • Fourier multipliers: identity, derivative 2πik and low-pass truncation.

Practice.

  • Pick k_max from the data: look at the spectrum of the outputs; modes with negligible energy need no weights.
  • Pad non-periodic domains before the FFT, or use a variant built for the geometry.
  • Train on coarse data, check on fine data: resolution transfer is the property to verify, not to assume.
  • Use relative L2 loss and normalise inputs; FNOs are usually trained with Adam and a step or cosine learning-rate schedule.
  • Tools: neuraloperator (FNO, TFNO, SFNO), NVIDIA PhysicsNeMo, and PDEBench data.
import numpy as np

# one Fourier layer with fixed random channels; only the linear readout w is trained
def fourier_channels(U, H):                       # H: (channels, kmax) complex multipliers
    Uh = np.fft.rfft(U, axis=1); n = U.shape[1]; out = np.zeros((len(U), len(H), n // 2 + 1), complex)
    out[:, :, :H.shape[1]] = Uh[:, None, :H.shape[1]] * H[None]
    return np.fft.irfft(out, n, axis=2)

Phi = np.tanh(a[None, :, None] * U[:, None, :] + fourier_channels(U, H) + c[None, :, None])
A = Phi.transpose(0, 2, 1).reshape(-1, Phi.shape[1])          # one row per (input, grid point)
w = np.linalg.lstsq(A, S.reshape(-1), rcond=None)[0]           # works for any grid size n
🐍 Exercise 1: Burgers data and Fourier multipliers
Generate periodic random inputs, solve viscous Burgers pseudo-spectrally, check the solver, and apply Fourier multipliers for identity, differentiation and truncation.
📝 Quick check (Level 2)
0/3 answered
  1. 1. A Python library with FNO implementations:
  2. 2. For a non-periodic domain, before the FFT one usually…
  3. 3. k_max is best chosen by looking at…

Level 3: Advanced

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

Theory

Why the Fourier domain. A translation-invariant integral operator ∫ κ(x − y) v(y) dy is a convolution, and the Fourier transform turns it into a product: mode k is multiplied by κ̂_k. Learning κ̂ on the first k_max modes gives a global kernel at the cost of two FFTs. Linear, constant-coefficient PDE solution operators are exactly of this form; for the heat equation the multiplier is exp(−ν(2πk)²T).

Why nonlinearity. Burgers’ equation has the term u u_x, which moves energy between modes; no set of per-mode multipliers can reproduce it. Stacking Fourier layers with pointwise nonlinearities gives products of modes and lets the model represent such couplings.

Results in the exercise. The model here is deliberately small: one Fourier layer with 150 fixed random channels and a trained linear readout, compared with per-mode multipliers alone. With modes 0–7, the multipliers reached 0.2 and the nonlinear layer 0.03. With only modes 0–1, both were limited (0.4 and 0.2). Trained on 64 points and applied to inputs sampled on 256 points, every error stayed the same to one significant figure, because all weights belong to modes and the outputs have negligible energy above mode 7.

📝 Quick check (Level 3)
0/3 answered
  1. 1. A convolution becomes in Fourier space…
  2. 2. Per-mode multipliers cannot represent Burgers because…
  3. 3. Errors on 256 points matched those on 64 points because…

Level 4: Expert

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

What does a Fourier layer need to learn a nonlinear PDE operator, and does it really transfer across grids?

History.

  • Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart and A. Anandkumar (2021) introduced the Fourier neural operator and showed zero-shot super-resolution on Burgers, Darcy and Navier–Stokes.
  • J. Guibas et al. (2022) introduced adaptive Fourier neural operators, used in FourCastNet (Pathak et al., 2022).
  • Variants followed: Geo-FNO for irregular geometry, U-NO, factorised FNO, and spherical FNO (Bonev et al., 2023) for the sphere.

Exercise 2. Viscous Burgers on [0, 1) with ν = 0.01, map u(·, 0) ↦ u(·, 0.5). 300 training inputs on 64 points, 100 test inputs on 64 points and 100 on 256 points. Linear: per-mode complex multipliers on the kept modes. Nonlinear: tanh of 150 random Fourier channels plus the linear part, readout by ridge least squares. Median relative L2 error.

kept modes linear (64 / 256 points) nonlinear (64 / 256 points)
0–1 0.4 / 0.3 0.2 / 0.2
0–3 0.2 / 0.2 0.03 / 0.03
0–7 0.2 / 0.2 0.03 / 0.03
  • Nonlinearity mattered most: about seven times lower error than per-mode multipliers.
  • A few modes were enough because viscosity damps high modes; modes 0–1 were too few.
  • Resolution transfer held: the 256-point errors matched the 64-point errors.
  • Seeds 1 and 2: the same pattern; the nonlinear model gave 0.03–0.04 with modes 0–3 and 0–7, and the linear model 0.3 with modes 0–1.
🐍 Exercise 2 (research): what does a Fourier layer need to learn a nonlinear PDE operator, and does it really transfer across grids?
Learn the viscous Burgers operator with Fourier multipliers and with a nonlinear one-layer Fourier model, vary the number of kept modes, and test on a finer grid.

Fourier neural operators in practice

  • Weather: FourCastNet used adaptive Fourier layers; spherical FNOs handle the globe without polar artefacts (J8-2).
  • Turbulence and fluids: surrogates for Navier–Stokes and Kolmogorov flow, often trained on coarse data.
  • Subsurface and carbon storage: U-FNO models for multiphase flow in heterogeneous rock.
  • Plasma and fusion: FNO surrogates for magnetohydrodynamic simulations.

References

  1. Z. Li, N. Kovachki, K. Azizzadenesheli, B. Liu, K. Bhattacharya, A. Stuart and A. Anandkumar (2021). “Fourier neural operator for parametric partial differential equations.” ICLR.
  2. J. Guibas, M. Mardani, Z. Li, A. Tao, A. Anandkumar and B. Catanzaro (2022). “Adaptive Fourier neural operators: efficient token mixers for transformers.” ICLR.
  3. J. Pathak et al. (2022). “FourCastNet: a global data-driven high-resolution weather model using adaptive Fourier neural operators.” arXiv:2202.11214.
  4. B. Bonev et al. (2023). “Spherical Fourier neural operators: learning stable dynamics on the sphere.” ICML.
  5. N. Kovachki, S. Lanthaler and S. Mishra (2021). “On universal approximation and error bounds for Fourier neural operators.” Journal of Machine Learning Research.