betaFeedback

WorksMathematics

Variationally correct loss functions for nonlinear parametric problems and their neural approximations

Abstract

We construct computable a posteriori error estimators for parametric families of nonlinear elliptic problems by measuring the residual of a variational formulation in the dual norm of a closed subspace of the test space. A single abstract theorem shows that the resulting estimator is bounded above and below by the error in the trial norm, i.e., it is a variationally correct loss function. Two instances are covered. The first considers an L2L_2-like test space, yielding a nonlinear first-order system least-squares loss function that certifies arbitrary, possibly meshless, approximations. The second breaks the test space, yielding a nonlinear discontinuous Petrov-Galerkin loss function computed by element-local problems. All assumptions are verified for quasilinear diffusion, including monotone fluxes and semilinear problems, and a nonlocal Kirchhoff model. Numerical studies train neural networks approximating the parameter-to-solution maps with the latter loss and measure the ratio of loss to squared error.

Introduction

The twin advances made in this paper concern (i) new a posteriori error estimators for parametric families of nonlinear elliptic problems, obtained by measuring a residual in a dual norm, and (ii) variationally correct loss functions for neural network (NN) approximations of the associated parameter-to-solution maps. The two are one and the same: the global error estimators are variationally correct loss functions, so we shall use the two terms interchangeably. The difference lies in applications. In automatic adaptivity, one localizes the error estimators and uses them in an adaptive loop (consisting of the standard solve, estimate, mark, and refine steps). In machine learning applications, one uses the loss function both for training and as an error certificate for NN predictions. In this paper we are driven more by the modern NN applications, but the new theory we develop applies to both.

Learning parameter-to-solution maps

A common approach to modeling uncertain physical processes is through systems of parameter-dependent partial differential equations (PDEs). Inference on system states, such as calibration of uncertain coefficients or identification of constitutive laws from observational data, is greatly facilitated by having an approximation to the parameter-to-solution map in hand. This motivates the vibrant area of operator learning. We shall see many examples later where a parametric PDE is reformulated into a nonlinear operator equation Aα(u)=ℓ\mathcal{A}_{\alpha}(u)=\ell on appropriate spaces, where α\alpha is a

2020 Mathematics Subject Classification. 65N30, 65N15, 35J62, 68T07.

Key words and phrases. nonlinear parametric PDEs, quasilinear fluxes, neural networks, Kirchhoff model, a posteriori estimator, DPG, FOSLS. high-dimensional parameter varying in some compact set Q\mathcal{Q} and Aα\mathcal{A}_{\alpha} involves partial derivatives with respect to the components of a spatial variable xx in a low-dimensional spatial domain Ω\Omega. The map α↦u\alpha\mapsto u is what we refer to as the parameter-to-solution map. Since the parameter domain is typically high- or even infinite-dimensional, operator learning extends established methods for solving a single PDE to learn the entire map.

Two paradigms currently dominate operator learning. The first, purely data-driven, requires computing high-fidelity solutions for a large number of parameter samples and then applying regression in function space over a suitable hypothesis class of operator representations, see, e.g., [5, 33]. The second—residual-based, or physics-informed—avoids high-fidelity solution computations altogether by minimizing a residual loss over the hypothesis class, see, e.g., [3, 17, 45, 38, 39]. The latter approach aligns with this paper, and its computational advantages are most pronounced when the PDE is nonlinear, since each high-fidelity solve is then particularly expensive. On the other hand, hypothesis classes best suited to high-dimensional parameter domains are themselves nonlinear, rendering the corresponding optimization non-convex. Consequently, it is generally uncertain whether optimization can fully exploit the approximation power of the hypothesis class, and the only available accuracy assessment at termination is the loss itself.

Variational correctness

Since the error cannot be computed and the loss is all one has at termination, it is worth stating precisely what one wants of it. Fix a parameter α\alpha, let u(α)u(\alpha) denote the exact solution of the PDE at that parameter, let ∥⋅∥\lVert\cdot\rVert denote a norm in which one wishes to measure the error—a model-compliant norm, such as an energy norm for a diffusion problem—and let H\mathcal{H} denote a hypothesis class of trial functions over which the loss is minimized. We call a loss function w↦Lα(w)w \mapsto\mathcal{L}_{\alpha}(w) variationally correct [3, 17] if there are constants 0<c≤C<∞0 < c \leq C < \infty, independent of α\alpha and of any discretization parameter, such that

c∥u(α)−w∥2≤Lα(w)≤C∥u(α)−w∥2for all w∈H.(1)c \lVert u(\alpha) - w \rVert^{2} \leq\mathcal{L}_{\alpha}(w) \leq C \lVert u(\alpha) - w \rVert^{2} \qquad\text{for all } w \in\mathcal{H}. \tag*{(1)}

The value of the loss is then a certificate of accuracy: it is small if and only if the error is small. Two features of (1) deserve emphasis. First, it is required to hold at every member of H\mathcal{H}, not merely at a minimizer, because during training the network output is an arbitrary member of the class and satisfies no Galerkin or Euler–Lagrange relation. Second, its constants must not degrade as the discretization is refined or as α\alpha ranges over the parameter set, since otherwise the certificate says nothing uniform.

A fundamental difficulty is that in infinite dimensions a small residual, measured in a convenient norm, need not imply a small error in a model-compliant norm. For linear PDEs this has led to the formulation of variationally correct residual losses [3, 17, 38], resting on the clean conceptual platform of Babuška’s theorem, which supplies stable variational formulations and hence (1). For nonlinear problems, which are the focus of this paper, matters are substantially harder. Existence and uniqueness of solutions may require strong structural hypotheses (monotonicity, coercivity), and bifurcations can give rise to multiple solution branches. When stability holds, it is typically only local, i.e., valid only in a neighborhood of a regular solution, one at which the derivative of the operator is well behaved; then (1) can be expected only for ww near u(α)u(\alpha). Beyond stability, a challenge inherited from the linear case remains: variationally correct residual losses involve dual norms, which are generally intractable to evaluate exactly.

Which losses are variationally correct?

Before describing what we do, we survey the losses in common use and ask which of them satisfy (1). We shall use the standard spaces on the low-dimensional spatial domain, such as H1={w∈L2(Ω):∂iw∈L2(Ω)}H^1 = \{w \in L_2(\Omega) : \partial_i w \in L_2(\Omega)\}, its dual H−1H^{-1}, and H(div⁡)={r∈L2(Ω)d:div⁡r∈L2(Ω)}H(\operatorname{div}) = \{r \in L_2(\Omega)^d : \operatorname{div} r \in L_2(\Omega)\}. For any space XX and its dual X′X', the action of a functional f∈X′f \in X' on v∈Xv \in X is written either as f(v)f(v) or as ⟨f,v⟩X\langle f,v\rangle_X, where the subscript is dropped when no confusion can arise. We also omit Ω\Omega from the notation for spaces if no confusion can arise. To keep the discussion concrete we use one model problem: on a bounded domain Ω⊂Rd\Omega\subset\mathbb{R}^d, given f∈L2(Ω)f \in L_2(\Omega) and a parameter-dependent flux function σα:Rd→Rd\sigma_\alpha:\mathbb{R}^d \to\mathbb{R}^d, find uu with

div⁡(σα(∇u))=f in Ω,u=0 on ∂Ω,(2)\operatorname{div}(\sigma_\alpha(\nabla u)) = f \text{ in } \Omega,\qquad u=0 \text{ on } \partial\Omega, \tag*{(2)}

i.e., u∈H˚1u \in\mathring{H}^1 with −(σα(∇u),∇v)Ω=(f,v)Ω-(\sigma_\alpha(\nabla u),\nabla v)_\Omega= (f,v)_\Omega for all v∈H˚1v \in\mathring{H}^1, where (⋅,⋅)Ω(\cdot,\cdot)_\Omega is the L2(Ω)L_2(\Omega) inner product and H˚1\mathring{H}^1 is the Sobolev space of L2L_2 functions with L2L_2 gradient and vanishing trace, normed by the model-compliant norm u↦∥∇u∥L2u \mapsto\|\nabla u\|_{L_2}. We assume that σα\sigma_\alpha satisfies the hypotheses in § 3.4 (strong monotonicity and Lipschitz continuity) given later. Under those assumptions (2) has a unique solution u=u(α)u=u(\alpha). The model-compliant norm is ∥∇(u−w)∥L2\|\nabla(u-w)\|_{L_2}.

The strong residual. The strong-form loss associated with (2), ubiquitous in collocation PINNs [39], is ∥f−div⁡(σα(∇w))∥L22\|f-\operatorname{div}(\sigma_\alpha(\nabla w))\|_{L_2}^2. It measures a second-order residual in L2L_2, whereas the natural residual of the weak problem lies in H−1H^{-1}. No mesh-independent equivalence can repair the mismatch. Even for the one-dimensional linear prototype, u′′=0=fu''=0=f on Ω=(0,π)\Omega=(0,\pi), with σα(p)=−p\sigma_\alpha(p)=-p in (2), whose exact solution is u=0u=0, for candidates wn(x)=n−2sin⁡(nx)w_n(x)=n^{-2}\sin(nx), n≥1n\ge1, the loss equals ∥wn′′∥L22=π/2\|w_n''\|_{L_2}^2=\pi/2 for every nn, whereas the error ∥∇(u−wn)∥L22=∥wn′∥L22=π/(2n2)\|\nabla(u-w_n)\|_{L_2}^2=\|w_n'\|_{L_2}^2=\pi/(2n^2) tends to zero as n→∞n\to\infty. The upper bound of (1) therefore fails.

The energy functional. Suppose the flux derives from an energy density, i.e., σα(p)=φα′(∣p∣)p/∣p∣\sigma_\alpha(p)=\varphi_\alpha'(|p|)p/|p| for a convex profile φα\varphi_\alpha. The functional whose Euler–Lagrange equation is the weak form of (2) is then

Jα(w):=∫Ωφα(∣∇w∣) dx−(f,w)Ω,(3)\mathcal{J}_\alpha(w) := \int_\Omega\varphi_\alpha(|\nabla w|)\,dx-(f,w)_\Omega, \tag*{(3)}

a valid training objective of Deep Ritz type [25] whose unique minimizer is uu. Indeed, the strong monotonicity and Lipschitz continuity assumed in § 3.4 imply

μ12∥∇(u−w)∥L22≤Jα(w)−Jα(u)≤μ22∥∇(u−w)∥L22,(4)\frac{\mu_1}{2}\|\nabla(u-w)\|_{L_2}^2 \le\mathcal{J}_\alpha(w)-\mathcal{J}_\alpha(u) \le\frac{\mu_2}{2}\|\nabla(u-w)\|_{L_2}^2, \tag*{(4)}

so the energy gap is variationally correct. It is not, however, a computable certificate, because the offset Jα(u)\mathcal{J}_\alpha(u) is unknown: the raw energy can be minimized without knowing the offset, but its magnitude cannot be converted into an error estimate or a stopping tolerance, and replacing it by ∣Jα(w)∣|\mathcal{J}_\alpha(w)| neither repairs this nor preserves the minimizer. The energy method is thus a legitimate optimization baseline, but its raw value is not a loss satisfying (1).

The natural residual and its localization. For w∈H˚1w \in\mathring{H}^1 the residual of the weak form,

⟨Res⁡α(w),v⟩:=(f,v)Ω+(σα(∇w),∇v)Ω,v∈H˚1,(5)\langle\operatorname{Res}_\alpha(w),v\rangle:= (f,v)_\Omega+(\sigma_\alpha(\nabla w),\nabla v)_\Omega,\qquad v\in\mathring{H}^1, \tag*{(5)}

then satisfies

1μ2∥Res⁡α(w)∥H−1≤∥∇(u−w)∥L2≤1μ1∥Res⁡α(w)∥H−1,(6)\frac{1}{\mu_2}\|\operatorname{Res}_\alpha(w)\|_{H^{-1}} \le\|\nabla(u-w)\|_{L_2} \le\frac{1}{\mu_1}\|\operatorname{Res}_\alpha(w)\|_{H^{-1}}, \tag*{(6)}

by the techniques in §3.4 with the μi\mu_i given there (use the fundamental theorem of calculus along the segment from ww to uu together with the flux bounds established there). The continuous H−1H^{-1} residual is therefore variationally correct—but its exact evaluation is an infinite-dimensional, globally coupled Riesz problem, so it is not computable. The standard computable surrogate is the residual estimator: with Xh⊂H˚1X_h \subset\mathring{H}^1 a conforming finite element space on a shape-regular simplicial mesh Ωh\Omega_h of Ω\Omega, whose elements KK have diameters hKh_K and whose interior facets FF have diameters hFh_F and unit normals nFn_F, put RK(wh)=f−div⁡(σα(∇wh))∣KR_K(w_h)=f-\operatorname{div}(\sigma_\alpha(\nabla w_h))|_K for the elementwise residual and JF(wh)=[[σα(∇wh)]]⋅nFJ_F(w_h)=[[\sigma_\alpha(\nabla w_h)]]\cdot n_F for the jump of the flux across FF, and set

References

  1. [1]L. Angermann, A posteriori error estimates for FEM with violated Galerkin orthogonality, Numer. Methods Partial Differential Equations, 18 (2002), pp. 241–259.DOI
  2. [2]J. Appell and P. P. Zabrejko, Nonlinear Superposition Operators, vol. 95 of Cambridge Tracts in Mathematics, Cambridge University Press, Cambridge, 1990.DOI
  3. [3]M. Bachmayr, W. Dahmen, and M. Oster, Variationally correct neural residual regression for parametric PDEs: On the viability of controlled accuracy, IMA J. Numer. Anal., draf073 (2025).arxiv.org/abs/2405.20065
  4. [4]F. Bertrand, M. Broddeck, T. Ricken, and H. Schneider, Least-squares finite element methods for nonlinear problems: a unified framework. arXiv:2503.18739, 2025.arxiv.org/abs/2503.18739
  5. [5]K. Bhattacharya, B. Hosseini, N. B. Kovachki, and A. M. Stuart, Model reduction and neural networks for parametric PDEs, SMAI J. Comput. Math., 7 (2021), pp. 121–157.arxiv.org/abs/2005.03180
  6. [6]P. B. Bochev, Analysis of least-squares finite element methods for the Navier–Stokes equations, SIAM J. Numer. Anal., 34 (1997), pp. 1817–1844.
  7. [7]P. Bringmann, Scaling-robust built-in a posteriori error estimation for discontinuous least-squares finite element methods, IMA J. Numer. Anal., 46 (2026), pp. 235–270.
  8. [8]P. Bringmann, C. Carstensen, and G. Starke, An adaptive least-square FEM for linear elasticity with optimal convergence rates, SIAM J. Numer. Anal., 56 (2018), pp. 428–447.DOI
  9. [9]P. Bringmann and D. Praetorius, Global convergence of adaptive least-squares finite element methods for nonlinear PDEs, SIAM J. Numer. Anal., 64 (2026), pp. 1239–1274.arxiv.org/abs/2509.01531
  10. [10]Z. Cai, R. Lazarov, T. A. Manteuffel, and S. F. McCormick, First-order system least squares for second-order partial differential equations. I, SIAM J. Numer. Anal., 31 (1994), pp. 1785–1799.
  11. [11]P. Cantin and N. Heuer, A DPG framework for strongly monotone operators, SIAM J. Numer. Anal., 56 (2018), pp. 2731–2750.DOI
  12. [12]C. Carstensen, P. Bringmann, F. Hellwig, and P. Wriggers, Nonlinear discontinuous Petrov–Galerkin methods, Numer. Math., 139 (2018), pp. 529–561.arxiv.org/abs/1710.00529
  13. [13]C. Carstensen, L. Demkowicz, and J. Gopalakrishnan, A posteriori error control for DPG methods, SIAM J. Numer. Anal., 52 (2014), pp. 1335–1353.DOI
  14. [14]C. Carstensen, L. Demkowicz, and J. Gopalakrishnan, Breaking spaces and forms for the DPG method and applications including Maxwell equations, Comput. Math. Appl., 72 (2016), pp. 494–522.DOI
  15. [15]M. Chipot and T. Savitska, Nonlocal p-Laplace equations depending on the Lp norm of the gradient, Adv. Differential Equations, 19 (2014), pp. 997–1020.DOI
  16. [16]M. Chipot, V. Valente, and G. Vergara Cafarelli, Remarks on a nonlocal problem involving the Dirichlet energy, Rend. Sem. Mat. Univ. Padova, 110 (2003), pp. 199–220.DOI
  17. [17]P. Cortés Castillo, W. Dahmen, and J. Gopalakrishnan, DPG loss functions for learning parameter-to-solution maps by neural networks, Comput. Math. Appl., 221 (2026), pp. 300–329.DOI
  18. [18]———, Global error estimators for parametric monotone nonlinearities and neural approximations. arXiv:2610.05767, 2026.arxiv.org/abs/2610.05767
  19. [19]P. Cortés Castillo and J. Gopalakrishnan, Fortin operators for DPG advection discretizations. arXiv:2608.30043, 2026.arxiv.org/abs/2608.30043
  20. [20]W. Dahmen, C. Huang, C. Schwab, and G. Welper, Adaptive Petrov–Galerkin methods for first order transport equations, SIAM J. Numer. Anal., 50 (2012), pp. 2420–2445.
  21. [21]L. Demkowicz and J. Gopalakrishnan, Analysis of the DPG method for the Poisson equation, SIAM J. Numer. Anal., 49 (2011), pp. 1788–1809.DOI
  22. [22]———, A class of discontinuous Petrov–Galerkin methods. Part II: Optimal test functions, Numer. Methods Partial Differential Equations, 27 (2011), pp. 70–105.
  23. [23]L. Demkowicz and J. Gopalakrishnan, A primal DPG method without a first-order reformulation, Comput. Math. Appl., 66 (2013), pp. 1058–1064.
  24. [24]———, The discontinuous Petrov–Galerkin method, Acta Numer., 34 (2025), pp. 293–384.DOI
  25. [25]W. E and B. Yu, The Deep Ritz method: A deep learning-based numerical algorithm for solving variational problems, Commun. Math. Stat., 6 (2018), pp. 1–12.arxiv.org/abs/1710.00211
  26. [26]A. Ern and J.-L. Guermond, Finite Elements II: Galerkin Approximation, Elliptic and Mixed PDEs, no. 73 in Texts in Applied Mathematics, Springer, Cham, 2021.DOI
  27. [27]T. Führer and N. Heuer, Robust DPG test spaces and Fortin operators—the H¹ and H(div) cases, SIAM J. Numer. Anal., 62 (2024), pp. 718–748.DOI
  28. [28]T. Führer and S. Rojas, A posteriori analysis of neural network approximations. arXiv:2507.06017, 2025.arxiv.org/abs/2507.06017
  29. [29]C. García Vera, N. Heuer, and D. Praetorius, Minimum residual discretization of a semilinear elliptic problem. arXiv:2603.29863, 2026.arxiv.org/abs/2603.29863
  30. [30]J. Gopalakrishnan and W. Qiu, An analysis of the practical DPG method, Math. Comp., 83 (2014), pp. 537–552.arxiv.org/abs/1107.4293
  31. [31]T. Gudi, Finite element method for a nonlocal problem of Kirchhoff type, SIAM J. Numer. Anal., 50 (2012), pp. 657–668.DOI
  32. [32]G. R. Kirchhoff, Vorlesungen über mathematische Physik: Mechanik, Teubner, Leipzig, 1876.
  33. [33]Z. Li, N. Kovachki, K. Azizadehnesheli, B. Liu, K. Bhattacharya, A. Stuart, and A. Anandkumar, Fourier neural operator for parametric partial differential equations, in International Conference on Learning Representations (ICLR), 2021.
  34. [34]J.-L. Lyons, On some questions in boundary value problems of mathematical physics, in Contemporary Developments in Continuum Mechanics and Partial Differential Equations, vol. 30 of North-Holland Math. Stud., North-Holland, Amsterdam, 1978, pp. 284–346.
  35. [35]I. Muga, J. Perera, S. Rojas, and R. Ruiz-Baier, A residual minimization approach for nonlinear partial differential equations set in Banach spaces. arXiv:2604.00341, 2026.arxiv.org/abs/2604.00341
  36. [36]B. Müller, G. Starke, A. Schwarz, and J. Schröder, A first-order system least squares method for hyperelasticity, SIAM J. Sci. Comput., 36 (2014), pp. B795–B816.DOI
  37. [37]A. Pal and T. Gudi, Convergence of an AFEM for a non-local nonlinear problem of Kirchhoff type, Comput. Math. Appl., 189 (2025), pp. 176–193.
  38. [38]Y. Qiu, P. Chen, and W. Dahmen, Variationally correct operator learning: Reduced basis neural operator with a posteriori error estimation, Comput. Methods Appl. Mech. Engrg., 461 (2026), p. 119228.
  39. [39]M. Raissi, P. Perdikaris, and G. E. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, J. Comput. Phys., 378 (2019), pp. 686–707.DOI
  40. [40]G. Starke, Gauss–Newton multilevel methods for least-squares finite element computations of variably saturated subsurface flow, Computing, 64 (2000), pp. 323–338.DOI
  41. [41]———, Least-squares mixed finite element solution of variably saturated subsurface flow problems, SIAM J. Sci. Comput., 21 (2000), pp. 1869–1885.DOI
  42. [42]———, An adaptive least-squares mixed finite element method for elasto-plasticity, SIAM J. Numer. Anal., 45 (2007), pp. 371–388.DOI
  43. [43]R. Verfürth, A posteriori error estimates for nonlinear problems: Finite element discretizations of elliptic equations, Math. Comp., 62 (1994), pp. 445–475.DOI
  44. [44]E. Zeidler, Nonlinear Functional Analysis and its Applications. II/B: Nonlinear Monotone Operators, Springer-Verlag, New York, 1990.
  45. [45]D. Zhang, L. Lu, L. Guo, and G. E. Karniadakis, Quantifying total uncertainty in physics-informed neural networks for solving forward and inverse stochastic problems, J. Comput. Phys., 397 (2019), p. 108850.DOI

Paper details

vlnc:W_y3kvxrqh
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents