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.
While Physics-Informed Neural Networks (PINNs) offer a mesh-free approach to solving fluid-flow PDEs, standard point-wise residual minimization suffers from convergence pathologies in topologically complex domains like Triply Periodic Minimal Surfaces (TPMS). The locality bias of point-wise constraints fails to propagate global information through tortuous channels, causing unstable gradients and conservation violations. To address this, we propose the Multi-scale Weak-form PINN (MUSA-PINN), which reformulates Navier-Stokes equation constraints as integral conservation laws over hierarchical spherical control volumes. We enforce continuity and momentum conservation via flux-balance residuals on control surfaces. Our method utilizes a three-scale subdomain strategy-comprising large volumes for long-range coupling, skeleton-aware meso-scale volumes aligned with transport pathways, and small volumes for local refinement-alongside a two-stage training schedule prioritizing continuity. Experiments on steady incompressible flow in TPMS geometries show MUSA-PINN outperforms state-of-the-art baselines, reducing relative errors by up to 93% and preserving mass conservation.
Weizheng Zhang, Xunjie Xie, Hao Pan +4
Shandong University, Qingdao, China · Tsinghua University, Beijing, China · Institute of Engineering Thermophysics, Chinese Academy of Sciences, Beijing, China
Physics-informed neural networks (PINNs) embed governing partial differential equations directly into the training loss, offering a promising alternative to costly CFD solvers for unsteady flows. Yet the growing list of techniques proposed to improve PINN training is typically validated one at a time, leaving open whether these techniques actually compose. We study this question in depth on the DFG/Schafer-Turek unsteady cylinder wake benchmark. In isolation, nearly every technique performs no better than an untreated baseline. However, combining periodic (SIREN) activations with causal weighting unlocks a previously inaccessible regime, reconstructing velocity and pressure fields to within 4.1% average relative L2 error against an OpenFOAM reference solution. Adding further techniques instead causes catastrophic performance degradation, demonstrating that individually effective PINN interventions can interact nonlinearly and that more elaborate training recipes are not necessarily better.
Fluid flows are governed by the nonlinear Navier-Stokes equations, which can manifest multiscale dynamics even from predictable initial conditions. Predicting such phenomena remains a formidable challenge in scientific machine learning, particularly regarding convergence speed, data requirements, and solution accuracy. In complex fluid flows, these challenges are exacerbated by long-range spatial dependencies arising from distant boundary conditions, which typically necessitate extensive supervision data to achieve acceptable results. We propose the Domain-Decomposed and Shifted Physics-Informed Neural Network (DDS-PINN), a framework designed to resolve such multiscale interactions with minimal supervision. By utilizing localized networks with a unified global loss, DDS-PINN captures global dependencies while maintaining local precision. The robustness of the approach is demonstrated across a suite of benchmarks, including a multiscale linear differential equation, the nonlinear Burgers' equation, and data-free Navier-Stokes simulations of flat-plate boundary layers. Finally, DDS-PINN is applied to the computationally challenging backward-facing step (BFS) problem; for laminar regimes (Re = 100), the model yields results comparable to computational fluid dynamics (CFD) without the need for any data, accurately predicting boundary layer thickness, separation, and reattachment lengths. For turbulent BFS flow at Re = 10,000, the framework achieves convergence to O(10^-4) using only 500 random supervision points (< 0.3 % of the total domain), outperforming established methods like Residual-based Attention-PINN in accuracy. This approach demonstrates strong potential for the super-resolution of complex turbulent flows from sparse experimental measurements.
Prashant Kumar, Rajesh Ranjan
Department of Aerospace Engineering, Indian Institute of Technology Kanpur, Kanpur, India 208016