The training of physics-informed neural networks (PINNs) for nonlinear multiphase flow in porous media is hampered by gradient conflicts between the individual components of the composite loss function. To address this problem, we propose a weighted gradient consistency metric that jointly accounts for the magnitudes and directions of the gradients of each loss term. Theoretical estimates of the convergence rate are derived, relating the proposed metric to the spectral properties of the preconditioner. The method is evaluated through a comparative study of optimizers—Adam, L-BFGS, and self-scaled Broyden—applied to three formulations of increasing complexity: a linear Buckley–Leverett model, a compressible two-phase model, and a fully nonlinear model with non-Newtonian rheology. The experiments demonstrate that self-scaled methods consistently achieve higher gradient alignment, faster loss reduction, and improved approximation accuracy compared to standard quasi-Newton and first-order baselines.
Aminev et al. (Mon,) studied this question.