Organizations: Technical University of Munich, Professorship of Data-driven Materials Modeling, School of Engineering and Design, Boltzmannstr. 15, 85748 Garching, Germany · Munich Data Science Institute (MDSI - Core member), Garching, Germany
Inverse problems and inverse design in multiphase media, i.e., recovering or engineering microstructures to achieve target macroscopic responses, require operating on discrete-valued material fields, rendering the problem non-differentiable and incompatible with gradient-based methods. Existing approaches either relax to continuous approximations, compromising physical fidelity, or employ separate heavyweight models for forward and inverse tasks. We propose GenPANIS, a unified generative framework that preserves exact discrete microstructures while enabling gradient-based inference through continuous latent embeddings. The model learns a joint distribution over microstructures and PDE solutions, supporting bidirectional inference (forward prediction and inverse recovery) within a single architecture. The generative formulation enables training with unlabeled data, physics residuals, and minimal labeled pairs. A physics-aware decoder incorporating a differentiable coarse-grained PDE solver preserves governing equation structure, enabling extrapolation to varying boundary conditions and microstructural statistics. A learnable normalizing flow prior captures complex posterior structure for inverse problems. Demonstrated on Darcy flow and Helmholtz equations, GenPANIS maintains accuracy on challenging extrapolative scenarios - including unseen boundary conditions, volume fractions, and microstructural morphologies, with sparse, noisy observations. It outperforms state-of-the-art methods while using 10 - 100 times fewer parameters and providing principled uncertainty quantification.
Spatially varying material coefficient taking discrete values c(0),…,c(P−1)
x={xj}j=1dx
Discrete microstructure vector with xj∈{0,1,…,P−1} (e.g., xj∈{0,1} for two-phase)
y∈Rdy
PDE-solution coefficient vector (basis expansion coefficients or NN weights)
u^
Observed (noisy) PDE measurements, u^=H(u)+noise
Table 1: Key symbols used in the GenPANIS framework. Symbols with a hat ⋅^ indicate observed or given quantities.
Figure 1: Probabilistic graphical model illustration for the GenPANIS framework. Plates indicate different data types (labeled, unlabeled, virtual). See text for details on model structure and parameterization.
Model
PINO
FunDPS
GenPANIS
Training time (in hrs )
38.2
44.5
0.6
Total Parameters (in millions)
13.1
183.3
2.9
Table 2: Training times and total number of trainable parameters for each model when training using 10000 labeled data (Darcy Flow Equation). In contrast to PINO and GenPANIS, FunDPS can utilize only labeled data during training. This is why we train all models exclusively with labeled data for results where comparisons are feasible.
dim(z)
L2 Relative Error (Forward)
Pixel Accuracy (Inverse)
Total Parameters
20
8.37⋅10−2
0.936
1.3⋅106
30
5.91⋅10−2
0.981
1.7⋅106
40
7.17⋅10−2
0.985
2.1⋅106
50
4.68⋅10−2
0.976
2.5⋅106
60
4.33⋅10−2
0.985
2.9⋅106
70
7.7⋅10−2
0.985
3.3⋅106
Table 3: Relative error (forward problem), pixel accuracy (inverse problem), and total number of trainable parameters for different values of dim(z) in GenPANIS.
Type of prior
L2 Relative Error (Forward)
Pixel Accuracy (Inverse)
NVP flow model with 12 layers
7.80⋅10−2
0.945
N(0,I)
2.26⋅10−1
0.920
Table 4: Results for the forward and inverse problems obtained when the flow model of section 2.1.1 is used as a prior for the latent variables z vs. a standard normal N(0,I) .
Figure 2: Forward problem predictions of the three models.
Figure 3: Reference posterior statistics for Darcy flow obtained from one million HMC samples. Full observations were used with SNR=100 .
Figure 4: Solving the Darcy flow inverse problem for various levels of noise by observing the full solution field. No additional residual information is used after training the models.
Figure 5: Solving the Helmholtz equation inverse problem for various levels of noise by observing the full solution field. No additional residual information is used after training the models.
Figure 6: Solving the Darcy flow inverse problem for various levels of noise by observing the full solution field. Additional residuals were used for the PINO and FunDPS models only.
Figure 7: Solving the inverse problem for various levels of noise by observing the full solution field. Additional residuals were used for the PINO and FunDPS models only.
Figure 8: Solving the Darcy flow inverse problem for various observation grids and SNR=100 . No additional residual information is used after training the models.
Figure 9: Solving the Helmholtz equation inverse problem for various observation grids and SNR=100 . No additional residual information is used after training the models.
Figure 10: Solving the Darcy flow inverse problem for various randomly selected observation points and SNR=100 . No additional residual information is used after training the models.
Figure 11: Solving the Helmholtz equation inverse problem for various randomly selected observation points and SNR=100 . No additional residual information is used after training the models.
Figure 12: Performance of the examined models, in terms of L2 error ϵ (forward problem, same instance as Figure 4 , noiseless) and pixelwise accuracy PA (inverse problem, same instance as Figure 4 , SNR=100 ), when different number of labeled data is employed during training.
Figure 13: Solving the Darcy flow inverse problem for an out-of-distribution input-output pair. The solution field is noisy ( SNR=100 ) and fully observed. No additional residual information is used after training the models.
Figure 14: Solving the Darcy flow inverse problem for out-of-distribution Boundary conditions described in Equation 35 . The solution field is noisy ( SNR=100 ) and fully observed. No additional residual information is used after training the models.
Figure 15: Solving the Helmholtz equation inverse problem for out-of-distribution Boundary conditions described in Equation 35 . The solution field is noisy ( SNR=100 ) and fully observed. No additional residual information is used after training the models.
Figure 16: Solving the Darcy flow inverse problem for out-of-distribution volume fraction (VF=10%). The solution field is noisy ( SNR=100 ) and fully observed. No additional residual information is used after training the models.
Figure 17: Solving the Helmholtz equation inverse problem for out-of-distribution volume fraction (VF=10%). The solution field is noisy ( SNR=100 ) and fully observed. No additional residual information is used after training the models.
Figure 18: Effect of using unlabeled data on top of a small labeled dataset ( Nl=100 ). Full observations were used for both the forward and inverse problems, while for the latter, the observation noise was equal to SNR=100 .
Figure 19: Predictive performance of the model, as more unlabeled training data are added to Nl=100 labeled training data.
Nl / Nv
Nv=0
Nv=100
Nv=1000
Nv=10000
Nl=0
-
1.547⋅10−1
1.189⋅10−1
0.963⋅10−1
Nl=100
1.029⋅10−1
0.983⋅10−1
0.967⋅10−1
0.925⋅10−1
Nl=1000
0.839⋅10−1
0.684⋅10−1
0.638⋅10−1
0.553⋅10−1
Nl=10000
0.560⋅10−1
0.428⋅10−1
0.394⋅10−1
0.387⋅10−1
Table 5: L2 error ϵ for solving the forward problem (same instance as 4 ) for different combinations of labeled ( Nl ) and virtual ( Nv ) data.
Nl | Nv
Nv=0
Nv=100
Nv=1000
Nv=10000
Nl=0
-
0.813
0.849
0.854
Nl=100
0.844
0.853
0.859
0.883
Nl=1000
0.873
0.906
0.918
0.922
Nl=10000
0.890
0.955
0.966
0.966
Table 6: Pixelwise Accuracy for solving the inverse problem of (same instance as 4 , SNR=100 ) for different combinations of labeled ( Nl ) and virtual ( Nv ) data.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Layers
Input → Output
Parameters
Linear
60 → 128
7808
LeakyReLU
—
—
Linear
128 → 128
16512
LeakyReLU
—
—
Linear
128 → 60
7740
Total
—
32060
Appendix
Table 7: Layers and parameters of the scale network sk(⋅) .
Layers
Input → Output
Parameters
Linear
60 → 128
7808
LeakyReLU
—
—
Linear
128 → 128
16512
LeakyReLU
—
—
Linear
128 → 60
7740
Total
—
32060
Appendix
Table 8: Layers and parameters of the translation network tk(⋅) .
Component
Parameters
Scale network sk(⋅)
32060
Translation network tk(⋅)
32060
Learned scale parameter αk∈R60
60
Total per coupling layer
64180
Total flow model parameters
770160
Appendix
Table 9: Total parameters of the 12-coupling-layer RealNVP prior.
Layers
Feature Maps
Height × Width
Parameters
Fully Connected Layer (60 → 16641)
—
16641 × 1
1015101
Reshape
—
129 × 129
—
Convolution Layer (k3s2p1)
16
65 × 65
160
Batch Normalization
—
65 × 65
32
Average Pooling Layer (k2s2)
—
32 × 32
—
Convolution Layer (k3s1p1)
48
32 × 32
6960
Appendix
Table 10: Layers and parameters of the neural network fθf(z) .
Layers
Feature Maps
Height × Width
Parameters
Input
—
129 × 129
—
Convolution Layer (k3s2p1)
8
65 × 65
80
Batch Normalization
—
65 × 65
16
Average Pooling Layer (k2s2)
—
32 × 32
—
Convolution Layer (k3s1p1)
24
32 × 32
1752
Batch Normalization
—
32 × 32
48
Appendix
Table 11: Layers and parameters of the neural network gξg(x^(i)) .
We present a framework for fine-tuning flow-matching generative models to enforce physical constraints and solve inverse problems in scientific systems. Starting from a model trained on low-fidelity or observational data, we apply a differentiable post-training procedure that minimizes weak-form residuals of governing partial differential equations (PDEs), promoting physical consistency and adherence to boundary conditions without distorting the underlying learned distribution. To infer unknown physical inputs, such as source terms, material parameters, or boundary data, we augment the generative process with a learnable latent parameter predictor and propose a joint optimization strategy. The resulting model produces physically valid field solutions alongside plausible estimates of hidden parameters, effectively addressing ill-posed inverse problems in a data-driven yet physicsaware manner. We validate our method on canonical PDE benchmarks, demonstrating improved satisfaction of PDE constraints and accurate recovery of latent coefficients. Our approach bridges generative modelling and scientific inference, opening new avenues for simulation-augmented discovery and data-efficient modelling of physical systems.
Jan Tauberschmidt, Sophie Fellenz, Sebastian J. Vollmer +1
DSA, German Research Center for Artificial Intelligence (DFKI) · Department of Computer Science, University of Kaiserslautern–Landau (RPTU) · Department of Mathematics, Imperial College London
Partial differential equation (PDE) inverse problems are often ill-posed, making fine-scale details difficult to recover. We address this problem by introducing a learned observation-complementary latent representation that preserves reconstruction-relevant information and is combined with the observation to reconstruct the unknown field. Building on this representation, we propose OCL-PDE, a generative framework that encourages the observation to guide large-scale structure and the latent to supply complementary fine-scale details. OCL-PDE is built on a physics-aware autoencoder (AE) and conditional Flow Matching, supporting inverse reconstruction as well as forward PDE prediction. Experiments demonstrate improved reconstruction accuracy and fine-detail recovery compared with the evaluated baselines.
Ding Yang, Chuqi Chen, Chang Ma +1
Department of Mathematics, The Hong Kong University of Science and Technology, Hong Kong · Department of Mathematics, University of Michigan, Ann Arbor, USA · Department of Materials, The Hong Kong University of Science and Technology, Hong Kong +1
Reconstructing PDE solutions from sparse observations is a core challenge in scientific computing. We present FM4PDE, a flow-matching generative framework that learns the joint distribution of PDE coefficients (or initial states) and solutions (or final states), enabling both forward simulation and inverse recovery with limited paired data. At inference, sampling is guided by a composite loss that enforces agreement with sparse measurements and reduces the PDE residual; we support deterministic, stochastic, and hybrid samplers. We provide error guarantees for these guided procedures. For the deterministic optimizer, a coercivity condition ensures trajectory boundedness and a phase-wise contraction yields logarithmic complexity in the target accuracy. For the stochastic sampler, we introduce adaptive guidance and assume dissipativity of the velocity field to obtain uniform moment bounds independent of the noise-floor parameter. This leads to polynomial-time error bounds, and a matching lower bound shows constant guidance induces an unavoidable positive bias, motivating adaptivity. A hybrid deterministic-stochastic analysis is also provided. Experiments on static and time-dependent benchmark PDEs demonstrate competitive accuracy and faster inference than diffusion-based generative models.
Xifeng Zhang, Jin Zhao
School of Mathematical Science Capital Normal University Beijing, 100048, China · Academy for Multidisciplinary Studies Capital Normal University2026 Beijing, 100048, China