Tapas Tripura

The Neural Combinatorial Wavelet Neural Operator (NCWNO) is a foundation model for scientific computing. A single network learns the solution operators of many PDEs at once, adapts to a new PDE by training only a small gate, and keeps what it learned about the old ones.

At a glance

  • One model, many PDEs. One network is trained on six 1D PDEs and another on six 2D PDEs, with about 1% mean relative error for most of them.
  • New PDEs without forgetting. Learning a new PDE trains only the probability gates, and the predictions on the old PDEs stay exactly the same.
  • Cheaper adaptation. Using the pre-trained model needs more than 50% less data and computational time, and cuts the cost of learning new equations by about 15 times in 1D and 5 times in 2D.
  • Generalizes. Accuracy drops by roughly 2 to 3 points on finer and coarser grids, and by about 2 points on out-of-distribution inputs.
  • Competitive. In the paper’s benchmarks it beats the multiphysics operators ICON and MPP, and the task-specific DeepONet, FNO and WNO.

Motivation

Solving a parametric PDE for many input parameters usually means running an expensive numerical solver again and again. Neural operators remove most of that cost by learning the solution operator itself, the map from input functions to solution functions. But each operator is trained for one physical system. A new physical system means a new model from scratch, with its own training data, manual tuning, memory, computing time, and energy.

Foundation models changed this in language and vision: train once on a broad set of tasks, then adapt to many downstream tasks. Very little of this exists for scientific computing. The NCWNO brings the idea to PDEs with three goals: learn many PDEs in one model, adapt to new PDEs with little data and time, and never forget the old ones.

Diagram: PDEs 0 to n are used to train a foundation model, which is then adapted to PDEs n+1, n+2, n+3 and beyond, to accelerate computational simulation.
A foundation model is trained once on a set of PDEs, then adapted to new PDEs to accelerate computational simulation.

Architecture

The NCWNO builds on the Wavelet Neural Operator (WNO). A neural operator maps the input parameters \(\mathbf a\) to the solution \(\mathbf u\) through a lifting map \(\mathcal P\), a chain of iterative updates, and a projection \(\mathcal Q\). Each update applies a kernel integral operator to the current context \(v_j\):

$$v_{j+1}(\mathbf x)=\Gamma\Big(\big(\mathcal K v_j\big)(\mathbf x)+g\,v_j(\mathbf x)\Big),\qquad \big(\mathcal K v_j\big)(\mathbf x)=\int_\Omega k_\phi(\mathbf x-\xi)\,v_j(\xi)\,d\xi$$

In the WNO, this convolution is done in the wavelet domain, where \(W_\psi\) is the wavelet transform, \(s\) and \(r\) are the scale and translation, and \(\kappa_\phi\) is a learned kernel:

$$\big(\mathcal K_\phi v_j\big)(\mathbf x)=W_\psi^{-1}\Big(\kappa_\phi\cdot\big[W_\psi v_j\big](s,r)\Big)(\mathbf x)$$

The NCWNO replaces that single wavelet integral block with an expert block, which has three parts:

  • Local wavelet experts. Each expert is a wavelet integral block with its own wavelet basis (Daubechies in 1D, biorthogonal in 2D), so each one learns different multiscale features.
  • Expert block. It ensembles the experts channel by channel, using weights from the gate.
  • Probability gate. It takes the PDE label \(\ell\) and the context, and returns the probability of each expert through a softmax. The gate itself uses wavelet integral layers, so it still works on grids it was not trained on.

With \(d_e\) experts, the kernel operator of an expert block becomes a probability-weighted sum:

$$\big(\mathcal K v_j\big)(\mathbf x)=\sum_{e=1}^{d_e}\boldsymbol\beta^{e}_{j}\cdot W_{\psi_e}^{-1}\Big(\kappa^{e}_{\phi}\cdot W_{\psi_e}\big(v_j;s,r\big)\Big)(\mathbf x),\qquad \boldsymbol\beta_j=\operatorname{softmax}\Big(p_\beta\big(\cdot\mid v_0,\ \ell;\ \theta_\beta\big)\Big)$$
Architecture of the NCWNO: a lifting map, a chain of expert blocks with probability gates and local wavelet integral blocks, and a projection to the solution.
The NCWNO. (a) The context function is derived from the input parameters and updated through expert blocks, where the local experts are ensembled with the probabilities from a gate. (b) Inside an expert block, the local wavelet integral blocks (WIB) are ensembled channel by channel.

Training has two stages. First, all expert and gate weights are trained together on \(m\) PDEs, which gives the foundation model. Second, to learn a new PDE, the experts are frozen and only the gate parameters are trained (see continual learning below). An expert block with \(d_e\) experts on a \(d\)-point grid costs \(\mathcal O(d\,d_e)\). The multiphysics models in the paper use four expert blocks, with 10 experts in 1D (41.11 million parameters) and 6 experts in 2D (92.77 million parameters).

Learning many PDEs at once

The first test is whether one network can hold many PDEs. The paper uses twelve benchmark problems: the Allen–Cahn, Nagumo, Burgers’, Heat and Advection equations in 1D and 2D, the 1D Wave equation, and the 2D Navier–Stokes equation. Each PDE has 1,500 random initial fields for training and 100 for testing, on a 256-point grid in 1D and a 64 × 64 grid in 2D. The datasets are very different from one another: cosine similarity, normalized KL divergence and mutual information all show that they share little, which is what makes a single model hard.

Two NCWNOs are trained, one on the six 1D PDEs and one on the six 2D PDEs. The 1D model maps the first ten time steps to the next forty, and the 2D model maps the first ten to the next twenty:

$$\mathcal D_\theta^{\mathcal N_{1:6}}:\ u\big|_{\Omega_{1D}\times[0,10]}^{\{1:6\}}\ \longmapsto\ u\big|_{\Omega_{1D}\times[11,50]}^{\{1:6\}}$$

At inference there is no fine-tuning. The predictions follow the ground truth closely, with a mean relative error of about 1% for most PDEs. The exception is the 2D Allen–Cahn equation at about 4%, which the paper attributes to jumps in the solution field.

Animation comparing ground truth and NCWNO predictions for six 1D PDEs over the prediction time steps.
One NCWNO, six 1D PDEs. Animated predictions against ground truth for the Advection, Nagumo, Allen–Cahn, Burgers’, Heat and Wave equations.
Animation of the initial condition, ground truth and NCWNO prediction for six 2D PDEs.
One NCWNO, six 2D PDEs. The initial condition, the ground truth and the NCWNO prediction for the Advection, Allen–Cahn, Burgers’, Heat, Nagumo and Navier–Stokes equations.

The paper compares the NCWNO with two transformer-based multiphysics operators: ICON, which handles 1D problems, and MPP, which handles 2D problems. Relative L2 error in percent, mean ± standard deviation over 100 test samples:

1D PDEsSizeAllen–CahnNagumoBurgers’HeatWaveAdvection
ICON31.56M7.86 ± 0.208.24 ± 0.219.09 ± 0.245.91 ± 0.229.93 ± 0.254.61 ± 0.17
NCWNO41.11M1.12 ± 1.011.03 ± 1.640.08 ± 0.031.23 ± 0.771.91 ± 1.530.52 ± 0.32
2D PDEsSizeNavier–StokesAllen–CahnBurgers’AdvectionNagumoHeat
MPP-AViT-B116M2.85 ± 1.178.84 ± 4.515.09 ± 2.724.63 ± 2.477.01 ± 4.373.23 ± 1.42
MPP-AViT-L409M4.98 ± 0.645.01 ± 0.185.01 ± 0.455.01 ± 0.594.98 ± 0.515.01 ± 0.56
NCWNO92.77M1.64 ± 0.884.10 ± 1.591.45 ± 0.631.02 ± 0.330.58 ± 0.330.75 ± 0.32

The 1D NCWNO is about 1.3 times the size of ICON. The 2D NCWNO is smaller than both MPP models.

Other resolutions, with no retraining

Neural operators should not depend on the grid, so the pre-trained models are tested, without fine-tuning, on grids different from the training grid. Training used 256 points in 1D and 64 × 64 in 2D. Testing used 512 and 128 points in 1D, and 128 × 128 and 32 × 32 in 2D.

The mean accuracy, defined as \(1-\lVert u-u^{*}\rVert/\lVert u\rVert\), is 94.56 ± 1.40% on the finer 1D grid and 96.29 ± 0.83% on the coarser one. In 2D it is 96.29 ± 1.75% and 96.41 ± 2.08%. That is a drop of about 1.5 to 3.2 percentage points compared with the training resolution.

Accuracy against testing time step for zero-shot predictions on finer and coarser grids, for 1D and 2D PDEs.
Zero-shot accuracy on grids the model was not trained on. (a) 1D on 512 points, (c) 1D on 128 points, (b) 2D on 128 × 128, (d) 2D on 32 × 32. Shaded regions show 95% confidence intervals.

Unseen inputs

The models are also tested on initial conditions from distributions they never saw. In the training data, the random initial fields come from a Gaussian random field with a fixed variance and length scale. For the out-of-distribution test, those two parameters are themselves drawn at random:

$$K(\mathbf x,\mathbf x')=\sigma^{2}\exp\!\Big(-\frac{\lVert\mathbf x-\mathbf x'\rVert^{2}}{2\ell^{2}}\Big),\qquad \sigma\sim\mathrm{Unif}(\cdot),\quad \ell\sim\mathrm{Unif}(\cdot)$$

For the 1D Burgers’ equation the random parameter is drawn from a wider range, and for the 2D Navier–Stokes equation the initial vorticity comes from a different Gaussian random field. Again there is no fine-tuning. On average, accuracy drops by about 2% in 1D and 1.75% in 2D.

Predictions of the NCWNO for 1D PDEs with out-of-distribution initial conditions, compared with ground truth.
Out-of-distribution inputs, 1D. Ground truth against NCWNO for the six 1D PDEs, with snapshots at four time steps.
Predictions of the NCWNO for 2D PDEs with out-of-distribution initial conditions at three time steps.
Out-of-distribution inputs, 2D. Ground truth against NCWNO at three time steps for each 2D PDE.
Prediction accuracy (%)AdvectionNagumoAllen–CahnBurgers’HeatWaveNavier–Stokes
1D98.63 ± 0.3595.72 ± 1.5898.83 ± 0.1997.55 ± 0.3496.10 ± 0.6496.04 ± 1.84–
2D95.71 ± 1.5495.49 ± 2.3795.44 ± 1.4295.83 ± 1.6798.30 ± 0.66–99.19 ± 0.12
Accuracy against testing time step for out-of-distribution parameters, for 1D and 2D PDEs.
Prediction accuracy over the testing time steps for out-of-distribution parameters. (a) 1D PDEs, (b) 2D PDEs. Shaded regions show 95% confidence intervals.

Continual learning without forgetting

This is the main point of the design. After pre-training on \(m\) PDEs, a new PDE \(\mathcal N_\tau\) is learned by freezing every expert and training only the gate parameters \(\theta_\beta\) on the new data:

$$\theta_\beta\leftarrow\theta_\beta-\alpha\,\nabla_{\theta_\beta}\mathcal L\big(u^{\tau},\ \mathcal Q(v_h^{\tau})\big),\qquad \mathcal D_\theta^{\mathcal N_{1:m}\cup\mathcal N_\tau}:\ \{\mathcal A_{1:m}\cup\mathcal A_\tau\}\mapsto\{\mathcal U_{1:m}\cup\mathcal U_\tau\}$$

The tuned gate parameters are small. They are stored in an ordered dictionary, so the gate for any earlier task can be loaded again to predict that task without fine-tuning. Large expert models never need to be saved again, and the old PDEs are not forgotten.

Diagram of pre-training an NCWNO on several PDEs and then fine-tuning the context gate for new tasks sequentially.
Continual learning. The NCWNO is pre-trained on a set of PDEs, then only the context gate is fine-tuned, one new task at a time.

1D. The foundation model is pre-trained on the Allen–Cahn, Nagumo and Wave equations, then adapted in turn to Burgers’, Advection and Heat. Before adaptation, the model predicts the unseen PDEs poorly, which is expected because the datasets are so different. After adaptation, the accuracy on the new PDEs rises to nearly 97–100%, and the accuracy on the pre-trained PDEs does not change.

Predictive accuracy against prediction time step for each 1D PDE after pre-training and after each fine-tuning stage.
Continual learning on 1D PDEs. Pre-trained on Allen–Cahn, Nagumo and Wave, then fine-tuned in turn on Burgers’, Advection and Heat. Each row tests one PDE; each column is the model after one stage.

2D. The model is pre-trained on Navier–Stokes, Allen–Cahn and Burgers’, then adapted to Advection, Nagumo and Heat. Accuracy on the new PDEs improves to nearly 94–100%, and the accuracy on the pre-trained PDEs stays exactly the same as before.

Predictive accuracy against prediction time step for each 2D PDE after pre-training and after each fine-tuning stage.
Continual learning on 2D PDEs. Pre-trained on Navier–Stokes, Allen–Cahn and Burgers’, then fine-tuned in turn on Advection, Nagumo and Heat. Each row tests one PDE; each column is the model after one stage.

Adaptation is also cheap. Pre-training used 1,500 samples per PDE and 200 epochs; each new PDE needed only 500 samples and 100 epochs. The cost of learning new equations falls by about 15 times in 1D and 5 times in 2D.

Comparisons

The NCWNO was also trained on single PDEs and compared with task-specific operators on eight benchmark problems. Relative L2 error in percent, mean ± standard deviation over 100 test samples:

ProblemDeepONetFNOWNONCWNO
1D Burgers’40.58 ± 35.131.31 ± 1.771.87 ± 0.900.23 ± 0.22
1D Advection0.28 ± 0.200.03 ± 0.020.04 ± 0.040.01 ± 0.01
1D Allen–Cahn6.17 ± 1.421.10 ± 4.907.87 ± 31.880.22 ± 0.03
1D Kuramoto–Sivashinsky154.31 ± 7.4916.32 ± 23.7774.84 ± 55.916.71 ± 2.35
2D Darcy (square)6.06 ± 2.451.01 ± 0.401.42 ± 0.520.40 ± 0.18
2D Darcy (triangle)0.94 ± 0.380.60 ± 0.231.10 ± 0.400.25 ± 0.09
2D Navier–Stokes5.76 ± 4.930.48 ± 0.331.38 ± 0.840.22 ± 0.03
2D Nagumo2.85 ± 0.880.96 ± 0.070.61 ± 0.220.20 ± 2.35

The number of local experts is a trade-off. More experts make the model remember old tasks better, but cost more time. In 1D, going from 4 to 10 experts (18.77M to 41.11M parameters) lowers the error on Advection from 11.81% to 1.12%, while an epoch grows from about 396 s to 1,038 s.

Limits and outlook

  • The NCWNO assumes the task identity, the PDE label, is known in advance. A future version could discover task identities on its own.
  • Pre-training is supervised and needs labelled data. The model is built to accelerate simulations, not for image classification, model-order reduction, reinforcement learning, or generative modeling.
  • Natural extensions are a multiscale NCWNO for very large domains, and a physics-informed NCWNO that biases each local expert toward the physics of one aspect of a multiphysics process.