An Imbalanced Learning-based Sampling Method for Physics-informed Neural Networks

Jiaqi Luo, Yahong Yang, Yuan Yuan, Shixin Xu, Wenrui Hao

TL;DR

This paper introduces Residual-based Smote (RSmote), a novel local adaptive sampling method that treats the training of Physics-Informed Neural Networks (PINNs) as an imbalanced learning problem. By using SMOTE to oversample localized regions with high PDE residuals, RSmote achieves state-of-the-art accuracy while drastically reducing GPU memory consumption. This makes it uniquely capable of solving complex, high-dimensional partial differential equations (PDEs) up to 100 dimensions where traditional global sampling methods suffer from memory overflow.

What Problem Does This Paper Address?

Physics-Informed Neural Networks (PINNs) have emerged as a powerful, mesh-free alternative for solving partial differential equations (PDEs). However, training them effectively requires choosing the right points in the domain to evaluate the PDE residual loss. Standard uniform sampling often fails when the solution contains sharp gradients or localized complexities.

To fix this, researchers use adaptive sampling to dynamically add points where the network struggles (i.e., where residuals are high). The current state-of-the-art method, Residual-based Adaptive Distribution (RAD), estimates a global probability density function over the entire domain to guide sampling. Unfortunately, global density estimation falls prey to the "curse of dimensionality." As the number of dimensions or sample sizes grow, global methods demand massive amounts of GPU memory, frequently leading to out-of-memory (OOM) errors and training failures in high-dimensional spaces.

Methods

RSmote circumvents global density estimation entirely by framing the problem through the lens of imbalanced learning. The authors observe that as a PINN converges, the regions with high residuals become highly localized and sparse—resembling a classic "minority class" problem in machine learning.

The RSmote workflow consists of three main steps:

  1. Residual Classification: The algorithm evaluates the absolute PDE residuals across the current dataset, sorts them, and labels the top $\lambda \times 100\%$ (where $\lambda < 0.5$) as the "positive" (high-error) class, and the rest as the "negative" class.
  2. Over-sampling via SMOTE: It applies the standard Synthetic Minority Over-sampling Technique (SMOTE) to generate new synthetic training points specifically within the positive class by interpolating between a high-residual point and its $k$-nearest neighbors.
  3. Dataset Resampling: To prevent the training set from growing indefinitely and consuming excess memory, RSmote constructs a new dataset of fixed size by combining the oversampled positive points with a smaller, randomly sampled set of points from the entire domain.
Visual pipeline of the RSmote adaptive sampling process.

Datasets

The authors evaluated RSmote against RAD across five distinct PDE benchmarks spanning low and high dimensions:

  • Laplace Equation (2D)
  • Burgers’ Equation (2D)
  • Allen-Cahn Equation (2D)
  • Elliptic Equation (10D, 20D, and 100D)
  • Reaction-Diffusion Equation (20D, 30D, and 50D)

Key Insights and Ideas

  • The Imbalanced Phenomenon in PINNs: The authors mathematically prove (Property 1) that as a network converges, the number of large residual points drops drastically. This confirms that the training landscape naturally becomes highly imbalanced, justifying an oversampling approach.
Evolution of the imbalanced residual phenomenon over training iterations.
  • Local Interpolation Beats Global Estimation: Instead of spending massive computational resources trying to map a complex global probability distribution across a high-dimensional space, it is far more efficient to perform local interpolation (via SMOTE) directly around known high-error points.
  • Rigorous Theoretical Backing: The paper provides a generalization error analysis showing that less smooth regions require significantly more sample points to bound the error. RSmote directly addresses this requirement locally without wasting points on already-learned, smooth regions.

Key Results

  • Breaking the High-Dimensional Barrier: In the 100-dimensional Elliptic equation benchmark, the state-of-the-art RAD method completely failed due to GPU memory overflow. RSmote was the only method capable of delivering a solution, achieving an $L_2$ relative error of $3.9 \times 10^{-3}$.
  • Massive Memory Savings: Across all dimensions, RSmote maintained a remarkably low and stable memory footprint. For instance, in the 20D Elliptic equation, RSmote required only 5,334 MB of memory compared to RAD’s 15,834 MB, while simultaneously delivering a lower error score ($4.5 \times 10^{-3}$ vs $5.9 \times 10^{-3}$).
  • Robustness in Sharp Transitions: For challenging equations like Burgers' and Allen-Cahn, which feature sharp gradients or shock formations, RSmote efficiently localized the large error regions, leading to more robust convergence and fewer loss oscillations compared to global alternatives.

Limitations and Future Work

The authors note that RSmote exhibits higher fluctuations in its loss curves when dealing with PDEs that have exceptionally smooth solutions (such as the Laplace equation). Because the error distribution in smooth problems is spread out rather than concentrated, RSmote's local selection mechanism can occasionally misjudge which regions truly require refinement.

Future research directions include extending RSmote to a broader variety of complex PDEs, exploring even higher-dimensional spaces, and refining the over-sampling and resampling strategies to further stabilize training on smooth landscapes.

Summary updated

BibTeX
@article{luo2025imbalanced,
  author = {Jiaqi Luo and Yahong Yang and Yuan Yuan and Shixin Xu and Wenrui Hao},
  title = {{An Imbalanced Learning-based Sampling Method for Physics-informed Neural Networks}},
  journal = {Journal of Computational Physics},
  year = {2025},
  doi = {10.1016/j.jcp.2025.114010},
}
Figure