Physics-Informed Neural Networks (PINNs) can be meta-learned to solve families of partial differential equations (PDEs), but existing methods treat all PDE configurations as equally difficult. This paper introduces DATS (Difficulty-Aware Task Sampler), a novel approach that analytically optimizes task sampling probabilities to allocate more training resources to harder PDEs. By doing so, DATS drastically reduces the number of residual points needed to achieve high accuracy and low performance disparity across different PDE configurations.
The Problem with Uniform Sampling
PINNs are a powerful tool for solving PDEs without needing ground-truth solution data; they train in an unsupervised manner by using the governing PDE equations as a loss function. However, a standard PINN must be trained from scratch for every specific PDE configuration (e.g., a specific Reynolds number).
Recent works use meta-learning to train a "meta-PINN" across a range of PDE configurations, allowing it to rapidly adapt to new parameters. The underlying issue is that current meta-learning approaches sample these training tasks (PDE configurations) uniformly.
In reality, some PDEs are inherently harder to solve than others. For example, fluid dynamics equations with high Reynolds numbers produce sharp shockwaves that are notoriously difficult for neural networks to capture. Uniform sampling wastes computational budget on easy tasks and starves hard tasks of the "residual points" (collocation points in the domain) they desperately need. This leads to poor average performance and high disparity between tasks.
The DATS Method
DATS frames task sampling as a bi-level optimization problem: optimize the task sampling probability to minimize the meta-model's validation loss across all tasks.
While previous approaches in general meta-learning have used complex reinforcement learning to solve similar bi-level problems, the authors of DATS derive an analytical solution. By using a first-order Taylor expansion (inspired by the Reptile meta-learning algorithm) and KKT conditions, they create a highly efficient update rule for task probabilities.
The authors propose two strategies to utilize these calculated probabilities:
- DATS-w (Adaptive Weighting): Uses the probabilities to weight the contribution of each task's loss to the total meta-training loss.
- DATS-rp (Adaptive Residual Points): Uses the probabilities to dynamically allocate the budget of residual points. Harder tasks physically get more points sampled in their domain.
To stabilize the probability assignments, DATS applies Kullback–Leibler (KL) divergence regularization against either a uniform prior or the distribution from the previous training step.
Key Insights
- Resource Allocation beats Loss Weighting: Ablation studies reveal that dynamically shifting the number of residual points (DATS-rp) is much more effective than just weighting the loss function (DATS-w). Hard PDEs don't just need larger gradients; they physically need a denser grid of points to resolve complex mathematical features.
- Analytical over RL: You don't need heavy reinforcement learning to do difficulty-aware sampling in meta-learning. A first-order analytical approximation works remarkably well and adds negligible computational overhead.
- Orthogonal to Point Sampling: Task-level adaptive sampling (DATS) provides benefits completely orthogonal to how you sample points within a single task. Simple random point sampling paired with DATS actually outperformed complex, state-of-the-art adaptive point sampling techniques.
Key Results
DATS was evaluated against Uniform sampling, Self-Paced learning, and GPT-PINN baselines using two different meta-learning architectures (HyperPINN and MAD-PINN) across five benchmark PDEs (1D Burgers', 1D Convection, 1D Reaction-Diffusion, 2D Helmholtz, and 3D Navier-Stokes).
- Massive Budget Reductions: DATS achieved the same lower-bound L2 error and disparity as the baselines using only a fraction of the residual point budget. It required only ~40% of the budget for the Burgers' equation, <10% for the Helmholtz equation, and <1% for the Convection equation.
- Complex 3D PDEs: On the 3D Navier-Stokes equation, DATS achieved baseline performance using only 40-60% of the budget for training tasks, and 20-40% of the budget when generalizing to unseen PDE parameters.
- Negligible Overhead: Because the analytical probability updates can be computed periodically (e.g., every 200 epochs), DATS was only 1% to 8% slower per epoch than uniform sampling—a tiny cost for the massive reduction in required training points.
Limitations and Future Work
Currently, DATS assumes a discrete set of PDE configurations during meta-training. Extending this mathematical framework to optimize over continuous distributions of PDE parameters is a key next step. Additionally, while the discrete analytical approximation works empirically, future work should formally examine its theoretical convergence. Finally, the authors suggest the core idea of difficulty-aware sampling could be extended beyond PINNs to operator learning frameworks (like DeepONets), which also require substantial training data.
Summary updated