Rethinking the Importance of Sampling in Physics-informed Neural Networks

Arka Daw, Jie Bu, Sifan Wang, Paris Perdikaris, Anuj Karpatne

Abstract

Despite the success of physics-informed neural networks (PINNs) in approximating partial differential equations (PDEs), PINNs can sometimes fail to converge to the correct solution in problems involving complicated PDEs. This is reflected in several recent studies on characterizing the "failure modes" of PINNs, although a thorough understanding of the connection between PINN failure modes and sampling strategies is missing. In this paper, we provide a novel perspective of failure modes of PINNs by hypothesizing that training PINNs relies on successful "propagation" of solution from initial and/or boundary condition points to interior points. We show that PINNs with poor sampling strategies can get stuck at trivial solutions if there are propagation failures, characterized by highly imbalanced PDE residual fields. To mitigate propagation failures, we propose a novel Retain-Resample-Release sampling (R3) algorithm that can incrementally accumulate collocation points in regions of high PDE residuals with little to no computational overhead. We provide an extension of R3 sampling to respect the principle of causality while solving time-dependent PDEs. We theoretically analyze the behavior of R3 sampling and empirically demonstrate its efficacy and efficiency in comparison with baselines on a variety of PDE problems.

1. Introduction: The Propagation Failure Problem

While Physics-Informed Neural Networks (PINNs) have revolutionized scientific machine learning by embedding physical laws into neural architectures, they remain notoriously brittle on "hard" PDEs—those with high convection coefficients or complex geometries. This paper identifies a primary cause of these failures: propagation failure.

We hypothesize that for a PINN to succeed, the correct solution must "propagate" from the initial or boundary conditions into the interior of the domain. If the network samples the interior poorly, it can get trapped in a local minimum—often a trivial solution like $u=0$—that satisfies the PDE residuals in the interior but ignores the boundary data.

Figure 1: Visualization of propagation failure in a convection problem. The PINN solution fails to propagate from the boundary into the domain interior, remaining stuck at a trivial zero solution for most of the domain across 50,000 iterations.

2. Methodology: Retain-Resample-Release (R3) Sampling

To mitigate propagation failures, we propose the R3 Sampling algorithm, a lightweight, biologically-inspired strategy that manages a fixed-size population of collocation points through three simple rules:

  1. Retain: At each iteration, points with PDE residuals higher than the average are kept. This "accumulates" points in difficult, high-error regions that act as barriers to information flow.
  2. Resample: "Resolved" points (those with low residuals) are replaced with new points sampled uniformly from the domain, ensuring continuous exploration.
  3. Release: Once the network masters a region, the associated points are naturally released as their residuals drop below the retention threshold.

For time-dependent problems, we introduce Causal R3, which utilizes a temporal gate to force the network to master earlier time steps before progressing to later ones, respecting the physical principle of causality.

3. Key Results and Discussion

The R3 algorithm was evaluated across several benchmark PDE problems, including Convection, Allen-Cahn, Eikonal, and Kuramoto-Sivashinsky equations.

3.1 Robustness and Convergence

In challenging convection benchmarks ($eta=50$), standard PINNs fail completely, with relative errors remaining near 100% as the model settles into a trivial solution. R3 and Causal R3 overcome this barrier, achieving relative errors as low as 0.7% to 1.9%.

Figure 6: Convergence metrics for convection problems. For the difficult case (β=50), standard PINNs exhibit a failure mode where relative error remains at 1.0 (100%) despite training, while easier cases (β=10) converge successfully.

3.2 Efficiency and Geometric Precision

R3 demonstrates remarkable sample efficiency, solving complex PDEs with as few as 100 collocation points where standard methods require 10,000+. On the Eikonal "gear" problem, R3 achieved a Mean Intersection-Over-Union (mIOU) of 97.09%, significantly outperforming fixed sampling (75.21%) by accurately capturing sharp interior corners.

4. Conclusion

R3 sampling provides a computationally efficient way to stabilize PINN training by dynamically adjusting the density of data points to match the complexity of the residual field. By focusing on high-residual "barriers," R3 enables the successful propagation of information across the domain without the heavy overhead of traditional adaptive refinement methods.

Summary updated

BibTeX
@inproceedings{daw2023rethinking,
  author = {Arka Daw and Jie Bu and Sifan Wang and Paris Perdikaris and Anuj Karpatne},
  title = {{Rethinking the Importance of Sampling in Physics-informed Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=rhvb4kprWB},
}
Figure