The loss-balance crisis: data + PDE + BC weights
Learning objectives
- Sweep the residual's weight from 1 to a millionth on one network and read the error against FD at each
- Measure each term's share of the weighted gradient at the start and relate it to the error
- Derive the curvature scale, the weight at which a residual and a misfit of the pulse's own shape cost alike
- Say why a weight that is too heavy and one that is too light fail differently
Six Decades of One Weight
The weights of a PINN's loss decide what it learns, over orders of magnitude. The same network, seed and points, trained 2000 Adam steps on the column's wave with the residual's weight fixed at each of seven values, ends 0.85 from FD at weight 1, 0.22 at 10⁻³, its best, and 0.71 at 10⁻⁶. At weight 1 the residual carries 63 % of the weighted gradient at the start, and the start term 4 %.
Too Heavy
The residual's gradient at the start is larger than the other terms' together, and the residual is summed over 800 points: the network ends 0.85 from FD at weight 1, Section 3.1's field that barely moves. Wang, Teng and Perdikaris (2020) traced a failure mode of PINNs to unbalanced back-propagated gradients during training; on the column the imbalance is visible in the first gradient.
Too Light
At a millionth the start term is met and the residual is left at 7.1 × 10² at the end, larger than anywhere else in the sweep: the network holds the pulse at rest and lets it move as it likes. The error rises again.
Where the Valley Is
Between the two failures the error is smallest, 0.22 at 10⁻³. The gradients at the start say where to look: the residual's weighted gradient equals the start term's at 6.9 × 10⁻². A second guide comes from the pulse itself: a misfit of the pulse's own shape, width , leaves a residual about times larger, with , so the weight makes the two cost alike. For T0's 200 m pulse that is the curvature scale, 3.8 × 10⁻⁵, and the network ends 0.31 from FD at the curvature scale. Sections 3.5 to 3.8 build on that weight.
Why Not Scale Everything
Adam divides each step by the gradient's own running size, so multiplying the whole loss by a constant changes nothing. What a weight changes is the balance: which term the gradient serves.
What Comes Next
Section 3.3 sets the weights from the network itself, by the traces of its neural tangent kernel, without a sweep.
References
- Wang, S., Teng, Y. and Perdikaris, P. (2020). Understanding and mitigating gradient pathologies in physics-informed neural networks. arXiv:2001.04536.