Paper deep dive
Parameterization method of reservoir properties for ensemble-based data assimilation using intermediate latent space of StyleGAN
Marcio A. Sampaio, Paulo H. Ranazzi, Martin J. Blunt
Intelligence
Status: not_run | Model: - | Prompt: - | Confidence: 0%
Entities (0)
Relation Signals (0)
No relation signals yet.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Ensemble smoothers are the most successful and efficient techniques currently available for history matching. However, because these methods rely on Gaussian assumptions, their performance is severely degraded when the prior geology is described in terms of complex facies distributions (non-Gaussian). In this way, for these methods, we need to apply efficient parameterization techniques. Currently, the most efficient methods for performing parameterization are deep learning models. However, given the variety of existing deep learning models, studies have not identified which is most suitable for use with ensemble-based methods, although some important models had already been evaluated. Based on a recent literature review, the most promising models selected were VAE-GAN, Latent Diffusion, and StyleGAN models. As a novel aspect of this work, data assimilation with the second generation of StyleGAN (StyleGAN2) model was performed using the latent z-space and intermediate w-space, separately. They were applied in two 2D case studies: one categorical (three facies) and the other continuous. The results demonstrated that all three models are highly efficient, with the StyleGAN2 model standing out for generating samples with geological realism and achieving excellent data matching in the cases studied. Our findings show that performing data assimilation with StyleGAN2 using the intermediate space (w-space) yielded better results than the traditional application in the latent space (z-space). This is due to the fact that ESMDA uses linear updates and the w-space is much more linear and disentangled than the highly entangled z-space, thereby ensuring that the updated vectors remain close to realistic geological patterns. These results were validated using main geostatistical and history matching metrics.
Tags
Links
- Source: https://arxiv.org/abs/2609.39626v1
- Canonical: https://arxiv.org/abs/2609.39626v1
Trouble viewing inline? Open PDF directly β
Full Text
69,973 characters extracted from source content.
Expand or collapse full text
1 Parameterization method of reservoir properties for ensemble-based data assimilation using intermediate latent space of StyleGAN Marcio A. Sampaio a1 , Paulo H. Ranazzi a2 , Martin J. Blunt b3 a Departamento de Engenharia de Minas e de PetrΓ³leo, Escola PolitΓ©cnica, Universidade de SΓ£o Paulo, 05508- 030, SP, Brasil. b Department of Earth Science and Engineering, Imperial College London, South Kensington, London, UK 1 Corresponding author. E-mail address: marciosampaio@usp.br (Marcio A. Sampaio). ORCID: 0000-0003- 1125-7218 2 Contributing author. E-mail address: ranazzi@usp.br (Paulo H. Ranazzi). ORCID: 0000-0002-4515-4797 3 Contributing author. E-mail address: m.blunt@imperial.ac.uk (Martin J. Blunt). ORCID: 0000-0002-8725-0250 ARTICLE INFO Keywords: Variational Autoencoder Generative Adversarial Network Latent Diffusion Style-Based Generative Adversarial Network Latent space reparameterization Data assimilation Authorship contribution statement Author 1: Conceptualization, Methodology, Data Curation, Formal analysis, Investigation, Software, Validation, Visualization, Writing. Author 2: Data curation, Datasets creation, Investigation, Validation, Writing. Author 3: Conceptualization, Data curation, Investigation, Validation, Writing, Visualization, Supervision. 2 ABSTRACT Ensemble smoothers are the most successful and efficient techniques currently available for history matching. However, because these methods rely on Gaussian assumptions, their performance is severely degraded when the prior geology is described in terms of complex facies distributions (non-Gaussian). In this way, for these methods, we need to apply efficient parameterization techniques. Currently, the most efficient methods for performing parameterization are deep learning models. However, given the variety of existing deep learning models, studies have not identified which is most suitable for use with ensemble-based methods, although some important models had already been evaluated. Therefore, trying to fill this gap, this study selected the three leading models found in the literature to determine the best method to employ, highlighting the advantages and disadvantages of each one. Based on a recent literature review, the most promising models selected were VAE-GAN, Latent Diffusion, and StyleGAN models. As a novel aspect of this work, data assimilation with the second generation of StyleGAN (StyleGAN2) model was performed using the latent z-space and intermediate w-space, separately. They were applied in two 2D case studies: one categorical (three facies) and the other continuous. The results demonstrated that all three models are highly efficient, with the StyleGAN2 model standing out for generating samples with geological realism and achieving excellent data matching in the cases studied. Our findings show that performing data assimilation with StyleGAN2 using the intermediate space (w-space) yielded better results than the traditional application in the latent space (z-space). This is due to the fact that ESMDA uses linear updates and the w-space is much more linear and disentangled than the highly entangled z-space, thereby ensuring that the updated vectors remain close to realistic geological patterns. These results were validated using main geostatistical and history matching metrics. 3 1. INTRODUCTION Ensemble-based methods represent the state-of-the-art for data assimilation (DA) application for history matching of the reservoir models. The main disadvantages of ensemble- based methods are their poor performance in highly nonlinear models, spurious correlations from limited ensemble size, and reliance on Gaussian assumptions, which degrades performance when reservoir prior parameters exhibit non-Gaussian distributions. Among ensemble-based methods, the Ensemble Smoother with Multiple Data Assimilation (ESMDA), proposed by Emerick and Reynolds (2013), is one of the most widely used. For a comprehensive review of the ensemble-based methods, readers are referred to Aanonsen et al. (2009) and Oliver and Chen (2011). Despite these methods have been applied successfully, they sometimes fail to preserve the geological realism of the model in reservoirs with complex facies distributions. This occurs mainly because of the underlying Gaussian assumptions on model parameters that are inherent in these methods. This fact has encouraged an intense research activity to develop Gaussian parameterizations in a latent space that maps into geologically- realistic facies realizations. Despite the large number of methods employed in the literature, conventional methods like Level Set (Chang et al., 2010; Luo et al., 2007, 2008), Truncated PluriβGaussian (Beucher and Renard, 2016; Silva and Deutsch, 2017), Distance Transform (HakimβElahi and Jafarpour, 2017), and NormalβScore Transform (Li et al., 2018) tend toward multiβGaussian assumptions and fail to adapt to the elaborate spatial statistics required in the geological models (Ling and Jafarpour, 2024). Recent applications of deep learning have attracted attention due to the quality of the results generated. Next, we highlight the key studies that employed deep learning models in the parameterization problem to be applied in the DA of reservoir models. Laloy et al. (2017) used a Variational Autoencoder (VAE) to construct a low- dimensional parameterization of binary facies models for data assimilation with Markov Chain 4 Monte Carlo (MCMC). The results showed that the dimensionality reduction (DR) approach outperforms traditional techniques like principal component analysis (PCA), optimization-PCA (OPCA) and discrete cosine transform (DCT). Two synthetic cases were used to illustrate the effectiveness of the proposed DR-based probabilistic inversion in relation to traditional approaches mentioned before. Later (Laloy et al., 2018), modified the spatial GAN to deal with high dimensional inversion problems. Synthetic 3D cases were tested to prove that GAN could capture the statistical features using low-dimensional latent variables and could perform well for inversion of channel structures. Canchumuni et al. (2017) used an autoencoder to parameterize binary facies values in terms of continuous variables for history matching with an ensemble smoother. In other work, Canchumuni et al. (2019a) extended the same parameterization using deep belief networks (DBN), which is able to map discrete facies into continuous parameters and reconstruct back to discrete facies. The results showed that the training step of the DBN was very successful in terms of reconstructing the input facies realizations of the validation sets, but the same performance was not observed when we updated the latent vectors of the DBN with ESMDA. As previous work of these authors was based on fully-connected layers, making the computational requirements for training infeasible in practice, Canchumuni et al. (2019b) applied a convolutional variational autoencoder (CVAE) and the ESMDA to investigate the parameterization in three synthetic history-matching problems with channelized facies, two 2D cases and one 3D. The results proved promising compared to previous methods, generating well-defined channelized facies. The proposed procedure outperformed previous results obtained with standard ESMDA, ESMDA with OPCA and DBN parameterizations in terms of the reconstruction of the channel facies. However, this work highlighted the need to improve the reconstruction accuracy, especially in three-dimensional cases, and reduce the computational cost in the training process of models. Results with VAEs alone showed that are 5 generally superior to standard PCA for non-Gaussian models, but they can produce blurry output of lower quality than GANs, or they may display unrealistic geometries. After, (Canchumuni et al., 2021) applied nine different formulations, including VAE, generative adversarial network (GAN), Wasserstein GAN (WGAN), WGAN with gradient penalty, WGAN with spectral normalization, variational auto-encoding GAN, principal component analysis (PCA) with cycle GAN, PCA with transfer style network, and VAE with style loss in the same channelized facies cases of the previous studies. They also proposed two strategies to allow the use of distance-based localization with the deep learning parameterizations. The results showed that all networks were able to generate realistic facies realizations with well- defined channels, but the DA for water cut values were not so good like images generation. Both localization strategies used in this work were able to solve the ensemble collapse problem, especially found in the VAE model application. Liu and Durlofsky (2021) propose the 3D CNN-PCA procedure for geological parameterization. This work introduced a new supervised learning-based reconstruction loss, which is used in combination with style loss and hard data loss to handle complex 3D geomodels. The deep learning model was used as a post-processor for PCA, which is a traditional parameterization method. The 3D case studies were three geological scenarios: binary and bimodal channelized systems, and a three-facies channel-levee-mud system. The algorithm was successfully applied for history matching with ESMDA for the bimodal channelized system showing uncertainty reduction, although it requires improvements. Bao et al. (2022) compared the performance of VAE and GAN in flow and transport DA using ESMDA. Four cases with categorical variables and three cases with continuous variables were conducted to test the performance of coupling ESMDA with deep learning models. The results showed that VAE was more successful in terms of DA performance and GAN was more efficient for reconstructing channel structure with similar properties as in the 6 training image. The authors highlighted that VAE models donβt need adversarial training like GANs, that is time-consuming and may be unstable. Ling and Jafarpour (2024) propose the Styleβbased Generative Adversarial Networks in the second version (StyleGAN2) for parameterization of complex subsurface flow properties and subsequent ESMDA application comparing the results with CVAE and GAN. This architecture was evaluated it using groundwater pumping tests and twoβphase fluid flow experiments. The results showed that parameterization with StyleGAN2 provide superior performance in terms of reconstruction fidelity and flexibility. The authors highlighted that StyleGAN2 have direct implications for representing complex subsurface heterogeneity using lowβdimensional latent variables, including improved fidelity and control of image attributes. They also highlighted a notable implication for model calibration was the increased regularity of the latent space (z-space), which implies that two points that are close in the latent space also remain close in the original spatial domain. After that, Ahn and Choe (2025) propose a novel method that enhances history matching in reservoir simulations by integrating a geological- style-mixing approach with GAN-based optimization using StyleGAN3, a framework capable of producing a variety of geological styles. Thus, the focus of this work was on generating diverse geological models to expand the initial ensemble to be used in DA, not using StyleGAN3 in the parameterization process. The proposed method was compared with the previously developed convolutional neural network-principal component analysis (CNN-PCA) and demonstrated similar history matching performance. Federico and Durlofsky (2025) used a variational autoencoder for dimension reduction and a U-Net for the denoising process for latent diffusion model. This model was applied in 2D three-facies (channel-levee-mud) systems obtained visually consistent realizations with samples used and significant uncertainty reduction in the DA process. Although good quality 7 images were obtained, the production and injection matching results were limited to reducing uncertainties in both cases, indicating a need for improved matching. Our previous work stemmed from the findings by Canchumuni et al. (2021) and Bao et al. (2022) that GANs are capable of generating high-quality images, albeit with poor matching, whereas VAEs exhibit the opposite behavior. Consequently, we proposed applying the hybrid VAE-GAN method to leverage the advantages of both. Indeed, the VAE-GAN model achieved output quality comparable to that of GANs, alongside assimilation results similar to those of VAEs (Sampaio et al., 2026). We evaluated the results across both categorical and continuous test cases using standard metrics. We also highlighted that VAE-GAN can be time-consuming and unstable, as it requires adversarial training between three networks. In the current work, inspired by the observations of Karras et al. (2019) regarding the StyleGAN model, specifically that the ν€-space is much more linear and disentangled than the highly entangled the ν§-space, we introduce a new parameterization method for non-Gaussian reservoir properties in ensemble-based DA, utilizing the intermediate latent space of second generation of StyleGAN. To demonstrate the effectiveness of this method, we compared our approach with DA using the conventional latent ν§-space, as well as against state-of-the art models in these problems, such as Latent Diffusion models (Federico and Durlofsky, 2025) and VAE-GAN (Sampaio et al., 2026). 2. METHODOLOGY In this section, we present the methodology developed in this work. It is divided into two main parts. The first part involves modeling and training three types of deep learning models to compare their respective advantages and disadvantages: VAE-GAN, Latent Diffusion and StyleGAN2. The second part consists in making the integration with DA, using the ESMDA to perform history matching. All models used the latent ν§-space for DA, except for StyleGAN2 8 model, which is also evaluated using its intermediate latent ν€-space. The images (realizations) in this study consist of 2D permeability maps defined on a 48 x 48 Cartesian grid. 2.1. Deep Learning Models In this first part, we briefly describe the three deep learning models used in this work. 2.1.1. Variational Autoencoder Generative Adversarial Network (VAE-GAN) The Variational Autoencoder Generative Adversarial Network (VAE-GAN) combines the advantages of VAE and GAN to improve image generation quality while preserving a structured latent representation. The VAE encoder learns a latent representation of the image and imposes a probabilistic distribution on this latent space (ν§-space), while the VAE decoder reconstructs images from the latent representation. Additionally, the GAN discriminator distinguishes real images from images generated by the decoder. In this architecture, the VAE is responsible for ensuring that the latent space is well structured and regularized, whereas the GAN improves the quality of generated images by forcing the decoder to generate more realistic images. The objective function combines the VAE and GAN losses to balance reconstruction and geological realism (Sampaio et al., 2026). 2.1.2. Latent Diffusion Model (LDM) The genesis of Latent Diffusion Models (LDMs) lies at the convergence of two distinct lines of research in deep generative learning: Denoising Diffusion Probabilistic Models (DDPMs) and Autoencoders (Rombach et al., 2022). The primary motivation for this fusion was to address the core limitation of original DDPMs: the high computational cost of training and inference, inherent to operating directly in high-dimensional pixel space (Ho et al., 2020). The resulting framework is composed of two stage architecture: an autoencoder and a diffusion model. In the autoencoder stage, an encoder compresses input images into a lower-dimensional latent representation (ν§-space), capturing essential spatial features while discarding unnecessary details. Conversely, the decoder reconstructs images from these latent codes, ensuring that the 9 latent space preserves meaningful information. In the diffusion process, the model learns to generate new latent representations by gradually denoising random noise. During the training step, referred to as the forward process, Gaussian noise is progressively added to clean latent codes across multiple time steps. In this model, a U-Net model learns to predict the noise added at each step, trained with a simple MSE loss between predicted and actual noise. After that, in the generation part, called as reverse process, it starts from pure random noise in the latent space and the trained U-Net iteratively removes noise step by step. In each step predicts and subtracts the noise component, gradually revealing a structured latent code. The clean latent code produced by the reverse diffusion is passed through the decoder to generate the final image. The LDM used in this work consists of a variational autoencoder (VAE) and a U-Net, similar to the architectures employed by Ronneberger et al. (2015) and Federico and Durlofsky (2025). 2.1.3. Style-Based Generative Adversarial Network (StyleGAN) The Styleβbased Generative Adversarial Networks (StyleGAN) architecture emerged from a progressive evolution of generative adversarial networks, driven by the need for greater control over the image synthesis process and higher output quality (Karras et al., 2018, 2019, 2020a, 2020b, 2021). The foundational GAN framework was introduced by Goodfellow et al. (2014), establishing the adversarial training paradigm, where a generator and discriminator compete in a min-max game. However, early GANs suffered from training instability and mode collapse, issues that were partially addressed by architectural innovations. Furthermore, manipulating the latent code to obtain a desired change in the generated image is challenging, since the mapping between the latent and image spaces is highly nonlinear. Consequently, changes to a latent code may simultaneously affect multiple semantic attributes of the generated image, a property usually referred to as entanglement. In this regard, Karras et al. (2019) demonstrated significant improvements in image quality and control over the disentanglement of semantic attributes with 10 StyleGAN model. In the StyleGAN2, a random latent vector (z-space) drawn from a standard normal distribution is first transformed by a mapping network into an intermediate latent representation (ν€-space). This transformed representation is then injected at multiple resolution levels of a synthesis network via adaptive instance normalization (AdaIN) operations, which modulate the feature maps by scaling and shifting their normalized activations. This mechanism allows coarse styles to control high-level geological structures, while finer styles govern local heterogeneity. A central aspect of this architecture is the enforcement of Gaussianity within the latent space. The model imposes a statistical regularization that constrains the latent vectors to maintain zero mean, unit variance, and negligible skewness and kurtosis. This is achieved through an additional loss term that penalizes deviations from standard normal moments. As a result, the latent manifold remains smooth and continuous, enabling meaningful interpolation between generated realizations and robust sampling for downstream applications. Overall, the model operates by learning a constrained, smooth mapping from a well-behaved Gaussian latent space to realistic geological images, guided by adversarial feedback, perceptual feature matching, and explicit statistical regularization. The improvements in latent space regularity and predictability, as well as generation of spatial domain images with higher quality and robustness, are among the reasons to use StyleGAN for subsurface flow modeling, and in particular in parameterization of model calibration problems (Ling and Jafarpour, 2024) 2.2. Ensemble Smoother with Multiple Data Assimilation (ESMDA) Emerick and Reynolds (2013) demonstrated that Ensemble Smoother (ES) is equivalent to a single full Gauss-Newton update step. Therefore, to handle with nonlinear forward operators, ESMDA assimilates all the observed data multiple times using an inflated measurement error covariance matrix, relating each iteration with a smaller Gauss-Newton update step. Neglecting model errors, the perfect forward model is expressed as ν=ν(ν¦), where the non-linear 11 forward operator ν ( β ) (in our case, the reservoir simulator) maps the model parameters vector ν¦β β ν ν to the predicted data vector νββ ν ν . Here, ν ν and ν ν are the number of model parameters and observed data points, respectively. The history matching inverse problem aims to estimate the model parameter vector ν¦ that best reproduce a set of observed measurements (ν obs ). The observed data are considered a noisy realization of the true reservoir response (ν true ), defined as ν obs = ν true + ν. The measurement error ν is usually drawn from a zero- mean Gaussian distribution, ν ~ ν©(0,ν D ), with ν D β β ν ν Γν ν representing the covariance matrix of measurement errors. In the ESMDA analysis step, each member ν of model parameters vector ensemble is updated using the following equation: ν¦ ν ν+1 =ν¦ ν ν +ν νν· ν (ν ν· ν +νΌ ν ν D ) β1 (ν ννν ,ν ν βν ν ν ) (1) for ν= ( 1,...,ν ν ) , where ν ν denotes the number of ensemble members (ensemble size), ν νν· ν β β ν ν Γν ν is the cross-covariance between the model parameters and predicted data, ν ν· ν β β ν ν Γν ν is the auto-covariance of the predicted data, νΌ ν is the inflation factor that damp the iteration i. The forward step is where each ensemble member ν ν ν is estimated using the forward operator ν ν ν =ν(ν¦ ν ν ) for ν=(1,...,ν ν ). 2.3. Geostatistical Metrics In this section, we introduce the geostatistical metrics used to evaluate the images generation in terms of geological realism and quality. 2.3.1. Variogram Mean Squared Error The variogram measures spatial continuity by quantifying how data values differ as a function of distance. For each lag distance h, the 2D experimental variogram is computed as: νΎ ( β ) = 1 2ν(β) β [ν(ν₯ ν )βν(ν₯ ν )] 2 ν,ν (2) 12 where ν(ν₯) is the value at location x, and N(h) is the number of point pairs separated by distance h in both horizontal and vertical directions. The MSE between real and generated variograms is then calculated as the mean squared difference over all lag distances. 2.3.2. Connectivity Function MSE The connectivity function quantifies how well a generated spatial model reproduces the connectivity patterns of real data. The connectivity function, denoted as Ο(h), measures the probability that two points separated by a lag distance h are not only above a threshold t but also belong to the same connected cluster. The MSE then computes the average squared difference between the connectivity functions of the real dataset and the generated (simulated) dataset across all lag distances. The connectivity function is defined as: ν ( β ) = β ν[ν ( ν₯ ν ) > ν‘ β§ ν ( ν₯ ν ) > ν‘ β§ νννννν‘νν νν‘ β] ν,ν β 1 ν,ν [ν ( ν₯ ν ) > ν‘] (3) where 1[β ] is the indicator function, and the sums run over all point pairs at lag distance h. The MSE is computed between the connectivity functions of real and generated data. Lower MSE values indicate that the generated data faithfully preserves the spatial continuity and clustering behavior of the reference real data. 2.3.3. Histogram KL Divergence This metric compares the full pixel value distributions using the Kullback-Leibler divergence (Kullback and Leibler, 1951). After computing normalized histograms P (real) and Q (generated) with a small epsilon added for numerical stability: ν· νΎνΏ ( ν || ν ) = β ν ( ν ) ννν( ν(ν) ν(ν) ) ν (4) A lower value indicates that the generated distribution closely matches the real data distribution. 2.3.4. PCA Correlation 13 Principal Component Analysis (PCA) is performed on flattened real and generated images. The correlation between corresponding principal components measures how well the global variance structure is preserved: ν ν = νΆνν£(ννΆ νννν,ν , ννΆ νννν,ν ) ν νννν,ν .ν νννν,ν (5) The reported metric is the mean of these correlations across the first two components. Values closer to 1 indicate strong structural similarity. 2.3.5. MDS MMD Multidimensional Scaling first projects both real and generated samples into a low- dimensional space. The Maximum Mean Discrepancy then quantifies the distance between these two distributions using a Gaussian kernel: νν· 2 =Ξ [ νΎ ( ν,ν β² )] +Ξ [ νΎ ( ν,ν β² )] β2Ξ [ νΎ ( ν,ν )] (6) where K(x, y) = exp(βΞ³ β₯x β yβ₯ 2 ). The bandwidth Ξ³ is set adaptively as the inverse of twice the squared median of pairwise distances. A lower MMD indicates the generated samples are statistically indistinguishable from real ones in the MDS embedding space. 2.4. History Matching Metrics In this section, we introduce the metrics used to evaluate the DA results. 2.4.1. Normalized data-mismatch objective function For each member j, the normalized data-mismatch is the difference between simulated and observed data, scaled by the measurements error covariance matrix: O N d,j = 1 N d (ν ν βν obs ) T ν D β1 (ν ν βν obs ) (7) and its average: O N d Μ = 1 ν ν β O N d,j ν ν j=1 (8) 2.4.2. Balanced Accuracy 14 Balanced accuracy is a performance metric used in classification tasks, especially when dealing with imbalanced datasets. Balanced accuracy generalizes naturally to multi-class problems by averaging the recall (true positive rate) for each class. For νΆ classes, balanced accuracy is computed as: Balanced Accuracy= 1 C β True positives i True positives i +False negatives i C i=1 ,for class i (9) 2.4.3. Root Mean Square Error (RMSE) An ensemble of root mean square error (RMSE) for the ensemble = ν¦ ν ν=1 N ν , with ν is the number of parameters and ν ν is the number of members of ensemble, with respect to the true model ν¦ true is: RMSE ( ν ,ν¦ true ) = β ν¦ ν β ν¦ true β 2 β ν ν=1 ν ν (10) 2.4.4. Spread The spread is defined as the average RMSE between each ensemble member and the ensemble mean: Spread ( ν ) = 1 ν ν β β ν¦ ν β ν¦ Μ β 2 β ν ν ν ν=1 (11) 2.4.5. FrΓ©chet Inception Distance (FID) and FrΓ©chet Reservoir Distance (FRD) The FrΓ©chet Inception Distance (FID) is estimated by computing the FrΓ©chet distance between the distributions ν and ν, obtained from the Inception network coding layer (Heusel et al., 2018): FID ( ν,ν ) =βν ν βν ν β 2 2 +νν ( ν ν +ν ν β2(ν ν ν ν ) 1 2 ) (12) where ν and ν denote the mean and covariance of a given set of samples, while νν ( β ) calculates the trace of a matrix. For further information about Inception network and GAN metrics, reader is directed to Borji (2018). Although widely used in computer vision, computing the FID metric to assess the quality of generated reservoir realizations poses challenges, because the nature of 15 the ImageNet dataset is very different from the geological images used in this work. For this reason, we replaced the Inception model with a Reservoir Classifier (RC) Network for computing the FrΓ©chet Distance as proposed by (Ranazzi et al., 2024), calling this metric as the FrΓ©chet Reservoir Distance (FRD). For both metrics, the statistics were computed over a large batch of 10,000 generated and training samples to avoid bias. For more information on the Reservoir Classifier (RC) and FrΓ©chet Reservoir Distance (FRD) used in this work, the reader can find all the details in (Ranazzi et al., 2024). 2.5. Integration between Deep Learning Models and ESMDA In this section, we present the integration framework between the generative deep learning models and ESMDA algorithm. Thus, we use generative models to learn low- dimensional and continuous data representation of the geological realizations, while ESMDA updates the corresponding latent vectors based on the available set of observed data. This workflow is accomplished through two main steps: Step 1: Modeling and training deep learning models to learn the distribution of the dataset. After training, the weights of the generator (VAE-GAN and StyleGAN) and decoder (LDM) are saved for use in the next step; Step 2: Employment of ESMDA to update the latent representations based on observed data. At each iteration, the ensemble of latent vectors ν§ (or also ν€ in the case of StyleGAN2) is passed through the respective generator or decoder to produce an ensemble of permeability realizations. These realizations are then fed into the simulator to compute the ensemble of ensemble of predicted data. The ESMDA is used to update the vector ν³ of all models (and also ν in the StyleGAN case) and the iterative process continues until the number of data assimilation iterations is reached. 16 3. CASE STUDIES We evaluate the methodology by considering two distinct synthetic datasets: one case consisting of categorical variables (integer values) representing three facies, and the second one considering continuous variable based on the carbonate reservoir benchmark. The datasets were normalized to a range of -1 to 1, which is necessary for using the tanh (hyperbolic tangent) activation function in the output layer of models. All prior realizations, in each dataset, were generated using the same training image of the reference model. 3.1. Categorical training dataset The realizations of the first dataset were built using the open-source Stanford Geostatistical Modeling Software β SGeMS (Remy et al., 2009), by applying the MPS algorithm Single Normal Simulation Equation β SNESIM (StrΓ©belle, 2000). Using the βStanford Vβ three-facies training image from Remy et al. (2009, chap. 8), we have created 80,000 categorical realizations, with a rotation angle of 45ΒΊ in relation to the training image. In the images, shown here normalized for training, they have original permeability values equal to 100, 1,000 and 9,000 mD, for the colors purple, green and yellow, respectively. Figure 1 shows some unconditional realizations obtained by SNESIM algorithm. Henceforth, this dataset referred to as the βcategorical training datasetβ. Figure 1: Random realizations of the categorical training dataset. 17 This case study is a 2D model that contains 48Γ48 gridblocks with the reservoir log- permeability being the only uncertain model parameter (ν ν = 2,304). The reference model was generated using the same approach as the training dataset. The reservoir simulation model contains 9 producers and 4 injectors with a configuration of four five-spots as we can see in Figure 2. The producers are controlled by minimum bottom-hole pressure (BHP) equal to 200 kgf/cm 2 and the injectors by maximum water injection rate (WIR) equal to 500 m 3 /day. History data consists of noisy measurements at 90 days interval in 10 measurements periods (ν ν = 660). The covariance matrix of the measurement errors was built considering a standard deviation of 4 m 3 /day for production rates, 3 m 3 /day for injector rates, and 2 kgf/cm 2 for bottom- hole pressures. Figure 2: The true reservoir model for the first case. The locations of injectors are indicated by triangles, and those of producers by circles. 3.2. Continuous Training Dataset To create the continuous training dataset in a more realistic context, we started with the UNISIM-I-H benchmark log-permeability realizations (Correia et al., 2015). The original 3D log-permeability field, which has dimensions of 46Γ69Γ30, is notably non-Gaussian due to the presence of Super-K features, thin layers with exceptionally high permeability (Meyer et al., 2000; Alqam et al., 2001). Following the approach of Ranazzi et al. (2024), we generated samples by taking multiple random 48Γ48 crops from each of the 30 vertical layers, resulting 18 in a total of 15,000 samples (see Figure 3 for example of individual realizations). The reference model was randomly chosen from the original set of samples. Figure 3: Random realizations of the continuous training dataset. The reservoir simulation model contains 9 producers and 4 injectors with a configuration of four five-spots. The well control strategy is identical to that adopted in the previous case study. History data consists of noisy measurements at 90 days interval in 10 different measurements periods (ν ν =660). The covariance matrix of the measurement errors was built considering a standard deviation of 4 m 3 /day for production rates, 3 m 3 /day for injector rates, and 2 kgf/cm 2 for bottom-hole pressures. The true reservoir model with well positions is shown in Figure 4. 19 Figure 4: The true reservoir model for the second case. The locations of injectors are indicated by triangles, and those of producers by circles. 3.3. VAE-GAN Configuration and Structure The VAEβGAN model was trained with a latent dimension of 512 for 150 epochs using a batch size of 32. The learning rate started at 0.0001 and followed an exponential decay schedule with a decay rate of 0.95 applied every 1,000 steps. The KL divergence loss was weighted by a beta parameter of 0.2, while the perceptual loss, computed using feature extractors based on InceptionV3 and a custom reservoir classifier, was weighted by a gamma of 0.1. The Leaky ReLU activation used an alpha slope of 0.2. The encoder consisted of three convolutional layers with 58, 116, and 230 filters, each followed by Leaky ReLU activation and batch normalization, plus a dropout rate of 0.3 before the dense layers that output the latent mean and log variance. The decoder mirrored this structure with three transposed convolutional layers using the same filter sizes in reverse order and a final tanh activation. The discriminator used three convolutional layers with the same filter progression, but incorporated spectral normalization, Gaussian noise with a standard deviation of 0.1, and dropout of 0.3. The total generator loss combined an L2 plus L1 reconstruction loss, the weighted KL divergence, the weighted perceptual loss, and an adversarial loss defined as the negative mean of the discriminatorβs output on fake samples. The discriminator was trained with a hinge loss using separate terms for real and fake images. Both the generator and discriminator were optimized with Adam using a Ξ² 1 of 0.5 and gradient clipping set to a maximum norm of 1.0. Early stopping 20 with a patience of 50 epochs, monitoring the validation loss, was implemented to prevent overfitting. The Figure 5 below shows the schematic structure of the VAE-GAN model used in this work. The complete details of all models can be found in the link: https://github.com/LASG-USP/Parameterization_StyleGAN. Figure 5: Schematic structure of the VAE-GAN. 3.4. Latent Diffusion Configuration and Structure The encoder compresses the input image to a latent representation, where the latent dimensionality was set to 512. The encoder architecture comprises four convolutional blocks with progressively increasing filter sizes (32, 64, 128, 256), each employing 3Γ3 kernels with stride 2 for downsampling, followed by Leaky ReLU activation with a slope of 0.2, batch normalization, and a dropout rate of 0.4. The final convolutional features are flattened and passed through a dense layer of size 256 before projection to the latent space (z-space). The decoder mirrors the encoder structure through transposed convolutions, reconstructing the image from the latent code. Two decoder variants were employed: (i) a discrete decoder with a 21 softmax output activation over K=3 facies classes for categorical generation and (i) a continuous decoder with a hyperbolic tangent (tanh) output activation for continuous-valued reconstruction. The latter enables direct discrete sampling by taking the argmax over class probabilities. The diffusion process operates directly on the 512-dimensional latent vectors. The denoising network follows a fully connected architecture conditioned on timestep embeddings. The timestep is encoded using a sinusoidal embedding of dimension 256, followed by two dense layers with Swish activation. This time embedding is added to the latent representation and passed through three hidden dense layers of sizes 1024, 1024, and 512, each with Leaky ReLU activation and a dropout rate of 0.1. The final layer projects back to the latent dimension. Training was conducted over 150 epochs using the Adam optimizer with an initial learning rate of 10 β4 and exponential decay rates Ξ² 1 =0.5 and Ξ² 2 =0.999. Gradient clipping with a maximum norm of 1.0 was applied to stabilize training. A batch size of 32 was used for both training and validation. The composite loss function combined multiple objectives: νΏ ν‘νν‘νν =νΏ νννν’ν ννν +ν ννννν νΏ ννννν +ν νννν νΏ νννν (13) where νΏ νννν’ν ννν is the mean squared error between the true and predicted noise in the latent space, νΏ ννννν is the pixel-wise MSE between the original and reconstructed images, and νΏ νννν is the sparse categorical cross-entropy for discrete facies prediction. The weighting coefficients were set to ν ννννν =0.2 and ν νννν =0.1. Learning rate scheduling employed a strategy of reducing the learning rate by a factor of 0.5 if the validation loss did not improve for 5 consecutive epochs, down to a minimum of 10 β6 . Early stopping with a patience of 50 epochs, monitoring the validation loss, was implemented to prevent overfitting. The Figure 6 below shows the schematic structure of the LDM used in this work. 22 Figure 6: Schematic structure of the Latent Diffusion model. 3.5. StyleGAN Configuration The generative model was trained using a Wasserstein GAN with gradient penalty (WGAN-GP) framework, with specific architectural and optimization parameters selected to ensure stable convergence and geostatistical fidelity. The generator employs a latent dimensionality of 512 (z-space), from which random vectors are drawn from a standard normal distribution. A mapping network composed of three dense layers with Leaky ReLU activations and dropout regularization transforms the latent vector (z-space) into an intermediate style representation (w-space). The synthesis network begins with a learned constant tensor of size 4Γ4, which is progressively upsampled through four stages using bilinear interpolation. Each upsampling stage doubles the spatial resolution, followed by convolutional layers and Gaussian-regularized adaptive instance normalization operations that inject style information. The final layer employs a convolutional operation with hyperbolic tangent activation to produce 23 the output image. The generator applies L2 regularization with a coefficient of 0.01 throughout its layers. The discriminator processes input images through a series of five convolutional blocks with Leaky ReLU activations, dropout regularization, and average pooling operations for progressive downsampling. The architecture includes a dedicated feature extraction pathway that captures intermediate representations used for perceptual loss computation. The final classification head consists of fully connected layers that produce a scalar critic score. L2 regularization is similarly applied to all discriminator layers. Training was performed using the Adam optimizer with distinct learning rates: 0.0001 for the generator and 0.0004 for the discriminator, following the convention of training the discriminator more aggressively. The Adam momentum parameters are set to Ξ²β = 0.5 and Ξ²β = 0.9. The batch size is configured to 32 samples. Training proceeds for 150 epochs with the batch order shuffled at each epoch. Label smoothing was applied with a factor of 0.1 to prevent discriminator overconfidence. Gradient clipping is enforced with a maximum norm of 0.5 for both generator and discriminator gradients. Gaussian noise with standard deviation of 0.05 is added to both real and generated images before discriminator evaluation, improving robustness. Latent Gaussian regularization is weighted by a factor of 0.1 in the generator loss, penalizing deviations from zero mean, unit variance, zero skewness, and zero excess kurtosis in the latent vectors. Feature matching loss from intermediate discriminator representations is incorporated with a weight of 0.1. Learning rate decay of 0.9 was applied when the discriminator loss fails to improve for five consecutive epochs. An adaptive scheduler may increase learning rates toward their initial values after ten epochs of stable training, where discriminator balance (real and fake outputs summing near zero) is maintained. Label smoothing was increased up to 0.3 in response to persistent discriminator overconfidence, and gradient clipping is halved when gradient norms exceed 100. We also applied early stopping with a patience of 50 to prevent overfitting. The Figure 7 below shows the schematic structure of the StyleGAN2 model used in this work. 24 Figure 7: Schematic structure of the StyleGAN2 model. 4. RESULTS AND DISCUSSIONS For each case study, we present the results of training of the models followed by the results of DA. All training process was performed in the same standard Nvidia GPU (GeForce RTX 3060 with 16 GB of memory) of a stand-alone computer, using the machine learning framework TensorFlow 2.10 (Abadi et al., 2015). In the DA step, we used 512 ensemble members and 32 iterations for ESMDA. In this way, the latent dimensions size was 512 for all models and cases. 4.1. Case Study 1: Categorical training dataset 4.1.1. Training of Models Variational Autoencoder Generative Adversarial Network (VAE-GAN) The VAE-GAN model was trained until the early stopping criterion was reached, reaching the FID and FRD after the end of iterations, respectively equal to 323 and 3.5. The training time was 6 hours and 58 minutes, showing that the computational cost of training was the highest of 25 all models, as it involves three models in the adversarial training. We can see in Figure 8 the high-quality of the images reconstructed by the decoderβs model. Figure 8: Three examples of random images from the set along with the reconstructed images by VAE-GAN for case study 1. Figure 9 shows the total error for the training and the validation sets. This graph is the combination of all losses of this model: reconstruction, KL, generator, discriminator and perceptual losses. The curves show stabilization in errors after 60 epochs. We can observe initial instability until stability is reached, since it is necessary to train three networks at the same time. Figure 9: Total loss versus epochs with VAE-GAN in the categorical case. Latent Diffusion We trained the Latent Diffusion model (LDM) after found the better structure and configuration using the categorical training dataset with all 72,000 samples for training and 8,000 samples for test until 150 epochs when stopped in the early stopping criterion. The training time was 3 hours and 9 minutes, less than half the time of VAE-GAN model. We 26 obtained the FID and FRD after the end of iterations, respectively equal to 179 and 16.7, showing that the training was efficient. The quality of the images generated at the end of the training, as shown in Figure 10, with high quality, but with a certain softening of the contours. Figure 10: Images reconstructed by LDM after training with 150 epochs for case study 1. Figure 11 show the total diffusion loss throughout the training. Thus, we can see that in this case the training was successful. Figure 11: MSE of training and validation versus epochs with LDM across training iterations. Style-Based Generative Adversarial Network (StyleGAN) The StyleGAN model, version 2, was trained until the early stopping criterion was reached, reaching the FID and FRD after the end of iterations, respectively equal to 257 and 1.0. The training time was 5 hours and 5 minutes, showing that the computational cost of training 27 StyleGAN is higher than LDM, but less than VAE-GAN. We can see in Figure 12 the high- quality of the images generated by the generatorβs model. Figure 12: Three examples of random images from the set along with the generated images by StyleGAN2 for case study 1. Figure 13 shows the decrease in the generator loss and increase in the discriminator loss curves throughout the training. We can see that both losses tend to stabilize around 50 epochs. This shows that StyleGAN2 training was efficient and sufficient. Figure 13: Graphs of generator and discriminator loss throughout the training with StyleGAN2 for case study 1. In the Table 1, we summarize the results of the FID and FRD metrics at the end of training for the three models. We can conclude that the FRD metric was more appropriate than the FID for our case study and that the values obtained were low, demonstrating that the training of all models was efficient. It is interesting to note that the StyleGAN2 reach the lowest FRD in comparison to VAE-GAN and LDM, highlighting the high quality of the generated images compared to the other two models. 28 Table 1: Results of FID and FRD of models in the categorical case. FID FRD VAE-GAN 323 3.5 Latent Diffusion 179 16.7 StyleGAN 257 1.0 To evaluate the quality of images generated by deep learning models in geological terms, we used main geostatistical metrics, such as: variogram (MSE), connectivity (MSE), histogram KL, PCA correlation and MDS MMD (Maximum Mean Discrepancy). In Table 2, we can see the results for static geostatistical metrics for the case study 1. Based on the comparative analysis of static geostatistical metrics, StyleGAN2 shows a clear overall advantage. For spatial continuity (Variogram MSE, Connectivity MSE), StyleGAN2 dominates decisively (0.00041 and 0.00056), being at least one order of magnitude better than VAE-GAN and LDM. It captures the spatial architecture of the categorical facies far more precisely. For distributional accuracy (Histogram KL divergence), this is the one metric where StyleGAN2 (0.77) does not lead. LDM excels with a very low score of 0.065, indicating it reproduces facies proportions most accurately in this case study. VAE-GAN scores slightly worse than StyleGAN2 with 0.89. Related to global structure (PCA Correlation, MDS MMD), StyleGAN2 ranks best, with an MDS MMD roughly half that of VAE-GAN. This confirms its realizations are most similar to the reference in terms of overall multivariate spatial arrangement. In summary, for the categorical case, StyleGAN2 delivers the best spatial pattern reproduction but struggles slightly with facies proportions, where LDM performs remarkably well. VAE-GAN remains consistently the weakest model across nearly all metrics. 29 Table 2: Results for static geostatistical metrics in the categorical case. VAE-GAN Latent Diffusion StyleGAN Variogram MSE 0.00953 0.03 0.00041 Connectivity MSE 0.01207 0.02533 0.00056 Histogram KL 0.88683 0.06541 0.76594 PCA Correlation 0.04801 0.05072 0.01134 MDS MMD 0.12060 0.15583 0.06335 4.1.2. Data Assimilation For ESMDA, we updated directly the natural logarithm of permeability (log-permeability). For DA, we will compare the results from all models. However, for StyleGAN2, we will include assimilation using the z-space, as usual, and assimilation in the intermediate latent space, known as ν€-space. It is important to mention that the only modification to the StyleGAN assimilations was the shift from latent space z to w, without altering any model configurations or hyperparameters, with the training being exactly the same. In Figure 14, we can see the images of the true case, the priori and posteriori mean and standard deviation. We also can see that the final posterior means did not result in extreme values, successfully preserving the geological realism inherent to the prior ensemble. Furthermore, an analysis of the final standard deviation maps shows that the spatial variability was preserved. As we know, in the ensemble-collapse scenario, the ensemble of models collapses to an almost deterministic solution, with posterior variances goes to near zero. We can observe that the VAE-GAN and LDM models were able to preserve the variance and mean values of the initial ensemble better than StyleGAN models for this case. 30 (a) (b) (c) (d) Figure 14: Images of the true case, the priori and posteriori mean, and the priori and posteriori standard deviation in the categorical case for: (a) VAE-GAN, (b) LDM, (c) StyleGAN2 (z- space) and (d) StyleGAN2 (w-space). Analyzing the time series of production data for P1 to P6 wells in Figure 15, it is possible to confirm that in all cases resulted in reductions in terms of ensemble spread. The improvement is demonstrated visually, which depicts the oil production rate (OPR) and water production rate 31 (WPR) time series for the producer wells. While the initial ensemble exhibits a wide spread, the updated ensemble shows a significantly narrowed spread that closely tracks the observed historical data. We can also observe that all posterior models achieved a good match for all wells, for oil and water production as a function of time. Of particular note are the excellent results achieved by the VAE-GAN and LDM models using the latent space z, and by the StyleGAN2 model using the intermediate latent space w. The results were not quite as good for the StyleGAN2 model using latent space z, likely due to the inherent entanglement characteristic of this configuration. (a) (b) 32 (c) (d) Figure 15: Time series of production data from the first five producers of oil production rate (above) and water production rate (below). Here, the gray lines represent the prior ensemble, blue lines represent the posterior ensemble, and the red dots represent the measurements in the case study 1 for: (a) VAE-GAN, (b) LDM, (c) StyleGAN2 (z-space) and (d) StyleGAN2 (w- space). Figure 16 depicts the evolution of data mismatch, RMSE, spread and balanced accuracy across iterations. As we can see, all models achieved a satisfactory data match, as the results indicate a significant reduction in both data mismatch (DM) and RMSE, suggesting that the assimilation process effectively honored the observed data. Furthermore, VAE-GAN and LDM showed superior performance in terms of balanced accuracy compared to StyleGAN2. 33 (a) (b) 34 (c) (d) Figure 16: Graphs of data mismatching, RMSE, spread and balanced accuracy as a function of the number of iterations in the categorical case for: (a) VAE-GAN, (b) Latent Diffusion, (c) StyleGAN2 (z-space) and (d) StyleGAN2 (w-space). Figure 17 shows boxplots for assimilation with StyleGAN2 in the z and w spaces, displayed together to facilitate comparison. As can be seen, assimilation in the w-space outperformed that in the z-space, confirming that the w-space is less entangled than the z-space, which contributes to better ESMDA performance. Figure 17: Comparison between graphs of data mismatching, RMSE, spread and balanced accuracy as a function of the number of iterations in the categorical case for StyleGAN2 (z- space) in black color and StyleGAN2 (w-space) in red color. 35 4.2. Case Study 2: Continuous training dataset 4.2.1. Training of Models Variational Autoencoder Generative Adversarial Network (VAE-GAN) The VAE-GAN model was trained until the early stopping criterion was reached, achieving an FID of 286 and an FRD of 9.1 upon convergence. Total training time was 10 hours and 23 minutes. Figure 18 depicts the visual quality of the realizations reconstructed by the VAE-GAN model (generator), showing high-fidelity relative to the truth samples. Figure 18: Three examples of random images from the set along with the reconstructed images by VAE-GAN in the continuous case. Figure 19 shows the total error curves for the training and the validation sets, considering the reconstruction KL, generator, discriminator, and perceptual loss components. The curves show stabilization in errors after 80 epochs. Figure 19: Total loss versus epochs with VAE-GAN in the continuous case. 36 Latent Diffusion We trained the LDM with continuous case after identifying the optimal architectural configuration using the continuous training dataset with all 4,000 samples for training and 1,000 samples for testing until 133 epochs, reaching the early stopping criterion. The training time was only 28 minutes, representing a significant speedup compared to VAE-GAN model. Upon convergence, we obtained an FID and FRD equal to 215 and 31.3, respectively, confirming effective optimization. This can be seen by the high-quality of the images generated at the end of the training, as shown in Figure 20. Figure 20: Images generated by LDM after training after 133 epochs in the continuous case. Figure 21 shows the total diffusion loss throughout the training. As we can see, training and validation curves have decreased over time. Thus, we can see that in this case the training also was successful. Figure 21: MSE of training and validation versus epochs with LDM across training iterations for case study 2. 37 Style-Based Generative Adversarial Network (StyleGAN) The StyleGAN2 model was trained until reach 106 epochs, when the early stopping criterion was reached. We obtained the FID and FRD after the end of iterations, respectively equal to 35 and 7.8. The training time was only 55 minutes, and therefore, much faster than the VAE-GAN model, but with almost twice the time of the LDM. We can see in Figure 22 the quality of the images generated by the generatorβs network, showing images with high-quality, similar to other models. Figure 22: Three examples of random images using StyleGAN2 in the case study 2. Figure 23 shows the MSE of the generator and discriminator. As we can see the fast decrease of generator loss and fast increase of discriminator throughout the training, showing that 106 epochs were sufficient to train the model. Figure 23: MSE of generator and discriminator losses versus epochs with StyleGAN2 in the case study 2. In Table 3, we summarize the results of the FID and FRD metrics at the end of training for the three models. We can conclude again that the FRD metric was more appropriate than 38 the FID also for this case study and that the values obtained were low, demonstrating that the training of all models was efficient, with the VAE-GAN and StyleGAN2 models achieving the lowest values. Table 3: Results of FID and FRD of models in the continuous case. FID FRD VAE-GAN 286 9.1 Latent Diffusion 215 31.3 StyleGAN 35 7.8 In Table 4, based on the comparative analysis of static geostatistical metrics, StyleGAN2 consistently outperforms both VAE-GAN and LDM across all metrics, often by a significant margin. In the spatial continuity (Variogram MSE, Connectivity MSE), StyleGAN2 achieves the best scores (0.00044 and 0.00140), showing it captures two-point and multi-point spatial patterns far more accurately than the other models. Related to distributional accuracy (Histogram KL divergence), StyleGANβs score of 0.52 is dramatically lower than VAE-GAN (3.90) and LDM (4.27), indicating it reproduces the univariate property distribution much more faithfully. About global structure (PCA Correlation, MDS MMD), StyleGAN2 again leads, with an MDS MMD of 0.132 compared to ~0.47 for the others, suggesting its generated realizations are much closer to the reference in a reduced dimensionality space. In summary, StyleGAN2 substantially surpasses VAE-GAN and LDM on all static geostatistical measures, while LDM generally performs the worst. 39 Table 4: Results for static geostatistical metrics for the continuous case. VAE-GAN Latent Diffusion StyleGAN Variogram MSE 0.00158 0.05001 0.00044 Connectivity MSE 0.04551 0.04234 0.00140 Histogram KL 3.89721 4.26662 0.52383 PCA Correlation 0.02318 0.02710 0.02029 MDS MMD 0.46454 0.47029 0.13239 4.2.2. Data Assimilation Figure 24 show the images of the true case, the priori and posteriori mean and standard deviation. We can observe that the posteriori mean presents an image similar to the true case for all models, but with more similarity in the cases of StyleGAN2 (z and w-spaces). (a) (b) 40 (c) (d) Figure 24: Images of the true case, the priori and posteriori mean, and the priori and posteriori standard deviation in the case study 2 for: (a) VAE-GAN, (b) LDM, (c) StyleGAN2 (z-space), and (d) StyleGAN2 (w-space). Evaluating the time series of production data in the Figure 25, we can see a better matching for the LDM and StyleGAN2 in the w-space than VAE-GAN and StyleGAN2 in the z-space. We can clearly see that the assimilation of StyleGAN2 using the intermediate latent space w was better than with the latent space z. (a) 41 (b) (c) (d) Figure 25: Time series of production data from the first five producers of oil production rate (above) and water production rate (below). Here, the gray lines represent the prior ensemble, blue lines represent the posterior ensemble, and the red dots represent the measurements in the case study 2 for: (a) VAE-GAN, (b) LDM, (c) StyleGAN2 (z-space) and (d) StyleGAN2 (w- space). 42 Figure 26 shows graphs of data mismatching, RMSE, spread as a function of the number of iterations. We can observe that LDM and StyleGAN2 in the w-space obtained the best results for RMSE and spread, followed by StyleGAN2 in the z-space and VAE-GAN, in this sequence. (a) (b) 43 (c) (d) Figure 26: Graphs of data mismatching, RMSE and spread as a function of the number of iterations for: (a) VAE-GAN, (b) LDM, (c) StyleGAN2 (z-space) and (d) StyleGAN2 (w- space). Figure 27 shows boxplots for assimilation with StyleGAN2 in the z and w spaces, displayed together. As we can see again, assimilation in the w-space outperformed that in the z-space, confirming that the w-space is less entangled than the z-space, which contributes to better DA efficiency. 44 Figure 27: Comparison between graphs of data mismatching, RMSE, spread as a function of the number of iterations in the continuous case for StyleGAN2 (z-space) in black color and StyleGAN2 (w-space) in red color. 5. CONCLUSIONS This work shows that StyleGAN2 generates high-quality realizations with high training stability, driven by its disentangled latent space that is fundamental to a high performance of data assimilation using ESMDA. The results based on geostatistical metrics demonstrated the superior quality of the StyleGAN2 model in generating high-quality samples with geological realism. Our findings show that performing data assimilation with StyleGAN2 using the intermediate space (ν€-space) yielded better results than the traditional formulation which uses the latent space (z-space). This is due to the fact that ESMDA uses linear updates and the w- space is much more linear and disentangled than the highly entangled z-space. And since the w-space has already been mapped by the network, the updated vectors remain close to realistic geological patterns. Our results were compared against those of two models considered state- of-the-art in recent literature, VAE-GAN and LDM. The results showed that LDM has a lower computational cost than the other models, yielding an excellent matching, but producing samples with less geological realism than StyleGAN2. The results of DA were similar between LDM and StyleGAN2, particularly when the latter uses the intermediate latent space. Future research could focus on evaluating the proposed approach on three-dimensional, large-scale reservoir models, as well as investigating techniques to mitigate spurious 45 correlations (such as inflation and localization methods) when using these deep generative frameworks for parameterization in ensemble-based data assimilation. Acknowledgments We gratefully acknowledge the support of Escola PolitΓ©cnica of the University of SΓ£o Paulo and Imperial. The authors would also like to thank the LASG (Laboratory of Reservoir Simulation and Management) for supporting this research, CMG (Computer Modelling Group Ltd.) for providing the reservoir simulator licenses used in this study and FAPESP β SΓ£o Paulo Research Foundation (16/08801-0). We also thank the National Council for Scientific and Technological Development (CNPq) for financial support through grant number 310676/2025- 8. Conflicts of interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Computer Code Availability The codes and the datasets generated and/or analyzed during the current study are available in the Github repository: https://github.com/LASG-USP/Parameterization_StyleGAN. REFERENCES Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G.S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., ManΓ©, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., ViΓ©gas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., Zheng, X., 2015. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 46 Aanonsen, S.I., NΓ¦vdal, G., Oliver, D. S., Reynolds, A.C.; VallΓ¨s, B. 2009. The Ensemble Kalman Filter in Reservoir Engineeringβa Review, SPE J. 14 (03): 393β412. https://doi.org/10.2118/117274-PA Ahn, S.; Choe, J. "Applications of Geological Features Style Mixing for Reservoir History Matching." SPE J. 30 (2025): 1651β1669. doi: https://doi.org/10.2118/224437-PA Alqam, M.H., Nasr-El-Din, H.A., Lynn, J.D., 2001. Treatment of Super-K Zones Using Gelling Polymers, in: All Days. Presented at the SPE International Symposium on Oilfield Chemistry, SPE, Houston, Texas, p. SPE-64989-MS. https://doi.org/10.2118/64989- MS Bao, J., Li, L., Davis, A., 2022. Variational Autoencoder or Generative Adversarial Networks? A Comparison of Two Deep Learning Methods for Flow and Transport Data Assimilation. Math. Geosci. 54, 1017β1042, 2022. https://doi.org/10.1007/s11004-022- 10003-3 Beucher, H., & Renard, D. (2016). Truncated Gaussian and derived methods. Comptes Rendus Geoscience, 348(7), 510β519. https://doi.org/10.1016/j.crte.2015.10.004 Borji, Ali. Pros and Cons of GAN Evaluation Measures. arXiv preprint, 2018. DOI: 10.48550/arXiv.1802.03446. Canchumuni, S.A., Emerick, A.A., Pacheco, M.A., 2017. Integration of Ensemble Data Assimilation and Deep Learning for History Matching Facies Models, in: Day 1 Tue, October 24, 2017. Presented at the OTC Brasil, OTC, Rio de Janeiro, Brazil, p. D011S006R005. https://doi.org/10.4043/28015-MS Canchumuni, S.W.A., Emerick, A.A., Pacheco, M.A.C., 2019a. History matching geological facies models based on ensemble smoother and deep generative models. J. Petrol. Sci. Eng. 177, 941β958. https://doi.org/10.1016/j.petrol.2019.02.037 Canchumuni, S.W.A., Emerick, A.A., Pacheco, M.A.C., 2019b. Towards a robust parameterization for conditioning facies models using deep variational autoencoders and ensemble smoother. Comput. Geosci. 128, 87-102. https://doi.org/10.1016/j.cageo.2019.04.006 Canchumuni, S.W.A., Castro, J.D.B., Potratz, J., Emerick, A.A., Pacheco, M.A.C., 2021. Recent developments combining ensemble smoother and deep generative networks for facies history matching. Comput. Geosci. 25, 433β466. https://doi.org/10.1007/s10596- 020-10015-0 Chang, H., Zhang, D., Lu, Z. 2010. Z. History matching of facies distribution with the EnKF and level set parameterization. Journal of Computational Physics, 229(20), 8011-8030. https://doi.org/10.1016/j.jcp.2010.07.005 Correia, M.., Hohendorff, J.., Gaspar, A.T., Schiozer, D.., 2015. UNISIM-I-D: Benchmark Case Proposal Based on a Carbonate Reservoir, in: Day 3 Fri, November 20, 2015. Presented at the SPE Latin American and Caribbean Petroleum Engineering Conference, SPE, Quito, Ecuador, p. D031S020R004. https://doi.org/10.2118/177140- MS Emerick, A. A.; Reynolds, A. C., 2013. Ensemble smoother with multiple data assimilation. Computers & Geosciences, v. 55, p. 3β15. https://doi.org/10.1016/j.cageo.2012.03.011 Federico, G.; Durlofsky, L. J. Latent diffusion models for parameterization of facies-based geomodels and their use in data assimilation, Computers & Geosciences, Volume 194, 2025, 105755, ISSN 0098-3004, https://doi.org/10.1016/j.cageo.2024.105755. Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y., 2014. Generative Adversarial Networks. https://doi.org/10.48550/arXiv.1406.2661 47 HakimβElahi, S. & Jafarpour, B. (2017). A distance transform for continuous parameterization of discrete geologic facies for subsurface flow model calibration. Water Resources Research, 53(10), 8226β8249. https://doi.org/10.1002/2016WR019853 Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., Hochreiter, S., 2018. GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium. https://doi.org/10.48550/arXiv.1706.08500 Ho, J., Jain, A., Abbeel, P., 2020. Denoising diffusion probabilistic models. In: Advances in Neural Information Processing Systems. Vol. 33, Curran Associates, Inc., p.6840β 6851. http://dx.doi.org/10.48550/arXiv.2006.11239. Karras, T., Aila, T., Laine, S., & Lehtinen, J. (2018). Progressive growing of GANs for improved quality, stability, and variation. arXiv. (arXiv:1710.10196 [cs, stat]) Retrieved from http://arxiv.org/abs/1710.10196 Karras, T., Aittala, M., Hellsten, J., Laine, S., Lehtinen, J., & Aila, T. (2020a). Training generative adversarial networks with limited data. arXiv. (arXiv:2006.06676 [cs, stat]). Retrieved from http://arxiv.org/abs/2006.06676 Karras, T., Aittala, M., Laine, S., HΓ€rkΓΆnen, E., Hellsten, J., Lehtinen, J., & Aila, T. (2021). Aliasβfree generative adversarial networks. arXiv. https://doi.org/10.48550/ARXIV.2106.12423 Karras, T., Laine, S., & Aila, T. (2019). A styleβbased generator architecture for generative adversarial networks. arXiv. (arXiv:1812.04948[cs, stat]). Retrieved from http://arxiv.org/abs/1812.04948 Karras, T., Laine, S., Aittala, M., Hellsten, J., Lehtinen, J., & Aila, T. (2020b). Analyzing and improving the image quality of StyleGAN. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition (p. 8110β8119). Kullback, S., Leibler, R.A., 1951. On information and sufficiency. Ann. Math. Stat. 22, 79β86. https://doi.org/10.1214/aoms/1177729694. Laloy, E., HΓ©rault, R., Jacques, D., Linde, N., 2017. Inversion using a new lowdimensional representation of complex binary geological media based on a deep neural network. Adv. Water Resour. 110, 387β405. https://doi.org/10.1016/j.advwatres.2017.09.029. Laloy, E., HΓ©erault, R., Jacques, D., Linde, N., 2018. Training-image based geostatistical inversion using a spatial generative adversarial neural network. Water Resour. Res.54 (1), 381β406. https://doi.org/10.1002/2017WR022148. Li, L., Stetler, L., Cao, Z., Davis, A., 2018. An iterative normal-score ensemble smoother for dealing with non-Gaussianity in data assimilation. Journal of Hydrology 567, 759β766. https://doi.org/10.1016/j.jhydrol.2018.01.038 Ling, W., & Jafarpour, B. (2024). Improving the parameterization of complex subsurface flow properties with styleβbased generative adversarial network (StyleGAN). Water Resources Research, 60, e2024WR037630. https://doi.org/10.1029/2024WR037630 Liu, Y.; Durlofsky, L. J. 3D CNN-PCA: A deep-learning-based parameterization for complex geomodels, Computers & Geosciences, Volume 148, 2021, 104676, ISSN 0098-3004, https://doi.org/10.1016/j.cageo.2020.104676. Luo, Z., Tong, L., Wang, M. Y., & Wang, S. (2007). Shape and topology optimization of compliant mechanisms using a parameterization level set method. Journal of Computational Physics, 227(1), 680β705. https://doi.org/10.1016/j.jcp.2007.08.011 Luo, Z., Wang, M. Y., Wang, S., & Wei, P. (2008). A level setβbased parameterization method for structural shape and topology optimization. International Journal for Numerical Methods in Engineering, 76(1), 1β26. https://doi.org/10.1002/nme.2092 Meyer, F.O., Price, R.C., Al-Raimi, S.M., 2000. Stratigraphic and Petrophysical Characteristics of Cored Arab-D Super-k Intervals, Hawiyah Area, Ghawar Field, Saudi Arabia. GeoArabia 5, 355β384. https://doi.org/10.2113/geoarabia0503355 48 Oliver, D. S.; Chen, Y., 2011. Recent progress on reservoir history matching: a review. Computational Geosciences, v. 15, n. 1, p. 185β221. https://doi.org/10.1007/s10596- 010-9194-2 Ranazzi, P. H.; Luo, X.; Sampaio, M. A., 2024. Improving the training performance of Generative Adversarial Networks with limited data: application to the generation of geological models. Computers & Geosciences, v. 193, p. 105747. Remy, N., Boucher, A., Wu, J., 2009. Applied Geostatistics with SGeMS: A Userβs Guide, 1st ed. Cambridge University Press. https://doi.org/10.1017/CBO9781139150019 Ronneberger, O., Fischer, P., Brox, T., 2015. U-net: convolutional networks for biomed-ical image segmentation. In: Medical Image Computing and Computer-AssistedIntervention - MICCAI 2015 - 18th International Conference Munich, Germany, October 5 - 9, 2015, Proceedings, Part I. In: Lecture Notes in Computer Science, vol. 9351, Springer, p. 234β241.http://dx.doi.org/10.1007/978-3-319-24574-4_28. Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B., 2022. High-resolution image synthesis with latent diffusion models. In: Proceedings of the IEEE/CVFConference on Computer Vision and Pattern Recognition. CVPR, p. 10684β10695. http://dx.doi.org/10.48550/arXiv.2112.10752. Sampaio, M. A.; Ranazzi, P. H.; Blunt, M. J.; Enhancing the parameterization of reservoir properties for data assimilation using deep VAE-GAN, Computers & Geosciences, Volume 214, 2026, 106196, ISSN 0098-3004, https://doi.org/10.1016/j.cageo.2026.106196. Silva, D. S. F., & Deutsch, C. V. (2017). Multiple imputation framework for data assignment in truncated pluriβGaussian simulation. Stochastic Environmental Research and Risk Assessment, 31(9), 2251β2263. https://doi.org/10.1007/s00477β016β1309β4 StrΓ©belle, S., 2000. Sequential simulation drawing structures from training images. Stanford, Stanford, CA, USA.