TL;DR
Training Physics-Informed Neural Networks (PINNs) is notoriously difficult because the loss terms for physics equations and boundary conditions often pull the network weights in conflicting directions. This paper introduces ConFIG, a novel gradient manipulation method that guarantees conflict-free updates while balancing optimization rates across all loss terms. A momentum-accelerated variant, M-ConFIG, further slashes computational costs, achieving state-of-the-art accuracy and speed on challenging PDE and multi-task learning benchmarks.
The Challenge of Gradient Conflict in PINNs
Physics-Informed Neural Networks (PINNs) learn to solve Partial Differential Equations (PDEs) by minimizing a combined loss function. This loss function typically adds together the PDE residual (the physics rules), the boundary conditions (BCs), and the initial conditions (ICs).
However, these additive terms often have vastly different gradient magnitudes and convergence rates. Worse, their gradients frequently point in opposite directions—a phenomenon known as gradient conflict. Because the PDE residual usually has a much larger gradient and countless local minima, the optimizer often gets stuck satisfying the physics equations while completely ignoring the boundary conditions, resulting in a physically useless solution. While many researchers try to fix this by dynamically re-weighting the loss terms, weighting alone cannot fix gradients that are fundamentally pointing in opposite directions.
ConFIG: Conflict-Free Inverse Gradients
To solve this fundamental optimization bottleneck, the authors propose ConFIG (Conflict-Free Inverse Gradients), which moves beyond simple scalar weighting to actively alter the update direction.
- Conflict-Free Direction: ConFIG uses a pseudoinverse matrix operation to find a single update vector that has a positive dot product (cosine similarity) with every individual loss gradient. This guarantees that taking a step will decrease all losses simultaneously.
- Uniform Optimization Rate: It enforces that the projection of the final update onto each loss-specific gradient is equal, ensuring no single objective dominates the training.
- Adaptive Magnitude: ConFIG dynamically scales the size of the update step. If all gradients agree, it takes a large step; if they are highly conflicting, it shrinks the step to avoid violently bouncing around local minima.
Because calculating the gradient for every loss term at every step is computationally expensive, the authors also introduce M-ConFIG. This variant uses an alternating momentum strategy: it backpropagates just one loss term per iteration to update its momentum, and reuses the stored momentums of the other terms to compute the ConFIG update.
Experimental Validation & Key Results
The authors evaluate their methods on a mix of standard and challenging benchmarks, including the 1D Burgers equation, 2D Kovasznay flow, 3D Beltrami flow, and highly complex PDEs from the PINNacle benchmark (like the 5D Poisson and Kuramoto-Sivashinsky equations). They also test on the CelebA dataset (predicting 40 distinct facial attributes) to evaluate general Multi-Task Learning (MTL) capabilities.
- Superior Accuracy: ConFIG and M-ConFIG consistently outperformed standard Adam baselines and state-of-the-art gradient methods (like PCGrad and IMTL-G) across the tested PDEs. For example, in the complex 3D Beltrami flow, M-ConFIG achieved a test MSE of $0.910 \times 10^{-4}$ compared to Adam's $3.648 \times 10^{-4}$.
- Massive Speedups: Because M-ConFIG skips backpropagating every loss term, its average training cost per iteration is only ~56% of the standard Adam baseline for a three-term loss. When plotted against wall-clock time, M-ConFIG reaches convergence significantly faster than all competitors.
- MTL Dominance: The gradient conflict problem in PINNs is mathematically identical to "catastrophic forgetting" in MTL. On the CelebA 40-task benchmark, ConFIG variants achieved the best Mean Rank (MR) and F1 scores compared to 10 popular MTL baselines (including CAGrad, Nash-MTL, and FAMO).
Limitations and Future Directions
While highly effective, the approach has a few limitations. First, M-ConFIG's performance can degrade when the number of loss terms is very high (e.g., 40 tasks in CelebA) because the momentum becomes too stale between updates, requiring more frequent gradient updates that eat into the speedup. Second, storing the momentums for every loss term requires $\mathcal{O}(nm)$ additional memory ($n$ parameters, $m$ losses), which could bottleneck massive models. Finally, ConFIG does not magically solve all PINN failures; it still struggles on highly chaotic systems like the Kuramoto-Sivashinsky equation, indicating that architectural changes or causality constraints are still required alongside better optimizers to fully solve chaotic PDEs.
Summary updated