Zing Forum

Reading

Lagrange Duality-based Theory-guided Neural Network: A New Paradigm for 2D Single-phase Subsurface Flow Simulation

This article introduces how the TgNN framework integrates physical equation constraints with deep neural networks to achieve high-precision subsurface flow prediction in data-scarce scenarios, including technical analysis of two training modes: partially labeled and unlabeled.

理论引导神经网络拉格朗日对偶物理信息神经网络地下水流模拟MODFLOW科学机器学习非均质介质数据稀缺学习
Published 2026-05-09 15:24Recent activity 2026-05-09 15:29Estimated read 9 min
Lagrange Duality-based Theory-guided Neural Network: A New Paradigm for 2D Single-phase Subsurface Flow Simulation
1

Section 01

Lagrange Duality-based Theory-guided Neural Network (TgNN): A New Paradigm for Subsurface Flow Simulation in Data-scarce Scenarios

This article introduces the TgNN framework proposed by the MiaoRong Laboratory. This framework integrates physical equation constraints with deep neural networks to address issues such as convergence difficulties and high computational costs of traditional Physics-Informed Neural Networks (PINNs) in scenarios involving complex nonlinear partial differential equations (PDEs) and large-scale heterogeneous media. It achieves high-precision 2D single-phase subsurface flow prediction in data-scarce scenarios (partially labeled and unlabeled training modes), providing a new paradigm for the field of scientific machine learning.

2

Section 02

Background: Evolution and Challenges of Physics-Informed Neural Networks

Deep learning in the field of scientific computing is shifting from purely data-driven to integrating physical constraints. Traditional PINNs ensure physical consistency by treating PDEs as regularization terms in the loss function, but they face challenges like convergence difficulties and high computational costs when dealing with complex nonlinear PDEs and large-scale heterogeneous media. The TgNN proposed by the MiaoRong Laboratory uses the idea of Lagrange duality decomposition to decouple physical constraints from neural network training, providing a feasible path for subsurface flow simulation in data-scarce scenarios.

3

Section 03

Core Method: Alternating Optimization Strategy for the Lagrange Duality Framework

The core innovation of TgNN is the introduction of Lagrange multipliers to transform physical constraints into dual problems. It adopts an alternating optimization strategy: in each iteration, first fix the Lagrange multipliers to train the neural network to minimize the augmented Lagrangian function, then fix the network parameters to update the multipliers to strengthen physical constraints. This strategy converts complex constrained optimization into easily solvable subproblems. The neural network is trained via backpropagation, and the multipliers are updated via gradient ascent, which theoretically converges to the KKT point that satisfies both data fitting and physical constraints.

4

Section 04

Mathematical Modeling of 2D Single-phase Subsurface Flow

The governing equation for 2D single-phase flow is the groundwater flow equation based on mass conservation: ∂(S_s·h)/∂t = ∇·(T·∇h) + Q (where h is the hydraulic head, S_s is the specific storage coefficient, T is the hydraulic conductivity tensor, and Q is the source/sink term). The spatial heterogeneity of T in heterogeneous media poses challenges for numerical simulation. Traditional finite difference/element methods require fine grids, leading to high computational costs; purely data-driven neural networks (NNs) train quickly but struggle to ensure physical conservation laws. TgNN, through theory guidance, balances the expressive power of NNs and the satisfaction of physical laws.

5

Section 05

Two Training Modes: Adapting to Different Data Availability Scenarios

TgNN implements two training modes:

  1. Partially Labeled Mode: Suitable for scenarios with sparse observation data. It combines a small number of labeled observation points (e.g., monitoring well heads) and a large number of unlabeled collocation points, using physical information to supplement data gaps. It still achieves accurate predictions with few observations, making it suitable for engineering applications under cost constraints.
  2. Unlabeled Mode: Suitable for scenarios with no observation data. It is trained only on physical equations and boundary conditions. Although its accuracy is lower than that of supervised cases, it can provide preliminary predictions to support decision-making in the exploration phase.
6

Section 06

Technical Implementation: Collaborative Architecture of MODFLOW and PyTorch

The project uses MODFLOW-2005 (an industry-standard subsurface flow simulation software) to generate high-fidelity training data and serve as a reference for physical constraints; the neural network is implemented based on PyTorch, leveraging automatic differentiation and GPU acceleration; a Fortran interface (Console10.f90) enables seamless data exchange between MODFLOW and Python; the training script supports hyperparameter configuration such as network structure, optimizer, and learning rate scheduling, facilitating sensitivity analysis and tuning.

7

Section 07

Experimental Results: Performance Superior to Traditional PINNs

Experiments show that TgNN performs excellently in 2D heterogeneous single-phase flow problems: its convergence speed is significantly improved compared to standard PINNs; in partially labeled scenarios, training with only 10% of the observation data can achieve the accuracy of full-data training; in unlabeled mode, the model can capture the main flow characteristics (streamline direction, pressure distribution trend). Although there is a loss in local detail accuracy, it can meet the needs of preliminary engineering evaluation.

8

Section 08

Application Prospects and Future Expansion Directions

TgNN can be extended to scientific problems described by PDEs such as reservoir multiphase flow, pollutant transport, and geothermal systems; in petroleum engineering, it is used for history matching and production prediction (early stage of new exploration areas); in environmental science, it is used for groundwater pollution tracking and remediation design; in carbon sequestration, it is used for CO2 storage simulation. Future directions include expanding to 3D problems, handling multiphase flow/multicomponent transport, integrating generative models/reinforcement learning, and uncertainty quantification (Bayesian NNs or ensemble learning).