---
title: 'Interface-Penalty PG-VPINN: Stabilized Neural Method'
url: https://www.emergentmind.com/topics/interface-penalty-pg-vpinn
type: topic
---

# Interface-Penalty PG-VPINN: Stabilized Neural Method

Interface-Penalty PG-VPINN denotes a Petrov–Galerkin variational physics-informed neural network formulation in which the trial space is represented by a deep neural network, the test space is constructed from localized hat functions, and interface penalty terms are introduced to enhance numerical stability and to resolve boundary-layer structure in singularly perturbed problems. In the formulation summarized in "A Variational Physics-Informed Neural Network Framework Using Petrov-Galerkin Method for Solving Singularly Perturbed Boundary Value Problems" [2509.12271], the method is applied to one-dimensional singularly perturbed boundary value problems and parabolic partial differential equations involving one or two small parameters. Its defining ingredients are weak residual minimization, hard enforcement of Dirichlet boundary conditions, localized Petrov–Galerkin testing, and interface-focused stabilization aimed at improved accuracy in both the $L_2$ and maximum norms relative to a standard VPINN baseline [2509.12271].

## 1. Problem class and singular perturbation structure

The framework targets singularly perturbed problems, namely differential equations in which one or more small parameters multiply the highest derivatives. These problems develop boundary layers, i.e. very steep gradients near one or both endpoints of the domain, and this is the main source of difficulty for both neural and mesh-based solvers [2509.12271].

For steady one-parameter convection–diffusion, the model problem is
\[
-\epsilon u''(x)+b(x)u'(x)+c(x)u(x)=r(x), \qquad x\in(0,1),
\]
with Dirichlet conditions
\[
u(0)=u(1)=0,
\]
and assumptions
\[
0<\epsilon\ll 1,\qquad b(x)\ge \alpha>0,\qquad c(x)-\frac{b'(x)}{2}>0.
\]
The summary states that this setting yields a boundary layer at $x=1$ [2509.12271].

For steady one-parameter reaction–diffusion, the model is
\[
-\epsilon^{2}u''(x)+c(x)u(x)=r(x), \qquad x\in(0,1),
\]
with
\[
u(0)=u(1)=0,\qquad c(x)\ge \beta^2>0.
\]
This exhibits boundary layers at both endpoints, $x=0$ and $x=1$ [2509.12271].

For the time-dependent one-parameter problem, the paper considers
\[
u_t-\epsilon u_{xx}+b(x)u_x+c(x)u(x,t)=r(x,t), \qquad (x,t)\in(0,1)\times(0,T],
\]
with
\[
u(0,t)=u(1,t)=0,\qquad u(x,0)=\phi(x).
\]
The solution again develops a boundary layer near $x=1$ [2509.12271].

The two-parameter extensions are
\[
-\epsilon u''(x)+\mu b(x)u'(x)+c(x)u(x)=r(x), \qquad x\in(0,1),
\]
and
\[
u_t-\epsilon u_{xx}+\mu b(x)u_x+c(x)u(x,t)=r(x,t),
\]
with
\[
0<\epsilon\ll 1,\qquad 0<\mu\ll 1.
\]
The steady two-parameter boundary value problem is described as having boundary layers at both ends [2509.12271].

Within this problem class, the interface-penalty reading of the method is motivated by the same difficulty that drives stabilized finite element design: narrow layers generate large derivatives in small regions, so purely pointwise or insufficiently localized residual enforcement can lose robustness near the layer.

## 2. Neural trial space, localized test space, and boundary treatment

The method is a VPINN in weak form, but with a Petrov–Galerkin structure: the trial space is nonlinear and neural, while the test space is finite-dimensional, local, and piecewise linear. The neural trial space is
\[
U_{NN}=\left\{u_\theta(x)=\mathrm{DNN}(x;\theta)\mid \theta\in\Theta\right\},
\]
and the experiments use a multilayer perceptron with $\tanh$ activations, 4 hidden layers, and 20 neurons per layer [2509.12271].

Dirichlet boundary conditions are not imposed by a soft penalty. Instead, they are embedded by construction through
\[
u_\theta(x)=x(1-x)\,\mathrm{NN}_\theta(x),
\]
which gives
\[
u_\theta(0)=u_\theta(1)=0
\]
exactly. The summary states that this removes the boundary-condition MSE term from the loss and improves convergence [2509.12271].

The test space is built from piecewise linear hat functions $\{v_i\}_{i=1}^M$ on a mesh $I_h$. Their compact support localizes weak residual enforcement and is explicitly presented as better suited to steep gradients than earlier VPINN choices such as Legendre polynomials or trigonometric test bases [2509.12271]. For the steady one-dimensional problems, the reported discretization uses 36 test functions and 1000 quadrature points. For time-dependent problems, it uses 18 test functions and 100 quadrature points in space and time [2509.12271].

This trial–test asymmetry is the core Petrov–Galerkin feature. The neural trial space carries the nonlinear approximation power, while the hat-function test space provides locality, support restriction, and a finite-element-like residual decomposition over the mesh.

## 3. Petrov–Galerkin weak residual formulation

For the steady convection–diffusion problem, the variational statement is: find $u\in H_0^1(I)$ such that
\[
a(u,v)=(r,v), \qquad \forall v\in H_0^1(I),
\]
with
\[
a(u,v)=\int_I \epsilon u'(x)v'(x)\,dx +\int_I b(x)u'(x)v(x)\,dx +\int_I c(x)u(x)v(x)\,dx,
\]
and
\[
(r,v)=\int_I r(x)v(x)\,dx.
\]
The neural Petrov–Galerkin approximation is then posed as: find $u_h\in U_{NN}$ such that
\[
a_h(u_h,v)=(r,v)\quad \forall v\in V_h,
\]
where $a_h$ denotes elementwise integration over the mesh $I_h$ [2509.12271].

The steady loss is constructed from local weak residuals against the hat basis,
\[
R_i(\theta)=\int_0^1\left(-\epsilon u_\theta''(x)+b(x)u_\theta'(x)+c(x)u_\theta(x)-r(x)\right)v_i(x)\,dx,
\]
and
\[
\mathcal{L}(\theta)=\frac{1}{M}\sum_{i=1}^M \left(R_i(\theta)\right)^2.
\]
This is the defining VPINN loss: the PDE is not enforced pointwise at collocation points, but through residual moments against local test functions [2509.12271].

For parabolic problems, the formulation uses backward Euler in time. At time step $t_n$, the residual is
\[
R(x)=\frac{u_\theta(x)-u^{n-1}(x)}{\Delta t} -\epsilon u_{\theta,xx}+b(x)u_{\theta,x}+c(x)u_\theta(x)-r(x,t_n),
\]
and the loss is
\[
\mathcal{L}(\theta)=\frac{1}{M}\sum_{i=1}^M \int_0^1 R(x)\phi_i(x)\,dx,
\]
approximated by quadrature or MSE form [2509.12271].

A compact summary given in the technical extraction is
\[
u_h(x)=x(1-x)\,\mathrm{DNN}_\theta(x),
\]
\[
R_i(\theta)=\int_I \Big(\mathcal{D}(u_h)-r\Big)v_i\,dx,
\]
\[
\mathcal{L}(\theta)=\frac{1}{M}\sum_{i=1}^M |R_i(\theta)|^2.
\]
Within this structure, the interface-penalty augmentation appears as a stabilization layer added to the weak residual objective rather than as a replacement for the variational formulation.

## 4. Interface penalty mechanism and stabilization role

The paper summary presents the method as an interface-penalty variant because the stabilization mechanism is consistent with interior-penalty ideas from DG, IPDG, SIPG, and NIPG methods. The motivation is explicit: boundary layers create very steep gradients; local weak testing on subintervals can leave instability or poor coupling between adjacent elements; interface penalties improve enforcement of continuity-like behavior across element interfaces and stabilize the learned approximation [2509.12271].

The stated purposes of the penalty terms are to stabilize the weak formulation in the presence of sharp layers, suppress oscillations near layer regions, improve inter-element communication when using local hat test functions, enhance accuracy in $L_2$ and $L^\infty$ norms especially near boundaries, and mimic the robustness of interior-penalty finite element ideas while retaining the neural trial space [2509.12271].

A representative augmentation is written as
\[
a_h^{\text{IP}}(u_h,v) = a_h(u_h,v) +\sum_{j}\eta_j [u_h]_{x_j}[v]_{x_j} +\text{(possibly flux / consistency terms)}.
\]
The summary also gives the corresponding loss-level form
\[
\mathcal{L}_{\text{IP}}(\theta) = \mathcal{L}(\theta) + \sum_j \eta_j \,\mathcal{P}_j(u_h,v_i),
\]
where $\mathcal{P}_j$ penalizes mismatch at element interfaces and improves stability near layers [2509.12271].

Because the neural trial function is continuous, the jump $[u_h]$ may be small or zero. The summary therefore notes that the penalty idea can still act on interface flux or derivative mismatch and improve robustness around layer-adapted regions [2509.12271]. This suggests that the essential role of the penalty is not merely continuity of function values, but stabilization of inter-element transmission of steep-gradient information.

The expected benefit is stated in specifically layer-oriented terms: the penalty discourages spurious interface mismatch, regularizes the training objective, improves approximation of steep gradients, and yields better layer resolution even on a relatively coarse mesh of test functions [2509.12271]. In that sense, the formulation is neither a purely strong-form PINN nor a purely classical continuous Galerkin VPINN; it is a weak neural method with explicit interface-aware stabilization.

## 5. Implementation details and reported numerical behavior

A key implementation detail is source-term generation by automatic differentiation from a manufactured exact solution. For example,
\[
r(x)= -\epsilon u_{\text{exact}}''(x)+b(x)u_{\text{exact}}'(x)+c(x)u_{\text{exact}}(x),
\]
and similarly for the parabolic case. The summary states that this ensures exact-consistency manufactured training data, accurate evaluation of the weak residual, and clean benchmark comparisons [2509.12271].

Training uses a two-stage optimizer strategy: Adam for fast initial descent and L-BFGS for fine tuning. For the steady convection–diffusion problem, the reported settings are Adam with learning rate $10^{-3}$ and then L-BFGS for 1500 epochs. For reaction–diffusion and two-parameter steady problems, the summary reports L-BFGS only for 1500 epochs. For parabolic problems, it reports Adam with learning rate $10^{-3}$ followed by L-BFGS for 1000 epochs [2509.12271].

Among the benchmark cases explicitly summarized, the following error ranges are reported.

| Problem | Setting | Reported errors |
|---|---|---|
| One-parameter convection–diffusion BVP | $\epsilon=10^{-1}$ to $10^{-5}$ | $L_2$: $2.11\times 10^{-5}$ to $1.17\times 10^{-3}$; max: $3.74\times 10^{-5}$ to $2.39\times 10^{-3}$ |
| Parabolic one-parameter IBVP | final time $T=1$ | $L_2$: $2.63\times 10^{-4}$ to $2.31\times 10^{-3}$; maximum: $4.73\times 10^{-4}$ to $2.13\times 10^{-2}$ |
| Reaction–diffusion BVP | reported benchmark | $L_2$: about $2.17\times 10^{-4}$ to $7.10\times 10^{-3}$; max: about $4.52\times 10^{-4}$ to $4.06\times 10^{-2}$ |
| Two-parameter BVP | reported benchmark | $L_2$: $2.04\times 10^{-4}$ to $8.97\times 10^{-4}$; max: $2.89\times 10^{-4}$ to $2.16\times 10^{-2}$ |
| Two-parameter parabolic IBVP | final-time errors | $L_2$: $4.99\times 10^{-5}$ to $3.19\times 10^{-3}$; max: $9.28\times 10^{-5}$ to $2.23\times 10^{-2}$ |

The summarized steady convection–diffusion benchmark uses
\[
b(x)=-(1+x),\qquad c(x)=1,
\]
with exact solution
\[
u(x)=1-x-e^{-x/\epsilon}+x e^{-x/\epsilon},
\]
while the one-parameter parabolic benchmark uses
\[
b(x)=1,\qquad c(x)=1,
\]
and
\[
u(x,t)=e^{-t}\big(1-e^{-(1-x)/\epsilon}\big)\sin x.
\]
The reaction–diffusion benchmark uses
\[
c(x)=1,\qquad u(x)=1+e^{-1/\epsilon}-e^{-x/\epsilon}-e^{-(1-x)/\epsilon},
\]
and the two-parameter BVP benchmark uses $b(x)=1$, $c(x)=1$, with an exact solution involving exponentials with $m_1,m_2$ [2509.12271].

The summary’s overarching claim is that the proposed Petrov–Galerkin VPINN setup, especially when augmented with interface-penalty stabilization, better captures steep boundary-layer profiles, yields lower absolute and relative errors in both $L_2$ and max norms, exhibits more stable convergence during training, is more robust as $\epsilon$ and $\mu$ become smaller, and improves performance for both steady and time-dependent singularly perturbed problems [2509.12271].

## 6. Relation to adjacent interface and weak-form neural methods

Interface-Penalty PG-VPINN sits within a broader methodological spectrum defined by three competing strategies for handling internal transmission constraints.

One strategy uses explicit penalty terms. Classical interface-penalty finite element formulations provide the closest structural precedent. In the unfitted $hp$-IPFEM for elliptic interface problems, the bilinear form includes consistency terms and jump penalties on both the solution and the normal flux,
\[
J_0(u,v)=\sum_{e\in\mathcal{I}_h}\frac{\gamma_0 p^2}{h_{K^e}}\int_e [u][v], \qquad
J_1(u,v)=\sum_{e\in\mathcal{I}_h}\frac{\gamma_1 h_{K^e}}{p^2}\int_e [a\nabla u\cdot n]\,[a\nabla v\cdot n],
\]
with symmetric and non-symmetric variants distinguished by $\beta=1$ and $\beta=-1$ [1007.2893]. This provides a direct finite-element analogue for the interface-penalty reading of PG-VPINN.

A second strategy removes interface penalties from the objective by encoding interface physics into the ansatz. "Hard-constrained Physics-informed Neural Networks for Interface Problems" introduces a windowing approach and a buffer approach so that interface continuity and flux balance are satisfied by design rather than by soft loss terms [2604.08453]. In one-dimensional problems, the paper reports that hard constraints consistently improve interface fidelity and remove the need for loss-weight tuning; in two dimensions, it identifies the buffer formulation as more robust than windowing because full hard windowing becomes sensitive to overlap, corner effects, and over-constraint [2604.08453]. Relative to Interface-Penalty PG-VPINN, this is an alternative rather than an extension.

A third strategy handles interfaces implicitly through the weak form itself. INI-VPINN is a weak-form PINN for multi-material domains in which compact-support weighting functions and integration by parts implicitly impose Neumann and interface conditions, with one global network and no explicit interface penalty loss terms [2606.18032]. The paper states that the weak formulation remains well-defined for discontinuous coefficients because it does not differentiate $\kappa$, and that the transmission conditions
\[
[u]_{\Gamma_I}=0,\qquad [\kappa\,\partial_n u]_{\Gamma_I}=0
\]
arise automatically from the weak form [2606.18032]. This provides an explicit contrast to interface-penalty approaches, where interface conditions remain an additional optimization target.

For singularly perturbed advection-dominated diffusion, the stabilization issue also appears in non-interface settings. "Physics Informed Neural Networks with strong and weak residuals for advection-dominated diffusion problems" emphasizes Petrov–Galerkin stabilization, residual minimization, and adaptive point or test-function placement near the outflow layer [2307.07647]. Its 2D residual-minimization PG formulation includes penalty-like boundary terms of the form
\[
-\sum_K \left(u_h, \frac{3p^2\epsilon}{h_K} v_m\right)_{\Gamma|_K},
\]
and the paper explicitly argues that carefully selected test spaces improve stability [2307.07647]. This suggests that interface-penalty PG-VPINN should be viewed not as an isolated architecture, but as one member of a broader stabilized weak-residual family.

For higher-order interface physics, the same design principle persists. The immersed $C^0$ interior penalty method for biharmonic interface problems uses additional penalty terms on interface segments to stabilize jumps associated with $u$, $\partial_n u$, $\beta\partial_{nn}u$, and higher-order flux terms [2509.12555]. A plausible implication is that, as the differential order or interface complexity increases, the penalty architecture in a PG-VPINN would have to reflect derivative order and geometric localization rather than merely penalize function-value mismatch.

Across these related formulations, the central methodological question is whether interface information should be penalized, embedded, or implied. Interface-Penalty PG-VPINN occupies the explicit-stabilization position: it keeps the Petrov–Galerkin weak residual as the core objective, uses localized test functions to resolve layers, and augments the formulation with interface penalty terms when steep-gradient transmission across local supports requires additional numerical control [2509.12271].

Source: https://www.emergentmind.com/topics/interface-penalty-pg-vpinn