betaFeedback

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, dd, to infer a set of model parameters, mm, 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,

  1. 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.

  1. 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.

  1. 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].

ϕ∂Sw∂t−∇⋅[Tw(∇Pw+ρwgk)]=Qw(1)\phi\frac{\partial S_w}{\partial t} - \nabla\cdot\left[T_w\left(\nabla P_w+\rho_w g k\right)\right] = Q_w \tag*{(1)}
ϕ∂So∂t−∇⋅[To(∇Po+ρogk)]=Qo(2)\phi\frac{\partial S_o}{\partial t} - \nabla\cdot\left[T_o\left(\nabla P_o+\rho_o g k\right)\right] = Q_o \tag*{(2)}
∇⋅(ρgBgTg(∇Pg+ρggk)+RsoρgBoTo(∇Po+ρogk))−Qg=−∂∂t[ϕ(ρgBgSg+RsoρgBoSo)](3)\nabla\cdot\left(\frac{\rho_g}{B_g}T_g\left(\nabla P_g+\rho_g g k\right)+\frac{R_{so}\rho_g}{B_o}T_o\left(\nabla P_o+\rho_o g k\right)\right)-Q_g=-\frac{\partial}{\partial t}\left[\phi\left(\frac{\rho_g}{B_g}S_g+\frac{R_{so}\rho_g}{B_o}S_o\right)\right] \tag*{(3)}

subscript ww = water, oo = oil, gg = gas. The system is closed by adding three additional equations Pcwo=Po−PwP_{cwo}=P_o-P_w; Pcog=Pg−PoP_{cog}=P_g-P_o; Sw+So+Sg=1S_w+S_o+S_g=1. Gravity effects are considered by the terms ρwgk\rho_w g k and ρogk\rho_o g k. Ω⊂Rn\Omega\subset\mathbb{R}^n (n=2,3n=2,3) is the modeling domain with boundary ∂Ω\partial\Omega, and [0,tf][0,t_f] is the time interval for which production data is available. ϕ(x)\phi(x) = porosity, ToT_o, TwT_w, TgT_g and TT the transmissibilities,

Tw=K(x)Krw(Sw)μw;To=K(x)Kro(Sw)μo;Tg=K(x)Krg(So)μg;(4)T_w=\frac{K(x)K_{rw}(S_w)}{\mu_w};\quad T_o=\frac{K(x)K_{ro}(S_w)}{\mu_o};\quad T_g=\frac{K(x)K_{rg}(S_o)}{\mu_g}; \tag*{(4)}

Assuming fault transmissibility multiplier (FTM),

T=FTM⋅(Tw+To+Tg)(5)T=FTM\cdot(T_w+T_o+T_g) \tag*{(5)}
−∇⋅[T∇P]=Q(6)-\nabla\cdot[T\nabla P]=Q \tag*{(6)}
ϕ∂Sw∂t−∇⋅[Tw(∇P)]=Qw(7)\phi\frac{\partial S_w}{\partial t}-\nabla\cdot[T_w(\nabla P)]=Q_w \tag*{(7)}
∇⋅(ρgBgTg(∇P)+RsoρgBoTo(∇P))−Qg=−∂∂t[ϕ(ρgBgSg+RsoρgBoSo)](8)\nabla\cdot\left(\frac{\rho_g}{B_g}T_g(\nabla P)+\frac{R_{so}\rho_g}{B_o}T_o(\nabla P)\right)-Q_g=-\frac{\partial}{\partial t}\left[\phi\left(\frac{\rho_g}{B_g}S_g+\frac{R_{so}\rho_g}{B_o}S_o\right)\right] \tag*{(8)}

Boundary and initial conditions are given as Sw(x,0)=Sw0(x)S_w(x,0)=S_w^0(x); P(x,0)=P0(x)P(x,0)=P^0(x); ∇P⋅ν=0\nabla P\cdot\nu=0. ν\nu = outward unit normal to ∂Ω\partial\Omega. 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 G†(a)=uG^\dagger(a)=u to approximate the mapping of function G:A→UG:A\to U, G≈G†G\approx G^\dagger.

en+1(x)=σ(Wen(x)+(P(a;ϑ)en(x))(x))(9)e_{n+1}(x)=\sigma\left(We_n(x)+\left(\mathcal{P}(a;\vartheta)e_n(x)\right)(x)\right) \tag*{(9)}

Figure 1 shows the full FNO architecture; input observation v(x)v(x) is first lifted to a higher dimensional potential representation e0(x)=M(v(x))e_0(x)=M(v(x)) by a fully connected shallow neural network MM. Then, e0(x)e_0(x) is used as input for an iterative Fourier layer e0→e1→e2→⋯→eNe_0\to e_1\to e_2\to\cdots\to e_N. The concrete iterative process from state en→en+1e_n\to e_{n+1} can be written as:

A standard Fourier neural operator (FNO)

Figure 1. A standard Fourier neural operator (FNO) as adopted from [66]

en+1(x)=σ(Wen(x)+(P(a;ϑ)en(x))(x))(10)e_{n+1}(x)=\sigma\left(We_n(x)+\left(\mathcal{P}(a;\vartheta)e_n(x)\right)(x)\right) \tag*{(10)}

Figure 1. Architecture of the FNO. FF denotes the Fourier transform, and F−1F^{-1} denotes the inverse Fourier transform. RϑR_{\vartheta} is a Fourier transform of the periodic function P\mathcal{P}; WW is a local linear transform; σ\sigma is a non-linear activation function; e0e_0 and e1e_1 are the input and output of Fourier layer 1. Here, σ\sigma is a non-linear activation function, WW is a linear transformation, and P\mathcal{P} is an integral kernel transformation parameterized by a neural network. (P(a;ϑ)en(x))(x)(\mathcal{P}(a;\vartheta)e_n(x))(x) is the bias, which can be written as an integral:

(P(a;ϑ)en(x))(x)=∫Pϑ(x,y)en(y) dy(11)(\mathcal{P}(a;\vartheta)e_n(x))(x)=\int\mathcal{P}_{\vartheta}(x,y)e_n(y)\,\mathrm{d}y \tag*{(11)}

To accelerate the integration process ∫Pϑ(x,y)en(y) dy\int\mathcal{P}_{\vartheta}(x,y)e_n(y)\,\mathrm{d}y, Li et al. (2020) imposed a condition that Pϑ(x,y)=Pϑ(x−y)\mathcal{P}_{\vartheta}(x,y)=\mathcal{P}_{\vartheta}(x-y) and the new integral becomes,

(P(a;ϑ)en(x))(x)=∫Pϑ(x,y)en(y) dy=F−1(Rϑ⋅(Fen))(x)(12)(\mathcal{P}(a;\vartheta)e_n(x))(x)=\int\mathcal{P}_{\vartheta}(x,y)e_n(y)\,\mathrm{d}y=F^{-1}(R_{\vartheta}\cdot(F e_n))(x) \tag*{(12)}

where FF denotes the Fourier transform, and F−1F^{-1} denotes the inverse Fourier transform. RϑR_{\vartheta} is a Fourier transform of periodic function P\mathcal{P}, Rϑ=F(Pϑ)R_{\vartheta}=F(\mathcal{P}_{\vartheta}), and Pϑ\mathcal{P}_{\vartheta} is the kernel of the neural network. Following the NN Fourier layer iteration, the last state output eN(x)e_N(x) is projected back to the original space using a fully connected neural network SS, y(x)=S(eN(x))y(x)=S(e_N(x)). In every block of the Fourier layer, FNO approximates highly non-linear functions mainly via combining the linear transform WW and global integral operator RϑR_{\vartheta} (Fourier transform). RϑR_{\vartheta} can be parameterized as a complex-valued tensor in the Fourier space from truncating high Fourier frequency modes kk, 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 (KK) and effective porosity (ϕ\phi). For completeness, the input and output tensors are indicated below. Pini,SiniP_{ini},S_{ini} are the initial pressure and water saturation, dtdt 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.

X={K,ϕ,FTM,Pini,Sini}∈RB0×1,D×W×H(13)X=\{K,\phi,FTM,P_{ini},S_{ini}\}\in\mathbb{R}^{B_0\times1,D\times W\times H} \tag*{(13)}
P=f1(X;θp),Sw=f2(X;θs),Sg=f3(X;θg)(14)P=f_1(X;\theta_p),\quad S_w=f_2(X;\theta_s),\quad S_g=f_3(X;\theta_g) \tag*{(14)}

KK is the absolute permeability, QQ is the total flow, QwQ_w is the water flow (injection rate), QgQ_g is the gas flow (injection rate), dtdt is the time stepping, PiniP_{ini} is the initial pressure of the reservoir, and SiniS_{ini} is the initial water saturation of the reservoir. PP is the pressure, and SwS_w is the water saturation and SgS_g is the gas saturation f1(X;θp)f_1(X;\theta_p) is the FNO model for the pressure output, f2(X;θs)f_2(X;\theta_s) is the FNO model for the water saturation output, and f3(X;θs)f_3(X;\theta_s) is the FNO model for the gas saturation output The physics loss ansatz is then,

V(Q,p;T)pressure equation=1ns∥(−∇⋅[T∇P]−Q)⋅act∥22(15)V(Q,p;T)_{\mathrm{pressure\ equation}}=\frac{1}{n_s}\left\|\left(-\nabla\cdot[T\nabla P]-Q\right)\cdot a_{ct}\right\|_2^2 \tag*{(15)}
V(p,Sw;t,Tw)water equation=1ns∥(ϕ∂Sw∂t−∇⋅[Tw⋅FTM.(∇P)]−Qw)⋅act∥22(16)V(p,S_w;t,T_w)_{\mathrm{water\ equation}}=\frac{1}{n_s}\left\|\left(\phi\frac{\partial S_w}{\partial t}-\nabla\cdot[T_w\cdot FTM.(\nabla P)]-Q_w\right)\cdot a_{ct}\right\|_2^2 \tag*{(16)}
V(p,Sg;t,Tg)gas equation=1ns∥∇⋅(ρgBgTg⋅FTM(∇P)+RsoρgBoTo⋅FTM(∇P))−Qg+∂∂t[ϕ(ρgBgSg+RsoρgBoSo)⋅act]∥22(17)V(p,S_g;t,T_g)_{\mathrm{gas\ equation}}=\frac{1}{n_s}\left\|\nabla\cdot\left(\frac{\rho_g}{B_g}T_g\cdot FTM(\nabla P)+\frac{R_{so}\rho_g}{B_o}T_o\cdot FTM(\nabla P)\right)-Q_g+\frac{\partial}{\partial t}\left[\phi\left(\frac{\rho_g}{B_g}S_g+\frac{R_{so}\rho_g}{B_o}S_o\right)\cdot a_{ct}\right]\right\|_2^2 \tag*{(17)}
ϕcfd=V(Q,p;T)pressure equation+V(p,Sw;t,Tw)water equation+V(p,Sg;t,Tg)gas equation(18)\phi_{cfd}=V(Q,p;T)_{\mathrm{pressure\ equation}}+V(p,S_w;t,T_w)_{\mathrm{water\ equation}}+V(p,S_g;t,T_g)_{\mathrm{gas\ equation}} \tag*{(18)}

Together with the initial conditions and boundary conditions.

Sw(x,0)=Sw0(x) ; P(x,0)=P(x) ; Sg(x,0)=Sg0(x) ; Fy=0(19)S_w(x,0)=S_w^0(x)\ ;\ P(x,0)=P(x)\ ;\ S_g(x,0)=S_g^0(x)\ ;\ F_y=0 \tag*{(19)}
ϕic=1ns∥Sw(x,0)−Sw0(x)∥22+1ns∥P(x,0)−P(x)∥22+1ns∥Sg(x,0)−Sg0(x)∥22(20)\phi_{ic}=\frac{1}{n_s}\|S_w(x,0)-S_w^0(x)\|_2^2+\frac{1}{n_s}\|P(x,0)-P(x)\|_2^2+\frac{1}{n_s}\|S_g(x,0)-S_g^0(x)\|_2^2 \tag*{(20)}
ϕbc=1ns∥Fy∥22(21)\phi_{bc}=\frac{1}{n_s}\|F_y\|_2^2 \tag*{(21)}
ϕ=ϕcfd+ϕic+ϕbc+ϕdata(22)\boldsymbol{\phi}=\phi_{cfd}+\phi_{ic}+\phi_{bc}+\phi_{data} \tag*{(22)}
θ=[θp,θs,θg]T(23)\theta=[\theta_p,\theta_s,\theta_g]^T \tag*{(23)}
θj+1=θj−ε∇ϕθj(24)\theta^{j+1}=\theta^j-\varepsilon\nabla\phi_\theta^j \tag*{(24)}

Algorithm 1 PINO Reservoir Simulator Surrogate for Dynamic Properties

Require:

  • X1={K,ϕ,FTM,Pini,Sini}∈RB×1×D×W×HX_1=\{K,\phi,FTM,P_{ini},S_{ini}\}\in\mathbb{R}^{B\times1\times D\times W\times H} ▷ dictionary of varied tensor inputs

  • XN1={Qw,Qg,Q,dt,act}∈RB×T×D×W×HX_{N1}=\{Q_w,Q_g,Q,dt,act\}\in\mathbb{R}^{B\times T\times D\times W\times H} ▷ dictionary of fixed tensor inputs

  • Y1ptY_{1pt} – labelled pressure, Y1stY_{1st} – labelled water saturation, Y1gtY_{1gt} – labelled gas saturation, f1(⋅,θp)f_1(\cdot,\theta_p), f2(⋅,θs)f_2(\cdot,\theta_s), f3(⋅,θg)f_3(\cdot,\theta_g)

  • TT ▷ Time reporting steps

  • epoch,tol,w1,w2,w3,w4,w5,w6∈Repoch,tol,w_1,w_2,w_3,w_4,w_5,w_6\in\mathbb{R}

Ensure:

  1. j=0j=0

  2. while (j≤epoch)(j\le epoch) or (ϕ≤tol)(\phi\le tol) do

  3. Y1p=f1(X1;θp)⋅actY_{1p}=f_1(X_1;\theta_p)\cdot act

  4. Y1s=f2(X1;θs)⋅actY_{1s}=f_2(X_1;\theta_s)\cdot act

  5. Y1g=f3(X1;θg)⋅actY_{1g}=f_3(X_1;\theta_g)\cdot act

  6. Compute: Tw=K(x)⋅Krw(Y1s)μwT_w=\frac{K(x)\cdot K_{rw}(Y_{1s})}{\mu_w}

  7. To=K(x)⋅Kro(1−(Y1s+Y1g))μoT_o=\frac{K(x)\cdot K_{ro}(1-(Y_{1s}+Y_{1g}))}{\mu_o}

  8. Tg=K(x)⋅Krg⋅Y1gμgT_g=\frac{K(x)\cdot K_{rg}\cdot Y_{1g}}{\mu_g}

  9. T=XN1[act]⋅XN1[FTM]⋅(Tw+To+Tg)T=X_{N1}[act]\cdot X_{N1}[FTM]\cdot(T_w+T_o+T_g)

  10. Compute: V(Y1p,Y1s;t,Tw)1s=1ns∥(ϕ⋅∂Y1s∂t−∇⋅[Tw⋅∇Y1p]−X1[Qw])∥22V(Y_{1p},Y_{1s};t,T_w)_{1s}=\frac{1}{n_s}\left\|\left(\phi\cdot\frac{\partial Y_{1s}}{\partial t}-\nabla\cdot[T_w\cdot\nabla Y_{1p}]-X_1[Q_w]\right)\right\|_2^2

  11. Compute: V(Y1p,Y1s,Y1g;t,To,Tg)1g=1ns∥∇⋅(ρgBg⋅Tg⋅XN1[act]⋅XN1[FTM]⋅∇Y1p+Rso⋅ρgBo⋅To⋅XN1[act]⋅XN1[FTM]⋅∇Y0p)−XN0[Qg]+∂∂t(ϕ⋅(ρgBg⋅Y1g+Rso⋅ρgBo⋅(1−(Y1s+Y1g))))∥22V(Y_{1p},Y_{1s},Y_{1g};t,T_o,T_g)_{1g}=\frac{1}{n_s}\left\|\nabla\cdot\left(\frac{\rho_g}{B_g}\cdot T_g\cdot X_{N1}[act]\cdot X_{N1}[FTM]\cdot\nabla Y_{1p}+\frac{R_{so}\cdot\rho_g}{B_o}\cdot T_o\cdot X_{N1}[act]\cdot X_{N1}[FTM]\cdot\nabla Y_{0p}\right)-X_{N0}[Q_g]+\frac{\partial}{\partial t}\left(\phi\cdot\left(\frac{\rho_g}{B_g}\cdot Y_{1g}+\frac{R_{so}\cdot\rho_g}{B_o}\cdot(1-(Y_{1s}+Y_{1g}))\right)\right)\right\|_2^2

  12. Compute: V(X1[Q],Y1p;T)1p=1ns∥(−∇⋅[T⋅act⋅∇Y1p]−X1[Q])∥22V(X_1[Q],Y_{1p};T)_{1p}=\frac{1}{n_s}\left\|(-\nabla\cdot[T\cdot act\cdot\nabla Y_{1p}]-X_1[Q])\right\|_2^2

  13. ϕp=∥Y1pt−f1(X1;θp)∥22\phi_p=\left\|Y_{1pt}-f_1(X_1;\theta_p)\right\|_2^2 ▷ data supervised loss for pressure

  14. ϕs=∥Y1st−f2(X1;θs)∥22\phi_s=\left\|Y_{1st}-f_2(X_1;\theta_s)\right\|_2^2 ▷ data supervised loss for water saturation

  15. ϕg=∥Y1gt−f3(X1;θg)∥22\phi_g=\left\|Y_{1gt}-f_3(X_1;\theta_g)\right\|_2^2 ▷ data supervised loss for gas saturation

  16. ϕ=w1⋅ϕp+w2⋅ϕs+w3⋅ϕg+w4⋅V(Y1p,Y1s;t,Tw)1s+w5⋅V(X1[Q],Y1p;T)1p+w6⋅V(Y1p,Y1s,Y1g;t,To,Tg)1g\phi=w_1\cdot\phi_p+w_2\cdot\phi_s+w_3\cdot\phi_g+w_4\cdot V(Y_{1p},Y_{1s};t,T_w)_{1s}+w_5\cdot V(X_1[Q],Y_{1p};T)_{1p}+w_6\cdot V(Y_{1p},Y_{1s},Y_{1g};t,T_o,T_g)_{1g} ▷ overall loss

  17. Update models:

  18. θ=[θp,θs,θg]T\theta=[\theta_p,\theta_s,\theta_g]^T

  19. θj+1=θj−ϵ∇ϕθ\theta^{j+1}=\theta^j-\epsilon\nabla\phi_\theta ▷ Back-propagation

  20. j←j+1j\leftarrow j+1

  21. end while

  22. Output: f1(⋅,θp)f_1(\cdot,\theta_p), f2(⋅,θs)f_2(\cdot,\theta_s), f3(⋅,θg)f_3(\cdot,\theta_g) ▷ pressure, water saturation and gas saturation PINO surrogates

w1,…,w6w_1,\ldots,w_6 are the weights associated to the loss functions associated to the 6 terms. X1={K,FTM,ϕ,Pini,Sini}X_1=\{K,FTM,\phi,P_{ini},S_{ini}\} are the dictionary inputs from running the reservoir simulator. epoch,tolepoch,tol are the number or epochs and the tolerance level for the loss function. f1(⋅;θp)f_1(\cdot;\theta_p), f2(⋅;θs)f_2(\cdot;\theta_s), f3(⋅;θg)f_3(\cdot;\theta_g) are the FNO models for the pressure, water, and gas saturation equation respectively, actact is the inactive / active cells grid, FTMFTM is the fault transmissibility multiplier.

Inverse Problem

A probability space is defined as a triplet (Ω,F,P)(\Omega,\mathcal{F},\mathbb{P}). The sample space Ω\Omega is a set containing all possible outcomes. The σ\sigma-algebra F\mathcal{F} on Ω\Omega is a set of all possible events from an experiment, and follows the following axioms: if A∈FA\in\mathcal{F}, then Ac∈FA^c\in\mathcal{F}, where AcA^c is the complement of AA. If A1A_1, A2A_2, ... ∈F\in\mathcal{F} is a countable sequence of elements, then ⋃i=1∞Ai∈F\bigcup_{i=1}^{\infty}A_i\in\mathcal{F} [4] The measure P:F→[0,1]\mathbb{P}:\mathcal{F}\to[0,1] defines a probability to every event in F\mathcal{F} and satisfies: P(A)≥0\mathbb{P}(A)\geq0, ∀A∈F\forall A\in\mathcal{F}, P(Ω)=1\mathbb{P}(\Omega)=1, If A1A_1, A2A_2, ... ∈F\in\mathcal{F} are pairwise disjoint (meaning Ai∩Aj=0A_i\cap A_j=0, ∀i≠j\forall i\ne j), then P(⋃i=1∞Ai)=∑i=1∞P(Ai)\mathbb{P}(\bigcup_{i=1}^{\infty}A_i)=\sum_{i=1}^{\infty}\mathbb{P}(A_i). This property is called countable additivity[4].

If measurable sets AiA_i for i∈Ni\in\mathbb{N} are pairwise disjoint, then P(⋃i=1∞Ai)=∑i=1∞P(Ai)\mathbb{P}(\bigcup_{i=1}^{\infty}A_i)=\sum_{i=1}^{\infty}\mathbb{P}(A_i). A measure is called σ\sigma-finite if Ω\Omega is a countable union of measurable sets with finite measure. In this paper, we restrict the Euclidean space Ω=Rn\Omega=\mathbb{R}^n, with Borel σ\sigma-algebra F=B(Rn)\mathcal{F}=\mathcal{B}(\mathbb{R}^n), and with Lebesgue measure on Rn\mathbb{R}^n. A random variable XX is defined as a measurable map X:(Ω,F)→(Rn,B(Rn))X:(\Omega,\mathcal{F})\to(\mathbb{R}^{n},\mathcal{B}(\mathbb{R}^{n})), which means that if A∈B(Rn)A\in\mathcal{B}(\mathbb{R}^{n}), then X−1(A)∈FX^{-1}(A)\in\mathcal{F}. The probability distribution of XX is then defined as a measure on (Rn,B(Rn))(\mathbb{R}^{n},\mathcal{B}(\mathbb{R}^{n})): μ(A):=P(X−1(A))\mu(A):=\mathbb{P}(X^{-1}(A)).

Theorem 1 (Radon-Nikodym Theorem). Let μ\mu and ν\nu be two measures on the same measure space (Ω,F)(\Omega,\mathcal{F}). If ν\nu is σ\sigma-finite and μ≪ν\mu\ll\nu then there exists a function f∈L1(Ω,F,ν)f\in\mathcal{L}^{1}(\Omega,\mathcal{F},\nu) such that

μ(A)=∫Af(x)dν(x),∀A∈F(25)\mu(A)=\int_{A}f(x)d\nu(x),\quad\forall A\in\mathcal{F} \tag*{(25)}

And f(x)=dμdν(x)f(x)=\frac{d\mu}{d\nu}(x) is called the Radon-Nikodym derivative of μ\mu with respect to $\nu

Suppose μ\mu is a probability measure on (Rn,B(Rn))(\mathbb{R}^{n},\mathcal{B}(\mathbb{R}^{n})), Ln\mathcal{L}_{n} is a Lebesgue measure on Rn\mathbb{R}^{n}, and μ≪Ln\mu\ll\mathcal{L}_{n}, then there exists π∈L1(Rn)\pi\in\mathcal{L}^{1}(\mathbb{R}^{n}) such that μ(A)=∫Aπ(x) dx\mu(A)=\int_{A}\pi(x)\,dx for any A∈B(Rn)A\in\mathcal{B}(\mathbb{R}^{n}), and π(x)\pi(x) is called the probability density function (pdf) of XX. The joint distribution of two random variables XX and YY over corresponding measurable sets AA and BB is given by μX×Y(A×B)=P(X−1(A)∩Y−1(B))\mu_{X\times Y}(A\times B)=\mathbb{P}(X^{-1}(A)\cap Y^{-1}(B)), and the marginal distribution of XX is defined as μX(A)=μX×Y(A×Rn)\mu_{X}(A)=\mu_{X\times Y}(A\times\mathbb{R}^{n}), similarly for YY. Two random variables XX and YY are independent if μX×Y(A×B)=μX(A)μY(B)\mu_{X\times Y}(A\times B)=\mu_{X}(A)\mu_{Y}(B).

A random variable Y∈L1(Ω,G,P;Rn)Y\in\mathcal{L}^{1}(\Omega,\mathcal{G},\mathbb{P};\mathbb{R}^{n}) is called the conditional expectation of X∈L1(Ω,F,P;Rn)X\in\mathcal{L}^{1}(\Omega,\mathcal{F},\mathbb{P};\mathbb{R}^{n}) with respect to the partial σ\sigma-algebra G\mathcal{G} if ∫GX(ω)dP(ω)=∫GY(ω)dP(ω)\int_{G}X(\omega)d\mathbb{P}(\omega)=\int_{G}Y(\omega)d\mathbb{P}(\omega) for all G∈GG\in\mathcal{G}, then define the expectation E(X∣G):=Y\mathbb{E}(X\mid\mathcal{G}):=Y. The conditional probability of an event A∈FA\in\mathcal{F} given the sub-σ\sigma-algebra G\mathcal{G} is a conditional expectation of the form E(f(x),G)\mathbb{E}(f(x),\mathcal{G}) where P(A∣G)=E(1A(X)∣G)\mathbb{P}(A\mid\mathcal{G})=\mathbb{E}(\mathbf{1}_{A}(X)\mid\mathcal{G}) and 1A(X):={1if x∈A0if x∉A\mathbf{1}_{A}(X):=\begin{cases}1&\text{if }x\in A\\0&\text{if }x\notin A\end{cases} is the indicator function of a subset AA of a set XX.

The cost functional for the history matching inverse problem is posed as [4, 1, 11] [63, 12, 41].

Φ(u;y)≡12∥Γ−1/2(y−G(u))∥2(26)\Phi(u;y)\equiv\frac{1}{2}\left\|\Gamma^{-1/2}(y-G(u))\right\|^{2} \tag*{(26)}

Where ∥⋅∥\|\cdot\| represents the MM dimensional Euclidean Norm. G:Rd→RkG:\mathbb{R}^{d}\to\mathbb{R}^{k} represents the forward simulator, that solves the forward problem and defines the relationship between unknown parameters u∈Rdu\in\mathbb{R}^{d}, y∈Rky\in\mathbb{R}^{k} is the corrupted noisy (or noiseless in rare cases) true data given by.

y=F(K+,ϕ+)+η(27)y=F(K^{+},\phi^{+})+\eta \tag*{(27)}

where K+,ϕ+K^{+},\phi^{+} is the underlining unknown true model (we want to recover) and η∼N(0,Γ)\eta\sim\mathcal{N}(0,\Gamma). Γ∈Rk×k\Gamma\in\mathbb{R}^{k\times k} is the data noise covariance matrix with Lebesgue density ρ(η)\rho(\eta). The unknown uu follows a prior distribution μ0\mu_{0} with Lebesgue density ρ0(u)\rho_{0}(u). This prior density ρ0(u)\rho_{0}(u) contains any information that we already know about uu; a good prior is key to the solution of the inverse problem. It then follows that (u,y)∈Rd×Rk(u,y)\in\mathbb{R}^{d}\times\mathbb{R}^{k} is a random variable with Lebesgue density ρ(y−G(u))ρ0(u)\rho(y-G(u))\rho_{0}(u). The posterior distribution u∣yu\mid y is then the solution to the inverse problem and is given by Bayes’ theorem,

P(u∣y)=1P(y)P(y∣u)P(u)(28)\mathbb{P}(u\mid y)=\frac{1}{\mathbb{P}(y)}\mathbb{P}(y\mid u)\mathbb{P}(u) \tag*{(28)}

Assume that Z:=∫Rnρ(y−G(u))ρ0(u) du>0Z:=\int_{\mathbb{R}^{n}}\rho(y-G(u))\rho_{0}(u)\,du>0, then u∣yu\mid y is a random variable with Lebesgue density π(u)=1Zρ(y−G(u))ρ0(u)\pi(u)=\frac{1}{Z}\rho(y-G(u))\rho_{0}(u), where ZZ is the probability of yy and acts as a normalizing constant; for random variables AA and BB, let P(A∣B)\mathbb{P}(A\mid B) be the conditional pdf of AA given BB and P(A)\mathbb{P}(A) be the pdf of AA, then P(u,y)=P(u∣y)P(y)=P(y∣u)P(u)\mathbb{P}(u,y)=\mathbb{P}(u\mid y)\mathbb{P}(y)=\mathbb{P}(y\mid u)\mathbb{P}(u), and P(y)=∫RdP(u,y) du\mathbb{P}(y)=\int_{\mathbb{R}^{d}}\mathbb{P}(u,y)\,du and P(u)=∫RkP(u,y) dy\mathbb{P}(u)=\int_{\mathbb{R}^{k}}\mathbb{P}(u,y)\,dy, assuming that P(y)>0\mathbb{P}(y)>0 then Bayes’ theorem gives us P(u∣y)=1P(y)P(y∣u)P(u)=1Zρ(y−G(u))ρ0(u)>0\mathbb{P}(u\mid y)=\frac{1}{\mathbb{P}(y)}\mathbb{P}(y\mid u)\mathbb{P}(u)=\frac{1}{Z}\rho(y-G(u))\rho_{0}(u)>0; if we define the negative log likelihood as Φ(u;y)=−log⁡ρ(y−G(u))\Phi(u;y)=-\log\rho(y-G(u)), then dμdμ0(u)=1Zexp⁡(−Φ(u;y))\frac{d\mu}{d\mu_{0}}(u)=\frac{1}{Z}\exp(-\Phi(u;y)), where Z=∫Rkexp⁡(−Φ(u;y))μ0(du)Z=\int_{\mathbb{R}^{k}}\exp(-\Phi(u;y))\mu_{0}(du), and μy\mu^{y} and μ0\mu_{0} are measures on Rk\mathbb{R}^{k} with densities π\pi and ρ0\rho_{0} respectively, which shows the posterior is absolutely continuous with respect to the prior density and the Radon-Nikodym derivative dμydμ0(u)\frac{d\mu^{y}}{d\mu_{0}}(u) is proportional to the likelihood. Using the Sherman-Morrison-Woodbury Lemma [26], we arrive at the Vanilla Ensemble Kalman Inversion (EKI),

un+1(j)=un(j)+CnuG(CnGG+αnΓ)−1(y+αξn−G(un(j)))(29)u_{n+1}^{(j)}=u_{n}^{(j)}+C_{n}^{uG}\left(C_{n}^{GG}+\alpha_{n}\Gamma\right)^{-1}\left(y+\sqrt{\alpha}\xi_{n}-G\left(u_{n}^{(j)}\right)\right) \tag*{(29)}

nn is the iteration index, jj is the ensemble member (columns in the matrix) in the ensemble size JJ. αn\alpha_{n} is a (crucial) regularisation dampener, CnuGC_{n}^{uG} and CnGGC_{n}^{GG} are cross-covariance matrixes to be explained shortly, ξ∼N(0,1)\xi\sim\mathcal{N}(0,1).

CnGG=1J−1∑j=1J(G(un(j))−G(un(j))‾)⊗(G(un(j))−G(un(j))‾)(30)C_{n}^{GG}=\frac{1}{J-1}\sum_{j=1}^{J}\left(G\left(u_{n}^{(j)}\right)-\overline{G\left(u_{n}^{(j)}\right)}\right)\otimes\left(G\left(u_{n}^{(j)}\right)-\overline{G\left(u_{n}^{(j)}\right)}\right) \tag*{(30)}
CnuG=1J−1∑j=1J((un(j))−(un(j))‾)⊗(G(un(j))−G(un(j))‾)(31)C_n^{uG} = \frac{1}{J-1}\sum_{j=1}^{J}\left(\left(u_n^{(j)}\right)-\overline{\left(u_n^{(j)}\right)}\right)\otimes\left(G\left(u_n^{(j)}\right)-\overline{G\left(u_n^{(j)}\right)}\right) \tag*{(31)}

In the developed aREKI method, the dampening parameter α\alpha 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:

  • {u0(j)}j=1J\left\{u_0^{(j)}\right\}_{j=1}^{J} ▷ prior density

  • yy ▷ measurements

  • Γ\Gamma ▷ measurement errors covariance

  • iteriter ▷ iteration

  1. Initialize: sn=0s_n=0, n=0n=0

  2. while (sn<1s_n<1) or (n≤itern\le iter) do

  3. Compute: G(un(j))G\left(u_n^{(j)}\right), j∈{1,…,J}j\in\{1,\ldots,J\}

  4. Compute: Φn≡{12∥Γ−1/2(y−G(un))∥22}j=1J\Phi_n\equiv\left\{\frac{1}{2}\left\|\Gamma^{-1/2}\left(y-G(u_n)\right)\right\|_2^2\right\}_{j=1}^{J}

  5. Compute: Φ‾n\overline{\Phi}_n, σΦn2\sigma_{\Phi_n}^2 ▷ mean & variance

  6. Compute: αn=1min⁡{max⁡{Ly2Φn,Ly2σΦn2},1−sn}\alpha_n=\frac{1}{\min\left\{\max\left\{\frac{L_y}{2\Phi_n},\sqrt{\frac{L_y}{2\sigma_{\Phi_n}^2}}\right\},1-s_n\right\}}

  7. Compute: sn=sn+1αns_n=s_n+\frac{1}{\alpha_n}

  8. Compute: CnGG=1J−1∑j=1J(G(un(j))−G(un(j))‾)⊗(G(un(j))−G(un(j))‾)C_n^{GG}=\frac{1}{J-1}\sum_{j=1}^{J}\left(G\left(u_n^{(j)}\right)-\overline{G\left(u_n^{(j)}\right)}\right)\otimes\left(G\left(u_n^{(j)}\right)-\overline{G\left(u_n^{(j)}\right)}\right)

  9. Compute: CnuG=1J−1∑j=1J(un(j)−un(j)‾)⊗(G(un(j))−G(un(j))‾)C_n^{uG}=\frac{1}{J-1}\sum_{j=1}^{J}\left(u_n^{(j)}-\overline{u_n^{(j)}}\right)\otimes\left(G\left(u_n^{(j)}\right)-\overline{G\left(u_n^{(j)}\right)}\right)

  10. Update ensemble: un+1(j)=un(j)+CnuG(CnGG+αnΓ)−1(y+αnξn−G(un(j)))u_{n+1}^{(j)}=u_n^{(j)}+C_n^{uG}\left(C_n^{GG}+\alpha_n\Gamma\right)^{-1}\left(y+\sqrt{\alpha_n}\xi_n-G\left(u_n^{(j)}\right)\right)

  11. Increment: n←n+1n\leftarrow n+1

  12. end while

  13. Output: u(j)u^{(j)} ▷ 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. ρ\rho 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 ‘∘\circ’ 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, ρ\rho 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 ρ\rho 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].

ρ={−14(∣z∣c)5+12(∣z∣c)4+58(∣z∣c)3−53(∣z∣c)2+1,0≤∣z∣≤c,112(∣z∣c)5−12(∣z∣c)4+58(∣z∣c)3+53(∣z∣c)2−5(∣z∣c)+4−23(∣z∣c),c≤∣z∣≤2c,0,2c≤∣z∣.(32)\rho=\begin{cases} -\frac{1}{4}\left(\frac{|z|}{c}\right)^5+\frac{1}{2}\left(\frac{|z|}{c}\right)^4+\frac{5}{8}\left(\frac{|z|}{c}\right)^3-\frac{5}{3}\left(\frac{|z|}{c}\right)^2+1, & 0\le|z|\le c,\\ \frac{1}{12}\left(\frac{|z|}{c}\right)^5-\frac{1}{2}\left(\frac{|z|}{c}\right)^4+\frac{5}{8}\left(\frac{|z|}{c}\right)^3+\frac{5}{3}\left(\frac{|z|}{c}\right)^2-5\left(\frac{|z|}{c}\right)+4-\frac{2}{3}\left(\frac{|z|}{c}\right), & c\le|z|\le2c,\\ 0, & 2c\le|z|. \end{cases} \tag*{(32)}
un+1(j)=un(j)+ρ∘CnuG(CnGG+αnΓ)−1(y+αnξn−G(un(j))),j∈{1,…,J}(33)u_{n+1}^{(j)}=u_n^{(j)}+\rho\circ C_n^{uG}\left(C_n^{GG}+\alpha_n\Gamma\right)^{-1}\left(y+\sqrt{\alpha_n}\xi_n-G\left(u_n^{(j)}\right)\right),\quad j\in\{1,\ldots,J\} \tag*{(33)}

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 D={(xi,yi)}i=1N\mathcal{D}=\{(x_i,y_i)\}_{i=1}^{N}, where xi∈Rdx_i\in\mathbb{R}^{d} are the inputs and the outputs yi∈Ry_i\in\mathbb{R} for regression or yi∈{0,1,…,J}y_i\in\{0,1,\ldots,J\} for classification. Postulating amongst a family of ansatz f(⋅;θ)f(\cdot;\theta), parametrized by θ∈RP\theta\in\mathbb{R}^{P}, we can find a θ∗\theta^{*} such that for all i=1,…,Ni=1,\ldots,N, yi=f(xi;θ∗)y_i=f(x_i;\theta^{*}). Then for all x′x' in the set {xi}i=1N\{x_i\}_{i=1}^{N}, y′≈f(x′;θ∗)y'\approx f(x';\theta^{*}), where y′y' is the true label of x′x'. [10] [45, 12]. Assume (xi,yi)∈X×Y(x_i,y_i)\in\mathcal{X}\times\mathcal{Y} are the input and output pairs of a model shown in Eqn. 10a.

yi≈f(xi)(34)y_i\approx f(x_i) \tag*{(34)}

f:X→Yf:\mathcal{X}\to\mathcal{Y} is irregular and has sharp features, very non-linear and has noticeable discontinuities, The output space is taken as Y=R\mathcal{Y}=\mathbb{R} and X=Rd\mathcal{X}=\mathbb{R}^{d}

Cluster

In this stage, we seek to cluster the training input and output pairs. λ:X×Y→L:={1,…,L}\lambda:\mathcal{X}\times\mathcal{Y}\to\mathcal{L}:=\{1,\ldots,L\} where the label function minimizes,

Φclust(λ)=∑l=1L∑i∈Slℓ(xi,yi)(35)\Phi_{clust}(\lambda)=\sum_{l=1}^{L}\sum_{i\in S_l}\ell(x_i,y_i) \tag*{(35)}
Sl={(xi,yi);λ(xi,yi)=l}(36)S_l=\{(x_i,y_i);\lambda(x_i,y_i)=l\} \tag*{(36)}

ℓl\ell_l loss function associated to cluster ll

zi=(xi,yi),ℓl=∣zi−μl∣2(37)z_i=(x_i,y_i),\ell_l=|z_i-\mu_l|^2 \tag*{(37)}
μl=1∣Sl∣∑i∈Slzi\mu_l=\frac{1}{|S_l|}\sum_{i\in S_l}z_i

where ∣⋅∣|\cdot| denotes the Euclidean norm

Classify

li=λ(xi,yi)l_i=\lambda(x_i,y_i) is an expanded training set

{(xi,yi,li)}i=1N(38)\{(x_i,y_i,l_i)\}_{i=1}^{N} \tag*{(38)}
fc:X→L(39)f_c:\mathcal{X}\to\mathcal{L} \tag*{(39)}

x∈Xx\in\mathcal{X} provides an estimate fc: x↦f(x)∈Lf_c:\ x\mapsto f(x)\in\mathcal{L} such that fc(xi)=lif_c(x_i)=l_i for most of the data. Crucial for the ultimate fidelity of the prediction. {yi}\{y_i\} is ignored at this phase. The classification function minimizes,

Φclust(fc)=∑i=1Nϕc(li,fc(xi))(40)\Phi_{clust}(f_c)=\sum_{i=1}^{N}\phi_c(l_i,f_c(x_i)) \tag*{(40)}

ϕc:L×L→R+\phi_c:\mathcal{L}\times\mathcal{L}\to\mathbb{R}_{+} is small if fc(xi)=lif_c(x_i)=l_i for example we can choose fc(x)=argmax⁡l∈Lgl(x)f_c(x)=\operatorname{argmax}_{l\in\mathcal{L}}g_l(x) where gl(x)>0g_l(x)>0, ∑l=1Lgl(x)\sum_{l=1}^{L}g_l(x) is a soft classifier and ϕc(li,fc(xi))=−log⁡(gl(x))\phi_c(l_i,f_c(x_i))=-\log(g_l(x)) is a cross-entropic loss.

Regress

fr:X×L→Y(41)f_r:\mathcal{X}\times\mathcal{L}\to\mathcal{Y} \tag*{(41)}

For each (x,l)∈X×L(x,l)\in\mathcal{X}\times\mathcal{L} must provide an estimate fr:(x,l)↦fr(x,l)∈Yf_r:(x,l)\mapsto f_r(x,l)\in\mathcal{Y} such that fr(x,fc(x))≈yf_r(x,f_c(x))\approx y for both the training and test data. If successful a good reconstruction for

f:X→Y(42)f:\mathcal{X}\to\mathcal{Y} \tag*{(42)}

Where f(.)=fr(.,fc(.))f(.)=f_r(.,f_c(.)) the regression function can be found by minimizing

Φr(fr)=∑i=1Nϕr(yi,fr(xi,fc(xi)))(43)\Phi_r(f_r)=\sum_{i=1}^{N}\phi_r(y_i,f_r(x_i,f_c(x_i))) \tag*{(43)}

Where ϕr:Y×Y→R+\phi_r:\mathcal{Y}\times\mathcal{Y}\to\mathbb{R}_{+} minimized when fr(xi,fc(xi))=yif_r(x_i,f_c(x_i))=y_i in this case can be chosen as ϕr(y,fr(x,fc(x)))=∣y−fr(x,fc(x))∣2\phi_r(y,f_r(x,f_c(x)))=|y-f_r(x,f_c(x))|^2. Data can be partitioned into Cl={i;fc(xi)=l}C_l=\{i;f_c(x_i)=l\} for l=1,…Ll=1,\ldots L and then perform LL separate regressions done in parallel.

Φrl(fr(.,l))=∑i∈Clϕr(yi,fr(xi,l))(44)\Phi_r^{l}(f_r(.,l))=\sum_{i\in C_l}\phi_r(y_i,f_r(x_i,l)) \tag*{(44)}

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,

D={(xi,yi)}i=1N(45)D = \{(x_i,y_i)\}_{i=1}^{N} \tag*{(45)}

Assume parametric models for the classifier gl(.;θc)=gl(.;θcl)g_l(.;\theta_c) = g_l(.;\theta_c^l) and the regressor fr(.,l;θrl)f_r(.,l;\theta_r^l) for l=1,…,Ll=1,\ldots,L where θc=(θc1,…,θcL)\theta_c=(\theta_c^1,\ldots,\theta_c^L) and θr=(θr1,…,θrL)\theta_r=(\theta_r^1,\ldots,\theta_r^L) and let θ=(θc,θr)\theta=(\theta_c,\theta_r), the posterior density has the form,

π(θ,l∣D)∝∏i=1Nπ(yi∣xi,θr,l)π(l∣xi,θc)π(θr)π(θc)(46)\pi(\theta,l\mid D) \propto\prod_{i=1}^{N}\pi(y_i\mid x_i,\theta_r,l)\pi(l\mid x_i,\theta_c)\pi(\theta_r)\pi(\theta_c) \tag*{(46)}
π(yi∣xi,θr,l)∝exp⁡(−12∣yi−fr(xi,l;θrl)∣2)(47)\pi(y_i\mid x_i,\theta_r,l) \propto\exp\left(-\frac{1}{2}\left|y_i-f_r(x_i,l;\theta_r^l)\right|^2\right) \tag*{(47)}

And

π(l∣xi,θc)=gl(xi;θc)(48)\pi(l\mid x_i,\theta_c)=g_l(x_i;\theta_c) \tag*{(48)}
gl(xi;θc)=exp⁡(hl(x;θcl))∑l=1Lexp⁡(hl(x;θcl))(49)g_l(x_i;\theta_c)=\frac{\exp\left(h_l(x;\theta_c^l)\right)}{\sum_{l=1}^{L}\exp\left(h_l(x;\theta_c^l)\right)} \tag*{(49)}

hl(x;θcl)h_l(x;\theta_c^l) 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 θrl=(μl,ψl)\theta_r^l=(\mu^l,\psi^l):

fr(⋅;θrl)∼GP⁡(μl,Kψl),f_r(\cdot;\theta_r^l)\sim\operatorname{GP}(\mu^l,K_{\psi^l}),

where μl\mu^l is the local mean function of the expert (for simplicity, it assumed to be constant) and ψl\psi^l are the parameters of the covariance function KψlK_{\psi^l}, 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 zz, the GP hyperparameters, which crucially determine the behavior of the unknown function, can be estimated by optimizing the log marginal likelihood:

log⁡(p(y∣x,z))=∑l=1Llog⁡(N(yl∣μl,KNll+σr2lINl))(50)\log(p(\mathbf{y}\mid\mathbf{x},\mathbf{z}))=\sum_{l=1}^{L}\log\left(\mathcal{N}(\mathbf{y}^l\mid\boldsymbol{\mu}^l,\mathbf{K}_{N_l}^l+\sigma_{r}^{2l}\mathbf{I}_{N_l})\right) \tag*{(50)}

where yl\mathbf{y}^l and xl\mathbf{x}^l contain the outputs and inputs of the llth cluster, i.e. yl={yi}zi=l\mathbf{y}^l=\{y_i\}_{z_i=l} and xl={xi}zi=l\mathbf{x}^l=\{x_i\}_{z_i=l}; μl\boldsymbol{\mu}^l is a vector with entries μl\mu^l; KNll\mathbf{K}_{N_l}^l represents the Nl×NlN_l\times N_l matrix obtained by evaluating the covariance function KψlK_{\psi^l} at each pair of inputs in the llth cluster; and NlN_l is number data points in the llth cluster. This however requires inversion of Nl×NlN_l\times N_l matrices, which scales O(∑l=1LNl3)\mathcal{O}(\sum_{l=1}^{L}N_l^3). While this reduces the computational complexity compared with standard GP models which scale O(N3)\mathcal{O}(N^3), 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 Ml<NlM_l<N_l pseudo-inputs x~l=(x~1l,…,x~Mll)\tilde{\mathbf{x}}^l=(\tilde{x}_1^l,\ldots,\tilde{x}_{M_l}^l) and pseudo-targets f~l=(f~1l,…,f~Mll)\tilde{\mathbf{f}}^l=(\tilde{f}_1^l,\ldots,\tilde{f}_{M_l}^l);

p(yl∣xl,x~l,f~l)=∏i:zi=lN(yi∣μ^il,σ^i2l)(51)p(\mathbf{y}^l\mid\mathbf{x}^l,\tilde{\mathbf{x}}^l,\tilde{\mathbf{f}}^l)=\prod_{i:z_i=l}\mathcal{N}(y_i\mid\hat{\mu}_i^l,\hat{\sigma}_i^{2l}) \tag*{(51)}

where

μ^il=μl+(kMl,il)T(KMll)−1(f~l−μl),\hat{\mu}_i^l=\mu^l+(\mathbf{k}_{M_l,i}^l)^{T}(\mathbf{K}_{M_l}^l)^{-1}(\tilde{\mathbf{f}}^l-\mu^l),
σ^i2l=σr2l+Kψl(xi,xi)−(kMl,il)T(KMll)−1kMl,il,\hat{\sigma}_i^{2l}=\sigma_r^{2l}+K_{\psi^l}(x_i,x_i)-(\mathbf{k}_{M_l,i}^l)^{T}(\mathbf{K}_{M_l}^l)^{-1}\mathbf{k}_{M_l,i}^l,

where KψlK_{\psi^l} is the Ml×MlM_l \times M_l matrix with elements Kψl(x~il,x~jl)K_{\psi^l}(\tilde{x}_i^l,\tilde{x}_j^l) and kMl,ilk_{M_l,i}^l is the vector of length MlM_l with elements Kψl(x~jl,xi)K_{\psi^l}(\tilde{x}_j^l,x_i). This corresponds to the fully independent training conditional (FITC) approximation [35]. After marginalization of the pseudo-targets under the GP prior f~l∼N(μl,KMll)\tilde{f}^l \sim\mathcal{N}(\mu^l,K_{M_l}^l), the pseudo-inputs x~l\tilde{x}^l and hyperparameters (μl,ψl)(\mu^l,\psi^l) can be estimated by optimizing the marginal likelihood:

log⁡(p(y∣x,z,x~))=∑l=1Llog⁡(N(yl∣μl,(KMlNll)T(KMll)−1KMlNll+Λl+σr2INl)),(52)\log(p(\mathbf{y}|\mathbf{x},\mathbf{z},\tilde{\mathbf{x}})) = \sum_{l=1}^{L} \log\left(\mathcal{N}\left(\mathbf{y}^l \mid\boldsymbol{\mu}^l,(\mathbf{K}_{M_lN_l}^l)^{T}(\mathbf{K}_{M_l}^l)^{-1}\mathbf{K}_{M_lN_l}^l+\boldsymbol{\Lambda}^l+\sigma_r^{2}\mathbf{I}_{N_l}\right)\right), \tag*{(52)}

where KMlNll\mathbf{K}_{M_lN_l}^l is the Ml×NlM_l \times N_l matrix with columns kMl,ilk_{M_l,i}^l, and Λl\boldsymbol{\Lambda}^l is the diagonal matrix with diagonal entries Kψl(xi,xi)−(kMl,il)T(KMll)−1kMl,ilK_{\psi^l}(x_i,x_i)-(k_{M_l,i}^l)^{T}(\mathbf{K}_{M_l}^l)^{-1}k_{M_l,i}^l. This strategy allows us to reduce the complexity to O(∑l=1LNlMl2)\mathcal{O}(\sum_{l=1}^{L}N_lM_l^2).

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 x∈Rdx \in\mathbb{R}^{d} to the parameters of a variational distribution over the latent variables z∈Rkz \in\mathbb{R}^{k}. The encoder outputs the mean and log variance of a Gaussian distribution:

qϕ(z∣x)=N(z;μϕ(x),σϕ2(x)I)(53)q_{\phi}(z|x) = \mathcal{N}(z;\mu_{\phi}(x),\sigma_{\phi}^{2}(x)\mathbf{I}) \tag*{(53)}
μϕ(x)=ConvNet⁡μ(x)(54)\mu_{\phi}(x) = \operatorname{ConvNet}_{\mu}(x) \tag*{(54)}
log⁡σϕ2(x)=ConvNet⁡log⁡σ2(x)(55)\log\sigma_{\phi}^{2}(x) = \operatorname{ConvNet}_{\log\sigma^{2}}(x) \tag*{(55)}

where ϕ\phi denotes the parameters of the encoder network.

Decoder

The decoder is a deconvolutional neural network that maps the latent variables zz back to the data space, producing the parameters of a generative distribution over xx:

pθ(x∣z)=N(x;μθ(z),σθ2(z)I)(56)p_{\theta}(x|z) = \mathcal{N}(x;\mu_{\theta}(z),\sigma_{\theta}^{2}(z)\mathbf{I}) \tag*{(56)}

where θ\theta denotes the parameters of the decoder network, and μθ(z)\mu_{\theta}(z) and log⁡σθ2(z)\log\sigma_{\theta}^{2}(z) are outputs of the deconvolutional network.

Evidence Lower Bound (ELBO)

The VCAE maximizes the evidence lower bound (ELBO) to approximate the true posterior distribution p(z∣x)p(z|x):

L(θ,ϕ;x)=Eqϕ(z∣x)[log⁡pθ(x∣z)]−DKL(qϕ(z∣x)∥p(z))(57)\mathcal{L}(\theta,\phi;x) = \mathbb{E}_{q_{\phi}(z|x)}[\log p_{\theta}(x|z)]-D_{\mathrm{KL}}(q_{\phi}(z|x)\|p(z)) \tag*{(57)}
=Eqϕ(z∣x)[log⁡N(x;μθ(z),σθ2(z)I)]−DKL(N(z;μϕ(x),σϕ2(x)I)∥N(0,I))(58)= \mathbb{E}_{q_{\phi}(z|x)}[\log\mathcal{N}(x;\mu_{\theta}(z),\sigma_{\theta}^{2}(z)\mathbf{I})]-D_{\mathrm{KL}}(\mathcal{N}(z;\mu_{\phi}(x),\sigma_{\phi}^{2}(x)\mathbf{I})\|\mathcal{N}(0,\mathbf{I})) \tag*{(58)}

The first term is the reconstruction loss, and the second term is the Kullback-Leibler (KL) divergence between the approximate posterior qϕ(z∣x)q_{\phi}(z|x) and the prior p(z)p(z).

Algorithm 3 CCR

1: Input: Set of labeled data D={(xi,yi)}i=1N\mathcal{D} = \{(x_i,y_i)\}_{i=1}^{N} where xi∈Rdx_i \in\mathbb{R}^{d} and yi∈Ry_i \in\mathbb{R} 2: Output: Refined model estimation f(x;θccr)=fr(x,fc(x))f(x;\theta_{\mathrm{ccr}}) = f_r(x,f_c(x)) 3: 4: function CLUSTER⁡(D)\operatorname{CLUSTER}(\mathcal{D}) 5: &nbsp;&nbsp;&nbsp;&nbsp;Initialize λ:Rd×R→{1,…,L}\lambda: \mathbb{R}^{d} \times\mathbb{R} \to\{1,\ldots,L\} 6: &nbsp;&nbsp;&nbsp;&nbsp;for each (xi,yi)∈D(x_i,y_i) \in\mathcal{D} do 7: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assign (xi,yi)(x_i,y_i) to a cluster l=λ(xi,yi)l = \lambda(x_i,y_i) 8: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculate Sl={(xi,yi):λ(xi,yi)=l}S_l = \{(x_i,y_i) : \lambda(x_i,y_i) = l\} 9: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculate cluster center μl=1∣Sl∣∑i∈Sl(xi,yi)\mu_l = \frac{1}{|S_l|}\sum_{i\in S_l}(x_i,y_i) 10: &nbsp;&nbsp;&nbsp;&nbsp;end for 11: &nbsp;&nbsp;&nbsp;&nbsp;Minimize Φclust(λ)=∑l=1L∑i∈Sl∣zi−μl∣2\Phi_{\mathrm{clust}}(\lambda) = \sum_{l=1}^{L}\sum_{i\in S_l}|z_i-\mu_l|^{2} 12: end function 13: 14: function CLASSIFY⁡(D,λ)\operatorname{CLASSIFY}(\mathcal{D},\lambda) 15: &nbsp;&nbsp;&nbsp;&nbsp;for each (xi,yi)∈D(x_i,y_i) \in\mathcal{D} do 16: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Classify li=λ(xi,yi)l_i = \lambda(x_i,y_i) 17: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Define fc(xi)←arg⁡max⁡l∈Lgl(xi)f_c(x_i) \leftarrow\arg\max_{l\in\mathcal{L}} g_l(x_i) 18: &nbsp;&nbsp;&nbsp;&nbsp;end for 19: &nbsp;&nbsp;&nbsp;&nbsp;Minimize Φclust(fc)=∑i=1N−log⁡(gli(xi))\Phi_{\mathrm{clust}}(f_c) = \sum_{i=1}^{N}-\log(g_{l_i}(x_i)) 20: end function 21: 22: function REGRESS⁡(D,fc)\operatorname{REGRESS}(\mathcal{D},f_c) 23: &nbsp;&nbsp;&nbsp;&nbsp;for each (xi,yi,li)(x_i,y_i,l_i) do 24: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Estimate fr(xi,li)≈yif_r(x_i,l_i) \approx y_i using the regression model 25: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Minimize Φr(fr)=∑i=1N(yi−fr(xi,fc(xi)))2\Phi_r(f_r) = \sum_{i=1}^{N}(y_i-f_r(x_i,f_c(x_i)))^{2} 26: &nbsp;&nbsp;&nbsp;&nbsp;end for 27: end function

Algorithm 4 Variational Convolutional Autoencoder (VCAE)

1: Initialize encoder parameters ϕ\phi and decoder parameters ψ\psi 2: Input image xx 3: Encode xx to get latent variables: z,μ,σ=Encoder⁡ϕ(x)z,\mu,\sigma= \operatorname{Encoder}_{\phi}(x) 4: Sample latent space: z∼N(μ,σ2)z \sim\mathcal{N}(\mu,\sigma^{2}) 5: Decode zz to reconstruct the image: x^=Decoder⁡ψ(z)\hat{x} = \operatorname{Decoder}_{\psi}(z) 6: Compute loss: L=Reconstruction Loss⁡(x^,x)+KL Divergence⁡(μ,σ)\mathcal{L} = \operatorname{Reconstruction\ Loss}(\hat{x},x) + \operatorname{KL\ Divergence}(\mu,\sigma) 7: Update parameters ϕ\phi and ψ\psi to minimize L\mathcal{L} 8: Output: Return the reconstructed image x^\hat{x}

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 x0x_0 through a sequence of latent variables xtx_t:

q(xt∣xt−1)=N(xt;αtxt−1,(1−αt)I)(59)q(x_t \mid x_{t-1}) = \mathcal{N}\left(x_t; \sqrt{\alpha_t}x_{t-1},(1-\alpha_t)\mathbf{I}\right) \tag*{(59)}

where αt\alpha_t 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:

p(xt−1∣xt)=N(xt−1;μθ(xt,t),σθ2(xt,t)I)(60)p(x_{t-1} \mid x_t) = \mathcal{N}\left(x_{t-1};\mu_{\theta}(x_t,t),\sigma_{\theta}^{2}(x_t,t)\mathbf{I}\right) \tag*{(60)}

where μθ(xt,t)\mu_{\theta}(x_t,t) and σθ2(xt,t)\sigma_{\theta}^{2}(x_t,t) are parametrized by a neural network, typically conditioned on tt to capture the step-dependent dynamics.

Sampling

Sampling from a DDIM involves iteratively applying the reverse diffusion process starting from noise:

xT∼N(0,I)(61)x_T \sim\mathcal{N}(0,\mathbf{I}) \tag*{(61)}
xt−1=μθ(xt,t)+σθ(xt,t)ε,ε∼N(0,I)(62)x_{t-1} = \mu_\theta(x_t,t) + \sigma_\theta(x_t,t)\varepsilon,\qquad\varepsilon\sim\mathcal{N}(0,\mathbf{I}) \tag*{(62)}

The sequence continues until x0x_0 is reached, effectively denoising the data to retrieve an approximation of the original sample.

Algorithm 5 Denoising Diffusion Implicit Model (DDIM)

  1. Initialize parameters θ\theta

  2. Set number of diffusion steps TT

  3. Sample initial noise xT∼N(0,I)x_T \sim\mathcal{N}(0,\mathbf{I})

  4. for t=Tt = T to 1 do

  5. Compute deterministic step x^t−1=fθ(xt,t)\hat{x}_{t-1} = f_\theta(x_t,t), where ff is the denoising function

  6. end for

  7. Output: Return the generated sample x^0\hat{x}_0

XGBoost

The objective function in XGBoost can be expressed as [59]:

L(Θ)=∑i=1nl(y^i,yi)+∑k=1KΩ(fk)(63)\mathcal{L}(\Theta) = \sum_{i=1}^{n} l(\hat{y}_i,y_i) + \sum_{k=1}^{K} \Omega(f_k) \tag*{(63)}

where:

  • y^i\hat{y}_i is the predicted value for the ii-th instance.

  • yiy_i is the true value for the ii-th instance.

  • ll is a differentiable convex loss function that measures the difference between the prediction y^i\hat{y}_i and the target yiy_i.

  • fkf_k represents the kk-th tree in the model.

  • Ω(fk)\Omega(f_k) 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:

y^i(t)=y^i(t−1)+ft(xi)(64)\hat{y}_i^{(t)} = \hat{y}_i^{(t-1)} + f_t(x_i) \tag*{(64)}

where:

  • y^i(t)\hat{y}_i^{(t)} is the prediction of the ii-th instance at the tt-th iteration.

  • ftf_t is the function (tree) added in the tt-th iteration.

Model Complexity

The regularization term Ω\Omega is defined as:

Ω(f)=γT+12λ∑j=1Twj2(65)\Omega(f) = \gamma T + \frac{1}{2}\lambda\sum_{j=1}^{T} w_j^2 \tag*{(65)}

where:

  • TT is the number of leaves in the tree.

  • wjw_j is the score on the jj-th leaf.

  • γ\gamma and λ\lambda 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:

L(t)≈∑i=1n[l(yi,y^i(t−1)+ft(xi))]+Ω(ft)(66)\mathcal{L}^{(t)} \approx\sum_{i=1}^{n} \left[ l\left(y_i,\hat{y}_i^{(t-1)} + f_t(x_i)\right) \right] + \Omega(f_t) \tag*{(66)}

Using a second-order Taylor expansion, we can approximate the loss function:

L(t)≈∑i=1n[gift(xi)+12hift(xi)2]+Ω(ft)(67)\mathcal{L}^{(t)} \approx\sum_{i=1}^{n} \left[ g_i f_t(x_i) + \frac{1}{2} h_i f_t(x_i)^2 \right] + \Omega(f_t) \tag*{(67)}

where:

  • gi=∂l(yi,y^i)∂y^ig_i = \frac{\partial l(y_i,\hat{y}_i)}{\partial\hat{y}_i} is the first derivative of the loss function.

  • hi=∂2l(yi,y^i)∂y^i2h_i = \frac{\partial^2 l(y_i,\hat{y}_i)}{\partial\hat{y}_i^2} is the second derivative of the loss function.

The structure score of a tree can then be calculated as:

Lsplit=12[(∑i∈ILgi)2∑i∈ILhi+λ+(∑i∈IRgi)2∑i∈IRhi+λ−(∑i∈Igi)2∑i∈Ihi+λ]−γ(68)\mathcal{L}_{\mathrm{split}} = \frac{1}{2} \left[ \frac{\left(\sum_{i \in I_L} g_i\right)^2}{\sum_{i \in I_L} h_i + \lambda} + \frac{\left(\sum_{i \in I_R} g_i\right)^2}{\sum_{i \in I_R} h_i + \lambda} - \frac{\left(\sum_{i \in I} g_i\right)^2}{\sum_{i \in I} h_i + \lambda} \right] - \gamma \tag*{(68)}

where II is the set of indices of data points, ILI_L and IRI_R are the sets of indices for the left and right children after the split, respectively.

Prediction

The final prediction for a given instance xix_i is:

y^i=∑t=1Tft(xi)(69)\hat{y}_i = \sum_{t=1}^{T} f_t(x_i) \tag*{(69)}

where TT 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 (KK, ϕ\phi) 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 MlM_l based on the cluster sizes [7]. The pseudo-inputs x~l\tilde{x}_l are initialized via K-means and the GP hyperparameters are initialized based on the scale of the data. The number of experts LL is determined a priori using the Bayesian information criterion (BIC) to compare the GMM clustering solutions of the rescaled (y,x)(y,x) across different values of LL. 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 woprwopr, wwprwwpr, wgprwgpr (well oil/water and gas production rates). The Peacemann analytical well model is described in Eqn.18a

Q=2πKkrh(Pavg−Pwf)μBln⁡(rerw)+s(70)Q = \frac{2\pi K k_r h(P_{\mathrm{avg}} - P_{\mathrm{wf}})}{\mu B \ln\left(\frac{r_e}{r_w}\right) + s} \tag*{(70)}

Where:

  • QQ is the flow rate.

  • KkrK k_r is the absolute permeability of the reservoir at the voxel location of the well.

  • krk_r is the relative permeability which is a function of water and gas saturation.

  • hh is the thickness of the reservoir.

  • PavgP_{\mathrm{avg}} is the average reservoir pressure.

  • PwfP_{\mathrm{wf}} is the bottom hole flowing pressure.

  • μ\mu is the viscosity of the fluid.

  • BB is the formation volume factor.

  • rer_e is the effective drainage radius.

  • rwr_w is the radius of the wellbore.

  • ss 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.

fccr(K,f1(:,θp),f2(:,θs),f3(:,θg);θccr)(71)f_{\mathrm{ccr}}(K, f_1(:,\theta_p), f_2(:,\theta_s), f_3(:,\theta_g);\theta_{\mathrm{ccr}}) \tag*{(71)}

We parametrise the permeability field by first using the encoder from Algorithm 4 to get the latent state uxu_x. We correct the Kalman Gain matrix with the compact support Gaspari and Cohn matrix. We then correct these states (ux,FTM,ϕ)(u_x, FTM, \phi) with aREKI and we recover the spatial permeability (KK) 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 (ii) is defined as

RMSE⁡(i)=(1N∑k=1N∑j=1Ndatak(Dobsj(k)−Dsim,ij(k)σn,j)2)12(72)\operatorname{RMSE}(i) = \left(\frac{1}{N}\sum_{k=1}^{N}\sum_{j=1}^{N_{\mathrm{data}}^k}\left(\frac{D_{\mathrm{obs}}^j(k)-D_{\mathrm{sim},i}^j(k)}{\sigma_{n,j}}\right)^2\right)^{\frac{1}{2}} \tag*{(72)}

NN: Number of data assimilation time steps where measurements are assimilated (measurement times) NdatakN_{\mathrm{data}}^k: Number of data collected at each time step kk ii: Ensemble member index kk: Time index jj: Metric or response (history matched metric or response) Dobsj(k)D_{\mathrm{obs}}^j(k): Observed data metric for metrics jj (Data equivalent in state space ensemble) at time step kk. Dsimj(k)D_{\mathrm{sim}}^{j}(k): Simulated data from simulator for metrics jj (Data equivalent in state space ensemble) at time step kk. σn,j\sigma_{n,j}: Observed data standard deviation for metrics jj (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 nx,ny,nz=46,112,22n_x,n_y,n_z = 46,112,22. 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.

Forwarding of the Norne Field

Figure 3. Forwarding of the Norne Field. Nx=46,Ny=112,Nz=22N_x = 46,N_y = 112,N_z = 22. 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).

Forwarding of the Norne Field

Figure 6. Forwarding of the Norne Field. Nx=46N_x = 46, Ny=112N_y = 112, Nz=22N_z = 22. 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.

PropertyValue
Grid Configuration46×112×2246 \times112 \times22
Grid size50×50×2050 \times50 \times20 ft
# of producers22
# of injectors13
Simulation period3,298 days
Integration step length100 days
# of integration steps30
Reservoir depth4,000 ft
Initial Reservoir pressure1,000 psia
Injector’s constraint500 STB/day
Producer’s constraint100 psia
Residual oil saturation0.2
Connate water saturation0.2
Petro-physical property distributionGaussian permeability/porosity
Uncertain parameters to estimateDistributed permeability, porosity, Fault transmissibility multiplier

Table 1. Norne reservoir model simulation properties

Algorithm 6 PINO - CCR Reservoir Simulator

Require: X0={K,FTM,ϕ,Pini,Sini}∈RB×1×D×W×HX_0 = \{K,FTM,\phi,P_{\mathrm{ini}},S_{\mathrm{ini}}\} \in\mathbb{R}^{B \times1 \times D \times W \times H}, f1(:,θp)f_1(:,\theta_p) - FNO pressure surrogate, f2(:,θs)f_2(:,\theta_s) - FNO Water saturation surrogate, f3(:,θg)f_3(:,\theta_g) - Gas saturation surrogate, fccr(:,θccr)f_{\mathrm{ccr}}(:,\theta_{\mathrm{ccr}}) - CCR Peaceman surrogate, NprN_{\mathrm{pr}} - Number of producers, ipef,jpef,kpefi_{\mathrm{pef}},j_{\mathrm{pef}},k_{\mathrm{pef}} - locations/completions, Nx,Ny,NzN_x,N_y,N_z - size of the reservoir domain, shutinTshut_{inT} - Boolean representing well shut-in state, TT - Time index

Ensure: YoutY_{\mathrm{out}}

1: Compute: Y1p=f1(X0;θp)Y_{1p}=f_1(X_0;\theta_p), Y1s=f2(X0;θs)Y_{1s}=f_2(X_0;\theta_s), Y1g=f3(X0;θg)Y_{1g}=f_3(X_0;\theta_g)

2: Construct:

X1=[if shutinT=True0,0,0,01Nz∑k=1NzKipef,jpef,k,if shutinT=False1Npr∑n=1Npr1Nz∑k=1Nzf1(X1,θp)ipefn,jpefn,k,1Nz∑k=1Nzf2(X1,θs)ipefn,jpefn,k,1Nz∑k=1Nzf3(X1,θg)ipefn,jpefn,k,1−(1Nz∑k=1Nzf2(X1,θs)ipefn,jpefn,k+1Nz∑k=1Nzf3(X1,θg)ipefn,jpefn,k)]X_1 = \left[ \begin{array}{ll} \text{if } shut_{inT}=\mathrm{True} & 0,0,0,0 \\ & \dfrac{1}{N_z}\sum_{k=1}^{N_z}K_{i_{\mathrm{pef}},j_{\mathrm{pef}},k}, \\ \text{if } shut_{inT}=\mathrm{False} & \dfrac{1}{N_{\mathrm{pr}}}\sum_{n=1}^{N_{\mathrm{pr}}}\dfrac{1}{N_z}\sum_{k=1}^{N_z}f_1(X_1,\theta_p)_{i_{\mathrm{pef}_n},j_{\mathrm{pef}_n},k}, \\ & \dfrac{1}{N_z}\sum_{k=1}^{N_z}f_2(X_1,\theta_s)_{i_{\mathrm{pef}_n},j_{\mathrm{pef}_n},k}, \\ & \dfrac{1}{N_z}\sum_{k=1}^{N_z}f_3(X_1,\theta_g)_{i_{\mathrm{pef}_n},j_{\mathrm{pef}_n},k}, \\ & 1-\left(\dfrac{1}{N_z}\sum_{k=1}^{N_z}f_2(X_1,\theta_s)_{i_{\mathrm{pef}_n},j_{\mathrm{pef}_n},k}+\dfrac{1}{N_z}\sum_{k=1}^{N_z}f_3(X_1,\theta_g)_{i_{\mathrm{pef}_n},j_{\mathrm{pef}_n},k}\right) \end{array} \right]

3: Compute: Yout=fccr(X1;θccr)∈RB×1×T×3NprY_{\mathrm{out}}=f_{\mathrm{ccr}}(X_1;\theta_{\mathrm{ccr}})\in\mathbb{R}^{B\times1\times T\times3N_{\mathrm{pr}}}              ▹\triangleright wopr, wwpr, wgpr

4: Output: YoutY_{\mathrm{out}}

Algorithm 7 Adaptive Regularized Kalman Inversion (aREKI) using PINO-CCR and VCAE/DDIM exotic priors

Require:

  • X0={K,FTM,ϕ,Pini,Sini}∈RB1×1×D×W×HX_0 = \{K, FTM, \phi, P_{\mathrm{ini}}, S_{\mathrm{ini}}\} \in\mathbb{R}^{B_1 \times1 \times D \times W \times H} ▷ Initial ensemble

  • f1(:,θp)f_1(:,\theta_p) ▷ PINO pressure surrogate

  • f2(:,θs)f_2(:,\theta_s) ▷ PINO Water saturation surrogate

  • f3(:,θg)f_3(:,\theta_g) ▷ PINO Gas saturation surrogate

  • fccr(:,θccr)f_{\mathrm{ccr}}(:,\theta_{\mathrm{ccr}}) ▷ CCR Peaceman surrogate

  • NprN_{\mathrm{pr}} ▷ Number of producers

  • ipef,jpef,kpefi_{\mathrm{pef}}, j_{\mathrm{pef}}, k_{\mathrm{pef}} ▷ locations/completions

  • Nx,Ny,NzN_x,N_y,N_z ▷ size of the reservoir domain

  • shutinTshutinT ▷ Boolean representing well shut-in state

  • TT ▷ Time index

  • yy ▷ Measurement data

  • Γ\Gamma ▷ Covariance matrix of measurement errors

  • iteriter ▷ Maximum number of iterations

  1. Initialize: sn=0s_n = 0, n=0n = 0

  2. while (sn<1)(s_n < 1) and (n≤iter)(n \leq iter) do

  3. Construct Xn(j)={Kn(j),FTMn(j),ϕn(j),Pini,Sini}X_n^{(j)} = \{K_n^{(j)}, FTM_n^{(j)}, \phi_n^{(j)}, P_{\mathrm{ini}},S_{\mathrm{ini}}\} ▷ tensor ensemble

  4. Compute predictions: G(Xn(j))=fccr(Xn(j);f1(:,θp),f2(:,θs),f3(:,θg);θccr)G(X_n^{(j)}) = f_{\mathrm{ccr}}(X_n^{(j)}; f_1(:,\theta_p), f_2(:,\theta_s), f_3(:,\theta_g); \theta_{\mathrm{ccr}}) for j=1,…,Jj = 1,\ldots,J ▷ Refer to Algorithm 6

  5. Encode KnK_n to get latent variables: uxn,μn,σn=Encoder⁡ϕ(Kn)u_{xn},\mu_n,\sigma_n = \operatorname{Encoder}_{\phi}(K_n) ▷ Refer to Algorithm 5.1.1

  6. Compute residuals: Φn≡{12∥Γ−12(y−G(Xn(j)))∥22}j=1J\Phi_n \equiv\left\{\frac{1}{2}\left\|\Gamma^{-\frac{1}{2}}\left(y-G(X_n^{(j)})\right)\right\|_2^2\right\}_{j=1}^{J}

  7. Compute mean and variance of residuals: Φ‾n,σΦn2\overline{\Phi}_n,\sigma_{\Phi_n}^2

  8. Adjust step size: αn=1min⁡{max⁡{L(y)2Φn,L(y)2σΦn2},1−sn}\alpha_n = \frac{1}{\min\left\{\max\left\{\frac{L(y)}{2\Phi_n},\frac{L(y)}{2\sigma_{\Phi_n}^2}\right\},1-s_n\right\}}

  9. Update accumulated step: sn=sn+1αns_n = s_n + \frac{1}{\alpha_n}

  10. Construct the parameters to recover un(j)=[uxnϕnFTMn]u_n^{(j)} = \begin{bmatrix}u_{xn}\\ \phi_n\\ FTM_n\end{bmatrix}

  11. Compute cross-covariance matrices:

  12. CnGG=1J−1∑j=1J(G(Xn(j))−G(Xn(j))‾)⊗(G(Xn(j))−G(Xn(j))‾)C_n^{GG} = \frac{1}{J-1}\sum_{j=1}^{J}\left(G(X_n^{(j)})-\overline{G(X_n^{(j)})}\right)\otimes\left(G(X_n^{(j)})-\overline{G(X_n^{(j)})}\right)

  13. CnuG=1J−1∑j=1J(un(j)−un(j)‾)⊗(G(Xn(j))−G(Xn(j))‾)C_n^{uG} = \frac{1}{J-1}\sum_{j=1}^{J}\left(u_n^{(j)}-\overline{u_n^{(j)}}\right)\otimes\left(G(X_n^{(j)})-\overline{G(X_n^{(j)})}\right)

  14. Update ensemble:

  15. un+1(j)=un(j)+CnuG(CnGG+αnΓ)−1(y+αnsn− G(Xn(j)))u_{n+1}^{(j)} = u_n^{(j)} + C_n^{uG}\left(C_n^{GG}+\alpha_n\Gamma\right)^{-1}\left(y+\sqrt{\alpha_n}s_n-\ G(X_n^{(j)})\right)

  16. for t=1t = 1 to TT do

  17. u^x,t−1(j)=fθ(ux,t(j),t)\hat{u}_{x,t-1}^{(j)} = f_{\theta}\left(u_{x,t}^{(j)},t\right) ▷ Refer to Algorithm 5, where fθf_{\theta} is the denoising DDIM function

  18. ux,t(j)=u^x,t−1(j)u_{x,t}^{(j)} = \hat{u}_{x,t-1}^{(j)}

  19. if t==Tt == T then

  20. Kn(j)=ux,T(j)K_n^{(j)} = u_{x,T}^{(j)}

  21. end if

  22. end for

  23. Increment counter: n←n+1n \leftarrow n+1

  24. end while

  25. Output: {Kn(j),ϕn(j),FTMn(j)}j=1J\{K_n^{(j)},\phi_n^{(j)},FTM_n^{(j)}\}_{j=1}^{J} ▷ 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.

Prior ensemble for oil production rate

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

Prior ensemble for water production rate

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

Prior ensemble for gas production rate

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

Posterior ensemble for oil production rate

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

Posterior ensemble for water production rate

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

Posterior ensemble for gas production rate

(f) posterior ensemble for gas production rate, QgQ_g (scf/day).

Figure 9. Inverse modeling with covariance localization and aREKI

Production profiles for oil production

(a) (a) Qo(stbday)Q_o \left(\frac{stb}{day}\right)

Production profiles for water production

(b) (b) Qw(stbday)Q_w \left(\frac{stb}{day}\right)

Production profiles for gas production

(c) (c) Qg(scfday)Q_g \left(\frac{scf}{day}\right)

RMSE values for different reservoir models

(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.

Forwarding of the Norne Field

Figure 2. Forwarding of the Norne Field. Nx=46,Ny=112,Nz=22N_x = 46,N_y = 112,N_z = 22. 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.

Forwarding of the Norne Field

Figure 4. Forwarding of the Norne Field. Nx=46,Ny=112,Nz=22N_x = 46, N_y = 112, N_z = 22. 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).

Forwarding of the Norne Field

Figure 5. Forwarding of the Norne Field. Nx=46,Ny=112,Nz=22N_x = 46, N_y = 112, N_z = 22. 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).

Forwarding of the Norne Field comparison for oil production rate

(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, QoQ_o (stbday\frac{\mathrm{stb}}{\mathrm{day}}) from the 22 producers. They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

Forwarding of the Norne Field comparison for water production rate

(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, QwQ_w (stbday\frac{\mathrm{stb}}{\mathrm{day}}) from the 22 producers.They are 22 oil/water/gas producers, 9 water injectors and 4 gas injectors.

Forwarding of the Norne Field comparison for gas production rate

(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, QgQ_g (scfday\frac{\mathrm{scf}}{\mathrm{day}}) 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.

Forwarding of the Norne Field: $R_2$ and $L_2$ accuracy plots

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

Cost function evolution

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.

Comparison of permeability field reconstruction

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. [1]A. A. Emerick and A. C. Reynolds. Ensemble smoother with multiple data assimilation. Computers Geosciences, 2013.DOI
  2. [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. [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. [4]A. M. Stuart. Inverse problems: A Bayesian perspective. Acta Numerica, 19:451–559, 2010.DOI
  5. [5]A. Tarantola. Inverse problem theory and methods for model parameter estimation. SIAM, Philadelphia, 2005.DOI
  6. [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. [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
  8. [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.
  9. [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

Paper details

vlnc:W_zf4gfqhh
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents