Learned PDE Solvers: Von Neumann Stability Analysis for Cell-Average Neural Networks

by Akshat Valse, Mengyuan Yang, & Jue Yan

Department of Mathematics, Iowa State University

We study the stability of cell-average neural network solvers for PDEs, which advance a solution one step at a time with a learned flux. The same network is evaluated at both faces of every cell, so these solvers conserve mass exactly for any weights, but nothing in the construction guarantees stability: networks differing only in their random seed, with training losses you cannot tell apart, can behave completely differently over long rollouts. We are adapting von Neumann stability analysis to them, toward stability conditions on the trained weights.

Write-up   

Manuscript in Preparation

Fifteen tall rounded columns on a purple background, their heights rising and falling in one smooth, symmetric mound. Each glows coral low down and warms to pale apricot at its tip.

Introduction

A neural network can be trained to advance a PDE solution one step at a time, and it can be built so that it never creates or destroys mass, whatever its weights are. What that construction does not give you is stability, and telling a stable network from an unstable one is hard for two reasons:

  1. The training objective: Training minimizes a one-step prediction error against a short reference trajectory, and nothing in that objective says what happens when the scheme is iterated for thousands of steps on states the network never saw. Networks trained identically up to the random seed, with training losses you cannot tell apart, can behave completely differently under long rollouts: some track the reference solution, others develop oscillations that grow until the output is worthless (Figure 1).

  2. The usual checks: Since the losses are indistinguishable, the loss cannot tell you which network you have. A short validation rollout is not much better, because the instability may take far longer to show itself than anyone is willing to simulate.

So you are left choosing among minima with no principled basis for the choice. It is the autoregressive-surrogate failure mode, in the simplest setting where the questions of classical numerical analysis can be put to it. The question we ask is:

Can you tell, from a trained network alone and before committing to an expensive simulation, whether its rollout will hold together?

Neural PDE solvers are usually assessed by running them: train, roll out, measure the error. That is expensive, and it only certifies the trajectories you actually ran. Anything you can check on the weights themselves is cheap by comparison and does not depend on having picked the right test case. We are adapting von Neumann stability analysis, the classical Fourier-mode test for finite-difference schemes, to these trained solvers, toward stability conditions on the trained weights.

This page sets out the problem and what we are doing about it. The results are held back until the paper, in preparation with Prof. Jue Yan and Mengyuan Yang, is submitted.

seed A seed B training one-step error on a short reference trajectory network A network B losses indistinguishable under long rollouts rollout tracks the reference oscillations grow until the output is worthless Can you tell which, from the trained network alone, before committing to the simulation?

Figure 1. The problem, as a schematic rather than data. Networks trained identically up to the random seed reach training losses you cannot tell apart, yet can behave completely differently under long rollouts. The question at the bottom paraphrases the one we ask.

Cell-Average Neural Network Solvers

A conservative finite-volume scheme advances cell averages by differencing a numerical flux across cell interfaces. In a cell-average-based neural network solver that flux is learned rather than designed: a small network is trained to reproduce the time-averaged flux at an interface. One step of the solver reads

vˉj n+1=vˉj n−ΔtΔx[N(Vj+1/2;Θ)−N(Vj−1/2;Θ)],(1)\bar v_j^{\,n+1} = \bar v_j^{\,n} - \tfrac{\Delta t}{\Delta x}\big[\mathcal{N}(V_{j+1/2};\Theta) - \mathcal{N}(V_{j-1/2};\Theta)\big], \tag{1}

where vˉj n\bar v_j^{\,n} is the average of the solution over cell jj at time step nn, Δt\Delta t and Δx\Delta x are the time step and the cell width, N(⋅ ;Θ)\mathcal N(\cdot\,;\Theta) is the flux network with weights Θ\Theta, and Vj±1/2V_{j\pm1/2} is its input at the face xj±1/2x_{j\pm1/2}. The public write-up does not say which cell averages make up Vj+1/2V_{j+1/2}, so Figures 2 and 3 leave the network's input unspecified, and the toy network in Figure 4 uses a placeholder input.

Figure 2 puts the learned flux in the slot that a designed flux would fill. The designed flux on the right is one textbook example, first-order upwind for linear advection, shown only for comparison: it does not stand for the project's equation or reference scheme, neither of which is public.

Learned flux

one network, the same weights Θ, at every face v̄j−1n cell j−1 v̄jn cell j v̄j+1n cell j+1 xj−3/2 xj−1/2 xj+1/2 xj+3/2 𝒩(Vj−1/2; Θ) − + 𝒩(Vj+1/2; Θ) − +

Designed flux (textbook, for comparison)

a formula: first-order upwind for ut + a ux = 0, a > 0 v̄j−1n cell j−1 v̄jn cell j v̄j+1n cell j+1 xj−3/2 xj−1/2 xj+1/2 xj+3/2 a v̄j−1 − + a v̄j − +

Figure 2. Schematics; bar heights are illustrative. Left: in a cell-average neural network solver, one network with the same weights Θ\Theta is evaluated at every face. Right, for comparison only: a designed flux, where the face value is a formula, here textbook first-order upwind for ut+a ux=0u_t + a\,u_x = 0 with a>0a > 0. Either way, each face value is subtracted from the cell on its left and added to the cell on its right: what leaves cell jj enters cell j+1j+1.

Conservation, Whatever the Weights

Sum (1) over the cells j=1,…,Mj = 1, \dots, M of the grid:

∑j=1Mvˉj n+1=∑j=1Mvˉj n−ΔtΔx[N(VM+1/2;Θ)−N(V1/2;Θ)].(2)\sum_{j=1}^{M} \bar v_j^{\,n+1} = \sum_{j=1}^{M} \bar v_j^{\,n} - \tfrac{\Delta t}{\Delta x}\big[\mathcal N(V_{M+1/2};\Theta) - \mathcal N(V_{1/2};\Theta)\big]. \tag{2}

Every interior face value appears twice, once with each sign, because what leaves cell jj through xj+1/2x_{j+1/2} is what enters cell j+1j+1 (Figure 3). On a periodic grid VM+1/2=V1/2V_{M+1/2} = V_{1/2}, so the bracket vanishes for every Θ\Theta: the update telescopes, and mass is conserved exactly, whatever the weights turn out to be. We assume a periodic grid here only for the illustration; the write-up does not say which boundary conditions the project uses.

one network, the same weights Θ, at every face v̄1n cell 1 v̄2n cell 2 v̄3n cell 3 v̄4n cell 4 v̄5n cell 5 𝒩1/2 𝒩3/2 𝒩5/2 𝒩7/2 𝒩9/2 𝒩11/2 change of each cell average over one step, in units of Δt/Δx −𝒩3/2 +𝒩3/2 = 0 −𝒩5/2 +𝒩5/2 = 0 −𝒩7/2 +𝒩7/2 = 0 −𝒩9/2 +𝒩9/2 = 0 +𝒩1/2 −𝒩11/2 periodic grid: x1/2 and x11/2 are the same face, so the two end terms cancel too Summed over all cells, every term cancels: the total mass does not change, whatever Θ is.

Figure 3. Why conservation comes for free, drawn for a periodic row of five cells with illustrative bar heights; Nj+1/2\mathcal N_{j+1/2} is short for N(Vj+1/2;Θ)\mathcal N(V_{j+1/2};\Theta). The network is evaluated once per face, and that one value enters the updates of the two cells that share the face, with opposite signs. Under each face the two terms cancel, and on a periodic grid the two end terms belong to the same face. Nothing here depends on training.

The argument never uses the values of the weights, so it holds just as well for a network with random, untrained weights. Figure 4 checks this live. In floating point the identity can only hold up to rounding, so the check computes the drift from an exact sum of the cell averages, rounded once at the end, and compares it with a rigorous bound on the rounding committed by the updates so far.

Conservation for any weights (random weights, not a trained solver)

exact reference: Σ v̄ⁿ − Σ v̄⁰ = 0 (sum over all cells) for every flux and every Θ, identity (2)
step 0 of 500
Σ v̄ⁿ (mass/Δx) –
drift 0 (exact 0)
|drift| / (M·max|v̄ⁿ|) 0
rounding bound 0
|drift| ≤ bound: yes
max |v̄ⁿ| –

Figure 4. A live check of identity (2) on a periodic grid, starting from a square pulse and a smooth bump on a constant background, with λ=Δt/Δx\lambda = \Delta t/\Delta x. The face flux is either a designed one, the textbook upwind flux a vˉja\,\bar v_j at xj+1/2x_{j+1/2} with a=1a = 1, or a tanh network of width 8 whose weights are random and untrained, drawn from the seed shown. In exact arithmetic the drift is zero for either flux and every seed; whatever the profile does, the mass stays put up to rounding. The network is an illustration of "whatever the weights", not a trained solver: its architecture, activation and two-cell input are placeholders chosen for this illustration, not a description of the project's networks, and the rollout says nothing about which trained networks are stable.

Conservation is guaranteed by construction. Stability is not.

QuestionAnswerWhy
Is mass conserved?Yes, exactly, for any weightsThe update telescopes, identity (2)
Are long rollouts stable?Not guaranteedStability is not built into the construction
Does the training loss tell stable from unstable networks?NoThe losses are indistinguishable
Is a short validation rollout a better test?Not much betterThe instability may take far longer to show itself than anyone is willing to simulate

Adapting von Neumann Analysis

A trained solver is still a numerical scheme. Its weights are frozen once training ends, so what you have in front of you is a fixed, deterministic update rule that happens to have been fitted rather than derived, and numerical analysis has a long history of asking exactly this question about update rules of that kind. Whether that history carries over to a learned flux, and what it says when it does, is what the project is about.

We are adapting von Neumann stability analysis to cell-average neural network solvers of the form (1): deriving the linearized amplification factor of the learned time-stepping scheme and characterizing how perturbations propagate through it, toward stability conditions on the trained weights analogous to those of classical finite-difference methods. I reimplemented the group's solver in Python to enable systematic stability experiments across schemes and step sizes.

The Textbook Case, for Reference

In its textbook form, von Neumann analysis applies to a linear scheme with constant coefficients on a periodic grid. One step carries a single Fourier mode vˉj n=v^ neijθ\bar v_j^{\,n} = \hat v^{\,n} e^{\mathrm{i} j\theta}, with i=−1\mathrm{i} = \sqrt{-1} and θ∈[−π,π]\theta \in [-\pi, \pi], to a multiple of itself, v^ n+1=G(θ) v^ n\hat v^{\,n+1} = G(\theta)\,\hat v^{\,n}, and the scheme is stable in this sense when ∣G(θ)∣≤1|G(\theta)| \le 1 for every θ\theta (more generally, ∣G(θ)∣≤1+CΔt|G(\theta)| \le 1 + C\Delta t for a constant CC). For the designed flux of Figure 2, first-order upwind with ν=a Δt/Δx\nu = a\,\Delta t/\Delta x,

G(θ)=1−ν(1−e−iθ),∣G(θ)∣2=1−2ν(1−ν)(1−cos⁡θ).(3)G(\theta) = 1 - \nu\big(1 - e^{-\mathrm{i}\theta}\big), \qquad |G(\theta)|^2 = 1 - 2\nu(1-\nu)(1-\cos\theta). \tag{3}

so ∣G(θ)∣≤1|G(\theta)| \le 1 for every θ\theta exactly when 0≤ν≤10 \le \nu \le 1. This is the textbook case, shown for comparison only. It is not the project's scheme or result, and this page does not say how the analysis carries over to a learned flux.

Conclusion

We are asking whether you can tell, from a trained cell-average neural network solver alone and before an expensive simulation, whether its rollout will hold together. Conservation comes with the construction, for any weights; stability does not, and neither the training loss nor a short validation rollout settles it. We are adapting von Neumann stability analysis to the question.

Bears on: learned operators · neural surrogates · rollout stability.

Status

The code and the results are in a private repository, pending submission; the problem statement on this page is also on GitHub.

ItemStatus
ProjectOngoing, May 2026 – present
PaperStability Certificates for Cell-Average-Based Neural Network Solvers: von Neumann Analysis of Trained Flux Networks (working title). In preparation, with Prof. Jue Yan and Mengyuan Yang (Iowa State, Mathematics)
AdvisorProf. Jue Yan, Department of Mathematics, Iowa State University
FundingNSF D4 NRT
What we are doingAdapting von Neumann stability analysis to trained cell-average solvers, toward stability conditions on the weights
ResultsHeld back pending submission
CodePrivate repository, pending submission

Problem write-up


Rare Events    All research    Early-Feedback Calibration