AI Skill Report Card

Applying Fourier Neural Operators

A90·Sep 15, 2026·Source: Extension-selection
14 / 15
Python
from neuralop.models import FNO model = FNO( n_modes=(16, 16), # per-dimension mode counts, ≤ N/2 (Nyquist) hidden_channels=32, # start small (16-32), scale up if needed in_channels=3, # e.g. input field + 2 coordinate/embedding channels out_channels=1, n_layers=4, # 3-6 is a good starting range factorization=None, # or "tucker" with rank=0.1-0.5 for compression ) # Standard operator-learning loss (resolution-consistent, uses quadrature weights) from neuralop.losses import LpLoss loss_fn = LpLoss(d=2, p=2) loss = loss_fn.rel(model(x), y)

Before committing to a full run: (1) inspect the power spectrum of a few training samples to pick n_modes, (2) run a small "overfitting" study on 20-100 samples for many more epochs to sanity-check architecture and losses, (3) confirm periodicity assumptions (pad or use Fourier continuation if not periodic).

Recommendation
Add a brief troubleshooting section mapping specific error symptoms (e.g., NaN loss, spectral blow-up) to fixes for faster debugging
15 / 15

Progress checklist for a new FNO project:

  • Define the mapping precisely: input function(s)/scalars → output function(s)/scalar(s); confirm the mapping is well-posed (unique output per input)
  • Inspect and preprocess data: check periodicity, normalize, choose a downsampling strategy that preserves spectral content if downsampling is needed
  • Plot power spectra of representative samples to choose n_modes (respect Nyquist: modes ≤ N/2 per dimension), account for anisotropy
  • Decide periodicity handling: zero-padding (cheap, usually fine for data-driven training), mirror-padding, Fourier continuation (FC-Legendre/FC-Gram) for high-precision derivatives, or spectrum-optimization extension for noisy signals
  • Set hidden_channels (start 16-32), n_layers (start 3-6), skip connections, normalization
  • Run small-scale overfitting study (20-100 samples, many epochs) to validate capacity and loss choice before full training
  • Choose data loss (relative Lp, H1/Sobolev, weighted, spectral) aligned with scientific goal
  • Train at full scale with tuned learning rate schedule, batch size, regularization (standard ML practices apply)
  • If super-resolution is a goal: reduce n_modes below N/2 (aliasing from nonlinearities), consider multi-resolution training or iFNO
  • Validate: check power spectra of predictions vs. ground truth, error maps, PDE residuals if applicable
  • If needed, add advanced components: physics-informed loss (PINO), tensor factorization (TFNO), autoregressive rollout (RNO), non-Euclidean domain (SFNO), or geometric encoder-decoder (Geo-FNO/GINO/OTNO) for irregular meshes
Recommendation
Include a minimal end-to-end training loop example showing data loader integration, not just model instantiation and loss computation
18 / 20

Example 1: Choosing n_modes for a 128-resolution 2D field

Input: Training data on a 128×128 grid, power spectrum shows >99% of energy within the lowest 20 modes per dimension, but zero-shot super-resolution to 256×256 is a downstream goal.

Output: Set n_modes=(20, 20) or slightly higher (e.g. 24) — well below Nyquist (64). Because nonlinearities inside FNO blocks generate higher-frequency content that can alias back if modes are set too close to N/2, keep modes conservatively low when super-resolution is required. Verify by checking the spectrum after passing a sample through the nonlinearity at training resolution vs. a finer resolution.

Example 2: Non-periodic 1D signal requiring accurate spectral derivatives (PINO)

Input: A smooth but non-periodic function on [0,1], need second derivatives with high accuracy for a physics loss.

Output: Do not use plain zero-padding (introduces Gibbs oscillations that corrupt derivatives). Use FCLegendre or FCGram from neuralop.layers.fourier_continuation to construct a smooth periodic extension, then apply FourierDiff for spectral differentiation on the extended domain. If the signal is noisy, prefer spectrum-optimization extension (minimizes Sobolev Hs norm) over Fourier continuation, since Fourier continuation amplifies noise in derivatives.

Example 3: Model overfits/underperforms with default hyperparameters

Input: FNO trained with paper-default hyperparameters on a new dataset performs poorly.

Output: Don't assume this is an FNO limitation. Run a small overfitting study on 20-100 samples for 10,000+ epochs. If it fails to fit, increase hidden_channels or n_layers. If it fits well but full training generalizes poorly, check data preprocessing (especially downsampling strategy — stride-based downsampling aliases; prefer spectral or window-based downsampling), tune learning rate schedule and regularization, and verify n_modes doesn't exceed Nyquist.

Recommendation
Consider adding a short comparison table of when to use FNO variants (TFNO, SFNO, Geo-FNO, PINO) to make the decision criteria more scannable
  • Always respect Nyquist: n_modes per dimension must not exceed N/2 for that dimension's resolution.
  • Under-set n_modes for super-resolution use cases: nonlinearities broaden the spectrum; training at N modes with resolution N causes the model to learn aliased behavior that breaks at higher resolution.
  • Use relative losses (LpLoss.rel) by default for scale-invariance across samples; use absolute or H1/Sobolev losses when gradient fidelity matters.
  • FNOs are not restricted to periodic, single-input, or same-resolution problems — use embeddings (sinusoidal for scalars), concatenation for multiple inputs, and resolution-scaling factors for different output resolutions.
  • Prefer Fourier continuation over naive padding when high-precision spectral derivatives are needed (PINO); use spectrum-optimization extension instead if data is noisy.
  • Use small overfitting studies as a fast diagnostic before full-scale training — they reveal capacity issues, bad loss choices, and preprocessing artifacts cheaply.
  • Tune systematically: negative FNO results in the literature are frequently due to under-tuned hyperparameters or non-tuned baselines, not fundamental architecture limits.
  • Inspect power spectra of predictions vs. ground truth as a standard diagnostic, not just scalar error metrics.
  • For compression, use Tensor FNO (factorization="tucker", rank=0.1-0.5) to reduce parameters 5-20× with minimal accuracy loss.
  • For irregular geometries, don't force uniform-grid FNOs onto unstructured meshes; use Geo-FNO, GINO, or OTNO with a geometric encoder-decoder.
  • Setting n_modes too high relative to resolution: injects unresolved high-frequency energy that aliases, especially harmful for zero-shot super-resolution.
  • Assuming FNOs require periodic domains: they don't — use padding or Fourier continuation; padding alone is often sufficient for data-driven (non-physics-informed) training.
  • Using naive stride-based downsampling without a low-pass filter: causes aliasing and corrupts the spectral content the FNO learns from.
  • Applying spectral differentiation/Fourier continuation to noisy data expecting high accuracy: differentiation is ill-conditioned for noise; use spectrum-optimization extension or low-pass filtering instead.
  • Assuming FNOs handle only single function inputs of matching input/output resolution: multiple inputs, scalar parameters (via sinusoidal embeddings), different dimensionalities, and different resolutions are all supported.
  • Reporting results with default/untuned hyperparameters: always tune systematically before concluding a limitation is intrinsic to FNOs.
  • Ignoring the mismatch between training and inference distributions in autoregressive rollouts: compounding errors accumulate; consider pushforward training or RNO for stability.
  • Using separable spectral convolutions when cross-channel mixing is physically important: separable convolutions save parameters but eliminate channel mixing within the spectral layer.
0
Grade AAI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
14/15
Workflow
15/15
Examples
18/20
Completeness
19/20
Format
15/15
Conciseness
14/15