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)) .
DSA, German Research Center for Artificial Intelligence (DFKI) · Department of Computer Science, University of Kaiserslautern–Landau (RPTU) · Department of Mathematics, Imperial College London
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
School of Mathematical Science Capital Normal University Beijing, 100048, China · Academy for Multidisciplinary Studies Capital Normal University2026 Beijing, 100048, China