Physics-Informed Neural Networks for Coupled Non-Isothermal Two-Phase Flow in Porous Media: Training Pathologies, Remedies, and the Role of Gradient Conflict
The question
Is conflict between training goals really why physics-informed networks fail on coupled flow?
In a hot-water flood, heated water thins viscous or waxy oil, and a tracer marks where the water goes. Water, tracer, and heat then cross the rock as three fronts at very different speeds. A physics-informed network trained on this coupled flow can succeed or fail depending only on its random starting point. A leading explanation blames conflict between the network’s training goals, and some methods remove that conflict directly. We tested whether removing it restores reliable training, on a problem whose exact solution is known.
What we found
On this benchmark, ConFIG removed the conflict completely but failed on all five random starts, and its tuned version repeatedly settled on the same wrong solution. SOAP, a curvature-aware optimiser, and per-term PCGrad trained reliably while conflict remained present, showing that its removal was neither necessary nor sufficient for reliable training here. The working model placed all three fronts within 1–2% of the reservoir length and predicted oil recovery within about 5%.
Schematic overview
Checking training diagnostics against the actual flow
Model three fronts with different speeds
The rock absorbs heat, so the thermal front lags behind the water front. A passive tracer marks the injected water and travels between them.
Compare how training updates are chosen
Each requirement suggests a change to the network: its gradient. We compared methods that reweight, reshape, or combine these changes to handle competing requirements.
Check the flow, not just training
An exact mathematical solution lets us check the front positions and predicted fields. We also tested water balance and repeated training with different initial random values.

Agreement during training is a diagnostic
The vertical axis summarizes agreement between training gradients; negative values indicate conflict. ConFIG moves closer to zero or above it, while methods that learn successfully can retain negative values.

Repeated runs can agree on a wrong answer
Here the vertical axis is the water-filled fraction of the pores. Five tuned ConFIG runs cluster together, but miss the small drop near the inlet and put the leading water front too far to the right.
Figure details and test conditions
These are two complementary checks, not the same runs. The left plot shows representative first-stage training traces for four method families. The right shows five validation runs of the separately tuned, grouped ConFIG variant at dimensionless time 0.25; black is the exact solution and red curves are predictions. All methods share the same front-smoothing regularizer. The paper also evaluates temperature, tracer concentration, conservation, and failure rates; alignment alone does not certify those quantities.
Investigating conflict between training goals
A physics-informed network is trained on a weighted sum of goals: satisfy each equation, the starting state, and the inlet conditions. When improving one goal worsens another, their gradients point in conflicting directions. A growing body of work attributes training failures to this conflict, and methods such as PCGrad and ConFIG remove it directly. Other work traces failures instead to a badly conditioned loss that second-order optimisers handle better (Rathore et al., 2024). This gave us a way to examine the proposed explanation: if conflict causes the failures, removing it should make training reliable. To assess that, we needed a coupled problem with a known solution against which the predictions could be checked.
Hot-water flow as a test of coupled training
Hot-water flooding is used where steam injection is impractical, such as offshore heavy-oil fields and waxy or high-pour-point crudes. The injected water leads, a dissolved tracer marks it, and the heat front lags far behind, carrying the viscosity reduction the flood is run for. One smooth network must represent a saturation shock, a temperature jump, and a tracer step, with speeds differing by a factor of about 8. Temperature and saturation also affect each other in both directions.
Each field is easy to learn alone, but training them together succeeds or fails depending on the random starting point. The coupled system also has an exact mathematical solution, which few coupled problems allow, so every predicted field can be checked. We could weaken the temperature coupling step by step, down to zero, and regenerate the exact answer each time. Designing and monitoring such a flood requires many solutions of the same model, so a fast surrogate with known accuracy is useful in its own right.
Applications of the trained model
The working formulation predicts the three fronts and the oil recovery. One network trained across a range of oil viscosities returns the solution for any viscosity in that range. An inverse calculation from synthetic temperature and tracer readings near the injector recovers the thermal front speed within 3%. It cannot separate two correlated heat-transport coefficients unless one is known independently.
Scope of the study
The model is one-dimensional, with uniform rock, synthetic data, and no capillarity, gravity, heat conduction, or heat loss. All methods share an artificial smoothing term, so the network’s fronts are wider than the exact ones. Water balance closes to within 5–6%, against better than 0.1% for a finite-volume solver. The viscosity-conditioned network loses temperature accuracy at higher viscosities. The training result concerns this problem family, where removing conflict was insufficient to make training reliable. It does not establish which remedy will perform best across other problems.
Methods and numbers
The main comparison uses five random seeds per configuration under a shared iteration budget; equal iteration counts do not mean equal training time or tuning cost. In the trained baseline, 58% of pairwise gradient cosines were negative. ConFIG failed on all five seeds at both granularities tested; after tuning, its grouped variant settled repeatedly on the same wrong solution. A trained network answers a query in about 0.42 ms, against 83 ms for the exact characteristic solution and 12.7 s for a finite-volume solve.