Solving Differential Equations with Constrained Learning
Viggo Moro, Luiz F. O. Chamon
TL;DR
Solving differential equations with constrained learning reframes PDE solution as a constrained learning task with worst-case losses, enabling seamless integration of mechanistic, structural, and observational knowledge. The authors prove the equivalence between weak PDE solutions and distributionally robust constrained objectives, and they develop a primal-dual MH-sampling algorithm that avoids heavy loss-weight tuning. The method, called science-constrained learning (SCL), delivers accurate solutions across a diverse set of PDEs and architectures, including parametric families and invariance constraints, often with competitive computational efficiency. This approach offers a robust, data- and knowledge-infused alternative to traditional mesh-based methods and standard PINNs, with practical implications for engineering and science workflows.
Abstract
(Partial) differential equations (PDEs) are fundamental tools for describing natural phenomena, making their solution crucial in science and engineering. While traditional methods, such as the finite element method, provide reliable solutions, their accuracy is often tied to the use of computationally intensive fine meshes. Moreover, they do not naturally account for measurements or prior solutions, and any change in the problem parameters requires results to be fully recomputed. Neural network-based approaches, such as physics-informed neural networks and neural operators, offer a mesh-free alternative by directly fitting those models to the PDE solution. They can also integrate prior knowledge and tackle entire families of PDEs by simply aggregating additional training losses. Nevertheless, they are highly sensitive to hyperparameters such as collocation points and the weights associated with each loss. This paper addresses these challenges by developing a science-constrained learning (SCL) framework. It demonstrates that finding a (weak) solution of a PDE is equivalent to solving a constrained learning problem with worst-case losses. This explains the limitations of previous methods that minimize the expected value of aggregated losses. SCL also organically integrates structural constraints (e.g., invariances) and (partial) measurements or known solutions. The resulting constrained learning problems can be tackled using a practical algorithm that yields accurate solutions across a variety of PDEs, neural network architectures, and prior knowledge levels without extensive hyperparameter tuning and sometimes even at a lower computational cost.
