Table of Contents
Fetching ...

Learning Under Laws: A Constraint-Projected Neural PDE Solver that Eliminates Hallucinations

Mainak Singha

TL;DR

This work addresses the problem that neural PDE solvers can violate fundamental physical laws during learning. It proposes Constraint-Projected Learning (CPL), which enforces physical admissibility by projecting gradient updates onto the intersection $\mathcal{C}$ of constraints including conservation, Rankine–Hugoniot, entropy, and positivity, with differentiable projections and modest overhead. Augmenting CPL with Total-Variation Damping (TVD) and a rollout curriculum yields both hard and soft violations suppression, achieving machine-precision conservation and stable long-horizon behavior on Burgers and Euler systems. The approach is architecturally universal and practically impactful, enabling neural solvers that respect the laws of physics from training through long-time predictions, reducing hallucinations and enhancing reliability for scientific computing tasks where physical fidelity is critical.

Abstract

Neural networks can approximate solutions to partial differential equations, but they often break the very laws they are meant to model-creating mass from nowhere, drifting shocks, or violating conservation and entropy. We address this by training within the laws of physics rather than beside them. Our framework, called Constraint-Projected Learning (CPL), keeps every update physically admissible by projecting network outputs onto the intersection of constraint sets defined by conservation, Rankine-Hugoniot balance, entropy, and positivity. The projection is differentiable and adds only about 10% computational overhead, making it fully compatible with back-propagation. We further stabilize training with total-variation damping (TVD) to suppress small oscillations and a rollout curriculum that enforces consistency over long prediction horizons. Together, these mechanisms eliminate both hard and soft violations: conservation holds at machine precision, total-variation growth vanishes, and entropy and error remain bounded. On Burgers and Euler systems, CPL produces stable, physically lawful solutions without loss of accuracy. Instead of hoping neural solvers will respect physics, CPL makes that behavior an intrinsic property of the learning process.

Learning Under Laws: A Constraint-Projected Neural PDE Solver that Eliminates Hallucinations

TL;DR

This work addresses the problem that neural PDE solvers can violate fundamental physical laws during learning. It proposes Constraint-Projected Learning (CPL), which enforces physical admissibility by projecting gradient updates onto the intersection of constraints including conservation, Rankine–Hugoniot, entropy, and positivity, with differentiable projections and modest overhead. Augmenting CPL with Total-Variation Damping (TVD) and a rollout curriculum yields both hard and soft violations suppression, achieving machine-precision conservation and stable long-horizon behavior on Burgers and Euler systems. The approach is architecturally universal and practically impactful, enabling neural solvers that respect the laws of physics from training through long-time predictions, reducing hallucinations and enhancing reliability for scientific computing tasks where physical fidelity is critical.

Abstract

Neural networks can approximate solutions to partial differential equations, but they often break the very laws they are meant to model-creating mass from nowhere, drifting shocks, or violating conservation and entropy. We address this by training within the laws of physics rather than beside them. Our framework, called Constraint-Projected Learning (CPL), keeps every update physically admissible by projecting network outputs onto the intersection of constraint sets defined by conservation, Rankine-Hugoniot balance, entropy, and positivity. The projection is differentiable and adds only about 10% computational overhead, making it fully compatible with back-propagation. We further stabilize training with total-variation damping (TVD) to suppress small oscillations and a rollout curriculum that enforces consistency over long prediction horizons. Together, these mechanisms eliminate both hard and soft violations: conservation holds at machine precision, total-variation growth vanishes, and entropy and error remain bounded. On Burgers and Euler systems, CPL produces stable, physically lawful solutions without loss of accuracy. Instead of hoping neural solvers will respect physics, CPL makes that behavior an intrinsic property of the learning process.

Paper Structure

This paper contains 46 sections, 50 equations, 2 figures, 1 algorithm.

Figures (2)

  • Figure 1: Effect of the Berger limiter. The baseline CPL prediction (gray) yields a mildly smeared shock front due to numerical diffusion. Applying Berger (blue) reconstructs a steeper jump that better matches the reference (black) while conserving fluxes and maintaining entropy admissibility. Inset: log--histogram of interface RH residuals $\mathcal{E}^{\mathrm{RH}}$ showing conservation at machine precision.
  • Figure 2: Long-horizon stability under total-variation damping (TVD). Per-step mean-squared error (MSE, solid lines) and positive total-variation growth ($\Delta TV^+$, dotted lines) during a forty-step rollout. The blue curves show the model trained only one step at a time: it remains physically valid at each step but gradually drifts, adding small ripples that the true system never produces---a form of lawful hallucination. The red curves show the same model trained with TVD and a rollout curriculum: it learns to stay stable over time, keeping both prediction error and total-variation growth nearly constant. In other words, blue learns the laws but forgets them over time, while red learns to obey them indefinitely.