Seung Whan Chung, Stephen Castonguay, Sumanta Roy, Michael Penwarden, Yucheng Fu, Pratanu Roy
6 min
This paper tackles a key limitation of Physics-Informed Neural Networks (PINNs) when solving Partial Differential Equations (PDEs) with interfaces—regions where solution properties like coefficients or the solution itself jump discontinuously (e.g., material boundaries). Standard PINNs enforce interface conditions softly via penalty terms in the loss function, leading to suboptimal accuracy near interfaces due to tricky multi-objective optimization and the need for manual loss-weight tuning. The authors propose two hard-constrained PINN formulations that bake interface physics directly into the neural network's solution representation (ansatz), ensuring exact satisfaction of continuity and flux conditions by design. This decouples constraint enforcement from PDE residual minimization, improving fidelity and robustness.
The methods are tested on 1D and 2D elliptic interface problems, modeled by the Poisson equation -∇·(κ(x)∇u) = f with discontinuous diffusivity κ(x), Dirichlet/Neumann boundaries, and interface jumps.
PINNs solve forward/inverse PDE problems by training neural networks to minimize a composite loss: PDE residuals in the domain interior plus boundary/interface penalties. They're mesh-free and flexible but struggle with interface problems, where discontinuities in coefficients (high-contrast κ) or solutions cause Gibbs-like oscillations or poor convergence near interfaces Γ_ij. Soft constraints [[u]]=0 (solution continuity) and {{κ∇u}}=0 (flux balance) are imperfect, as the optimizer balances competing losses unevenly.
This domain-decomposition method builds a trial solution u(x) as a sum of subdomain-specific terms: u(x) = Σ_m NN_m(x) · W_m(x) + boundary/interface corrections. Here, NN_m are standard neural networks, and W_m are compactly supported polynomial window functions that are 1 inside subdomain Ω_m, smoothly taper to 0 at boundaries Γ_b and interfaces Γ_ij, and have vanishing derivatives to enforce flux conditions.
Intuition: Windows 'turn on/off' each subnetwork exactly where needed, embedding constraints geometrically. In 1D, it achieves spectral-like accuracy (10^{-9} error) for simple cases. In 2D, it's sensitive to window overlap, corners, and over-constrains the function space, reducing flexibility.
A more robust alternative augments unrestricted subnetworks NN_m(x) with lightweight buffer functions b_m(x)—simple corrections (e.g., distance-based polynomials) evaluated only at discrete collocation points on boundaries/interfaces. The ansatz is u(x) = Σ_m NN_m(x) + Σ b_m(x), where buffers enforce constraints pointwise without restricting the main networks.
Intuition: Buffers act as 'patches' for exact constraint satisfaction at key points, leaving interiors free for PDE fitting. It's geometrically flexible (no overlap tuning), scales to complex 2D interfaces, and maintains ~10^{-5} accuracy across varied sources/configs, outperforming windowing in higher dimensions.
Hard constraints eliminate loss tuning, boost interface fidelity, and outperform soft baselines. Windowing shines in 1D structured problems; buffers excel in 2D/multi-interface realism. This advances PINNs for multiphysics simulations (e.g., fluid-structure, heterogeneous materials), bridging neural solvers with classical domain-decomposition ideas like immersed boundaries.
Physics-informed neural networks (PINNs) have emerged as a flexible framework for solving partial differential equations, but their performance on interface problems remains challenging because continuity and flux conditions are typically imposed through soft penalty terms. The standard soft-constraint formulation leads to imperfect interface enforcement and degraded accuracy near interfaces. We introduce two ansatz-based hard-constrained PINN formulations for interface problems that embed the interface physics into the solution representation and thereby decouple interface enforcement from PDE residual minimization. The first, termed the windowing approach, constructs the trial space from compactly supported windowed subnetworks so that interface continuity and flux balance are satisfied by design. The second, called the buffer approach, augments unrestricted subnetworks with auxiliary buffer functions that enforce boundary and interface constraints at discrete points through a lightweight correction. We study these formulations on one- and two-dimensional elliptic interface benchmarks and compare them with soft-constrained baselines. In one-dimensional problems, hard constraints consistently improve interface fidelity and remove the need for loss-weight tuning; the windowing approach attains very high accuracy (as low as $O(10^{-9})$) on simple structured cases, whereas the buffer approach remains accurate ($\sim O(10^{-5})$) across a wider range of source terms and interface configurations. In two dimensions, the buffer formulation is shown to be more robust because it enforces constraints through a discrete buffer correction, as the windowing construction becomes more sensitive to overlap and corner effects and over-constrains the problem. This positions the buffer method as a straightforward and geometrically flexible approach to complex interface problems.
Alex: Like targeted fixes over the network's mistakes.
Sam: Exactly. In 1D tests, buffers hit errors around a billionth as small as soft methods. The paper suggests this comes from ditching soft penalties entirely.
Alex: Those fixes are exact only at sample points, though?
Sam: Correct. They choose a finite set of points per boundary, then solve to make mismatches vanish there. Between points, the buffer blends smoothly. This keeps the network focused on interior physics.
Alex: How do they shape the buffers at those points?
Sam: For points with fixed values, they use bump-shaped functions—like small hills peaked at the spot, dropping off with distance. Points with fixed slopes add a tilt. At interfaces, paired bumps match values and flows across sides. Think of them as adjustable stickers, one per point, summed into the buffer.
Alex: Does this hold up in their tests?
Sam: It does. In simple 1D cases, both hard methods beat soft ones. Windows did best in the easiest setups. But with sharp changes in heat sources, buffers worked about ten times better because the network stays free inside zones.
Alex: What about 2D, with slanted edges?
Sam: The 2D test used a tilted divide, patchy sources, and mixed boundary types. Windows left errors around five percent near overlaps. Buffers were more robust, with relative errors around 3.5 percent—better than windows at 4.6 percent and soft baselines over six percent. Buffers avoid geometry tweaks by fixing at points.
Alex: What trips up windows at corners?
Sam: Corners are where edges meet, like a sharp bend in an L-shaped room. Heat solutions get very steep there—what math calls singularities. Windows fade across these spots, but overlaps cause training to stiffen and slow. Buffers solve locally at points, skipping fades.
Alex: How do buffers sample in 2D?
Sam: They use eight evenly spaced points per edge—smart spots that capture details efficiently. Each gets a small bump function, like a hill one-ninth the edge length wide. These tilt for slopes and pair across interfaces. The buffer sums them, solving to zero errors at points.
Alex: Those bumps stay small next to the main network?
Sam: Yes—buffers add just thousandths to the solution, while the network handles the main pattern. Boundaries snap exactly to rules at points, blending smoothly between.
Alex: Overall in 2D?
Sam: Buffers edged out windows, especially for complex shapes. The paper notes buffers are more stable, decoupling fixes from main learning.
Alex: Any limits, like sampling density?
Sam: Yes—sparser points loosen fits between them, though still better than soft methods. In higher dimensions or singularities, denser or adaptive points would help. Still, buffers offer a practical way for messy interfaces.
Alex: Buffers trade geometry issues for simple point fixes. A clear step forward.
Sam: Both methods enforce boundaries reliably where standards falter. Windows need careful zone sizing—like doubling widths to cut errors by a factor of ten in some cases. Buffers bring more flexibility for real-world setups, like metal-polymer parts.
Alex: That's our look at hard constraints for interface problems in PINNs. Thanks for joining ResearchPod.