WorksComputer Science
Reservoir History Matching of the Norne field with generative exotic priors and a coupled Mixture of Experts – Physics Informed Neural Operator Forward Model
Abstract
We developed a novel reservoir characterization workflow that addresses reservoir history matching by coupling a physics-informed neural operator (PINO) forward model with a mixture of experts' approach, termed cluster classify regress (CCR). The inverse modelling is achieved via an adaptive Regularized Ensemble Kalman inversion (aREKI) method, ideal for rapid inverse uncertainty quantification during history matching. We parametrize unknown permeability and porosity fields for non-Gaussian posterior measures using a variational convolution autoencoder and a denoising diffusion implicit model (DDIM) exotic priors. The CCR works as a supervised model with the PINO surrogate to replicate nonlinear Peaceman well equations. The CCR's flexibility allows any independent machine-learning algorithm for each stage. The PINO reservoir surrogate's loss function is derived from supervised data loss and losses from the initial conditions and residual of the governing black oil PDE. The PINO-CCR surrogate outputs pressure, water, and gas saturations, along with oil, water, and gas production rates. The methodology was compared to a standard numerical black oil simulator for a waterflooding case on the Norne field, showing similar outputs. This PINO-CCR surrogate was then used in the aREKI history matching workflow, successfully recovering the unknown permeability, porosity and fault multiplier, with simulations up to 6000 times faster than conventional methods. Training the PINO-CCR surrogate on an NVIDIA H100 with 80G memory takes about 5 hours for 100 samples of the Norne field. This workflow is suitable for ensemble-based approaches, where posterior density sampling, given an expensive likelihood evaluation, is desirable for uncertainty quantification.
Introduction.
Overview
Reservoir engineers are mostly burdened with the task of developing reliable simulation models that can accurately capture the complex dynamics of subsurface reservoir systems. The use of a set of observed measurements, , to infer a set of model parameters, , is known as an inverse problem [1, 4, 5] [15, 24, 41]. Given specific observations which are the observed data of the state variable (data that is a direct function of state variables); the aim is to infer information about the model parameters which includes some uncertainty. The focus is on discrete inverse problems (systems characterized by a few or a finite number of parameters). Reservoir history matching is an example of a discrete inverse problem. In such situations, the number of data is always finite, and the data always contain some measurement errors [1] [12, 15, 53, 63]. It is hence impossible to estimate the parameters of a reservoir model correctly from inconsistent, inaccurate and insufficient data using a forward model that most likely will contain some modeling errors. In most cases, we always have some prior information about the realism and plausibility of the reservoir model, these include a geological model that is constructed from cores, logs and seismic data and also some information on the depositional environment.
Reservoir history matching is the process of constraining the reservoir model to mimic actual historical dynamic production data of the reservoir to predict its future production behavior and reduce uncertainty about the description of the reservoirs [1] [12, 15, 53, 63]. Reservoir history matching is an ill-posed problem because the amount of independent data available is much less than the number of variables. Hence, there exist an infinite number of combinations of the unknown reservoir properties that result in reservoir models which can match the observations. Besides that, the information accessible about the reservoir is always inaccurate and may be inconsistent [1] [12, 15, 53, 63]. As a result, reservoir models are constructed with uncertain parameters; consequently, their predictions are also uncertain.
Over the last decade, increased importance has been attributed to the quantification of uncertainty in reservoir model performance predictions and reservoir model descriptions to manage risk. Because of this obsession with the characterization of uncertainty, it is now common to generate multiple history-matched models. However, generating multiple history-matched models may not necessarily lead to a correct assessment of uncertainty. Uncertainty has no scientific meaning beyond the realm of statistics and probability. Bayesian statistics provides a straightforward theory for dealing with uncertainty.
In the application of interest, Bayes’ theorem allows one to write down the posterior probability density function (pdf) for reservoir model parameters conditional to field measurements such as production, electromagnetic and seismic data. Then, the optimization problem of characterizing the model uncertainty in reservoir model parameters is tantamount to the problem of sampling this posterior pdf [4, 5] [36]. If a set of realizations of the vector of reservoir model parameters represents a set of samples from the posterior pdf, then a correct assessment of the uncertainty in specific outcomes of reservoir performance predictions can be generated by predicting with each model and then constructing statistics for the set of outcomes. For example, one can estimate the pdf for a well’s predicted oil rate at each time from a histogram of the predictions set. Markov chain Monte Carlo (MCMC) provides a theoretically attractive technique for sampling the posterior pdf for model parameters.
It is established that a properly designed MCMC method samples this pdf correctly in the limit as the number of states in the chain goes to infinity. For high-dimensional problems, MCMC typically requires many iterations to provide a reasonable sampling of the desired pdf. When utilizing MCMC to compute the posterior pdf of reservoir model parameters conditional to historical observed production data, computation of the probability of accepting the transition from the current state to the proposed state requires a run of the reservoir model simulator to evaluate the likelihood part associated with the posterior pdf. This requirement makes the direct application of MCMC to realistic reservoir problems computationally prohibitive [4, 5] [36].
The modeling of flow and transport processes in subsurface formations is essential for various reservoir engineering applications, such as oil reservoir development and carbon sequestration. Quantifying flow mechanisms in these scenarios often requires using partial differential equations (PDEs) founded on laws of conservation. Traditionally, PDEs have been solved numerically using methods such as finite elements, finite differences, spectral, and meshless techniques. These methods have undergone significant development over the years, rendering them robust and flexible for solving complex subsurface flow and transport problems. However numerical simulations can be computationally demanding for large-scale simulation problems in petroleum engineering, posing challenges during execution [48, 52, 54].
Moreover, tasks like history-matching, sensitive analysis, and project design optimization require multiple simulation runs, leading to prohibitively inefficient computations for obtaining meaningful results [58].In recent years, data-driven methods have garnered significant attention and achieved remarkable progress in various domains such as natural language processing [19] and image classification[62]. Among these methods, artificial neural networks (ANNs) have emerged as one of the most important data-driven simulation techniques due to their universal approximation property and ability to accurately approximate any measurable function. The versatility of ANNs extends to various science and engineering fields, demonstrating their potential in nonlinear universal approximation and data assimilation [12].Notably, within the realm of petroleum engineering, ANNs have made substantial advancements in both forward modeling and other applications. Dong et al.[51] proposed an enhanced artificial neural network model for predicting CO2 minimum miscibility pressure based on the full composition of the crude oil and temperature.
Erofeev et al.[3] studied the applicability of various machine learning algorithms for predicting rock properties usually defined by geoscientists through specialized laboratory analysis. Moosavi et al. [56] utilized multilayer perceptron neural networks to accurately identify reservoir models from pressure derivative curves derived from horizontal wells.
Chung et al. [60] proposed a pore-scale finite volume solver to predict permeability on digital cores by solving flow on micro-CT images. Kim et al. [33] proposed an innovative data-integration method that uses an iterative-learning approach with a deep neural network coupled with a stacked autoencoder to address challenges encountered in many-objective history matching. Santos et al. [32] tackled the limitation of modeling important geometries like fractures and vuggy domains accurately using a general multiscale deep learning model that can learn from porous media simulation data. Furthermore, Wang et al. [48] outlined an integrated method that combines predictions of fluid flow with direct flow simulation, significantly reducing computation time without compromising accuracy. Alakeely and Horne [2] examined the effectiveness of generative deep learning methods in predicting multiphase flow profiles of new wells in unseen locations using historical production data and a variational autoencoder algorithm.
Dong et al. [51] introduced a deep reinforcement learning based approach for automatic curve matching for well test interpretation, utilizing the double deep Q-network. Despite its remarkable advancements, the conventional data-driven approach inevitably faces several challenges. Firstly, the data-driven model is perceived as a "black box," since it lacks the incorporation of physical meaning of the dataset, leading to predictions that may be physically inconsistent or implausible[42]. Secondly, the robustness of the data-driven model maybe poor, and its long-term prediction capabilities are weak. This can be attributed to the fact that generalizing and extrapolating beyond the parameter space of the included dataset is remain extremely challenging, as the models developed within artificial neural networks are bounded by the parameter space of the training dataset [42, 22]. A recent and innovative neural network architecture that embodies this concepts known as ’physics-informed neural networks’ (PINNs)[42, 22]. By incorporating PDEs, boundary conditions, initial conditions, and other measurable prior knowledge into the loss function, PINNs seamlessly integrate data and physics laws to construct a physics-constrained loss function based on automatic differentiation. These algorithms not only improve the interpretability of machine learning models in terms of physical principles but also demonstrate robustness in handling flawed data, such as missing or noisy values, outliers, and other irregularities [42, 22].
The performance of PINNs has been demonstrated in petroleum reservoir problems associated with subsurface flow and transport in porous media. Li et al. [31] introduced a TGNN model that integrates high-fidelity numerical simulation data, fundamental physical laws, boundary conditions, initial conditions, expert knowledge, and engineering control terms in the loss function, enabling the solution of two-phase subsurface flow problems at the reservoir scale beyond the Buckley Leverett equation. Daolun et al. [38] proposed an improved physics constrained PDE solution method by integrating potential features of the PDE into the loss functions to alleviate the strong nonlinear problem of the flow equation caused by the source-sink term in the single-phase homogeneous reservoir problem. Gasm and Tchelepi (2021) [14] utilized PINNs to tackle the two-phase immiscible flow problem governed by the Buckley-Leverett equation, achieving physical solutions by incorporating either a diffusion term into the partial differential equations or observed data. Almajd and Abu-Al-Saud [40] implemented a physics informed neural network technique that combines fluid flow physics and observed data to model the Buckley Leverett problem.
Cornelio et al. [30] developed a neural network (NN) model to learn the physical model residual errors in simulation-based production prediction as a function of input parameters of an unconventional well. Hanna et al. [29] developed a novel residual based adaptive PINN and compared it with the residual-based adaptive refinement (RAR) method and a PINN with fixed collocation points. Wang et al. [48] proposed a theory-guided convolutional neural network (TgCNN) framework that incorporates discretized governing equation residuals into the training of convolutional neural networks, to extend to two-phase porous media flow problems. However, when applying PINNs to reservoir simulation with large-scale systems and production wells, existing research typically relies on training neural networks using high-fidelity numerical simulation data. The challenge arises from the scarcity of real reservoir data available for training purposes, which is often limited to information such as production rates and bottomhole flow pressures. Consequently, the accuracy of the physical information method may not always be guaranteed, when solving complex partial differential equations (PDEs) with large-scale systems and production wells, especially in the near-well zone where the pressure gradient is the largest. In this study, we extend the methodology proposed by Etienam et al. [12], focusing entirely on the Norne field [64] by incorporating denoising diffusion implicit model[25] and variational convolutional autoencoder [18] as generative exotic priors, we construct a forward solver surrogate that couples a modified mixture of experts approach [10] [17] with the PINO to give an augmented surrogate called PINO-CCR. We then use the PINO-CCR surrogate in a Bayesian ensemble history matching workflow to recover the unknown permeability,porosity and fault multipliers parameters. Our contribution includes,
Develop a Fourier neural operator surrogate (PINO-surrogate) trained from both the data and physics loss to replace the black oil model reservoir equations with Nvidia Modulus framework.
Develop an inverse modeling workflow using the prior developed PINO surrogate together with exotic priors to calibrate the permeability and porosity field for the reservoir under consideration.
Use the developed inverse modeling workflow for forward uncertainty quantification and field optimization.
Forward problem
Our simplified Black oil model for three-phase flow in porous media for reservoir simulation is given as [50, 54].
subscript = water, = oil, = gas. The system is closed by adding three additional equations ; ; . Gravity effects are considered by the terms and . () is the modeling domain with boundary , and is the time interval for which production data is available. = porosity, , , and the transmissibilities,
Assuming fault transmissibility multiplier (FTM),
Boundary and initial conditions are given as ; ; . = outward unit normal to . The overall elliptical-hyperbolic coupled PDE equations to solve are equations 3b, 3c, and 3d.
Surrogate forward modeling with a Fourier Neural operator (FNO) - Contribution
If the notation above is clear, we now discuss the PINO model used for solving the forward problem posed in Eqn.3(b-d).
The Fourier neural operator (FNO) is effective in learning the mapping relationships between the infinite-dimensional
function spaces that convert a traditional convolution operation into a multiplication operation using the Fourier transform [66]. This causes the higher modes of the neural layer to be removed from the Fourier space, leaving only the lower modes in the Fourier layer. Hence, FNO can greatly improve the computational efficiency of the training process. The goal of FNO is to use a neural network to approximate the mapping of function , .
Figure 1 shows the full FNO architecture; input observation is first lifted to a higher dimensional potential representation by a fully connected shallow neural network . Then, is used as input for an iterative Fourier layer . The concrete iterative process from state can be written as:

Figure 1. A standard Fourier neural operator (FNO) as adopted from [66]
Figure 1. Architecture of the FNO. denotes the Fourier transform, and denotes the inverse Fourier transform. is a Fourier transform of the periodic function ; is a local linear transform; is a non-linear activation function; and are the input and output of Fourier layer 1. Here, is a non-linear activation function, is a linear transformation, and is an integral kernel transformation parameterized by a neural network. is the bias, which can be written as an integral:
To accelerate the integration process , Li et al. (2020) imposed a condition that and the new integral becomes,
where denotes the Fourier transform, and denotes the inverse Fourier transform. is a Fourier transform of periodic function , , and is the kernel of the neural network. Following the Fourier layer iteration, the last state output is projected back to the original space using a fully connected neural network , . In every block of the Fourier layer, FNO approximates highly non-linear functions mainly via combining the linear transform and global integral operator (Fourier transform). can be parameterized as a complex-valued tensor in the Fourier space from truncating high Fourier frequency modes , and it can greatly reduce the number of trainable parameters and improve efficiency during the process of training. We are interested in predicting the pressure, water & gas saturation given any input of the absolute permeability field () and effective porosity (). For completeness, the input and output tensors are indicated below. are the initial pressure and water saturation, is the change in time steps. Three different FNO models are trained simultaneously for the pressure, gas saturation and water saturation, with the same interacting loss function, this is to accommodate for the difference in magnitude between these quantities.
is the absolute permeability, is the total flow, is the water flow (injection rate), is the gas flow (injection rate), is the time stepping, is the initial pressure of the reservoir, and is the initial water saturation of the reservoir. is the pressure, and is the water saturation and is the gas saturation is the FNO model for the pressure output, is the FNO model for the water saturation output, and is the FNO model for the gas saturation output The physics loss ansatz is then,
Together with the initial conditions and boundary conditions.
Algorithm 1 PINO Reservoir Simulator Surrogate for Dynamic Properties
Require:
▷ dictionary of varied tensor inputs
▷ dictionary of fixed tensor inputs
– labelled pressure, – labelled water saturation, – labelled gas saturation, , ,
▷ Time reporting steps
Ensure:
while or do
Compute:
Compute:
Compute:
Compute:
▷ data supervised loss for pressure
▷ data supervised loss for water saturation
▷ data supervised loss for gas saturation
▷ overall loss
Update models:
▷ Back-propagation
end while
Output: , , ▷ pressure, water saturation and gas saturation PINO surrogates
are the weights associated to the loss functions associated to the 6 terms. are the dictionary inputs from running the reservoir simulator. are the number or epochs and the tolerance level for the loss function. , , are the FNO models for the pressure, water, and gas saturation equation respectively, is the inactive / active cells grid, is the fault transmissibility multiplier.
Inverse Problem
A probability space is defined as a triplet . The sample space is a set containing all possible outcomes. The -algebra on is a set of all possible events from an experiment, and follows the following axioms: if , then , where is the complement of . If , , ... is a countable sequence of elements, then [4] The measure defines a probability to every event in and satisfies: , , , If , , ... are pairwise disjoint (meaning , ), then . This property is called countable additivity[4].
If measurable sets for are pairwise disjoint, then . A measure is called -finite if is a countable union of measurable sets with finite measure. In this paper, we restrict the Euclidean space , with Borel -algebra , and with Lebesgue measure on . A random variable is defined as a measurable map , which means that if , then . The probability distribution of is then defined as a measure on : .
Theorem 1 (Radon-Nikodym Theorem). Let and be two measures on the same measure space . If is -finite and then there exists a function such that
And is called the Radon-Nikodym derivative of with respect to $\nu
Suppose is a probability measure on , is a Lebesgue measure on , and , then there exists such that for any , and is called the probability density function (pdf) of . The joint distribution of two random variables and over corresponding measurable sets and is given by , and the marginal distribution of is defined as , similarly for . Two random variables and are independent if .
A random variable is called the conditional expectation of with respect to the partial -algebra if for all , then define the expectation . The conditional probability of an event given the sub--algebra is a conditional expectation of the form where and is the indicator function of a subset of a set .
The cost functional for the history matching inverse problem is posed as [4, 1, 11] [63, 12, 41].
Where represents the dimensional Euclidean Norm. represents the forward simulator, that solves the forward problem and defines the relationship between unknown parameters , is the corrupted noisy (or noiseless in rare cases) true data given by.
where is the underlining unknown true model (we want to recover) and . is the data noise covariance matrix with Lebesgue density . The unknown follows a prior distribution with Lebesgue density . This prior density contains any information that we already know about ; a good prior is key to the solution of the inverse problem. It then follows that is a random variable with Lebesgue density . The posterior distribution is then the solution to the inverse problem and is given by Bayes’ theorem,
Assume that , then is a random variable with Lebesgue density , where is the probability of and acts as a normalizing constant; for random variables and , let be the conditional pdf of given and be the pdf of , then , and and , assuming that then Bayes’ theorem gives us ; if we define the negative log likelihood as , then , where , and and are measures on with densities and respectively, which shows the posterior is absolutely continuous with respect to the prior density and the Radon-Nikodym derivative is proportional to the likelihood. Using the Sherman-Morrison-Woodbury Lemma [26], we arrive at the Vanilla Ensemble Kalman Inversion (EKI),
is the iteration index, is the ensemble member (columns in the matrix) in the ensemble size . is a (crucial) regularisation dampener, and are cross-covariance matrixes to be explained shortly, .
In the developed aREKI method, the dampening parameter is developed via the discrepancy principle [5, 4] in Algorithm 2. Covariance localization means localising the effect of an observation to the state variables that are ‘closer’
Algorithm 2 aREKI
Require:
▷ prior density
▷ measurements
▷ measurement errors covariance
▷ iteration
Initialize: ,
while () or () do
Compute: ,
Compute:
Compute: , ▷ mean & variance
Compute:
Compute:
Compute:
Compute:
Update ensemble:
Increment:
end while
Output: ▷ posterior density
to the observations. It is a technique used in history matching to eliminate filter divergence and spurious correlations which are found in both standard ensemble-based methods [1] [21, 63, 15, 16]. It selectively assimilates data during the update step by adjusting the correlation between the data measured at a location A and the model parameters or data measured at a further location B to be zero, therefore eliminating long-distance non-zero spurious correlations and increasing the degrees of freedom available for data assimilation. It is usually applied with a Schur product. The various localization methods proposed in the literature have the common goal of removing the spurious terms in the cross-covariance matrix; this matrix is in turn used to update the state vectors during the ensemble update process. This is done by conditioning the Kalman Gain through a localizing function [1] [21, 63, 15, 16]. Each localization scheme distinguishes itself from each other by how this localizing function, also known as the Schur product or the multiplier function, is computed. The motivation of covariance localization is to achieve a similar level aREKI performance if a larger ensemble size would have been used. However, it requires enormous computational resources to perform history matching if the ensemble size is large. is the localization function or multiplier function, this is a specified parameter for covariance localization. It is introduced to modify the Kalman Gain during update step for aREKI. The symbol ‘’ is an element-by-element multiplication operator known as the Schur product. To implement the Schur product in covariance localization, a correlation function with local support, is defined. The term local support refers to the function taking on non-zero values in a small region and being zero elsewhere. The function is usually defined to be the compactly supported fifth order piecewise rational function defined by Gaspari and Cohn as shown below [1] [21, 63, 15, 16].
Mixture of experts.
Mixture of experts
In general, the problem of designing machine learning-based models in a supervised context is the following. Assume a set of labeled data , where are the inputs and the outputs for regression or for classification. Postulating amongst a family of ansatz , parametrized by , we can find a such that for all , . Then for all in the set , , where is the true label of . [10] [45, 12]. Assume are the input and output pairs of a model shown in Eqn. 10a.
is irregular and has sharp features, very non-linear and has noticeable discontinuities, The output space is taken as and
Cluster
In this stage, we seek to cluster the training input and output pairs. where the label function minimizes,
loss function associated to cluster
where denotes the Euclidean norm
Classify
is an expanded training set
provides an estimate such that for most of the data. Crucial for the ultimate fidelity of the prediction. is ignored at this phase. The classification function minimizes,
is small if for example we can choose where , is a soft classifier and is a cross-entropic loss.
Regress
For each must provide an estimate such that for both the training and test data. If successful a good reconstruction for
Where the regression function can be found by minimizing
Where minimized when in this case can be chosen as . Data can be partitioned into for and then perform separate regressions done in parallel.
Bayesian Formulation
A critique of this method is that it re-uses the data in each phase. A Bayesian postulation handles this limitation elegantly. Recall,
Assume parametric models for the classifier and the regressor for where and and let , the posterior density has the form,
And
are some standard parametric regressors.
Sparse Gaussian process experts
Mixtures of GP experts have proven to be very successful [10] [20, 47, 57, 13]. In particular, they overcome limitations of stationary Gaussian process models by reducing the computational complexity through local approximations and allow different local properties of the unknown function to handle challenges, such as discontinuities, non-stationarity and non-normality. In this case, one assumes a GP prior on the local regression function with hyperparameters :
where is the local mean function of the expert (for simplicity, it assumed to be constant) and are the parameters of the covariance function , whose chosen form and hyperparameters encapsulate properties of the local function such as the spatial correlation, smoothness, and periodicity. While GP experts are appealing due to their flexibility, interpretability and probabilistic nature, they increase the computational cost of the model significantly. Indeed, given the allocation variables , the GP hyperparameters, which crucially determine the behavior of the unknown function, can be estimated by optimizing the log marginal likelihood:
where and contain the outputs and inputs of the th cluster, i.e. and ; is a vector with entries ; represents the matrix obtained by evaluating the covariance function at each pair of inputs in the th cluster; and is number data points in the th cluster. This however requires inversion of matrices, which scales . While this reduces the computational complexity compared with standard GP models which scale , it can still be costly[10].
To improve scalability, one can resort to approximate methods for GPs, including sparse GPs based on a set of inducing points or pseudo inputs [10] [20, 47, 57], basis function approximations [57], or sparse formulations of the precision matrix [47, 57], among other. For a recent review of approaches in spatial statistics and [47, 57] for a review of approaches in machine learning).
In the present work, we employ an inducing point strategy, assuming the local likelihood of the data points within each cluster factorizes given a set of pseudo-inputs and pseudo-targets ;
where
where is the matrix with elements and is the vector of length with elements . This corresponds to the fully independent training conditional (FITC) approximation [35]. After marginalization of the pseudo-targets under the GP prior , the pseudo-inputs and hyperparameters can be estimated by optimizing the marginal likelihood:
where is the matrix with columns , and is the diagonal matrix with diagonal entries . This strategy allows us to reduce the complexity to .
Generative priors and Tree based learning
Variational Convolutional Autoencoder (VCAE)
A Variational Convolutional Autoencoder (VCAE) is an extension of the Variational Autoencoder (VAE) with convolutional layers to handle image data more effectively[18].
Encoder
The encoder is a convolutional neural network that maps the input data to the parameters of a variational distribution over the latent variables . The encoder outputs the mean and log variance of a Gaussian distribution:
where denotes the parameters of the encoder network.
Decoder
The decoder is a deconvolutional neural network that maps the latent variables back to the data space, producing the parameters of a generative distribution over :
where denotes the parameters of the decoder network, and and are outputs of the deconvolutional network.
Evidence Lower Bound (ELBO)
The VCAE maximizes the evidence lower bound (ELBO) to approximate the true posterior distribution :
The first term is the reconstruction loss, and the second term is the Kullback-Leibler (KL) divergence between the approximate posterior and the prior .
Algorithm 3 CCR
1: Input: Set of labeled data where and 2: Output: Refined model estimation 3: 4: function 5: Initialize 6: for each do 7: Assign to a cluster 8: Calculate 9: Calculate cluster center 10: end for 11: Minimize 12: end function 13: 14: function 15: for each do 16: Classify 17: Define 18: end for 19: Minimize 20: end function 21: 22: function 23: for each do 24: Estimate using the regression model 25: Minimize 26: end for 27: end function
Algorithm 4 Variational Convolutional Autoencoder (VCAE)
1: Initialize encoder parameters and decoder parameters 2: Input image 3: Encode to get latent variables: 4: Sample latent space: 5: Decode to reconstruct the image: 6: Compute loss: 7: Update parameters and to minimize 8: Output: Return the reconstructed image
Denoising Diffusion Implicit Models (DDIM)
Denoising Diffusion Implicit Models (DDIMs) are a type of generative model that produce samples by reversing a forward diffusion process.[25]
Forward Diffusion Process
The forward diffusion process incrementally adds Gaussian noise to the data through a sequence of latent variables :
where are the variance preserving coefficients that determine the noise level at each diffusion step.
Reverse Diffusion Process
In DDIMs, the reverse diffusion process aims to reconstruct the original data by gradually denoising the sequence of noisy samples:
where and are parametrized by a neural network, typically conditioned on to capture the step-dependent dynamics.
Sampling
Sampling from a DDIM involves iteratively applying the reverse diffusion process starting from noise:
The sequence continues until is reached, effectively denoising the data to retrieve an approximation of the original sample.
Algorithm 5 Denoising Diffusion Implicit Model (DDIM)
Initialize parameters
Set number of diffusion steps
Sample initial noise
for to 1 do
Compute deterministic step , where is the denoising function
end for
Output: Return the generated sample
XGBoost
The objective function in XGBoost can be expressed as [59]:
where:
is the predicted value for the -th instance.
is the true value for the -th instance.
is a differentiable convex loss function that measures the difference between the prediction and the target .
represents the -th tree in the model.
is the regularization term which helps to smooth the final learnt weights to avoid overfitting.
Additive Training
XGBoost builds the model in an additive manner:
where:
is the prediction of the -th instance at the -th iteration.
is the function (tree) added in the -th iteration.
Model Complexity
The regularization term is defined as:
where:
is the number of leaves in the tree.
is the score on the -th leaf.
and are regularization parameters.
Approximate Tree Learning
Approximate Tree Learning
To learn the tree structure, XGBoost uses a greedy algorithm. For a given tree structure, the objective function can be written as:
Using a second-order Taylor expansion, we can approximate the loss function:
where:
is the first derivative of the loss function.
is the second derivative of the loss function.
The structure score of a tree can then be calculated as:
where is the set of indices of data points, and are the sets of indices for the left and right children after the split, respectively.
Prediction
The final prediction for a given instance is:
where is the total number of trees.
Methodology
We use NVIDIA Modulus [49], an open-source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art physics ML methods to learn the PINO surrogate. This framework is part of NVIDIA’s suite of AI tools and is tailored for domain scientists, engineers, and AI researchers working on complex simulations across various domains such as fluid dynamics, atmospheric sciences, structural mechanics, electromagnetics, acoustics, and related domains. The emphasis on providing components and models that introduce inductive bias into the neural networks (e.g. FNOs, GNNs, etc.) and training (e.g. physics-based constraints) allows for more accurate and generalizable trained models for physics-ML applications, especially in scenarios where the data might be scarce or expensive to obtain.
The Modulus framework is fundamentally composed of Modulus Core (generally referred to as Modulus) and Modulus-Sym. Modulus-Sym is built on top of Modulus which is a generalized toolkit for physics-ML model development and training. Modulus provides core utilities to train AI models in the physics-ML domain with optimized implementations of various network architectures specifically suited for physics-based applications (MLPs, operator networks like FNOs, DeepONet, graph networks), efficient data pipes for typical physics-ML datasets (structured and unstructured grids, point-clouds, etc.) and utilities to distribute and scale the training across multiple GPUs and nodes. Modulus-Sym provides utilities to introduce physics-based constraints into the model training and has utilities to handle various geometries (via built-in geometry module or STL)s, introduce PDE constraints, and compute gradients efficiently through an optimized gradient backend. It also provides abstractions such as pre-defined training loops that enable domain scientists to experiment with AI model training quickly without diving into the depths of specific implementations of DL training. Modulus-Sym is designed to be highly flexible, supporting various types of partial differential equations (PDEs) (built-in PDE definitions as well as easy ways to introduce your own PDEs symbolically) and constraint definitions typically found in physics-based problems like boundary and equation residual conditions. Modulus is compatible with NVIDIA’s broader AI and HPC (high-performance computing) ecosystems. It is built on top of PyTorch and is interoperable with PyTorch. Modulus’ architecture allows for easy customization and has several integrations with other NVIDIA technologies like CUDA, Warp, PySDF, DALI, NVFuser, and Omniverse, to facilitate efficient computation, scaling, performance optimizations, and real-time visualization leveraging NVIDIA GPUs.
We develop the prior density for the permeability and porosity fields (, ) using a Gaussian measure from a Gaussian process. We use this prior density to learn the PINO-CCR reservoir surrogate using Algorithm 1 with appropriate data and physics loss. Next this prior density is then used to learn the CCR machine learning model required for the peaceman analytical well model using Algorithm 3 and then saved in the folder. For the sparse GP experts, we use the isotropic squared exponential covariance function with a variable number of inducing points based on the cluster sizes [7]. The pseudo-inputs are initialized via K-means and the GP hyperparameters are initialized based on the scale of the data. The number of experts is determined a priori using the Bayesian information criterion (BIC) to compare the GMM clustering solutions of the rescaled across different values of . The choice of GMM is motivated by allowing elliptically-shaped clusters in the rescaled space, while keeping cost low (e.g., if compared to the K-means). The GPytorch package [34] and Xgboost [59] were used to train the sparse Gaussian experts and Xgboost classifier gating network respectively. We also learn the VCAE and DDIM models using Algorithm 4 and Algorithm 5 and save the models in the folder.
A selected number of realizations is then used for the inverse problem workload. In the inverse modeling we use Algorithm 7 where we first forward using the prior developed PINO-CCR Reservoir simulator as shown in Algorithm 6 to get predicted well data of , , (well oil/water and gas production rates). The Peacemann analytical well model is described in Eqn.18a
Where:
is the flow rate.
is the absolute permeability of the reservoir at the voxel location of the well.
is the relative permeability which is a function of water and gas saturation.
is the thickness of the reservoir.
is the average reservoir pressure.
is the bottom hole flowing pressure.
is the viscosity of the fluid.
is the formation volume factor.
is the effective drainage radius.
is the radius of the wellbore.
is the skin factor.
This gives a novel implementation where we couple the CCR algorithm and the PINO approach to give a surrogate reservoir simulator called PINO-CCR, again Algorithm 6 explains this in detail.
We parametrise the permeability field by first using the encoder from Algorithm 4 to get the latent state . We correct the Kalman Gain matrix with the compact support Gaspari and Cohn matrix. We then correct these states with aREKI and we recover the spatial permeability () by applying the denoising function from Algorithm 5. We repeat this cycle until a stopping criterion is met which is defined by the discrepancy principle or the maximum number of iteration. The code for the numerical implementation can be found at https://github.com/NVIDIA/modulus-sym/tree/f59eba4d852a65cc80f703da754a87e51ba44d9d/examples/reservoir_simulation/Norne
Numerical Experiments
The root-mean-square-error (RMSE) function for each ensemble member () is defined as
: Number of data assimilation time steps where measurements are assimilated (measurement times) : Number of data collected at each time step : Ensemble member index : Time index : Metric or response (history matched metric or response) : Observed data metric for metrics (Data equivalent in state space ensemble) at time step . : Simulated data from simulator for metrics (Data equivalent in state space ensemble) at time step . : Observed data standard deviation for metrics (Data equivalent in state space ensemble). The result for the PINO surrogate for the Norne field is shown in Figure 3 - Figure 6. The Norne reservoir model is based on a real field black-oil model for an oil field in the Norwegian Sea [6] [64]. The grid is a faulted corner-point grid, with heterogeneous and anisotropic permeability. 100 training samples for the data loss requiring labeling and running the OPM-Flow simulator [52] were used. The water flows from the injectors (downwards-facing arrows) towards the producers (upwards-facing arrows). The size of the reservoir computational voxel is . Three phases are considered (oil, gas, and water) and the wells (9 water injectors, 4 gas injectors, and 22 producers) are configured. The 22 producer wells have measurable quantities of oil rate, water rate, and gas rate and are controlled by bottom-hole-pressure. The 4 water injector wells have a measurable quantity of bottom hole pressure (BHP), controlled by injection rates. The reservoir is a sandstone Gaussian reservoir. 3,298 days of simulation are simulated. 100 realizations of the Norne model that include variations in porosity, rock permeabilities, and fault transmissibility multipliers are used to generate the training and test data.

Figure 3. Forwarding of the Norne Field. . At Time = 8 days. Dynamic properties comparison between the pressure, water saturation, oil saturation and gas saturation field between Nvidia Modulus’s PINO surrogate (left column), Numerical solver reservoir simulator (middle column) and the difference between both approaches (last column). They are 22 oil/water/gas producers (green), 9 water injectors (blue) and 4 gas injectors) red. We can see good concordance between the surrogate’s prediction and the numerical reservoir simulator (Numerical solver).

Figure 6. Forwarding of the Norne Field. , , . At Time = 3298 days. Dynamic properties comparison between the pressure, water saturation, oil saturation and gas saturation field between Nvidia Modulus’s PINO surrogate (left column), Numerical solver reservoir simulator (middle column) and the difference between both approaches (last column). They are 22 oil/water/gas producers (green), 9 water injectors (blue) and 4 gas injectors) red. We can see good concordance between the surrogate’s prediction and the numerical reservoir simulator (Numerical solver).
The left column of Figure 3-Figure 6 is the responses from the PINO surrogate, the middle column is the responses from the finite volume solver -Flow and the right column is the difference between each response.
| Property | Value |
| Grid Configuration | |
| Grid size | ft |
| # of producers | 22 |
| # of injectors | 13 |
| Simulation period | 3,298 days |
| Integration step length | 100 days |
| # of integration steps | 30 |
| Reservoir depth | 4,000 ft |
| Initial Reservoir pressure | 1,000 psia |
| Injector’s constraint | 500 STB/day |
| Producer’s constraint | 100 psia |
| Residual oil saturation | 0.2 |
| Connate water saturation | 0.2 |
| Petro-physical property distribution | Gaussian permeability/porosity |
| Uncertain parameters to estimate | Distributed permeability, porosity, Fault transmissibility multiplier |
Table 1. Norne reservoir model simulation properties
Algorithm 6 PINO - CCR Reservoir Simulator
Require: , - FNO pressure surrogate, - FNO Water saturation surrogate, - Gas saturation surrogate, - CCR Peaceman surrogate, - Number of producers, - locations/completions, - size of the reservoir domain, - Boolean representing well shut-in state, - Time index
Ensure:
1: Compute: , ,
2: Construct:
3: Compute: wopr, wwpr, wgpr
4: Output:
Algorithm 7 Adaptive Regularized Kalman Inversion (aREKI) using PINO-CCR and VCAE/DDIM exotic priors
Require:
▷ Initial ensemble
▷ PINO pressure surrogate
▷ PINO Water saturation surrogate
▷ PINO Gas saturation surrogate
▷ CCR Peaceman surrogate
▷ Number of producers
▷ locations/completions
▷ size of the reservoir domain
▷ Boolean representing well shut-in state
▷ Time index
▷ Measurement data
▷ Covariance matrix of measurement errors
▷ Maximum number of iterations
Initialize: ,
while and do
Construct ▷ tensor ensemble
Compute predictions: for ▷ Refer to Algorithm 6
Encode to get latent variables: ▷ Refer to Algorithm 5.1.1
Compute residuals:
Compute mean and variance of residuals:
Adjust step size:
Update accumulated step:
Construct the parameters to recover
Compute cross-covariance matrices:
Update ensemble:
for to do
▷ Refer to Algorithm 5, where is the denoising DDIM function
if then
end if
end for
Increment counter:
end while
Output: ▷ Updated permeability,porosity and fault multiplier fields
Figure 3 - Figure 6 shows the dynamic responses for the pressure, water saturation and gas saturation fields for the PINO surrogate simulator and the numerical solver. Figure 7a-Figure 7c) shows the well response match between the PINO-CCR surrogate and the actual true data. Figure 9 - Figure 12 shows the results for the inverse modeling. Figure 9 - Figure 12 is the ultimate target in such reservoir characterization task, and it shows the well responses for the each of the percentiles (P10, P50,P90) match to the true model.

(a) prior ensemble for oil production rate, (stb/day).

(b) prior ensemble for water production rate, (stb/day).

(c) prior ensemble for gas production rate, (scf/day).

(d) posterior ensemble for oil production rate, (stb/day).

(e) posterior ensemble for water production rate, (stb/day).

(f) posterior ensemble for gas production rate, (scf/day).
Figure 9. Inverse modeling with covariance localization and aREKI

(a) (a)

(b) (b)

(c) (c)

(d) (d) RMSE value showing the performance of the 6-reservoir model accuracy to the True data to be matched.
Figure 12. P10-P50-P90 Production profile comparison for the posterior ensemble. (red) True model, (Blue) P10 model, (cyan) P50 model, (green) P90 model. from the 22 producers. They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

Figure 2. Forwarding of the Norne Field. . Peaceman well model surrogate with CCR. The 66 tile indicates each of the 66 outputs for the wopr, wwpr, wgpr for the 22 wells. The accuracies are computed on the unseen validation text set.

Figure 4. Forwarding of the Norne Field. . At Time = 968 days. Dynamic properties comparison between the pressure, water saturation, oil saturation and gas saturation field between Nvidia Modulus’s PINO surrogate (left column), Numerical solver reservoir simulator (middle column) and the difference between both approaches (last column). They are 22 oil/water/gas producers (green), 9 water injectors (blue) and 4 gas injectors) red. We can see good concordance between the surrogate’s prediction and the numerical reservoir simulator (Numerical solver).

Figure 5. Forwarding of the Norne Field. . At Time = 2104 days. Dynamic properties comparison between the pressure, water saturation, oil saturation and gas saturation field between Nvidia Modulus’s PINO surrogate (left column), Numerical solver reservoir simulator (middle column) and the difference between both approaches (last column). They are 22 oil/water/gas producers (green), 9 water injectors (blue) and 4 gas injectors) red. We can see good concordance between the surrogate’s prediction and the numerical reservoir simulator (Numerical solver).

(a) Forwarding of the Norne Field Comparison between using the. (red) True model, (blue) PINO-CCR model. Outputs from peaceman machine for oil production rate, () from the 22 producers. They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

(b) Forwarding of the Norne Field Comparison between using the. (red) True model, (blue) PINO-CCR model. Outputs from peaceman machine for water production rate, () from the 22 producers.They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

(c) Forwarding of the Norne Field Comparison between using the. (red) True model, (blue) PINO-CCR model. Outputs from peaceman machine for gas production rate, () from the 22 producers. They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.
Figure 7. Overall forwarding of the Norne Field using True model (red) and PINO-CCR model (blue). Outputs from Peaceman machine for oil, water, and gas production rates from the 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

Figure 8. Forwarding of the Norne Field (First row): accuracy, (bottom-row) accuracy. Column 1-4 denotes the pressure, water saturation, oil saturation and gas saturation field respectively.

Figure 10. Cost function evolution. (Top -left) prior ensemble RMSE cost, (Top-right) posterior ensemble RMSE cost, (Bottom-left) RMSE cost evolution between the MAP model (blue) and the MLE model (green).
Conclusion
We have developed a coupled mixture of experts - physics-informed neural operator-based reservoir simulator (PINO-CCR) that solves the black oil model by augmenting the supervised loss from the labelled data with the residual loss of the governing pde. The PINO can approximate the pressure, water saturation and gas saturation given any input of the permeability, porosity and the fault multiplier term. The developed PINO-CCR is first compared to the numerical black oil reservoir simulator and the similarities are very close. Next, we use this developed surrogate simulator in an ensemble-based history-matching workflow. The method used is the aREKI with VCAE and DDIM generative exotic priors, to make the inverse problem less ill-posed, reduce the computational complexity of the Kalman gain and improve convergence to the minimum of the history matching cost functional. For the Norne field the overall workflow is successful in recovering the unknown permeability, porosity fields as well as the fault multiplier values and simulation (inference) is very fast with an inference time of approximately 7secs and a speedup of 6000X to the traditional numerical methods. Training of the PINO-CCR surrogate for the Norne field on a cluster with 2 NVIDIA H100 GPUs with 80G memory each takes approximately 5 hours for 100 training samples. Full reservoir characterization together with plotting and solution to the inverse problem for an ensemble size of 200 realizations took 1 hour(s). The workflow is suitable to be used in an inverse uncertainty quantification scenario where sampling the full posterior density is desirable
Credit authorship contribution statement
Clement Etienam: Data curation, Conceptualization, Formal analysis, Investigation, Methodology, Software, Validation, Writing – original draft. Yang Juntao/Oleg Ovcharenko: Investigation, Writing – review and editing – original draft. Issam Said: Research direction, conceptualisation of the forward and inverse problem.
Acknowledgement
The authors would like to express gratitude to NVIDIA for their financial support and permission to publish the article. Additionally, we extend our thanks to colleagues who contributed to this paper by way of intellectual discussions and suggestions.

Figure 11. Comparison of permeability field reconstruction (1st column) prior, (2nd column) MLE estimate (posterior) (third column) MAP estimate (posterior) and (4th-column) True Model. The method used is the – aREKI + Covariance localization.
References
- [1]A. A. Emerick and A. C. Reynolds. Ensemble smoother with multiple data assimilation. Computers Geosciences, 2013.DOI
- [2]A. Alakeely, R. Horne 2022. Simulating oil and water production in reservoirs with generative deep learning. SPE Reservoir Eval. Eng. 25 (4), 751e773. https://doi.org/10.2118/206126-PA.
- [3]A. Erofeev, D. Orlov, A. Ryzhov, D. Koroteev 2019. Prediction of porosity and permeability alteration based on machine learning algorithms. Transp Porous Med. 128, 677e700. https://doi.org/10.1007/s11242-019-01265-3.
- [4]A. M. Stuart. Inverse problems: A Bayesian perspective. Acta Numerica, 19:451–559, 2010.DOI
- [5]A. Tarantola. Inverse problem theory and methods for model parameter estimation. SIAM, Philadelphia, 2005.DOI
- [6]B. Foss, , and J.L. Jensen. (2002). Stochastic reservoir simulation for the modelling of uncertainty in the Norne field. SPE Reservoir Evaluation and Engineering.
- [7]D.R., Burt, C.E.,Rasmussen, and M., van der Wilk. Convergence of sparse variational inference in Gaussian processes regression, 2020 Journal of Machine Learning Research, 21:1–63arxiv.org/abs/2008.00323
- [10]C. Etienam, J. H. L. Law, and S. Wade. Ultra-fast Deep Mixtures of Gaussian Process Experts. 2023. https://arxiv.org/abs/2006.13309.
- [11]C. Etienam, I. Said, O. Ovcharenko, and K. Hester. A Reservoir Model Characterization with a Bayesian Framework and a Modulus-based Physics-constrained Neural Operator. In EAGE Seventh High-Performance Computing Workshop, 2023. doi:10.3997/2214-4609.2023630004.DOI