Abstract
Physics-informed Neural Networks (PINNs) often struggle with multiscale imbalance, where the magnitudes of different loss terms—such as the PDE residual and boundary conditions—differ by several orders of magnitude. This imbalance leads to "gradient pathology," where the optimizer prioritizes certain terms at the expense of others, resulting in physically incorrect solutions. We present MultiAdam, a parameter-wise scale-invariant optimizer that partitions the loss into groups and maintains independent gradient momentums for each. By normalizing updates using group-specific second momentums, MultiAdam achieves robustness to coordinate scaling and improves predictive accuracy by up to two orders of magnitude.
1. Introduction
Physics-informed Neural Networks (PINNs) have emerged as a powerful framework for solving Partial Differential Equations (PDEs) by embedding physical laws into the neural network's loss function. However, the optimization landscape of PINNs is notoriously complex. A primary challenge is the multiscale imbalance between the PDE residual loss ($\mathcal{L}_{PDE}$) and the boundary condition loss ($\mathcal{L}_{BC}$).
When these terms are mismatched in scale, standard optimizers like Adam often fail to converge to a physically valid solution. This paper introduces MultiAdam, an optimizer specifically engineered to handle the multitask nature of PINN training through scale-invariant parameter updates.
2. The Scaling Problem and Gradient Pathology
The difficulty in training PINNs often stems from how the domain is scaled. The authors demonstrate that the ratio between loss terms is highly sensitive to the coordinate system, a phenomenon they identify as a major hurdle in PINN convergence.
2.1 Theoretical Foundation
In Theorem 4.1, the authors prove that for a $k$-order homogeneous PDE, narrowing the spatial domain by a factor of $t$ multiplies the PDE loss by $t^{2k}$, while the boundary loss remains unchanged. This scaling law explains why a PINN that works on a unit square might fail completely when the domain is resized. This "gradient pathology" occurs when the gradients of the PDE loss drown out the gradients necessary to satisfy boundary conditions, leading the network to ignore critical constraints.
3. The MultiAdam Algorithm
MultiAdam addresses the scaling problem by treating each component of the loss function as an independent task with its own gradient characteristics.
3.1 Partitioned Momentums
Unlike standard Adam, which tracks a single first momentum ($m_t$) and second momentum ($v_t$) for the aggregated gradient, MultiAdam partitions the loss into $n$ groups (e.g., one for the PDE and one for boundary conditions). For each group $i$, it maintains:
- First Momentum ($m_{t,i}$): The moving average of the gradient for group $i$.
- Second Momentum ($v_{t,i}$): The moving average of the squared gradient for group $i$.
3.2 Scale-Invariant Updates
The optimizer normalizes the update for each group using its respective second momentum. Because the second momentum acts as an effective proxy for the scale of the gradient, dividing the first momentum by the square root of the second momentum causes the absolute scale of the loss term to cancel out. The final update to the network parameters is the average of these normalized updates across all groups.
3.3 The Importance of $\beta$ Equality
A critical finding in the development of MultiAdam is the requirement that $\beta_1 = \beta_2$ (typically set to 0.99). This ensures that both momentums track the same history window of gradients, allowing the scaling factor to cancel out perfectly during the division step. Without this equality, the optimizer remains sensitive to temporal fluctuations in gradient scales.
4. Experimental Evaluation
MultiAdam was evaluated against several standard PDE benchmarks, including the 2D Poisson’s equation, the Helmholtz equation, and the Burgers’ equation.
4.1 Robustness to Domain Scaling
In the "Poisson-1" benchmark (a small-scale domain), standard Adam exhibited a relative error of 70.78%, failing to capture the physics. MultiAdam maintained a robust error of 4.49%, demonstrating that it is nearly indifferent to the coordinate scale. This highlights a key insight: a lower training loss does not always equate to a better solution if the PDE and boundary terms are out of balance.
4.2 Accuracy and Convergence
On the Helmholtz equation, MultiAdam improved predictive accuracy by 1-2 orders of magnitude compared to established baselines like Learning Rate Annealing (LRA) and Neural Tangent Kernel (NTK) weighting. While MultiAdam requires an initial estimation phase (approximately 5,000 epochs) to stabilize its group-wise momentums, its subsequent convergence rate far outstrips standard Adam or PCGrad.
5. Conclusion and Future Work
MultiAdam provides a theoretically grounded method to handle multiscale loss terms in PINN training. By ensuring scale invariance, it reduces the need for exhaustive manual weight tuning and prevents the vanishing gradient problem for boundary conditions.
Future research directions include developing automated grouping strategies for complex systems with dozens of interacting physical constraints and optimizing the initial momentum estimation phase to reduce total training time.
Summary updated