Physics-Informed Neural Networks (PINNs) promise a revolution in scientific computing by embedding physical laws—typically partial differential equations (PDEs)—directly into the loss function of a neural network. However, as noted in the survey by Songming Liu and Zhongkai Hao, these models are notoriously difficult to train.
The core issue is that a PINN is not a single-objective model; it is a multi-objective optimization problem disguised as a single scalar loss. When we train a PINN, we are asking the network to simultaneously satisfy a PDE residual ($L_{pde}$), boundary conditions ($L_{bc}$), initial conditions ($L_{ic}$), and sometimes experimental data ($L_{data}$). These objectives often "fight" each other, leading to training instabilities and poor convergence.
The Multi-Objective Tug-of-War
In a standard neural network, the gradient points toward the steepest descent for a single task. In a PINN, the total gradient is a weighted sum of gradients from different physical constraints: $$\nabla L_{total} = \lambda_1 \nabla L_{pde} + \lambda_2 \nabla L_{bc} + \dots$$
As Sifan Wang and Paris Perdikaris demonstrate in Gradient Alignment in Physics-informed Neural Networks, these gradient vectors often point in opposing directions. This is known as gradient conflict. When two gradients are antagonistic (the angle between them is greater than 90 degrees), improving the model's adherence to the PDE might actually make it worse at satisfying the boundary conditions.
This conflict manifests in two primary ways:
- Magnitude Imbalance: One loss term (e.g., the PDE residual) might be orders of magnitude larger than another (e.g., the boundary condition), causing the optimizer to ignore the smaller but equally critical constraint.
- Directional Opposition: Even if magnitudes are balanced, the update directions may cancel each other out, leaving the model stuck in a poor local minimum.
Geometric Solutions: Finding the Harmonized Cone
To solve directional conflict, researchers have moved toward "conflict-free" gradient descent. The intuition is to find a single update direction that benefits all objectives simultaneously.
Mengyu Chu and Nils Thuerey introduced ConFIG (Conflict-Free Inverse Gradients) in Towards Conflict-free Training of Physics Informed Neural Networks. ConFIG manipulates the gradient components to ensure that the resulting update direction has a non-negative projection onto every individual objective's gradient.
Similarly, Dohyun Bu proposed HARMONIC (Harmonized Cone for Feasible and Non-conflict Directions), which uses geometric analysis to identify a "Harmonized Cone." If the gradients for the PDE and the boundary conditions fall within this cone, the optimization is stable. If they conflict, the method projects the gradients onto the boundary of the feasible region to maintain progress on all fronts. Youngsik Hwang explores a related approach in Dual Cone Gradient Descent, specifically targeting the antagonism between physical laws and boundary data.
Adaptive Weighting and Scheduling
If the problem is that some objectives are "louder" than others, why not change their volume dynamically?
Jungeun Kim and Noseong Park developed the Dynamic Pulling Method (DPM) in A Novel Training Method for Physics-Informed Neural Networks in Extrapolation. DPM forces the network to prioritize physical laws when they conflict with data-fitting, which is particularly effective for extrapolation tasks where data is unavailable.
Other researchers focus on the timing of these constraints. In CoPhy-PGNN, Jie Bu and colleagues use a "cold starting" approach and simulated annealing to adaptively introduce different physics losses. By not overwhelming the network with all constraints at once, the model can find a stable path toward a global minimum.
Specialized Optimizers
Standard optimizers like Adam are designed for single-objective landscapes. When applied to PINNs, they often fail because they maintain a single set of momentum buffers for the combined loss.
Jiachen Yao and Zhongkai Hao addressed this with MultiAdam (Parameter-wise Scale-invariant Optimizer). MultiAdam maintains separate gradient momentum tracks for each loss term. This allows the optimizer to automatically balance the scales of PDE residuals and boundary conditions at the parameter level, preventing the "loss imbalance" problem that plagues standard training.
Architectural Decoupling: Avoiding the Fight
Perhaps the most robust way to solve gradient conflict is to prevent it from happening in the first place. If the network architecture itself guarantees that certain constraints are met, those constraints no longer need to be part of the "tug-of-war" in the loss function.
- HB-PINN: Chuyu Zhou and Wei Li developed Hybrid Boundary PINNs, which use a dedicated distance-metric network to enforce boundary conditions by construction.
- LieSolver: René P. Klausen and Sebastian Lapuschkin take this further in LieSolver, using Lie symmetries to bake physical laws directly into the model's architecture.
By removing boundary conditions or symmetries from the optimization objective, these methods eliminate the primary sources of gradient conflict, leading to solutions that are both more accurate and significantly faster to compute.