UniPINN: A Unified PINN Framework for Multi-task Learning of Diverse Navier-Stokes Equations
Authors: Dengdi Sun, Jie Chen, Xiao Wang, Jin Tang
Organizations: Key Laboratory of Intelligent Computing & Signal Processing (ICSP), Ministry of Education, School of Artificial Intelligence, Anhui University, Hefei 230601, China · Anhui Provincial Key Laboratory of Multimodal Cognitive Computing, School of Computer Science and Technology, Anhui University, Hefei 230601, China
Physics-Informed Neural Networks (PINNs) have shown promise in solving incompressible Navier-Stokes equations, yet existing approaches are predominantly designed for single-flow settings. When extended to multi-flow scenarios, these methods face three key challenges: (1) difficulty in simultaneously capturing both shared physical principles and flow-specific characteristics, (2) susceptibility to inter-task negative transfer that degrades prediction accuracy, and (3) unstable training dynamics caused by disparate loss magnitudes across heterogeneous flow regimes. To address these limitations, we propose UniPINN, a unified multi-flow PINN framework that integrates three complementary components: a shared-specialized architecture that disentangles universal physical laws from flow-specific features, a cross-flow attention mechanism that selectively reinforces relevant patterns while suppressing task-irrelevant interference, and a dynamic weight allocation strategy that adaptively balances loss contributions to stabilize multi-objective optimization. Extensive experiments on three canonical flows demonstrate that UniPINN effectively unifies multi-flow learning, achieving superior prediction accuracy and balanced performance across heterogeneous regimes while successfully mitigating negative transfer. The source code of this paper will be released on https://github.com/Event-AHU/OpenFusion
Figures & tables
Figure 1: Single-task vs. unified multi-flow learning. (a) Conventional single-task PINNs train independent networks for each flow type, incurring parameter redundancy and neglecting the shared Navier-Stokes structure across flows. (b) UniPINN unifies multiple flow types under a shared backbone with task-specific heads and cross-flow attention, enabling joint learning and knowledge transfer while preserving flow-specific fidelity.
Figure 2: UniPINN architecture. It consists of three components: (1) Task-shared backbone network: extracts common physical features from spatiotemporal coordinates and task embeddings for all flow types. (2) Task-specific feature extraction: the task-aware multi-task attention selectively reinforces the shared representation; the task-specific dedicated layers decode the enhanced features into stream function and pressure, with velocity obtained via automatic differentiation. (3) Dynamic weight allocation: adaptively reweights equation, boundary, and data loss terms across flows to ensure stable joint optimization.
Method
Lid-Driven
Pipe Flow
Couette flow
Linear Regression [ 41 ]
6.61e-02
5.79e-01
6.61e-02
GPR [ 42 ]
2.51e-02
3.97e-01
4.95e-01
DNN [ 43 ]
3.25e-02
2.80e-01
6.83e-02
LAAF-PINN [ 44 ]
-
2.26e-01
-
KIH-PINN [ 45 ]
2.49e-02
2.41e-01
3.39e-02
AL-PINN [ 46 ]
3.12e-02
1.91e-01
4.73e-02
Table 1: Comparative Study Results: Performance Comparison (MSE) Across Different Methods.
Figure 3: Predicted flow field visualization (streamline plot). The model accurately captures characteristic physical structures: (a) Lid-driven cavity primary vortex; (b) Pipe flow parabolic profile; (c) Couette flow linear profile.
Attention
Input Norm.
DWA
Lid-Driven
Pipe Flow
Couette flow
✓
✓
✓
1.27e-02
1.25e-01
1.27e-02
✓
✓
×
1.83e-02
2.17e-01
1.18e-01
✓
×
✓
2.57e-02
1.65e-01
2.40e-02
×
✓
✓
8.59e-02
2.62e-01
1.62e-02
×
×
✓
1.22e-01
3.51e-01
6.39e-02
×
×
×
1.42e-01
3.78e-01
9.21e-02
Table 2: Ablation study results: Component analysis and performance comparison (MSE).
Figure 4: Training convergence analysis (loss curves) during multi-flow PINN training. (a) Unweighted Total Loss; (b) Equation Loss (Navier-Stokes residuals); (c) Boundary Condition Loss; (d) Data Loss. All loss components and the total loss show stable convergence under the DWA strategy.
Transfer Scenario
Setting
Final MSE
Loss Reduction
Initial Loss
Source: Pipe & Lid Target: Couette
From scratch
0.1226
Baseline
3004
Frozen Backbone
0.0236
80.7%
1.51
Fine-tuned
0.0216
82.4%
1.08
Source: Pipe & Couette Target: Lid-Driven
From scratch
6.2407
Baseline
97.7
Frozen Backbone
0.0268
99.96%
4.84
Fine-tuned
0.0214
99.97%
1.76
Table 3: Cross-task transfer learning performance using pre-trained shared backbone.
Target Task
Baseline
Source: Lid
Source: Pipe
Source: Couette
Lid-Driven
0.087
—
0.135 (+55%)
0.158 (+81%)
Pipe
0.235
0.297 (+26%)
—
0.339 (+44%)
Couette
0.049
0.056 (+14%)
0.068 (+39%)
—
Table 4: Negative transfer analysis when reusing task-specific attention features. Values indicate Final MSE and Relative Increase over Baseline.
Shandong University, Qingdao, China · Tsinghua University, Beijing, China · Institute of Engineering Thermophysics, Chinese Academy of Sciences, Beijing, China