Skip to main content
Back

Sandia's NN-OpInf Beats Polynomial Simulation Models With Structure-Preserving Neural Networks

Sandia researchers replace polynomial approximations in reduced-order modeling with composable, structure-preserving neural networks that handle non-polynomial physics

Pro

Paper, Full Access
  • NN-OpInf replaces polynomial approximations in non-intrusive reduced-order modeling with composable, structure-preserving neural network operators.
  • The framework decomposes the learned dynamics into a sum of structured blocks (skew-symmetric, SPSD, gradient-preserving) that each enforce distinct physical invariants by construction.
  • On non-polynomial benchmarks (CDR system, nonlinear heat conduction, hyper-elastic torsion), NN-OpInf is 5-10× more accurate than polynomial OpInf and stabilizes where vanilla neural-network ROMs go unstable.
  • Online inference cost is O(K³), comparable to quadratic P-OpInf; the main cost increase is in offline training, which requires iterative gradient descent instead of a one-shot least-squares solve.
  • The paper provides the first systematic comparison between neural-network-based and polynomial-based operator inference across multiple problem classes.
  • An open-source PyTorch package is available with a modular API for mixing heterogeneous operator blocks in a single ROM.

Running a high-fidelity simulation of a combustion flame, a twisting beam, or a reacting fluid is expensive. Reduced-order modeling (ROM) is the standard engineering answer: compress the simulation into a tiny latent space and learn the dynamics there. The dominant non-intrusive approach, Polynomial Operator Inference (P-OpInf), works by assuming the dynamics in that latent space can be written as a polynomial, then fitting the polynomial coefficients to snapshot data from the full simulation. No access to the simulator's internals is needed. But the polynomial assumption is exactly that: an assumption, and one that breaks down for many real systems.

Researchers at Sandia National Laboratories have now published NN-OpInf, a framework that replaces the polynomial ansatz with composable, structure-preserving neural networks while keeping everything else about the non-intrusive workflow intact. The result is a drop-in upgrade for P-OpInf that handles non-polynomial nonlinearities, preserves physical invariants by construction, and ships with an open-source Python package.

Why polynomials aren't enough

P-OpInf has a clean story: many physics models (shallow water equations, linear elasticity, Euler equations) are naturally polynomial in their state variables, so fitting a polynomial in the latent space is principled and the resulting least-squares problem is convex, meaning it has a unique, globally optimal solution. Non-intrusive ROMs construct models using snapshot data alone, i.e., instantaneous samples of representative full-order model solutions at various parameter values. But many systems of practical interest do not admit a polynomial model form. Common examples include finite deformation solid mechanics, the Reynolds-averaged Navier-Stokes equations, and fluid flow with reacting gases.

When the physics isn't polynomial, practitioners have two options: use a "lifting" transformation to try to make it polynomial (which doesn't always exist), or switch to a neural-network surrogate. Prior neural-network ROM approaches existed but suffered from a critical flaw: these approaches did not embed any physical structure within the ROM, leading to black-box models that were unstable, hard to train, and prone to accuracy stagnation as the basis dimension grew.

The composable operator idea

NN-OpInf's central insight is that physical systems are rarely monolithic. A diffusion-convection-reaction PDE has a diffusion term that is symmetric positive definite, a convection term that is skew-symmetric (energy-conserving), and a forcing term. Rather than throwing a single black-box network at the whole right-hand side, NN-OpInf decomposes it into a sum of structured operator blocks:

  • Standard (vector) operator: a fully connected network mapping reduced state to reduced velocity, the most flexible option.
  • SPSD operator: a Cholesky-inspired product of lower-triangular matrix networks, guaranteeing symmetric positive semi-definiteness and dissipative dynamics.
  • Skew-symmetric operator: enforces energy conservation by construction, ideal for advection-dominated problems.
  • SPSD Potential operator: computes the gradient of a learned scalar potential, preserving Lagrangian structure for mechanical systems.
  • Vector offset: a constant or parameter-dependent forcing term.

The modular structure for the NN-OpInf ROM is motivated by the observation that many discretizations of physical systems result in right-hand side operators that are comprised of a summation of different terms, e.g., a diffusion term, an advection term, and a body forcing term. Furthermore, while the entire right-hand side dynamics operator often does not have any noteworthy algebraic structure, its constituent parts do.

Each block can take different inputs (state only, parameters only, or both), use a different architecture, and enforce its own algebraic structure. At inference time, their outputs are summed to produce the reduced velocity. A short usage example using the open-source NN-OpInf package:

import nnopinf
import nnopinf.operators as operators
import nnopinf.models as models
import nnopinf.training as training
x_var = nnopinf.Variable(size=rom_dim, name="x", normalization_strategy="MaxAbs")
mu_var = nnopinf.Variable(size=n_params, name="mu", normalization_strategy="MaxAbs")
y_var = nnopinf.Variable(size=rom_dim, name="y", normalization_strategy="MaxAbs")
spd_op = operators.SpdOperator(
    acts_on=x_var,
    depends_on=(x_var, mu_var),
    n_hidden_layers=2,
    n_neurons_per_layer=64,
    positive=True,
)
forcing_op = operators.VectorOffsetOperator(n_outputs=rom_dim)
model = models.Model([spd_op, forcing_op])
settings = training.get_default_settings()
training.train(model, variables=[x_var, mu_var], y=y_var, training_settings=settings)

How it works, step by step

  1. Collect snapshots. Run the full-order simulator at a set of parameter values and time steps. No access to internal matrices is needed.
  2. Build a reduced basis. Apply Proper Orthogonal Decomposition (POD) to the snapshot matrix. POD finds the low-dimensional linear subspace that best approximates the data in a least-squares sense.
  3. Project snapshots. Map the high-dimensional snapshots and their time derivatives into the reduced space.
  4. Design the operator composition. Choose which structured operator blocks to include based on known physics (e.g., add a skew-symmetric block if the system conserves energy).
  5. Train. Minimize a regression loss between the sum of operator outputs and the projected time derivatives. Training uses a hybrid L-BFGS + Adam strategy: the approach interleaves L-BFGS steps with steps of ADAM. The motivation behind this alternating strategy is to use L-BFGS to quickly reach a local minimum, followed by ADAM to escape this minimum and further drive down the loss.
  6. Deploy. At query time, integrate the learned reduced ODE with a standard time-stepper. The full-order simulator is never called again.

The cost tradeoff

The paper provides a detailed FLOP analysis. Online (inference-time) cost is comparable to quadratic P-OpInf: structured NN-OpInf operators scale as O(K³) in the reduced dimension K, the same as quadratic polynomial models. The pain is in training. NN-OpInf incurs orders of magnitude higher cost than P-OpInf for small basis dimensions. This increase in cost highlights one of the main tradeoffs of NN-OpInf: a potential increase in accuracy at the expense of an oftentimes sharp increase in offline training cost. However, this gap narrows as K grows, because quadratic P-OpInf training scales as O(K⁷) while NN-OpInf training scales as O(N_s · n_epochs · K³).

What the benchmarks show

The paper tests NN-OpInf on five problems of increasing difficulty:

  • Burgers equation (polynomial dynamics): NN-OpInf-Skew matches quadratic P-OpInf in the reproductive regime and outperforms both linear and quadratic P-OpInf in future-state prediction, while exactly preserving energy by construction.
  • Nonlinear convection-diffusion-reaction (CDR) system (non-polynomial, parametric): P-OpInf-cA and P-OpInf-cAH both fail to accurately characterize the solution and yield relative errors greater than 5% for all basis dimensions, a consequence of their restricted polynomial model form. NN-OpInf-PSD-f is comparable to the Galerkin ROM and 5-10× more accurate than the P-OpInf models.
  • 2D nonlinear heat conduction (temperature-dependent diffusivity): NN-OpInf-SPSD-f is 5-10× more accurate than linear P-OpInf; both quadratic P-OpInf and vanilla NN-OpInf produce unphysical solutions.
  • Premixed H₂-air flame (non-affine parametric dependence): NN-OpInf-PSD-f achieves errors roughly an order of magnitude lower than those reported in prior neural-network ROM work, and roughly 3× lower than polynomial P-OpInf at the highest basis dimension on the test set.
  • 3D hyper-elastic torsion (highly nonlinear solid mechanics): the NN-OpInf-SPSD-Potential model, which preserves the Lagrangian structure of the FOM, is approximately an order of magnitude more accurate than standard P-OpInf models. The vanilla NN-OpInf-NN model is unstable.

The real breakthrough: structure beats expressiveness

The most important finding isn't that neural networks beat polynomials. It's that structured neural networks beat unstructured ones. The vanilla NN-OpInf baseline (a single black-box network) is unstable in most of the non-polynomial experiments, while the structured composable variants are stable and accurate. This embedded structure and flexibility results in ROMs that are easier to train and more accurate and robust than past NN-based efforts. The paper also provides the first systematic side-by-side comparison between neural-network-based and polynomial-based operator inference across multiple problem classes.

Limitations to know

NN-OpInf is not a free lunch. Several practical constraints matter:

  • Non-convex training. Unlike P-OpInf's one-shot least-squares solve, NN-OpInf requires iterative gradient descent. The optimization problem is considerably more difficult to solve than the linear least-squares problem associated with P-OpInf, since it can be nonlinear, is generally non-convex for nonlinear operators, and will almost certainly have no closed form solutions.
  • Non-monotonic convergence. Several experiments show that error does not decrease smoothly as the basis dimension grows, a known challenge for neural-network-based ROMs.
  • Additive non-uniqueness. The decomposition into operator blocks is not unique; different combinations can produce the same aggregate dynamics, complicating interpretability.
  • Hyperparameter sensitivity. While less sensitive than P-OpInf's regularization, the training still requires choices around learning rate, ensemble size, and network width.
  • Not suitable when dynamics are polynomial. On the H₂ flame example, where polynomial terms dominate, P-OpInf is more accurate on the training set.

When to use it

NN-OpInf is most valuable when you have a simulator that you can run but cannot modify (legacy code, commercial solver), your dynamics involve non-polynomial nonlinearities (exponential reaction terms, hyperelastic materials, temperature-dependent coefficients), and you need the ROM to respect physical invariants like energy conservation or Lagrangian structure. NN-OpInf can serve as an effective drop-in replacement for P-OpInf when the dynamics to be modeled contain non-polynomial nonlinearities, offering potential gains in accuracy and out-of-distribution performance at the expense of higher training computational costs and a more difficult, non-convex learning problem.

The open-source NN-OpInf package is built on PyTorch and organized around variables, operators, and models, making it straightforward to prototype new operator types by defining a new nn.Module. The paper and code are available at arxiv.org/abs/2603.08488.