Generative adversarial reduced order modelling

In this work, we present GAROM, a new approach for reduced order modeling (ROM) based on generative adversarial networks (GANs). GANs attempt to learn to generate data with the same statistics of the underlying distribution of a dataset, using two neural networks, namely discriminator and generator. While widely applied in many areas of deep learning, little research is done on their application for ROM, i.e. approximating a high-fidelity model with a simpler one. In this work, we combine the GAN and ROM framework, introducing a data-driven generative adversarial model able to learn solutions to parametric differential equations. In the presented methodology, the discriminator is modeled as an autoencoder, extracting relevant features of the input, and a conditioning mechanism is applied to the generator and discriminator networks specifying the differential equation parameters. We show how to apply our methodology for inference, provide experimental evidence of the model generalization, and perform a convergence study of the method.


Introduction
Partial differential equations (PDEs) are able to model complex physical processes, ranging from fluid dynamics, aerospace engineering to material science [42,4,26].Nevertheless, only specific types of PDEs can be analytically solved, while the majority of them require numerical approximations such as finite difference or finite element methods.Despite their great accuracy, these numerical approaches are still extremely costly in terms of computational resources.The latter is even worse in parametric contexts, where a new simulation must be performed for each set of new parameters, making unfeasible real-time computations.To overcome this barrier, reduced order models (ROMs) have become an emerging field in computational sciences, fulfilling the demand for efficient computational tools for performing real-time simulations [17,23,27].In particular, data-driven ROMs have grasped increasing attention from the scientific community, due to their ability to model systems using only a small amount of data, i.e. model agnostic.One of the most used techniques for ROM is the proper orthogonal decomposition (POD), where a low-dimensional space is employed to optimally represent the problem at hand.For parametric problems, radial basis functions (RBFs) [24] are used as a standard interpolation procedure for mapping the parameter space to the mode of variation coefficients space.While data-driven ROM using POD has been extensively used for dimensionality reduction, one of the major drawbacks is that the procedure exhibits limitations for non-linear dynamics [5].
Deep learning (DL) algorithms have recently emerged as new approaches for performing nonlinear ROM by means of autoencoders [29,12].These architectures consist of two neural networks, namely encoder and decoder.The encoder network is used for compressing the data onto a lowerdimensional manifold, while the decoder performs the opposite transformation.The final objective is to minimize the reconstruction error between the encoded-decoded data and the original one, quantified by a specific norm.Similarly to POD, the RBF procedure can be used for mapping the parameter space to the lower-dimensional vector space.Alternatively, distinct neural networks can be used, such as long short-term memory (LSTM) networks for temporal predictions [30,13], or feed forward neural networks in parametric problems [18].
Regardless of the great advancement achieved in terms of generalizability by neural networks with respect to POD, only discriminative models have been extensively investigated.Discriminative models, such as regression techniques, are machine learning models optimized for mapping the input around the most similar training examples, depending on some specific distances [14].Nevertheless, these models lack a semantic understanding of the phenomenology characterizing the data [43], and quantifying the uncertainty may be challenging.On the other hand, generative models are able to capture the data (-generating) distribution, due to their probabilistic nature.Indeed, the aim of generative models is to learn the data generation process, which forces the network to learn specific patterns in the data.Latent variable models [7] are an example of generative models which have been successfully applied in many fields, see [37,20,31,33] as far from an exhaustive list of possible applications.
Recently, latent variable model approaches, specifically variational autoencoder (VAE) models [22], have been applied for reduced order modeling.In particular, in [11] the authors apply VAEs to produce a near-orthogonal ROM for turbulent flows, while in [41] a ROM for fluid flow predictions based on VAEs is presented.VAEs represent a powerful subclass of latent variable models, namely prescribed models.In prescribed models, the (parametric) distributions defining the probabilistic model must be chosen upfront.Nevertheless, the quality of the model can be affected if too simplistic distributions are used [43,35].
The implicit models -different from the above-mentioned ones -do not define any probability distribution upfront.Among the latent implicit models family, Generative Adversarial Networks (GANs) [15] have been proven to be very effective.GANs are typically composed of two networks, a generator, and a discriminator network.The generator's objective is to produce a realistic output resembling the data distribution.Opposite, the discriminator's goal is to differentiate between generator outputs and real data.The learning procedure, known as adversarial learning, sees thus a competition between the two networks, trained simultaneously, in which the discriminator becomes better and better in individuating the real data, while the generator improves the ability to generate new data in order to deceive the discriminator.Therefore, differently to (un-)supervised discriminative learning approaches, generative modelling final aim is to generate data resembling the true distribution.In particular in GANs, the latter is achieved by implicitly modelling the true unknown probability distribution through a generator network trained by adversarial learning.
In this work, we present GAROM, a generative adversarial reduce order model.GAROM is a novel reduced order model framework, based on a variation of conditional boundary equilibrium GAN [28].In particular, GAROM uses adversarial learning to learn the distribution over highfidelity data, conditioned on domain-specific conditioning.At convergence, the GAROM network is able to generate high-fidelity data given domain-specific conditioning, e.g.PDE parameters, or temporal time steps.We also present a regularized version of the latter, r-GAROM, providing extra information on the generative process as explained in the Methods section 2. The frameworks are tested in a variety of problems, comparing the prediction ability to state-of-the-art ROM methods, and analyzing the convergence robustness.Empirical results on the network's ability to generalize to unseen data are provided, and different uncertainty quantification strategies based on statistics are presented.Finally, we provide further possible research directions to investigate this novel methodology.

Conditional Boundary Equilibrium GAN
Boundary equilibrium generative adversarial network (BEGAN) [6] is an autoencoder based generative adversarial network.The BEGAN model consists of a generator network G : R Nz → R Nu , generating a domain-specific sample in R Nu by passing random noise z ∈ R Nz following p(z) distribution; and a discriminator network D : R Nu → R Nu , which autoencode real and generated samples.The core idea of BEGAN is utilizing the autoencoder reconstruction loss distribution derived from the Wasserstein distance [3] to approximate the data distribution.Specifically, the optimization is done with respect to the Wasserstein distance between the autoencoder reconstruction losses of real and generated samples.In addition, to prevent the imbalance of G and D, an equilibrium term is added in the objective function.
Formally, let L : R Nu → R + the autoencoder reconstruction loss defined as: with R Nu the space of real data samples.Thus, the BEGAN objective is: for each training step t, with θ G and θ D the network parameters for the generator and discriminator, k t a control term allowing the losses balance at each step t, and λ the learning rate for k t .Finally, γ ∈ [0, 1] is the diversity ratio defined as the ratio between the generated and real data reconstruction loss expected value: Therefore, the discriminator has two main goals: autoencode real data, and discriminate real from generated data.The γ ratio is used to balance the two objectives.In fact, for lower values of γ, the discriminator focuses more heavily on autoencoding real data, leading to smaller data diversity.BEGAN has been proved to be effective for generating high resolution images, but it lacks to specifically condition the network.Conditional BEGAN (cBEGAN) [28] has been introduced to overcome this issue.The cBEGAN objective is very similar to the one presented in Equation 2.1.2,but the generator and discriminator are conditioned on conditioning variables c ∈ R Nc .Hence, the cBEGAN objective becomes: for each training step t, (2.1.4) with the autoencoder reconstruction loss: In practice, the generator is conditioned by concatenating the random noise vector z with the conditioning variable c.The concatenation of the two represents the input for G. On the other hand, the discriminator is conditioned by concatenating the encoder output with the conditioning variable, before passing the concatenation to the decoder.

GAROM implementation details
The final objective of GAROM is to obtain a unique neural network which can perform ROM, while maintaining high reconstruction accuracy and generalization.We follow a data-driven approach for ROM, where a sample of high fidelity results from a domain-specific simulation is collected and used for training.Let u ∈ R Nu indicating the output of the real simulation, and c ∈ R Nc the variable affecting the simulation, e.g.parameters, time steps or boundary conditions.We name the variables c as the conditioning variables, represented in this work by the free simulation parameters, as explained in Section 2.5.GAROM framework is based on an implicit generative modeling approach, specifically using cBEGAN.Indeed, cBEGAN allows the discriminator to learn a latent space for the real data manifold by autoencoding, forcing the generator to learn fundamental patterns of the data.Furthermore, having defined the discriminator as an autoencoder allows to impose constrains on the latent space, e.g.orthogonality, or to change the architecture to make it more robust, e.g.utilizing denoising [45] or contractive [36] regularization.These adjustments would not be possible with a vanilla GAN [15], where the discriminator outputs a real number in [0, 1] only.
Formally, GAROM aims to approximate the density of the high fidelity solution data given the conditioning variables.In the present work the uniqueness of the high fidelity solutions is assumed, thus for a given parameter c a unique solution u is obtained.Following the cBEGAN framework, the GAROM objective is defined as: where η ∈ {0, 1} ensure the absence or presence of the regularize parameter.Indeed, when η = 0 the GAROM objective is the same as the cBEGAN objective, which forces the generator to learn a distribution without any information of the uniqueness of the solution.Opposite, setting η = 1 forces the generator to learn a unique distribution, which results in a shrinkage of the generator's variance, as well as better accuracy and generalization (see Section 3.2).We name the latter regularized generative adversarial reduced order model, r-GAROM.We want to highlight that, differently to many (classical or deep learning based) ROM frameworks, we do not project onto a lower dimensional space and, once the latent representation is learnt, train an interpolator.Instead, no interpolation is done since the conditioning is passed directly to the generator and discriminator.Hence, we perform only one neural network training with our methodology.The Discriminator encodes the input obtaining a latent vector, which is concatenated with the conditioning representation g ψ (c) before it is passed to the decoder.

Modes
The (r-)GAROM architecture is depicted schematically in Figure 1.Notice that the conditioning variables (the PDE parameters) are not concatenated directly, as done in cBEGAN, but passed to a domain-specific decoder for the generator f τ , and discriminator g ψ .This is done in order to pass more information to the generator similarly to [34], and to avoid a high mismatch in the dimension of z and c.Finally, it is worth noticing that in general different conditioning variables can be applied, e.g.parameters, POD modes or coordinates information.As a consequence, a specific network is needed to encode the information into one high-dimensional vector.In the present work, only parametric problems are considered, and we leave for future works the investigation of highly effective conditioning mechanisms.

GAROM predictive distribution
Once the (r-)GAROM model is trained, a probabilistic ensemble for the output variable u(c) can be constructed leveraging G(z | c).Following a similar approach to [46], we can predict the mean prediction û and its variance σ2 , for a new conditioning variable c * , by Monte Carlo sampling: In particular, p G is the implicit distribution learned by the generator via adversarial optimization, K is the number of Monte Carlo samples used for approximating the distribution moments, and z k are the samples from the latent distribution p(z).

Uncertainty quantification strategies
Quantify the uncertainty of the prediction is a common problem for data-driven reduced order models [39].Exploiting the (r-)GAROM predictive distribution one can obtain moment estimates by Monte-Carlo sampling, as discussed in Section 2.3.These estimates can be used during inference to compute bounds in probability of the prediction error, i.e. the difference between real and average (r-)GAROM solution.As an example, employing the Markov inequality we can find the following bound for any threshold a > 0: where Prob is the probability distribution for c, e.g.random uniform.In practice, the right hand side of Equation 2.4.1 can be estimated, with sufficient statistics, after training by Monte Carlo approximation on the training dataset, resulting in an estimate in probability for the average prediction.
A more tight bound for each parameter c, can be obtained assuming an approximation of the distribution p G , and apply the theory of confidence interval.As an example, assuming p G is well approximated using a normal distribution N (û, σ2 ), one could estimate the prediction uncertainty in a similar approach to the one adopted by [16].While the first bound based on Markov inequality is certain, the latter one uses an approximation of the distribution.Nonetheless, as also evidenced in [16], these kind of approximations (problem specific) can obtain very good estimates.

Datasets description
This section is dedicated to introduce the numerical benchmarks applied for testing GAROM and comparing it to the baseline models presented in Section 2.6.For notation consistency, c indicates the vector of free parameters while u the simulation solution.

Parametric Gaussian The first test case is a simple problem representing a Gaussian function moving in a domain
(2.5.1) the centers of the Gaussian.Practically, u is evaluated on 900 points uniformly randomly chosen in Ω for a fixed c.The evaluation results are flatten (row-major order) in a one dimensional vector of size 900, namely u.The dataset is composed by N = 400 instances c i uniformly randomly chosen in Ω, resulting in N high fidelity solutions u i .

Graetz Problem
The second test case deals with the Graetz-Poiseuille problem, that models forced heat convection in a channel.The problem is characterized by two parameters: c 1 controlling the length of the domain, and c 2 the Péclet number, that takes into account the heat transfer in the domain.The full domain is Ω(c The high fidelity solution u : Ω(c 1 ) → R is obtained by solving: where ∆ indicates the Laplacian operator, and ∂ n the normal derivative.The high fidelity solution are numerically computed by finite elements following the work [17], using a mesh of 5160 points.Specifically, N = 200 instances of c i are uniformly randomly chosen in Ω(c 1 ), resulting in N high fidelity solutions u i arranged as a vector (row-major order).

Lid Cavity
The last test case is the famous Lid Cavity problem, modeling isothermal, incompressible flow in a two-dimensional square domain.The domain is composed by a top wall moving along the horizontal axis, while the other three walls are stationary.At low Reynolds number (Re) the flow is laminar, but it becomes turbulent when increasing the Re.A complete mathematical formulation of the problem is found in [40].The full domain is Ω = [d, d] with d = 1m the domain size.The free parameter c is the magnitude of the velocity of the top wall, measured in ms −1 .The Reynolds number is given by: with the kinematic viscosity ν = 10 −6 m 2 s −1 .To compute the high fidelity solution, we simulate for a time step of 5s using delta step 0.0001s keeping only the last time-step simulation.The mesh is done by hexahedral cells of 70 × 70 × 1 number of cell points in each direction.We use a cell-center finite volume scheme.The dataset is composed by N = 300 instances of c ∈ [0.01, 1] evenly spaced, resulting in N high fidelity solutions arranged as a vector (row-major order).

Baseline models
We compared the performances of the (r-)GAROM approach against some of the more consolidated data-driven frameworks in ROM community.Such models rely on machine learning and/or linear algebra techniques, resulting on different approaches from the algorithmic perspectives.In such way, we aim for the most possible fair comparison, individuating the GAROM advantages and disadvantages with respect to the state-of-the-art in different possible operating contexts.
The baseline comparison models are: • Proper Orthogonal Decomposition with Radial Basis Function interpolation (POD-RBF), • Proper Orthogonal Decomposition with Artificial Neural Network interpolation (POD-NN), • Autoencoders with Radial Basis Function interpolation (AE-RBF), • Autoencoders with Artificial Neural Network interpolation (AE-NN).A complete mathematical description of the methodologies can be found in [39].In few words, these models use proper orthogonal decomposition and an autoencoder for dimensionality reduction, while radial basis function and artificial neural network for approximating the reduced parametric solution manifold.The POD is performed by truncated singular value decomposition with a variable rank (latent dimension in the manuscript), while the autoencoder is the same as the discriminator network without the conditioning concatenation.For radial basis function we employed a Gaussian Kernel with length scale equal to 1, while the artificial neural network is composed by two linear layers of dimension 24 and 64, with ReLU activation function applied to all layers except the last.The weights of the artificial neural network are chosen to resemble in size the conditioning mechanism of the generator, allowing a more fair comparison.The autoencoder is trained for 1000 epochs, while the artificial neural network for 20000 epochs.Both the autoencoder and artificial neural network are optimized with Adam [21] using 0.001 learning rate, minimizing the mean square error loss.

Software details
The PyTorch software [32] is used to implement the GAROM model due to its versatility and its wide used in the deep learning community.The EZyRB software [9] is used for performing the comparison between GAROM and state-of-the-art techniques in Section 3.1.Openfoam [1] and FeniCSx [2] are used for the numerical simulations.An implementation of GAROM is available at https://github.com/dario-coscia/GAROM.

Training setup and model architecture
An NVIDIA Quadro RTX 4000 GPU was used to train the GAROM models, while the GAROM comparison methods are trained on Intel CPUs.In the Graetz and Lid Cavity experiments, the GAROM and baseline models are all trained on a dataset containing 80% of the total number of high fidelity simulation instances, and tested on the remaining 20%.Differently, for the Gaussian test case, 60% of the high fidelity instances are used for training, and the remaining 40% for testing.This choice is due to the higher number of instances with respect to Lid and Graetz test cases.
The GAROM models are all trained for 20000 epochs, with Adam optimizer using a learning rate of 0.001 for both the discriminator and generator.The GAROM training times for the benchmarks are approximately of 45 minutes for the parametric Gaussian, 1 hours and 30 minutes for Graetz, and 2 hours for the Lid Cavity, independently on the discriminator latent dimension.In order to fit all data in GPU we used a batch size of 8 for all tests.The noise vector z are uniform random samples in [−1, 1] of dimension 12 for all tests.Furthermore, the λ and γ parameters of Equation 2.2.1 are set to 0.001 and 0.3 respectively, as suggested in [6].The generator, discriminator, generator conditional encoder, and discriminator conditional encoder networks are reported in Table 1.

Results
In this section, the performances of GAROM and its improved variant r-GAROM are presented.To estimate the accuracy of the presented methodology, we use the mean l 2 relative error ϵ between the high-fidelity solution u(c) ∈ R Nu , and the generated one û(c) ∈ R Nu , for the parameter c ∈ R Nc .It is formally defined as: with N the number of testing parameters used for the metric evaluation.All of our experiments are performed on three different test cases, representing benchmark problems in parametric contexts.Aiming at a complexity escalation, we take into account a Gaussian signal moving inside a square (algebraic), the Graetz-Poiseuille problem (linear PDE), and the Lid Cavity problem (nonlinear PDE).The datasets for the training are so composed of the (parameter-dependent) high-fidelity solutions, which are obtained by solving such problems with the consolidated numerical solver, as exhaustively explained in Section 2.5.Moreover, for all the test cases, different latent dimensions for the discriminator network are considered.The other architectural details for the models at hand are fully described in Section 2.8, together with the optimizer settings.

Model inference
In the first experiment, we test the GAROM capability to predict the solution for a new parameter, aka conditioning variable.A visualization of the r-GAROM prediction for a testing parameter, and its l 2 point-wise error, is reported in Figure 2. The spatial distribution of the prediction for all the test cases is almost identical to the original one, as proved also by the low error.
Looking at a more precise measure for the GAROM accuracy, we calculate the mean l 2 relative error over a set of training and testing parameters, comparing it with the error obtained using the ROM baseline models -POD-RBF, POD-NN, AE-RBF, AE-NN.As we can note from Table 2, for the majority of the experiments POD-RBF is the best across all models on the training dataset (gray rows), but it fails to properly generalize to test data.Indeed, the test error for the POD (white rows) can increase drastically to more than five orders of magnitude, as in the Graetz case, showing a poor ability to correctly generalize.Differently, ML-based methodologies exhibit comparable train and test errors, due to their ability to learn complex nonlinear relationships by the data.For the test error, which is used to assess the model prediction ability, the r-GAROM model obtains very promising results for almost half of the test cases.Across the different deep learning models, r-GAROM obtains lower error for seven out of nine tests, highlighting its encouraging precision even in this preliminary contribution.It is also important to highlight that the (r-)GAROM architecture is fairly simple in all the numerical tests here pursued: both generator and discriminator are composed only of a few dense layers (details in Section 2.8).Searching for the optimal architecture is outside the scope of the work, whose aims are limited to presenting a new methodology for reduced order modeling.Because of this consideration and assuming the precision of the network is correlated to the number of hyperparameters, we suppose the accuracy can be further improved by using more powerful deep learning architectures, as in [29,10,25], at the cost of longer and more expensive training.Finally, the r-GAROM error seems to be almost independent of the latent dimension, since only a small variation of the errors is observed in training and testing for the various dimensions.In such a way, we can empirically prove the better capability to reduce the original dimension of the snapshots, since adding new reduced dimensions does not really affect the final accuracy.

Model variance
Figure 2 reports the (r-)GAROM variance obtained by a Monte Carlo approximation with different random inputs for the generator.Contrary to the ROM baseline models, GAROM can provide also an estimate of the model variance, obtained by a probabilistic ensemble (see Section 2.3).Since the solution is unique by assumption, we expect a zero variance for the generated samples given the conditioning variables.Hence, a high variance in the GAROM estimate gives an uncertain prediction of the model.This is confirmed by observing the variances for different models in Table 2, and the point-wise variance in Figure 2.Both GAROM and r-GAROM models report a small variance, with training variance always one or two orders of magnitude smaller than the testing one.This indicates that GAROM models are more uncertain in predicting testing data than training ones.This is expected since the GAROM model builds a distribution on the training Table 2: Accuracy comparison for different test cases, methods, and latent dimensions.The table reports the mean l 2 relative error ϵ (in percent).Gray rows represent the error on training data, while white rows the error on testing data.For GAROM and r-GAROM models, also the predictive standard deviation is reported (in percent).We employ N = 240 for Gaussian and Lid Cavity datasets, and N = 160 for the Graetz dataset.The variance estimate, although very important for the aforementioned reasons, does not give a quantification of the predictive uncertainty, but only statistical information of the learnt distribution.Nevertheless, due to the probabilistic framework adopted, we can obtain bounds in probability for the reconstruction error by using the variance estimate.Indeed, as deeply explained in Section 2.4, with the variance information provided by the GAROM framework, it is possible to obtain prediction uncertainty using the Markov inequality, or the confidence interval theory.While extremely important, in this work we just show how to obtain these näive bounds.Exploring further to obtain tighter bounds, or employ the uncertainty quantification strategies for noisy data are possible new interesting research topics, which we will explore in the future.

Generalization
One fundamental aspect, especially in the context of data-driven modelling, is the ability to correctly generalize across new instances of the conditioning domain, which of course were not inside the training dataset.To empirically prove the GAROM ability to generalize over the testing parameters, we define the difference δ(c) as the mean difference between the truth parametric solution and the corresponding GAROM prediction, such that: where u(c) = u 1 (c) . . .u Nu (c) and û(c) = û1 (c) . . .ûNu (c) .We highlight that we do not consider the absolute value here in order to detect possible systematic over-and under-estimations of the proposed model.Figure 3 shows the distribution of the δ different for all latent dimensions and for all test cases.We can note that the distribution of the error computed over the training parameters is quite similar to the error distribution for the testing parameters in all the numerical investigations.Such behaviour indicates that both models can correctly generalize outside the training dataset, for the proposed problems.Furthermore, the distributions are centered around zero for both models, indicating a good high-fidelity solution reconstruction, as also shown in the previous Section.Finally, it is worth noticing that r-GAROM distributions are more closed towards zero than the not regularized counterpart, as a consequence of the regularizer term addition.

Robustness
The last investigation regards the robustness of the training.It is well established in the deep learning community that generative adversarial networks tend to be unstable during training [15].Nevertheless, such behaviour is drastically reduced with BEGAN [6,28].In order to assess the convergence of the optimization procedure, we perform a statistical analysis studying the error trend during the training, using different random initialization for the weights of the network.
Practically, 5 training loops are carried out changing the seed for the random number generator1 .Figure 4 depicts the mean error and the interval between the minimum and the maximum error across the 5 simulations.The plot indicates a stable convergence of r-GAROM, with sporadic perturbations in the statistical campaign.The unique test case that is showing not a stable trend is the Gaussian one, but only when the latent dimension is 4: we suppose the latent dimension is not sufficiently big to represent the original problem, leading to an aleatory optimization.However, the l 2 relative error for the maximum discrepancy is in the same order of magnitude as the average result, showing that the model has still reached a good performance.

Discussion
In this study, we proposed GAROM, a generative adversarial reduce order modeling approach to tackle parametric PDE problems.The presented methodology is also extended to a regularized version (r-GAROM) in case the solution for the PDE is unique.The methodology is general, and applicable to a variety of ROM problems.The latter is tested on three parametric benchmarks for different latent dimensions, showing very promising results in data-driven modeling.Among the deep learning approaches for ROM, r-GAROM outperforms in terms of accuracy in model prediction all of them in seven out of nine tests.Moreover, this approach seems to be more resilient to overfitting.The POD demonstrates again here its great robustness and applicability in ROM methods, but it emerges in these examples the high difference between train and test errors in the case the POD is not able to properly detect the latent dimension of the problem -e.g.due to Differently, GAROM and its variation do not suffer from poor generalization, resulting in a more reliable model, despite the lack of precision in some tests.Surprisingly, it also shows any dependence between the l 2 relative mean error and the latent dimension we use in the discriminator, making it less sensitive to this parameter.It must be repeated that, with the GAROM approach, we are not projecting data on a reduced space, but the inner dimension is only used in the discriminator autoencoder.The adversarial approach combined with the proposed regularisation seems also helpful to stabilize the training in terms of loss trend, making such an approach practically less difficult to hyper-parameters tuning.Finally, the statistical approach allows to compute the variance learned by the generator, making it possible to quantify the uncertainty of predictions applying different statistical strategies.We identify multiple exciting research directions for the methodology.Firstly, improving the quality of the neural networks for the generator, discriminator, and conditioning mechanisms, and applying the methodology to more complex problems.As already stated, in the work we have used very simple architectures, which limits the generation capability.As an example, the framework could be easily extended to time-dependent problems, employing LSTM [19] or transformers [44] networks for the conditioning mechanism.Alternatively, as also suggested in [6], employing different architecture for the discriminator, e.g.U-net [38], could lead to accuracy improvement.Another possibility is to enhance the conditioning set with more information, e.g. by passing POD modes, or mesh information.Another very interesting prosecution of this work would be the continuous extension of the entire architecture.With the proposed one, both the networks' dimension scales with the number of components in the snapshots vector.To apply such approach to very finer meshes, the computational requirement to train and infer the model would be huge and sometimes unfeasible.In these cases, a spatial continuous extension can lead to a wider diffusion, especially in more complex problems.Another possibility to mitigate the difficult application to finer meshes (and so snapshots with more degree of freedom) is the employment of the architecture presented in [8] where the authors employ continuous convolutional neural networks over unstructured meshes.
In summary, the presented new methodology, combined with the different new research directions, paves the way to the application of GAROM in very complex settings, exhibiting great potential for future ROM developments in computational science.

Figure 1 :
Figure 1: A schematic representation for GAROM generator and discriminator.The Generator input is the concatenation of random noise z, and the conditioning representation f τ (c).The Discriminator encodes the input obtaining a latent vector, which is concatenated with the conditioning representation g ψ (c) before it is passed to the decoder.

Figure 2 :
Figure 2: r-GAROM inference results.The images show the generated snapshot for a testing parameter using a latent dimension of 64, compared to the corresponding high-fidelity solution.Top: Gaussian dataset.Center : Graetz dataset.Bottom: Lid cavity dataset.

Figure 3 :
Figure 3: Distribution of the δ difference.The graph depicts, for each latent dimension, train (red) and test (blue) distribution of the δ.Top: r-GAROM model.Bottom: GAROM model.

Figure 4 :
Figure 4: r-GAROM convergence graph in l 2 relative error for training.The solid line indicates the average across all simulations.The shaded area represents the interval obtained by taking the maximum and minimum error across all simulations.The total number of training is 5.

Table 1 :
GAROM model architecture.The table reports the type of layer, its weights and the activation after each layer.The input dimension is indicated as N u , noise dimension N z , conditioning dimension N c , and latent dimension N l .
However, it is worth noticing that the l 2 errors between training and testing in Table2are almost always identical across different dimensions, showing good generalizability of the model, as also reported in Section 3.3.It is evident from Table2that r-GAROM has a lower variance than GAROM for testing and training.This is mainly due to the regularizer term, which forces the network to converge faster, as explained in the Section 2.