Astral: training physics-informed neural networks with error majorants

## Abstract

Abstract The primal approach to physics-informed learning is a residual minimization. We argue that residual is, at best, an indirect measure of the error of approximate solution and propose to train with error majorant instead. Since error majorant provides a direct upper bound on error, one can reliably estimate how close PiNN is to the exact solution and stop the optimization process when the desired accuracy is reached. We call loss function associated with error majorant Astral : neur A l a po ST erio RI function A l Loss. To compare Astral and residual loss functions, we illustrate how error majorants can be derived for various PDEs and conduct experiments with diffusion equations (including anisotropic and in the L-shaped domain), convection-diffusion equation, temporal discretization of Maxwell’s equation, and magnetostatics problem. The results indicate that Astral loss is competitive to the residual loss, typically leading to faster convergence and lower error (e.g., for Maxwell’s equations, we observe an order of magnitude better relative error and training time). We also report that the error estimate obtained with Astral loss is usually tight enough to be informative, e.g., for a highly anisotropic equation, on average, Astral overestimates error by a factor of 1.5 1.5 1.5 1.5 , and for convection-diffusion by a factor of 1.7 1.7 1.7 1.7 .

## 1 Introduction

Physics-informed neural networks (PiNNs) can be considered as a solution technique for differential equations (most notably, PDEs) that approximate an unknown solution with a neural network, obtain derivatives with automatic differentiation, and minimize PDE-related loss function with first-order or quasi-Newton method Lagaris et al. (), Raissi et al. (). One of the principal questions is how reliable PiNNs can be trained and how accurate is the final approximation.

For both of these questions, the appropriate choice of the loss function is crucial. The most widely used option is PDE residual sampled at the set of random points Wang et al. (). Adaptively selected points Wu et al. (), Zubov et al. () are also used to promote additional error control. For selected problems, variational loss is used E and Yu (), Barrett et al. (), and weak form with fixed Kharazmi et al. () or adaptive Chen et al. () test function. For time-dependent problems, special reweighting schemes are also available Wang et al. ().

A good loss function is necessary for a highly accurate approximate solution, but not sufficient. One way or another, error analysis needs to be introduced. Many works available that focus on a priori error analysis for PiNNs, e.g., De Ryck et al. (), Mishra and Molinaro (), De Ryck and Mishra (), Gonon et al. (), Jiao et al. (). In such contributions, authors show that it is possible to reach a given approximation accuracy with a neural network of a particular size. However, a priori error analysis is insufficient to obtain practical error estimation of trained neural network. For that one should resort to a posteriori error analysis for PiNNs, which is also present in literature but to a lesser extent, e.g., Guo and Haghighat (), Filici (), Hillebrecht and Unger (), Berrone et al. (), Minakowski and Richter (), Roth et al. (), Cai et al. (). In all these contributions, authors specialize in a particular classical error bound to deep learning PDE/ODE solvers. Namely, Filici () adopts a well-known error estimation for ODEs, based on the construction of related problems with exactly known solution Zadunaisky (). Similarly, Hillebrecht and Unger () uses well-known exponential bound on error that involves residual and Lipschitz constant Hairer et al. () and applies a neural network to perform the residual interpolation. Similarly, contributions Guo and Haghighat (), Berrone et al. () and Cai et al. () are based on FEM posterior error estimates, and Minakowski and Richter (), Roth et al. () are on dual weighted residual estimator Becker and Rannacher ().

In the present contribution, we take a different root and propose to address efficient PiNN training and a posteriori error analysis simultaneously. The approach is based on functional a posteriori error estimate Repin (), Muzalevsky and Repin () that is approximation-agnostic and, because of that, ideally suited for ansätze based on neural network. The main idea is to derive a tight upper bound on error (error majorant) in a problem-dependent energy norm and use this upper bound as a loss function. This way one can seamlessly combine learning high-quality approximate solutions with a posteriori error control. To summarise, our main contributions are:

- 1.
We introduce Astral – loss function based on error majorant derived with the help of a posteriori functional error estimate.
- 2.
We perform a series of tests of parametric families of diffusion equations (including highly anisotropic cases and equations with large mixed derivatives), convection-diffusion equation, diffusion equation in the L-shaped domain, Maxwell’s equation, and magnetostatics problem. Our tests indicate that Astral loss is robust, comparable, or more accurate than residual loss, computationally cheaper, and results in a sufficiently tight upper bound.

## 2 Motivation and the first look at the Astral loss

The end goal of physics-informed training is to find an approximate solution for PDE, meaning to obtain small errors. Unfortunately, the error is not computable since the exact solution is not known so a prevailing strategy is to minimize $l_{2}$ norm of residual sampled at a small set of points Lagaris et al. (), Wang et al. (). However, it is well known that residuals can fail to provide information about the error.

To illustrate that, we consider a simple boundary-value problem

$$ $\frac{d^{2}\phi(x)}{dx^{2}}=0,\,x\in(-1,1),\,\phi(-1)=\phi(1)=0,$ (1) $$

with trivial exact solution $\phi(x)=0$. It is easy to construct pathological approximate solutions to this problem that lead to arbitrary relations between error and residual.

Two edge cases are given by the following functions

$$ $\widetilde{\phi}_{1}(x,\epsilon)=\epsilon\sin\left(\frac{x}{\epsilon}\right), \,\widetilde{\phi}_{2}(x,\alpha)=\begin{cases}\alpha(1+x),\,x\leq 0;\\ \alpha(1-x),\,x>0.\end{cases}$ (2) $$

For small $\epsilon$, function $\widetilde{\phi}_{1}(x,\epsilon)$ has a small amplitude and does not deviate substantially from the exact solution, but simultaneously has a large second derivative, so residual can be made arbitrary large for arbitrary small error.

As noted in Muzalevsky and Repin () function $\widetilde{\phi}_{2}(x,\alpha)$ is piecewise linear, so the residual is zero for arbitrary $\alpha$ everywhere except $x=0$, where $\widetilde{\phi}_{2}(x,\alpha)$ is not differentiable. On the other hand for selecting large $\alpha$ one can make an error arbitrarily large for zero residual. Note, that $x=0$ is easy to miss since residual is enforced in a finite set of collocation points.

Is it possible to propose loss function $\mathcal{L}_{A}$ with a more direct relation to the error? More, specifically, we want $\mathcal{L}_{A}$ to have the following properties: (i) If $\mathcal{L}_{A}$ is small for some approximate solution $\widetilde{\phi}$, the same is true for the error $\left\|\widetilde{\phi}-\phi\right\|$ in some suitably chosen norm; (ii) It is possible to compute $\mathcal{L}_{A}$ without the knowledge of exact solution; (iii) $\mathcal{L}_{A}$ has continuous formulation suitable for physics-informed neural networks; (iv) The computation cost of $\mathcal{L}_{A}$ evaluation is comparable with the one for residual.

The first two requirements in the desiderata above are related to a broad field of a posteriori error estimate, and the third one can be achieved with the a posteriori error estimate of a functional type Mali et al. (). Before providing a general abstract discussion, we will illustrate on a simple example that it is indeed possible to derive such loss function $\mathcal{L}_{A}$.

Consider a generalisation of boundary-value problem (1)(^1^11For simplicity we omit technical, see Mali et al. (). For this particular problem $f$ belongs to $L^{2}$, approximate solution belongs to Sobolev space $H^{1}$ and is supposed to agree exactly with boundary conditions, trial functions are from $H^{1}$ and zero on the boundary, auxiliarry function is also from $H^{1}$.)

$$ $-\frac{d}{dx}\left(a(x)\frac{d\phi(x)}{dx}\right)=f(x),\,x\in(-1,1),\,\phi(-1) =\phi(1)=0,\,a(x)\geq\epsilon>0.$ (3) $$

Following Mali et al. (), we will estimate deviation from the exact solution in a natural energy norm

$$ $E[\phi-\widetilde{\phi}]=\sqrt{\int dx\,a(x)\left(\frac{d\phi(x)}{dx}-\frac{d \widetilde{\phi}(x)}{dx}\right)^{2}}.$ (4) $$

Note that since

$$ $\int_{-1}^{1}dx\,a(x)\frac{du(x)}{dx}\geq\lambda_{\min}\int_{-1}^{1}dx\,u^{2}( x)=:\lambda_{\min}\left\|u\right\|_{2}^{2},$ (5) $$

where $\lambda_{\min}$ is a minimal eigenvalue of the differential operator (3), the error in energy norm is an upper bound for the error in $L_{2}$ norm

$$ $\left\|\phi-\widetilde{\phi}\right\|_{2}\leq\frac{1}{\sqrt{\lambda_{\min}}}E[ \phi-\widetilde{\phi}].$ (6) $$

The first step is to subtract the approximate solution from both sides of the weak form of (3)

$$ $\int_{-1}^{1}dx\,\frac{dw(x)}{dx}a(x)\left(\frac{d\phi(x)}{dx}-\frac{d \widetilde{\phi}(x)}{dx}\right)=\int dx\,\left(w(x)f(x)-a(x)\frac{dw(x)}{dx} \frac{d\widetilde{\phi}}{dx}\right).$ (7) $$

If we take $w(x)=\phi(x)-\widetilde{\phi}(x)$ in the expression above we will have $E[\phi-\widetilde{\phi}]^{2}$ on the left. Our strategy is to bound the right-hand side from above with the expression proportional to $E[\phi-\widetilde{\phi}]$, with the remaining factor free from unknown exact solution $\phi$. To do that we introduce two extra terms using the following identity ($w(\pm 1)=0$)

$$ $\int_{-1}^{1}dx\,\left(\frac{dw(x)}{dx}y(x)+w(x)\frac{dy(x)}{dx}\right)=0,$ (8) $$

where $y(x)$ is arbitrary function. With these two terms right-hand side of (7) reads

$$ $\int dx\,\left(w(x)\left(f(x)-\frac{dy(x)}{dx}\right)+\frac{dw(x)}{dx}\left(-a (x)\frac{d\widetilde{\phi}}{dx}+y(x)\right)\right).$ (9) $$

Now, we take $w(x)=\phi(x)-\widetilde{\phi}(x)$ and from Cauchy–Schwarz inequality obtain the bound on the first term of (9)

$$ $\int_{-1}^{1}dx\,\left(w(x)\left(f(x)-\frac{dy(x)}{dx}\right)\right)\leq\left \|\phi-\widetilde{\phi}\right\|_{2}\left\|f-\frac{dy}{dx}\right\|_{2}\leq\frac {1}{\sqrt{\lambda_{\min}}}E\left[\phi-\widetilde{\phi}\right]\left\|f-\frac{dy }{dx}\right\|_{2},$ (10) $$

where $\left\|g\right\|_{2}=\sqrt{\int dxg^{2}(x)}$.

For the second term in (9) we similarly obtain

$$ $\int_{-1}^{1}dx\,a^{1/2}(x)\frac{dw(x)}{dx}\frac{1}{a^{1/2}(x)}\left(-a(x) \frac{d\widetilde{\phi}(x)}{dx}+y(x)\right)\leq E\left[\phi-\widetilde{\phi} \right]\left\|\frac{1}{a^{1/2}}\left(y-a\frac{d\widetilde{\phi}}{dx}\right) \right\|_{2},$ (11) $$

where we introduced $a^{1/2}$ in the numerator and denominator and made use of Cauchy–Schwarz inequality.

These two bounds combined give us an upper bound on the error in energy norm after we cancel $E[\phi-\widetilde{\phi}]$ from both sides:

$$ $E[\phi-\widetilde{\phi}]\leq\frac{1}{\sqrt{\lambda_{\min}}}\left\|f-\frac{dy}{ dx}\right\|_{2}+\left\|\frac{1}{a^{1/2}}\left(y-a\frac{d\widetilde{\phi}}{dx} \right)\right\|_{2}.$ (12) $$

Since the upper bound contains no unknown parameters, one can parametrize $\widetilde{\phi}$ and $y$ with a neural network and use the right-hand side of (12) as a loss function in a physics-informed setting. In this paper, we call Astral losses alike the right-hand side of (12) based on error majorants.

Is it a good loss function? We can look at the point of the requirements listed above: (i) The bond is tight. Observe that if $y=a\frac{d\widetilde{\phi}}{dx}$ and $\widetilde{\phi}=\phi$ the bound is saturated; (ii) The bound does not contain $\phi$, it can be computed by either optimization of $y$ for fixed $\widetilde{\phi}$ or by joint optimization of $\widetilde{\phi}$ and $y$; (iii)The bound appears as a continuous functional that does not depend on a particular form of approximation made, so it remains valid for finite-differences, finite-elements, physics-informed neural networks and all other discretization methods; (iv) To compute the upper bound one needs to find first derivatives of two fields $\widetilde{\phi}$ and $y$, whereas for the residual loss one need to find second and first derivative of $\phi$. One can expect that numerical costs are comparable, which we will verify in Section 5.

The derivation of Astral loss for simple BVP relies on straightforward inequalities. More elaborate techniques suitable for more complex equations can be found in Mali et al. () and references therein. We will provide examples of other upper bound in Section 4.

## 3 General definition of error majorants and Astral loss

Having BVP example (3) in mind, we extend the definition of the upper bound and the list of requirements to a more general situation.

Consider PDE in the abstract form

$$ $\mathcal{A}\left[\phi,\mathcal{D}\right]=0,$ (13) $$

where $\mathcal{A}$ is a nonlinear operator containing partial derivatives of the solution $\phi$, $\mathcal{D}$ stands for supplementary data such as initial conditions, boundary conditions, and PDE parameters.

For a selected set of PDEs, it is possible to obtain a posteriori functional error estimate of the form

$$ $E\left[\widetilde{\phi}-\phi\right]\leq U[\widetilde{\phi},\mathcal{D},w],$ (14) $$

where $\widetilde{\phi}$ is an approximate solution, $w$ are arbitrary free functions from certain problem-dependent functional space, $\mathcal{D}$ is problem data, $U$ is problem-dependent nonlinear functionals called error majorant Mali et al. (). For example, for BVP (3) we bound energy norm (4) with functional (12), where problem dependent data $\mathcal{D}$ consists of minimal eigenvalue $\lambda_{\min}$, $f$ and $a$ and $y$ serves as a single free foucntion $w$.

We require majorant to have the following properties: (i) For $\widetilde{\phi}=\phi$ one can find $w$ such that $E\left[\widetilde{\phi}-\phi\right]=U[\widetilde{\phi},\mathcal{D},w]$, that is, the upper bound is saturated; (ii) It is possible to evaluate $U$ efficiently given only problem data and approximate solution; (iii) The upper bound is defined in a continuous sense for arbitrary $\widetilde{\phi}$, $w$ from certain functional spaces, that is, it does not contain information on a particular solution method, grid quantities, convergence, or smoothness properties.

We already demonstrated that functionality with these properties exists for BVP (3). More examples appear in Section 5.

Given error majorant (14) we define Astral loss function and associated optimization problem.

###### Astral loss .

For PDE with functional error majorant $U[\widetilde{\phi},\mathcal{D},w]$, and neural network $\mathcal{N}(\mathcal{D},\theta)=\left(\widetilde{\phi},w\right)$ with weights $\theta$ that predicts solution $\widetilde{\phi}$ and auxiliary fields $w$ optimize

$$ $\min_{\theta}U[\widetilde{\phi},\mathcal{D},w]\text{ s.t. }\left(\widetilde{ \phi},w\right)=\mathcal{N}(\mathcal{D},\theta).$ (15) $$

Because Astral loss is based on the upper bound, we can be sure that the error is smaller than the observed loss. Since bound saturates, we also can be sure that it is possible to reach an exact solution.

###### Astral loss .

## 4 Examples of error majorant

Functional error majorants can be derived for various practically relevant equations (see Repin (), Neittaanmäki and Repin (), Mali et al. () for more details). Here we provide the upper bound for three families of equations that we will later use in Section 5 for experimental comparison of different loss functions.

### 4.1 Diffusion equation

Consider diffusion equation

$$ $-\text{div}\left(\sigma(x,y)\,\text{grad}\,\phi(x,y)\right)=f(x,y),\,x,y\in \Gamma,\,\left.\phi\right|_{\partial\Gamma}=0,$ (16) $$

where $\sigma(x,y)$ is $2\times 2$ symmetric positive definite matrix, $\Gamma$ is a piecewise smooth domain and $\partial\Gamma$ is the boundary.

Energy norm reads

$$ $E[\phi-\widetilde{\phi}]^{2}=\int dxdy\,\,\left\|\sigma^{1/2}(x,y)\,\text{grad }\,(\phi(x,y)-\widetilde{\phi}(x,y))\right\|^{2},$ (17) $$

where $\left\|\cdot\right\|^{2}$ is $l_{2}$ norm applied pointwise, and the upper bound is

$$ $U_{D}^{2}[\widetilde{\phi},f,\sigma]=\frac{(1+\beta)}{4\pi^{2}\inf\lambda_{ \min}\left(\sigma(x,y)\right)}\int dxdy\,\left(f(x,y)+\text{div}\,w(x,y)\right )^{2}\\ +\frac{1+\beta}{\beta}\int dxdy\,\left\|\sigma^{-1/2}(x,y)\left(\sigma(x,y)\, \text{grad}\,\widetilde{\phi}(x,y)-w(x,y)\right)\right\|^{2}.$ (18) $$

The derivation is very similar to the one presented in Section 2 and can be found in (Mali et al., , Chapter 3). Note that the upper bound depends on scalar free parameter $\beta$ and vector fields with two components $w(x,y)$.

### 4.2 Maxwell’s equation

Magnetostatics problem as well as temporal discretization of Maxwell’s equation can be presented in the following form

$$ $\begin{split}&\text{curl}\,\mu(x,y)\,\text{curl}\,B(x,y)+\alpha B=f(x,y),\,x,y \in\Gamma,\,\left.\phi\right|_{\partial\Gamma}=0,\\ \end{split}$ (19) $$

where $\mu(x,y)$ is uniformly positive scalar function, $\alpha$ is non-negative real number, $\Gamma$ is a piecewise smooth domain, $\partial\Gamma$ is the boundary; curl from a vector field reads $\text{curl}\,B(x,y)=\partial_{y}B_{x}(x,y)-\partial_{x}B_{y}(x,y)$, and curl from a scalar field reads $\text{curl}\,\phi(x,y)=e_{x}\partial_{y}\phi(x,y)-e_{y}\partial_{x}\phi(x,y)$.

The natural energy norm for Maxwell’s equation is

$$ $E[B-\widetilde{B}]^{2}=\int dxdy\,\left(\mu(x,y)\left\|\text{curl}\left(B(x,y) -\widetilde{B}(x,y)\right)\right\|^{2}+\alpha\left\|B(x,y)-\widetilde{B}(x,y) \right\|^{2}\right).$ (20) $$

It is convenient to obtain the upper bound for two separate cases Repin () when $\alpha>0$ and when $\alpha=0$. For the former case, we have

$$ $U_{M_{1}}^{2}[\widetilde{B},f,\mu,\alpha,w]=\int dxdy\,\left(\frac{1}{\alpha} \left\|f(x,y)-\alpha\widetilde{B}(x,y)-\text{curl}\,w(x,y)\right\|^{2}\right. \\ +\left.\frac{1}{\mu(x,y)}\left(y(x,y)-\mu(x,y)\,\text{curl}\,\widetilde{B}(x,y )\right)^{2}\right),$ (21) $$

and for the later case

$$ $U_{M_{2}}[\widetilde{B},f,\mu,\alpha,w]=\frac{1}{2\pi\inf{\sqrt{\mu(x,y)}}} \sqrt{\int dxdy\left\|f(x,y)-\text{curl}\,w(x,y)\right\|^{2}}\\ +\sqrt{\int dxdy\frac{1}{\mu(x,y)}\left(w(x,y)-\mu(x,y)\,\text{curl}\, \widetilde{B}(x,y)\right)^{2}}.$ (22) $$

Both error majorants (21) and (22) depend on a scalar auxiliary field $w(x,y)$. Note that $U_{M_{2}}$ is a straightforward modification of the result from Repin () obtained with the use of Friedrichs’s inequality for curl.

### 4.3 Convection-diffusion equation

We consider the initial value problem

$$ $\begin{split}&\frac{\partial u(x,t)}{\partial t}-\frac{\partial^{2}u(x,t)}{ \partial x^{2}}+a\frac{\partial u(x,t)}{\partial x}=f(x),\,(x,t)\in(0,1)\times (0,T),\\ &u(x,0)=\phi(x),\,u(0,t)=u(1,t)=0,\end{split}$ (23) $$

where $a$ and $T$ are positive real numbers.

The natural energy norm is

$$ $E^{2}[u-\widetilde{u}]=\int dxdt\,\left(\frac{\partial u(x,t)}{\partial x}- \frac{\partial\widetilde{u}(x,t)}{\partial x}\right)^{2}+\frac{1}{2}\int dx\, \left(u(x,T)-\widetilde{u}(x,T)\right)^{2},$ (24) $$

and the upper bound Repin and Tomar () for approximation that exactly fulfills initial condition reads

$$ $U_{CD}[\widetilde{u},f,a]=\sqrt{\int dxdt\,\left(w(x,t)-\frac{\partial \widetilde{u}(x,t)}{\partial x}\right)^{2}}\\ +\frac{1}{\pi}\sqrt{\int dxdt\,\left(f(x)-\frac{\partial\widetilde{u}(x,t)}{ \partial t}-a\frac{\partial\widetilde{u}(x,t)}{\partial x}+\frac{\partial w(x, t)}{\partial x}\right)^{2}}.$ (25) $$

For upper bound (25), we have one auxiliary scalar field $w(x,t)$.

## 5 Experiments

We use examples of PDEs described in Section 4 to study the following questions: (i) How is the accuracy of solutions obtained with Astral loss compare with the ones obtained with residual and variational losses? (ii) How cost-efficient is Astral loss in comparison with other losses? (iii) Which loss is more robust to the irregularities of underlining PDE, e.g., anisotropy of coefficients or geometric singularities? (iv) How tight in practice is the upper bound obtained with Astral loss?

This section describes the experiments we prepared to this end and the analysis of the obtained results.

### 5.1 Datasets

To benchmark Astral loss, we consider seven PDEs described below:

- 1.
Isotropic diffusion: Isotropic diffusion refers to equation (16) in $(0,1)^{2}$ with $\sigma(x,y)=Ia(x,y)$ with $a=5(z-\min z)/(\max z-\min z)+1$, $u(x,y)=\sin(\pi x)\sin(\pi y)r$ where $r,z\sim\mathcal{N}\left(0,\left(1-\Delta\right)^{-1}\right)$ with homogeneous Dirichlet conditions.
- 2.
Anisotropic diffusion: Anisotropic diffusion is similarly based on equation (16) but with an anisotropy parameter $\epsilon$ introduced into the diffusion coefficient $\sigma(x,y;\epsilon)=\begin{pmatrix}1&0\\
0&\epsilon^{2}\end{pmatrix}a(x,y)$, and into the exact solution $u(x,y)=\sin(\pi x)\sin(\pi y)r$ where $r\sim\mathcal{N}\left(0,\left(1-\partial_{x}^{2}-\epsilon^{2}\partial_{y}^{2}
\right)^{-1}\right).$
- 3.
Diffusion with large mixed derivative: This PDE is built based on the same random fields as isotropic diffusion, but with different diffusion matrix $\sigma(x,y;\delta)=\begin{pmatrix}1&\delta\\
\delta&1\end{pmatrix}a(x,y)$. The case when $\delta$ is close to $1$ is especially interesting since $\det\sigma$ becomes close to 0 0.
- 4.
Diffusion in the L-shaped domain: Here we consider equation (16) in domain $(0,1)^{2}\setminus(0.5,1)^{2},$ and for simplicity take $\sigma(x,y)=I$, field $f$ is sampled from $\mathcal{N}\left(0,\left(1-0.01\Delta\right)^{-2}\right)$ so it is smoother that for other diffusion equations.
- 5.
Maxwell’s equation: We consider equation (19) with $\alpha=1$, $B=\text{curl}\,A$, $A\sim\mathcal{N}\left(0,(1-\Delta)^{-1}\right)$ with homogeneous Neumann boundary conditions, $\mu=5(z-\min z)/(\max z-\min z)+1$, where $z\sim\mathcal{N}\left(0,\left(1-\Delta\right)^{-1}\right)$ with homogeneous Dirichlet conditions.
- 6.
Magnetostatics: This equation is precisely the same as Maxwell’s equation above but with $\alpha=0$.
- 7.
Convection-diffusion equation: This dataset is based on equation (23) with $T=0.1$, $a$ sampled uniformly from 0 0 to $10$, $f,\phi\sim\mathcal{N}\left(0,\left(1+0.04\left(-\partial_{x}^{2}+a\partial_{x}
\right)^{2}\right)^{2}\right)$ with homogeneous Dirichlet conditions.

### 5.2 Loss functions

For datasets based on diffusion equation, we use Astral loss function (18), standard residual loss function which can be obtained by evaluating (16) at a set of points and taking $l_{2}$ norm from the difference between left- and right-hand sides, and variational loss function reads

$$ $V[\phi]=\int dxdy\,\left(\frac{1}{2}\left\|\sigma^{1/2}(x,y)\,\text{grad}\, \phi(x,y)\right\|^{2}-\phi(x,y)f(x,y)\right).$ (26) $$

**Table 1: Results for isotropic and anisotropic diffusion equations: relative $L_{2}$ is relative error in $L_{2}$ norm, $E[\phi-\widetilde{\phi}]$ is error in natural energy norm, the large $\epsilon$ the more anisotropic is diffusion equation. Relative error is measured in $\%$ and energy norm and majorant are multiplied by $10^{2}$.**
|  | Residual | Astral | Variational |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| $\epsilon$ | relative $L_{2}$ | $E[\phi-\widetilde{\phi}]$ | relative $L_{2}$ | $E[\phi-\widetilde{\phi}]$ | majorant | relative $L_{2}$ | $E[\phi-\widetilde{\phi}]$ |
| 1 | $0.13\pm 0.07$ | $0.03\pm 0.01$ | $\boldsymbol{0.11\pm 0.05}$ | $0.03\pm 0.01$ | $0.13\pm 0.03$ | $3.48\pm 1.46$ | $1.01\pm 0.32$ |
| 5 | $0.63\pm 0.27$ | $0.04\pm 0.01$ | $\boldsymbol{0.53\pm 0.19}$ | $0.04\pm 0.00$ | $0.09\pm 0.02$ | $6.89\pm 3.88$ | $0.62\pm 0.22$ |
| 10 | $1.65\pm 0.92$ | $0.07\pm 0.03$ | $\boldsymbol{0.97\pm 0.57}$ | $0.05\pm 0.03$ | $0.11\pm 0.03$ | $10.55\pm 5.88$ | $0.48\pm 0.21$ |
| 15 | $3.16\pm 1.74$ | $0.09\pm 0.04$ | $\boldsymbol{2.08\pm 1.24}$ | $0.07\pm 0.04$ | $0.12\pm 0.04$ | $11.92\pm 6.04$ | $0.49\pm 0.19$ |
| 20 | $5.64\pm 3.18$ | $0.12\pm 0.05$ | $\boldsymbol{3.6\pm 2.18}$ | $0.09\pm 0.05$ | $0.13\pm 0.06$ | $14.07\pm 7.69$ | $0.44\pm 0.22$ |

For Maxwell’s problems, Astral losses are (21) and (22) when $\alpha=0$. For the convection-diffusion equation, Astral loss is (25). Residual losses for these problems are self-evident, and variational losses are unavailable. For magnetostatics problem (19) with $\alpha=0$ for both residual and Astral losses, we enforce the predicted field to be solenoidal with an additional term.

### 5.3 Metrics

To evaluate training methods, we use several metrics: (i) Relative error. This metrics is the most often used $\sqrt{\sum_{i,j}\left(\phi_{i,j}-\widetilde{\phi}_{i,j}\right)^{2}}\big{/}
\sqrt{\sum_{i,j}\phi_{i,j}^{2}}$, where $\phi_{i,j}=\phi(x_{i},y_{j})$ is a field computed on the uniform grid with different resolution from the training grid; (ii) Natural energy norm. For diffusion equation is given by equation (17), for convection-diffusion – (24), for Maxwell’s equation – (20). In all cases, integrals are computed with Gauss–Legendre quadrature; (iii) Error majorant. The definition coincides with Astral loss, but the integral is evaluated with Gauss–Legendre quadrature on a fine grid different from the training grid. This metric is only applicable to Astral loss.

### 5.4 Architectures and training details

Following best practices Wang et al. () we approximate all integrals with the Monte Carlo method with a small number of randomly selected points restricted to the uniform grid $64\times 64$.

Legendre grid and uniform grid used for evaluation have $200$ points along each direction, for all equations but diffusion in L-shaped domain where they have $100$ points in each of three square subdomains.

In all cases, we enforce boundary and initial conditions exactly. For the L-shaped domain this is done with the help of mean value coordinates Floater () as explained in Sukumar and Srivastava ().

Architecture used is Siren network Sitzmann et al. () with the same number of hidden neurons $N_{\text{hidden}}\in\left[50,100\right]$ in each layer $N_{\text{layers}}\in\left[3,4,5\right]$. Individual Siren network is used for each field one needs to predict for a given problem.

**Table 2: Results for convection-diffusion equation, Maxwell’s equation, magnetostatics problem and diffusion with mixed derivative: relative $L_{2}$ is a relative error in $L_{2}$ norm, $E[\phi-\widetilde{\phi}]$ is an error in natural energy norm, the large $\delta$ the more role has a term with mixed derivatives. Relative error is measured in $\%$ and energy norm and majorant are multiplied by $10^{2}$.**
|  | Residual | Astral |  |  |  |
| --- | --- | --- | --- | --- | --- |
| equation | relative $L_{2}$ | $E[\phi-\widetilde{\phi}]$ | relative $L_{2}$ | $E[\phi-\widetilde{\phi}]$ | majorant |
| conv-diff | $\boldsymbol{3.96\pm 4.91}$ | $7.36\pm 12.54$ | $4.05\pm 4.97$ | $8.84\pm 12.91$ | $17.91\pm 29.76$ |
| Maxwell, $\alpha=1$ | $5.49\pm 2.35$ | $1.93\pm 0.66$ | $\boldsymbol{0.45\pm 0.16}$ | $0.32\pm 0.06$ | $3.53\pm 1.08$ |
| Maxwell, $\alpha=0$ | $0.12\pm 0.06$ | $0.15\pm 0.03$ | $\boldsymbol{0.07\pm 0.03}$ | $0.29\pm 0.06$ | $0.96\pm 0.26$ |
| L-shaped | $\boldsymbol{0.26\pm 0.06}$ | $0.17\pm 0.1$ | $0.8\pm 0.34$ | $0.32\pm 0.21$ | $1.29\pm 0.75$ |
| mixed-diff, $\delta=0.5$ | $0.13\pm 0.07$ | $0.02\pm 0.01$ | $\boldsymbol{0.12\pm 0.06}$ | $0.05\pm 0.01$ | $0.18\pm 0.04$ |
| mixed-diff, $\delta=0.7$ | $0.15\pm 0.08$ | $0.03\pm 0.01$ | $\boldsymbol{0.12\pm 0.06}$ | $0.05\pm 0.01$ | $0.23\pm 0.06$ |
| mixed-diff, $\delta=0.9$ | $0.18\pm 0.09$ | $0.04\pm 0.01$ | $\boldsymbol{0.13\pm 0.07}$ | $0.07\pm 0.02$ | $0.25\pm 0.05$ |
| mixed-diff, $\delta=0.99$ | $0.25\pm 0.14$ | $0.15\pm 0.05$ | $\boldsymbol{0.12\pm 0.10}$ | $0.03\pm 0.02$ | $0.76\pm 0.16$ |

We use Lion optimizer Chen et al. () with learning rate $\in\left[10^{-3},5\cdot 10^{-3},10^{-4}\right]$, exponential learning rate decay with decay rate $0.5$ and transition steps $\in[10000,25000,50000]$. The batch size (number of randomly selected points to compute loss function) used is $16\times 16$ and the number of weights updates is $50000$.

We report the average and standard deviation of all metrics of interest for $100$ problems for each PDE. The best results are reported among all hyperparameters. All experiments were performed on a single Tesla V100-SXM2-16GB. Ensemble training was used, so $100$ neural networks are trained simultaneously. The same setup was used to report wall-clock training time. Depending on the architecture and loss function training time is in-between $70$ and $1200$ seconds for $100$ neural networks.

### 5.5 Reproducibility

In [https://anonymous.4open.science/r/astral-0F43](https://anonymous.4open.science/r/astral-0F43) one can find datasets, scripts used to generate datasets, and scripts used to obtain all training results. The dependencies are minimal: we use JAX, Optax DeepMind et al. () and Equinox Kidger and Garcia (). Scripts with dataset collection also use NumPy Harris et al. () and SciPy Virtanen et al. ().

### 5.6 Results

Results are summarized in Table 1 and Table 2, and training wall clock time is reported in Table 3. The main observations are:

- 1.
Accuracy. When ranked concerning the $L_{2}$ norm we can see that residual and Astral losses are much better than variational loss. On most of the problems, Astral loss leads to similar or slightly better error than residual loss. There are two notable exceptions: for Maxwell’s equations Astral leads to a much better error and for the L-shaped domain the error reached by residual loss is better.
- 2.
Robustness. When problems become less regular Astral loss leads to better results than residual loss. This is the case for both highly anisotropic diffusion equations and diffusion equations with large mixed derivatives. Also note that Astral upper bound does not deteriorate for diffusion equation in the L-shaped domain which is a standard test problem used to benchmark methods for a posteriori error estimation.
- 3.
Cost-efficiency. From Table 3 we can see that even though training with Astral requires predicting more fields, the training time is typically smaller than for residual loss. The reason for that is one does not need to compute second derivatives. It is often the case that Astral loss also requires smaller networks for best error, e.g., for Maxwell’s equation (Table 2, $\alpha=1$) training time for Astral loss is $105$ seconds and for residual loss is $1176$ seconds, yet Astral loss leads to an order of magnitude better relative error.
- 4.
Quality of the upper bound. Here we observe that the upper bound is typically reasonably tight. In the most favorable cases, one has mild overestimation by a factor of $0.5$ (anisotropic equation $\epsilon=5$). For some cases, overestimation is more severe, e.g., by a factor of $2.0$ for the convection-diffusion problem, and by a factor of $10$ for Maxwell’s equation. But overall upper bound remains a good estimate of the error in energy norm.

## 6 Conclusion

We introduced a novel type of loss that allows for error estimation. The advantages of the loss include:

- 1.
When Astral is used, one can compute the upper bound on error (compute integral alike (12)) and use it for quality control. This is not possible with other losses
- 2.
For second-order problems Astral loss requires only the first derivative, which speeds up training compared to residual loss.
- 3.
For most equations, Astral loss leads to better final relative error.

Limitations are:

- 1.
One needs to derive the upper bound. Although upper bounds are available for many relevant equations, it is challenging to derive them for arbitrary PDE. It is important to note that this is also the case for residual loss, defined only for PDEs when a strong form makes sense.
- 2.
Integrals involved in the upper bound can be hard to evaluate reliably. The problem is that the error term is not straightforward to control when a neural network is used as an ansatz, and one can observe overfitting Rivera et al. (). This can result in cases when, because of numerical errors, the upper bound is smaller than the error, although this is theoretically impossible.

## 7 Acknowledgements

The authors would like to thank Anna Rudenko, who suggested the name Astral (neurAl a poSTerioRi functionAl Loss) for the loss function (15).

**Table 3: Average training time in seconds required for $50000$ updates of $100$ neural network weights on a single Tesla V100-SXM2-16GB. The small neural network has $50$ hidden neurons per layer and $3$ hidden layers, large neural network has $100$ hidden neurons per layer and $5$ hidden layers.**
|  | Residual | Astral | Variational |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| equation | small | large | small | large | small | large |
| diff | 128 | 535 | 92 | 437 | 37 | 164 |
| conv-diff | 77 | 326 | 62 | 276 | – | – |
| Maxwell, $\alpha=1$ | 298 | 1176 | 105 | 481 | – | – |
| Maxwell, $\alpha=0$ | 338 | 1312 | 142 | 598 | – | – |
| L-shaped | 133 | 497 | 110 | 480 | – | – |
| mixed-diff | 237 | 728 | 91 | 428 | – | – |

## NeurIPS Paper Checklist

- 1.
Claims
- Question: Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
- Answer: [Yes]
- Justification: We made several claims: (i) We introduce a novel loss function called Astral, (ii) Astral allows for error estimate, (iii) Training with Astral is faster than with residual, (iv) Training with Astral leads to better final relative error for most of the equations, (v) We use quantitative statements about the relative performance of Astral and residual losses in the abstract.
All of these claims are supported by theory or experiments: (i) To the best of our knowledge Astral was not used to train neural networks before. The closest to our work is the paper Muzalevsky and Repin [] where functional a posteriori errors are used to analyze trained networks. (ii) This statement is explained in Section 2, Section 3, Section 4. (iii) This follows from Table 3. (iv) This is supported by data in Section 5. Only the diffusion equation in the L-shaped domain residual results in a noticeable better error. (v) Quantitative statements follows from Table 1 and Table 2.
- Guidelines:
•
The answer NA means that the abstract and introduction do not include the claims made in the paper.
•
The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.
•
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
•
It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
- 2.
Limitations
- Question: Does the paper discuss the limitations of the work performed by the authors?
- Answer: [Yes]
- Justification: We explicitly discuss limitations in Section 6. The main limitation is that the upper bound needs to be derived for PDE before Astral can be applied.
- Guidelines:
•
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
•
The authors are encouraged to create a separate "Limitations" section in their paper.
•
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
•
The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
•
The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
•
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
•
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
•
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren’t acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
- 3.
Theory Assumptions and Proofs
- Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
- Answer: [N/A]
- Justification: The paper is based on the well-developed theory of functional a posteriori error estimate Repin [] and does not introduce new theoretical results.
- Guidelines:
•
The answer NA means that the paper does not include theoretical results.
•
All the theorems, formulas, and proofs in the paper should be numbered and cross-referenced.
•
All assumptions should be clearly stated or referenced in the statement of any theorems.
•
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.
•
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
•
Theorems and Lemmas that the proof relies upon should be properly referenced.
- 4.
Experimental Result Reproducibility
- Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
- Answer: [Yes]
- Justification: We provide a detailed description of architectures, optimizers, and hyperparameters in Section 5.4. Also, in Section 5.5, we share a link to the repository with all scripts used to run experiments in the paper.
- Guidelines:
•
The answer NA means that the paper does not include experiments.
•
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
•
If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
•
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
•
While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a)
If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.
(b)
If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.
(c)
If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d)
We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
- 5.
Open access to data and code
- Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?
- Answer: [Yes]
- Justification: We provide training scripts, dataset generation scripts, and datasets themselves. The link is given in Section 5.5.
- Guidelines:
•
The answer NA means that paper does not include experiments requiring code.
•
Please see the NeurIPS code and data submission guidelines ([https://nips.cc/public/guides/CodeSubmissionPolicy](https://nips.cc/public/guides/CodeSubmissionPolicy)) for more details.
•
While we encourage the release of code and data, we understand that this might not be possible, so “No” is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).
•
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ([https://nips.cc/public/guides/CodeSubmissionPolicy](https://nips.cc/public/guides/CodeSubmissionPolicy)) for more details.
•
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
•
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.
•
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
•
Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.
- 6.
Experimental Setting/Details
- Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
- Answer: [Yes]
- Justification: We provide a detailed description of architectures, optimizers, and hyperparameters in Section 5.4. Also, in Section 5.5, we share a link to the repository with all scripts used to run experiments in the paper.
- Guidelines:
•
The answer NA means that the paper does not include experiments.
•
The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.
•
The full details can be provided either with the code, in appendix, or as supplemental material.
- 7.
Experiment Statistical Significance
- Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
- Answer: [Yes]
- Justification: For each result in the paper, we perform $100$ training runs and report the average along with the standard deviation.
- Guidelines:
•
The answer NA means that the paper does not include experiments.
•
The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
•
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
•
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
•
The assumptions made should be given (e.g., Normally distributed errors).
•
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
•
It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.
•
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).
•
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.
- 8.
Experiments Compute Resources
- Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
- Answer: [Yes]
- Justification: All experiments were run on a single Tesla V100-SXM2-16GB, this information is available in Section 5.4.
- Guidelines:
•
The answer NA means that the paper does not include experiments.
•
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
•
The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.
•
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn’t make it into the paper).
- 9.
Code Of Ethics
- Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics [https://neurips.cc/public/EthicsGuidelines](https://neurips.cc/public/EthicsGuidelines)?
- Answer: [Yes]
- Justification: We carefully reviewed the NeurIPS Code of Ethics and confirmed that during the preparation of the research, we strictly followed all the guidelines.
- Guidelines:
•
The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.
•
If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.
•
The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).
- 10.
Broader Impacts
- Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
- Answer: [N/A]
- Justification: The article is on the novel method (namely, novel loss for PiNNs) to solve PDEs. The content is too abstract and mostly of interest to applied mathematics. We do not expect it to lead to any negative social impact.
- Guidelines:
•
The answer NA means that there is no societal impact of the work performed.
•
If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.
•
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
•
The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
•
The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
•
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
- 11.
Safeguards
- Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
- Answer: [N/A]
- Justification: We do not release models. The data released is a set of PDE solutions. These PDEs are diffusion equation, convection-diffusion equation, Maxwell’s equation, and magnetostatics equation, that is, fairly standard nonspecific PDEs widely used in many other papers.
- Guidelines:
•
The answer NA means that the paper poses no such risks.
•
Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
•
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
•
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.
- 12.
Licenses for existing assets
- Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
- Answer: [N/A]
- Justification: We use only home-grown code, models, and datasets. The deep learning frameworks (JAX, Optax, Equinox) that we used are properly acknowledged.
- Guidelines:
•
The answer NA means that the paper does not use existing assets.
•
The authors should cite the original paper that produced the code package or dataset.
•
The authors should state which version of the asset is used and, if possible, include a URL.
•
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
•
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
•
If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, [paperswithcode.com/datasets](paperswithcode.com/datasets) has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.
•
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
•
If this information is not available online, the authors are encouraged to reach out to the asset’s creators.
- 13.
New Assets
- Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
- Answer: [Yes]
- Justification: We extensively documented datasets that we share. We also provide instructions on how to run the code and reproduce experiments. The detailed description can be found in [https://anonymous.4open.science/r/astral-0F43](https://anonymous.4open.science/r/astral-0F43).
- Guidelines:
•
The answer NA means that the paper does not release new assets.
•
Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
•
The paper should discuss whether and how consent was obtained from people whose asset is used.
•
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
- 14.
Crowdsourcing and Research with Human Subjects
- Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
- Answer: [N/A]
- Justification: No human subjects were involved in our research.
- Guidelines:
•
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
•
Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.
•
According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
- 15.
Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects
- Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
- Answer: [N/A]
- Justification: No human subjects were involved in our research.
- Guidelines:
•
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
•
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
•
We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
•
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 3
presentation: 4
questions: - Perhaps the improvements you've seen in your experiences come from improved conditioning of the problem. If so, this could be an interesting line of research, since as things stand, the proposed corrections require expensive computational corrections. So it would be interesting if you could provide an analysis of the NTK spectrum with classical loss and with your loss, following the work presented in https://doi.org/10.1016/j.jcp.2021.110768.
soundness: 2
strengths: - Bounding of new losses are clearly and consistently derived.
- Clear and pedagogical presentation.
summary: This paper starts from the observation that the loss minimization used for pinns does not generally guarantee that the distance L2 of the approximated solution from the true solution is minimized. To overcome this problem, the authors propose new losses for PINNs, which are shown to bound the L2 distance. The authors then provide empirical evidence that these losses achieve lower relative L2 errors, particularly as the equation becomes more physically complicated.
weaknesses: - The proposed solutions are specific to each equation, which limits the applicative scope of the results.
- Empirical results are not sufficiently convincing. Only a few examples show an improvement in errors, but in most cases this remains of the same order of magnitude. It is therefore unclear whether these improvements are significant, or simply the result of statistical or numerical fluctuations.
- As has already been shown in several series of works, what affects the lack of convergence of PINNs is the poor conditioning of the problem (see for example https://doi.org/10.1016/j.jcp.2021.110768 or https://arxiv.org/abs/2310.05801) and solutions have since been successfully proposed to correct this problem (see for example https://arxiv.org/abs/2302.13163 or https://arxiv.org/abs/2402.10680), with a significant impact both on the minimization of the classical loss, and on the minimization of L2 and even H1 errors.
- Finally, questions of generalizing PINNs to different losses have already been explored in detail by Siddhartha Mishra's students. We refer you, for example, to the dissertations by Tim De Ryck (https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/674112/dissertation_deryck.pdf?sequence=1) or Roberto Molinaro (https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/646749/Thesis%2813%29.pdf?sequence=1).
- At the beginning of section 2, a proper definition of error and residual would be suited.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: - More of a remark than a question: In Section 2.1, the authors give two motivating examples. The first one (the sinusoidal solution) shows that the function can be L2 close to the solution while having a large residual. The authors use this as an argument against residual based loss functions. I don't think this is fair, the same phenomenon happens for Astral loss. Can the authors comment?

- The standard PINN residual is, in fact, also an a posteriori error estimator for the error. Even for the error in the regularity spaces (H2 for Poisson etc). See the results in [Zeinhofer, arXiv:2311.00529]. Can the authors discuss why they prefer different a posteriori error estimators? I suppose it is because of unknown constants, but I would appreciate a clarification.
soundness: 3
strengths: - Moving away from strong formulations to first-order systems (the error majorants presented are not exactly first order systems, but relatively close) seems like a good idea.

- Good error estimators are useful in practice.
summary: The manuscript proposes alternatives to the common, residual-based loss functions used in physics-informed neural networks. The authors argue that certain functional a posteriori error estimators better match the error (measured in energy norm) than the standard PINN loss formulation. Numerical examples for a number of different equations are presented comparing the standard residual/PINN approach to the one using a posteriori error estimators.
weaknesses: - Novelty: Although the proposed loss functions are not exactly first-order system reformulations of the considered PDEs, they share a similar spirit -- no second derivatives are needed but instead auxiliary variables are introduced. However, first-order system formulations are not novel, not even for neural network based solution methods for PDEs, see for example the works of [Cai, arXiv:1911.02109] or [Schwab, arXiv:2409.20264]. So I believe it is crucial to understand if the advantages of the proposed loss functions are due to the reformulation as a first-order system or if they are specific to the proposed losses. Can the authors comment on that? The advantages of first-order systems that I have in mind are: better conditioning than PINN type losses (thinking in terms of FEM results), and the fact that only first derivatives need to be computed. 

- Numerical results: The presented results confirm an improvement over the PINN baseline (in terms of errors), but it is not drastic. The relative L2 errors even seem to be comparable for the majority of the considered equations. Thus the value of the error majorants may lie mostly in what they are designed for -- estimating the error (after training) and the real question is: Are first-order systems (or Astral loss) computationally more efficient than the standard PINN formulation. This question is not sufficiently addressed in the present manuscript, and would need the experiments to focus on runtime and a thorough evaluation of automatic differentiation and implementation tricks. (For instance, it is often more efficient to compute the spatial derivatives in forward mode, incorporate tricks like the Forward Laplacian framework [ arXiv:2307.08214]  etc.)

- Recent work shows that PINNs are best optimized using second order methods. Improvement in accuracy can be drastic when changing from a stochastic first order method to a natural gradient or Gauss-Newton method see [Müller, arXiv:2302.13163] and [Rathore, arXiv:2402.01868]. It is important to take these recent developments into consideration for a thorough evaluation.

---

confidence: 4
contribution: 4
initial_rating: 6
presentation: 3
questions: - What is the surrogate function $\omega$ for the elastoplasticity example in Section 4.4?
- How exactly does the variational approach work?
- What do the surrogate functions required for evaluating the natural energy error look like? What is the behavior of their errors?
soundness: 3
strengths: The idea of training PINNs with the error majorant is a novel idea that, at least for some PDE classes, appears to be quite promising. The paper is generally well written and, for the most part, quite accessible. I particularly commend the intuitive motivation in Section 2.1, and the fact that a large number of PINNs (100) were trained for each setting, thus ruling out random effects. Some readers may consider the fact that the majorant must be derived/available for the considered PDE class as a shortcoming. In my experience with PINNs, in most forward problems, training often requires problem-specific adaptations (such as domain decomposition for large domains, collocation point weighting for stiff problems, etc.). I thus see the proposed approach as yet another such problem-specific adaption, but as an innovative one that leaves the established PINN paradigm of using the residual loss.
summary: The paper proposes training physics-informed neural networks (PINNs) not via the usual residual-based loss, but via minimizing the so-called error majorant, a quantity that can be derived for certain classes of PDEs but that requires learning surrogate functions. The paper shows that the energy norm error correlates with the relative error of the PINN candidate function to a better degree than the residuals do. The results indicate that this approach of training PINNs results in smaller relative errors in many cases, and that further the runtime to achieve this error is smaller than for conventional training strategies.
weaknesses: At some parts, the paper is not well written and somewhat unclear. For example, I think the authors switch between $\phi$ in Section 3, which is a general notation for the solution of the PDE, and problem-specific notation ($\phi$, $B$, $u$, etc.) in Section 4. In Section 5, the solution for diffusion is given as $u$, while in Section 4 it is given as $\phi$ (if I understand correctly). In Section 2.3, the surrogate function (flux) is denoted as $\tilde{F}$, while I think this corresponds to $\omega$ in Section 3. This makes reading the paper quite taxing. More importantly, it is sometimes not clear which functions are given and which are learned; and of those that are learned, which are the solution to the PDE ($\phi$) and which are surrogate functions ($\omega$). I thus suggest to homogenize notation.

Section 4 could be moved to the appendix, and the example in Section 2.3 or the general framework in Section 3 could be expanded. I think it must be more clear that surrogate functions need to be learned, which may be best accomplished by a schematic.

There are further considerations regarding the experimental section:
- In Section 5, it is not clear how the variational approach works. A few lines explaining this should be included in the revision.
- To judge the difficulty of the problems, I suggest to plot the solutions and PINN candidates for each of the considered problems.
- Table 1 could use vertical bars between Residual / Astral / Variational to better separate the results.
- Table 2 shows that the majorant is often a quite loose bound, contradicting the claims of the paper somewhat. Indeed, also for the mixed diffusion equation, the majorant is at least a factor of 3-4 of the natural energy error. It would be valuable to explain this phenomenon, and maybe also illustrate the error of the surrogate function required to approximate the natural energy error (e.g., the flux).
- Figure 1 requires axis labels.

Finally, I suggest that the paper undergoes proof reading by a native speaker, as some constructs read strangely and do not parse well.

Meta-review: The work is motivated from the observation that PINN losses may be unsuitable as an approximation/bound of the L2 distance between true and estimated solution. The work proposes new losses which are able to bound the L2 distance and some empirical evidence is provided supporting the effectiveness of the proposed losses. The reviewers acknowledge the progress reported, but several concerns were raised from all reviewers, including limited clarity of exposition, limited comparison with alternative approaches, e.g., which better handle the poor conditioning, limited empirical  evidence towards convincingly showing the efficacy, among others. The authors have responded to the concerns raised, resolved some, but certain concerns persist.

Decision: Reject