Building Trust in PINNs: Error Estimation through Finite Difference Methods
Authors: Aleksander Krasowski, René P. Klausen, Aycan Celik, Sebastian Lapuschkin, Wojciech Samek, Jonas Naujoks
Organizations: Department of Artificial Intelligence, Fraunhofer Heinrich Hertz Institute · Centre of eXplainable Artificial Intelligence, Technological University Dublin · Department of Electrical Engineering and Computer Science, Technische Universität Berlin · BIFOLD - Berlin Institute for the Foundations of Learning and Data
Physics-informed neural networks (PINNs) constitute a flexible deep learning approach for solving partial differential equations (PDEs), which model phenomena ranging from heat conduction to quantum mechanical systems. Despite their flexibility, PINNs offer limited insight into how their predictions deviate from the true solution, hindering trust in their prediction quality. We propose a lightweight post-hoc method that addresses this gap by producing pointwise error estimates for PINN predictions, which offer a natural form of explanation for such models, identifying not just whether a prediction is wrong, but where and by how much. For linear partial differential equations, the error between a PINN approximation and the true solution satisfies the same differential operator as the original problem, but driven by the PINN's PDE residual as its source term. We solve this error equation numerically using finite difference methods requiring no knowledge of the true solution. Evaluated on several benchmark PDEs, our method yields accurate error maps at low computational cost, enabling targeted and interpretable validation of PINNs.
Figures & tables
Problem
PDE
Boundary Conditions
Poisson
∇2u−f=0
Dirichlet: u(xL)=u(xR)=0
Heat
∂t∂u−α∂x2∂2u=0
Dirichlet: u(xL)=u(xR)=0
Drift-Diffusion
∂t∂u−α∂x2∂2u−β∂x∂u=0
Periodic: u(xL)=u(xR)
Wave
∂t2∂2u−c2∂x2∂2u=0
Dirichlet: u(xL)=u(xR)=0
Table 1: Benchmark problems. The initial condition is u(x,0)=sin(2πx) for all time-dependent problems. Parameters are: α=201 , β=2 , c=21 .
Figure 1: Exact solutions for the benchmark problems. The horizontal line in (a) at y=0.5 represents the solution for the 1D Poisson problem.
Figure 2: Error estimates for a well-trained PINN on the heat equation, (a)–(d) at four different time-points across space and (e) L2 error over time, including the bound ebound . The FDM-based methods use a 64×64 spatio-temporal grid (time slices shown at nearest grid point to specified values); ebound uses 64 spatial points with adaptive time integration (up to 165 steps at t=1 ).
Figure 3: Accuracies of the error estimates across different discretizations, measured as ∥etrue−emethod∥2 on respective grid points, for all benchmark problems. Averaged over 10 runs, bands show one standard deviation.
Physics-informed neural networks (PINNs) combine machine learning with physical laws to solve differential equations. While existing results provide rigorous a posteriori upper bounds for PINN prediction errors, complete certification also requires complementary lower information in order to obtain computable two-sided error enclosures. In this paper, we derive computable a posteriori lower bounds for PINN errors in ordinary differential equations on suitable certified state-space domains under a localized strong monotonicity condition. We combine these estimates with complementary localized upper bounds under a one-sided Lipschitz condition, which is weaker than the global Lipschitz assumption used in previous work and can yield sharper upper error bands. The resulting bounds depend only on the neural-network approximation, the ODE residual, and local monotonicity and growth constants, and therefore do not require access to the exact solution. For linear time-invariant and time-varying systems, we further derive explicit formulas in terms of the minimal and maximal eigenvalues of the symmetric part of the system matrix. We also discuss the distinction between soft and hard enforcement of initial conditions in PINNs and explain why exact enforcement can make the scalar lower certificate uninformative. To recover nontrivial lower information in the linear setting, we use a signed-residual finite-probe certificate based on coordinate unit vectors. We also formulate a certificate-informed training strategy in which the propagated upper certificate is used as an auxiliary regularizer, while lower certificates remain post-training diagnostics. Altogether, the proposed framework provides rigorous and practically computable error certificates for PINN approximations of ODEs, while making explicit the domains and model classes for which the assumptions can be verified.
Ismail Huseynov, Arzu Ahmadova, Agamirza Bashirov
Physikalisch-Technische Bundesanstalt (PTB), Germany · Technical University of Berlin, Germany · Weierstrass Institute for Applied Analysis and Stochastics, Berlin, Germany +1
Physics-Informed Neural Networks (PINNs) are a common class of machine learning-based partial differential equation (PDE) solvers which train a network to represent a solution by minimizing a residual loss that encodes the PDE. Despite their successes, they are known to fail on certain simple equations, converging to an incorrect solution despite low loss. These failure modes have garnered significant attention in the literature over the past several years, motivating both architectural and optimization based solutions. By directly visualizing the residual, we show that failure modes are the result of overfitting: the loss is minimized on the collocation points, but not elsewhere. Applying regularization causes the failure modes to vanish. Finally, we extend double backpropagation over the full set of residuals, and use it to achieve state-of-the-art performance on four standard failure mode equations with up to 23× fewer collocation points and a vanilla architecture.
Nigel T. Andersen, Takashi Matsubara
Graduate School of Information Science and Technology Hokkaido University Sapporo, Japan · RIKEN Center for Advanced Intelligence Project (AIP) Tokyo, Japan
We propose a linearized Physics-Informed Neural Network (lPINN), a reduced-order neural basis method for forward and inverse differential equations. In an offline stage, lPINN learns operator-compatible continuous neural basis functions from an ensemble of numerical solutions. The basis functions are differentiable through automatic differentiation and are pretrained using solution data together with either derivative information or physics residuals. For each new problem instance, the basis functions are frozen and the solution is obtained by minimizing the governing-equation residual together with applicable initial, boundary, regularization, and observational terms. Unlike surrogate and operator-learning methods, the training data define the trial space offline, while the instance-specific solution is computed online by enforcing the governing physics. Relative to vanilla PINNs, lPINN pretrains the nonlinear hidden-layer representation offline and performs online inference only in the final linear layer. We evaluate lPINN on forward and inverse problems for the advection-diffusion equation, Burgers' equation, and the nonlinear pendulum equation. Compared with vanilla PINNs, lPINN achieves lower solution and parameter errors while reducing online inference times by approximately one to more than three orders of magnitude, with the largest gains generally observed for limited residual or measurement data. Cross-resolution experiments show that the learned continuous representation can be evaluated on finer meshes without retraining and with nearly unchanged accuracy.
Wenhao Chen, Alexandre M. Tartakovsky
Civil and Environmental Engineering Department University of Illinois Urbana-Champaign Urbana, IL 61801, USA · Pacific Northwest National Laboratory Richland, WA 99352, USA