원시데이터 수집 시스템
선정목록으로

A machine learning approach for efficient uncertainty quantification using multiscale methods

관련 필름·전자재료 · (16) CPI(투명 폴리이미드)

기본 정보

저자
  1. Chan Shing
  2. Elsheikh, Ahmed H.
DOI
10.48550/arxiv.1711.04315
저널
arXiv (Cornell University)
발행년도
2022
발행기관
Cornell University
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.48550/arxiv.1711.04315
토픽
Composite Material Mechanics
OpenAlex ID
W6910652404

평가 내용

관련도
관련
사업분야
필름·전자재료 · (16) CPI(투명 폴리이미드)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > CPI(투명 폴리이미드)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Several multiscale methods account for sub-grid scale features using coarse scale basis functions. For example, in the Multiscale Finite Volume method the coarse scale basis functions are obtained by solving a set of local problems over dual-grid cells. We introduce a data-driven approach for the estimation of these coarse scale basis functions. Specifically, we employ a neural network predictor fitted using a set of solution samples from which it learns to generate subsequent basis functions at a lower computational cost than solving the local problems. The computational advantage of this approach is realized for uncertainty quantification tasks where a large number of realizations has to be evaluated. We attribute the ability to learn these basis functions to the modularity of the local problems and the redundancy of the permeability patches between samples. The proposed method is evaluated on elliptic problems yielding very promising results.

본문 56,702자

본문 펼치기
### A machine learning approach for efficient uncertainty quantification using multiscale methods Chan, Shing Elsheikh, Ahmed H. Abstract Several multiscale methods account for sub-grid scale features using coarse scale basis functions. For example, in the Multiscale Finite Volume method the coarse scale basis functions are obtained by solving a set of local problems over dual-grid cells. We introduce a data-driven approach for the estimation of these coarse scale basis functions. Specifically, we employ a neural network predictor fitted using a set of solution samples from which it learns to generate subsequent basis functions at a lower computational cost than solving the local problems. The computational advantage of this approach is realized for uncertainty quantification tasks where a large number of realizations has to be evaluated. We attribute the ability to learn these basis functions to the modularity of the local problems and the redundancy of the permeability patches between samples. The proposed method is evaluated on elliptic problems yielding very promising results. #### 1 Introduction Uncertainty quantification is an important task in practical engineering where some parameters are unknown or highly uncertain (Elsheikh et al., 2012, 2013, 2015). After selecting adequate priors for the uncertain parameters, simulations are performed for a large number of realizations. In the particular case of reservoir simulations, the problem is further aggravated where very fine details of the geological models are needed (large number of cells) for accurate description of the flow. One traditional approach to address this problem is to upscale the geological models Babaei et al. (2013). Another more recent approach is to use multiscale methods (Jenny et al., 2003; Hou and Wu, 1997). In these methods, the global fine scale problem is decomposed into many smaller local problems. The solution of these smaller local problems results in a set of numerically computed basis functions which are then used to build a coarse system of equations. After solving the coarse system, an interpolation is performed with the basis functions to obtain the fine scale solution. We note that in multiscale methods, a large number of local problems are solved under the same boundary conditions to obtain the required basis functions. This process is repeated Submitted to Journal of Computational Physics (2017): `[https://doi.org/10.1016/j.jcp.2017.10.034](https://doi.org/10.1016/j.jcp.2017.10.034)` 1 for each geological realization in uncertainty quantification tasks. Our aim is to exploit the redundancy that may arise in solving these local problems for several geological realizations by introducing a data-driven approach for estimating the basis functions efficiently. Specifically, we exploit the large number of local problem solutions that become available after a given number of full runs to construct a computationally cheap function that generates approximate solutions to local problems, i.e. approximate basis functions. In effect, what we propose is a type of hybrid surrogate model by embedding a data-driven approach into the multiscale numerical method. In this work, we focus on one multiscale method called the Multiscale Finite Volume method (MsFV) introduced by Jenny et al. (2003). However, the proposed approach can be applied to any multiscale method where the explicit construction of basis functions is performed such as in the more recent multiscale method based on restriction-smoothed basis functions (MsRSB) (Møyner et al., 2015). Aarnes and Efendiev (2008) introduced a multiscale mixed finite element (MsMFE) method for porous media flows with stochastic permeability field where a set of precomputed basis functions is constructed based on selected set of realizations of the permeability field. These basis functions are then used to build a low-dimensional approximation space for the velocity field. We note that the cost of solving the upscaled problem (i.e. coarse scale) in (Aarnes and Efendiev, 2008) increases with the number of selected set of realizations. In contrast, in this manuscript we directly address the generation of basis functions via a “black box” surrogate modeling approach using machine learning. The generated basis functions are then directly employed in the multiscale formulation without any further modification. Another major difference is that our method directly benefits from increasing the number of realizations used to build the surrogate model without any increase in the computational cost of solving the coarse scale problems for new realizations. This paper presents the first attempt to combine/embed machine learning techniques within multiscale numerical methods with very promising results. The motivation for our work comes from the observation that computational power and data storage capacity are ever increasing. This trend is likely to continue for some time and results in an increased ability to store and data-mine large volumes of simulation data. Another source of motivation comes from the renewed interest in machine learning among the research community, specially in the branch of deep learning to tackle AI-complete tasks such as computer vision and natural language processing. Neural network models are regarded as _universal_ _function_ _approximators_ (Hornik et al., 1989, 1990; Cybenko, 1989) with capacity to learn highly non-linear maps. Therefore, they seem to be suitable for our current application. The rest of the paper is organized as follows: In section 2, we give a brief description of the multiscale finite volume method (MsFV) and neural networks (NN). In section 3, we present 2 _~~<u>•</u>~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ ~~Ω~~ <sup>_C_</sup> _~~i~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ _~~i~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ ~~Ω~~ <sup>_~~D~~_</sup> _j_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ Figure 1: A square domain with a fine discretization of size 15 _×_ 15 (grey thin lines). A coarse _primal_ _grid_ of size 3 _×_ 3 is defined on top of the fine grid (black bold lines). A _primal_ _cell_ Ω <sup>_C_</sup> _i_ is highlighted in green. The centers of each primal cell are marked with red dots. From these centers, the _dual_ _grid_ is defined (blue dashed lines). A _dual_ _cell_ Ω <sup>_D_</sup> _j_ <sup>is</sup> <sup>highlighted</sup> <sup>in</sup> <sup>light</sup> <sup>red.</sup> the methodology for the proposed approach for machine learning the basis. In section 4, we examine the effectiveness of the presented method for uncertainty quantification in two test cases. Finally, in section 5 we report the conclusions of this work along with a brief discussion of future directions. #### 2 Background In this section we briefly describe the two main components of the proposed method: multiscale finite volume (MsFV) methods and neural networks (NN) for surrogate modelling. A number of variants of the MsFV method have been proposed since its introduction in (Jenny et al., 2003). In this manuscript, we employ the MsFV method as described in (Lunati and Jenny, 2006, 2008). 2.1 Multiscale finite volume method We consider an elliptic equation describing the pressure field _−∇·_ ( K _∇p_ ) = _q_ (1) where _p_ denotes the fluid pressure, _q_ denotes fluid sources, and K denotes the permeability tensor. Discretizing Eq. (1) by the finite volume method results in a system of equations of the form Ap = q, which for some applications (such as reservoir simulation) tends to be extremely 3 ~~<u>7</u>~~ ~~<u>8</u>~~ ~~<u>9</u>~~ _~~<u>•</u>~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ ~~<u>4</u>~~ ~~<u><mark>5</mark></u>~~ ~~<u>6</u>~~ _~~<u>•</u>~~_ _~~<u><mark>•</mark></u>~~_ _~~<u>•</u>~~_ ~~<u>1</u>~~ ~~<u>2</u>~~ ~~<u>3</u>~~ _~~<u>•</u>~~_ _~~<u>•</u>~~_ _~~<u>•</u>~~_ Figure 2: Shown in blue is the support region of basis function _φ_ <sup>5</sup> corresponding to coarse node 5 (green cell). Basis function _φ_ <sup>5</sup> is obtained by solving the local problems in Eq. (2) for _i_ = 5, then _φ_ <sup>5</sup> = <sup>�</sup> _j_ <sup>_N_</sup> =1 <sup>_D_</sup> _j_ <sup>5.</sup> <sup>In</sup> <sup>this</sup> <sup>example,</sup> <sup>only</sup> <sup>_φ_</sup> <sup>5</sup> <sup>is</sup> <sup>an</sup> <sup>_interior_</sup> <sup>basis</sup> <sup>function</sup> <sup>(see</sup> <sup>Section</sup> <sup>3).</sup> _j_ <sup>_N_</sup> =1 <sup>_D_</sup> <sup>_φ_</sup> _j_ <sup>5</sup> (a) A partial basis function. (b) A complete basis function. Figure 3: Illustration of a local solution (partial basis function) and a basis function within its support region. 4 large. The MsFV method tackles this problem by constructing and solving a much coarser system of equations A _C_ p _C_ = r _C_, the solution of which is then used to obtain an approximation of p by interpolation. For this, it relies on a set of basis functions which are obtained by solving local problems. In this sense, the method slightly resembles the finite element method, except that the basis functions employed are not analytic functions but numerically computed functions. The method begins with the definition of a pair of overlapping coarse grids, namely the _primal_ _grid_ and the _dual_ _grid_, as shown in Figure 1. In principle, the primal grid can be any coarse partition defined over the fine grid. Next, we define the _coarse_ _nodes_ as the fine cells at the centers of each primal cell. Lastly, the dual grid is defined by the lines connecting these coarse nodes. We denote the primal cells with Ω <sup>_C_</sup> _i_ <sup>_,_</sup> <sup>_i_</sup> <sup>_∈{_</sup> <sup>1</sup> <sup>_, · · ·_</sup> <sup>_, NC}_</sup> <sup>,</sup> <sup>and</sup> <sup>the</sup> <sup>dual</sup> <sup>cells</sup> <sup>with</sup> Ω <sup>_D_</sup> _j_ <sup>_,_</sup> <sup>_j_</sup> <sup>_∈{_</sup> <sup>1</sup> <sup>_, · · ·_</sup> <sup>_, ND}_</sup> <sup>.</sup> A set of (partial) basis functions are obtained by solving the local problems _∇·_ ( K _· ∇φ_ <sup>_i_</sup> _j_ <sup>_i_</sup> _j_ <sup>) = 0</sup> in Ω <sup>_D_</sup> _j_ _j_ _∇·_ _∥_ ( K _· ∇φ_ <sup>_i_</sup> _j_ <sup>_i_</sup> _j_ <sup>)</sup> _∥_ <sup>= 0</sup> on _∂_ Ω <sup>_D_</sup> _j_ _j_ (2) _φ_ <sup>_i_</sup> _j_ <sup>(</sup> <sup>x</sup> <sup>_k_</sup> <sup>) =</sup> <sup>_δik_</sup> _k_ _∈{_ 1 _, · · ·_ _, NC},_ where _φ_ <sup>_i_</sup> _j_ <sup>_i_</sup> _j_ <sup>denotes</sup> <sup>the</sup> <sup>(partial)</sup> <sup>basis</sup> <sup>function</sup> <sup>on</sup> <sup>dual</sup> <sup>cell</sup> <sup>Ω</sup> <sup>_D_</sup> _j_ <sup>_D_</sup> _j_ <sup>(see</sup> <sup>Figure</sup> <sup>3a)</sup> <sup>associated</sup> <sup>with</sup> coarse node _i_, x _k_ denotes the coordinate of coarse node _k_, and _∥_ _·_ _∥_ denotes the tangential component over the dual cell boundary _∂_ Ω <sup>_D_</sup> _j_ <sup>.</sup> <sup>In</sup> <sup>the</sup> <sup>2D</sup> <sup>case,</sup> <sup>this</sup> <sup>means</sup> <sup>solving</sup> <sup>1D</sup> <sup>problems</sup> over _∂_ Ω <sup>_D_</sup> _j_ <sup>_D_</sup> _j_ <sup>,</sup> <sup>the</sup> <sup>solutions</sup> <sup>of</sup> <sup>which</sup> <sup>become</sup> <sup>the</sup> <sup>boundary</sup> <sup>conditions</sup> <sup>for</sup> <sup>the</sup> <sup>2D</sup> <sup>problem</sup> <sup>on</sup> <sup>Ω</sup> <sup>_D_</sup> _j_ <sup>_D_</sup> _j_ <sup>.</sup> Another component of the MsFV formulation employed are the correction functions, ob tained by solving the local problems _∇·_ ( K _· ∇φ_ <sup>ˆ</sup> _j_ ) = _q_ in Ω <sup>_D_</sup> _j_ _∇·_ _∥_ ( K _· ∇φ_ <sup>ˆ</sup> _j_ ) _∥_ = _q_ on _∂_ Ω <sup>_D_</sup> _j_ _φ_ ˆ _j_ ( x _k_ ) = 0 _k_ _∈{_ 1 _, · · ·_ _, NC},_ (3) where _φ_ <sup>ˆ</sup> _j_ denotes the correction function on dual cell Ω <sup>_D_</sup> _j_ <sup>.</sup> Once the basis and correction functions are obtained, we approximate the fine scale pressure _p_ as an interpolation of coarse scale pressure values p _C_ plus a correction term _NC_ ( _i_ =1 <sup>_i_</sup> _C_ <sup>+</sup> <sup>_φ_</sup> <sup>ˆ</sup> <sup>_j_</sup> <sup>)</sup> (4) _p ≈_ _ND_ _j_ =1 _φ_ <sup>_i_</sup> _j_ <sup>_i_</sup> _j_ <sup>_pi_</sup> Substituting Eq. (4) in Eq. (1), and applying finite volume discretization over the primal grid, we get the coarse system of equations A _C_ p _C_ = r _C_ . In the current work, it is more convenient to express the basis and correction functions in a global point of view (see Figure 3b) by writing _φ_ <sup>_i_</sup> = <sup>�</sup> _j_ <sup>_N_</sup> =1 <sup>_D_</sup> <sup>_i_</sup> _j_ <sup>and</sup> <sup>_φ_</sup> <sup>ˆ</sup> <sup>=</sup> <sup>�</sup> _j_ <sup>_N_</sup> =1 <sup>_D_</sup> _j_ <sup>_N_</sup> =1 <sup>_D_</sup> <sup>_φi_</sup> _j_ _j_ <sup>_N_</sup> =1 <sup>_D_</sup> <sup>_φ_</sup> <sup>ˆ</sup> <sup>_j_</sup> <sup>(for</sup> <sup>the</sup> 5 Input Layer Hidden Layer Output Layer # ... _y_ 1 _y_ 2 _ydout_ _x_ 1 _x_ 2 _xdin_ # ... ... Figure 4: Representation of a 1-hidden layer neural network as a graph. The first column of nodes (from left to right) is the input layer, taking inputs x = ( _x_ 1 _, · · ·_ _, xdin_ ) of dimension _din_, and the last column is the output layer with output y = ( _y_ 1 _, · · ·_ _, ydout_ ) of dimension _dout_ . The intermediate column is the hidden layer. Each line connecting two nodes represents a multiplication by a scalar weight. basis functions, we actually only need to sum over supporting dual cells, i.e. dual cells that are associated with the corresponding node). Then, Eq. (4) has a simpler interpolation expression of the form: _p ≈_ _NC_ _i_ =1 _φ_ <sup>_i_</sup> _p_ <sup>_i_</sup> _C_ <sup>+</sup> <sup>_φ_</sup> <sup>ˆ</sup> (5) In the case that the pressure solution will be utilised to drive a transport problem at the fine scale, a flux reconstruction step consisting of solving additional local Neumann problems is necessary (Lunati and Jenny, 2006). 2.2 Feedforward neural networks for surrogate modelling A _feedforward_ _neural_ _network_ _f_ is a function consisting of a compositional chain of simpler functions, i.e. _f_ ( x ) = _f_ <sup>(</sup> <sup>_n_</sup> <sup>)</sup> ( _f_ <sup>(</sup> <sup>_n−_</sup> <sup>1)</sup> ( _· · ·_ ( _f_ <sup>(1)</sup> ( x )) _· · ·_ )). Here, _f_ is said to have _n layers_, where _f_ <sup>(1)</sup> is the first layer, _f_ <sup>(2)</sup> the second layer, etc. The first layer is also called the _input_ _layer_, the last layer the _output_ _layer_, and the layers in between are called _hidden_ _layers_ . The size or _number_ _of_ _units_ of a layer _f_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> : R <sup>_di_</sup> <sup>_i_</sup> _in_ _→_ R <sup>_di_</sup> <sup>_i_</sup> _out_ <sup>.</sup> <sup>Neural</sup> <sup>networks</sup> _out_ <sup>_i_</sup> refers to its output dimension, i.e. _d_ <sup>_i_</sup> are typically represented as a graph as shown in Figure 4. The input layer encompasses any pre-processing of the data, while the output layer may take many forms depending on the learning task. For example, in classification tasks, the _softmax_ 6 function is normally employed where the output layer size (number of units) equals the number of classes, and the softmax output represents the probability of the input sample belonging to each class. This is a way of embedding prior information of the learning task into the model. For regression tasks, the identity function is normally employed, but other functions can also be chosen to embed any prior information of the output space. A conventional hidden layer is an affine transformation followed by an element-wise nonlinear function or _activation_, i.e. _f_ <sup>(</sup> <sup>_i_</sup> <sup>)</sup> ( x ) = _σi_ ( W _i_ x + b _i_ ). Some popular choices for _σi_ are the hyperbolic tangent, the sigmoid function, and more recently, the rectified linear unit (Jarrett et al., 2009). 2.2.1 Neural network optimization Once the network _architecture_ is defined (number of layers _n_, layer sizes _d_ <sup>_i_</sup> _out_ <sup>,</sup> <sup>activation</sup> <sup>func-</sup> tions _σi_, etc.), the optimization problem is to find _θ_ = [ W 1; b 1 _, · · ·_ _,_ W _n_ ; b _n_ ] such that _f_ best describes the observations. Let _{_ ( x 1 _,_ y 1) _, · · ·_ _,_ ( x _N_ _,_ y _N_ ) _}_ be the set of observations used to train the model (the _training_ _set_ ), then the minimization problem is formulated as: _N_ _i_ =1 arg min _θ_ <u>1</u> _N_ _||_ y _i −_ _f_ ( x _i_ ; _θ_ ) _||_ <sup>2</sup> 2 (6) where _J_ ( _θ_ ) := <sup><u>1</u></sup> _N_ - _Ni_ =1 <sup>_||_</sup> <sup>y</sup> <sup>_i −_</sup> <sup>_f_</sup> <sup>(</sup> <sup>x</sup> <sup>_i_</sup> <sup>;</sup> <sup>_θ_</sup> <sup>)</sup> <sup>_||_</sup> 2 <sup>2</sup> <sup>is</sup> <sup>the</sup> <sup>_cost_</sup> <sup>_function_</sup> <sup>.</sup> <sup>This</sup> <sup>problem</sup> <sup>can</sup> <sup>be</sup> <sup>solved</sup> <sup>using</sup> gradient-based algorithms such as gradient descent: _θ_ <sup>_k_</sup> <sup>+1</sup> = _θ_ <sup>_k_</sup> _−_ _ϵ∇_ _θ_ _J_ ( _θ_ ) (7) where _ϵ_ is the _learning_ _rate_ . The derivative _∇_ _θ_ _J_ can be obtained with numerical differentiation schemes. In neural networks, this is typically the _backpropagation_ algorithm (Rumelhart et al., 1988). More recent gradient-based algorithms improve over gradient descent by offering adaptive learning rates such as AdaGrad (Duchi et al., 2011), RMSProp (Tieleman and Hinton, 2012) and Adam (Kingma and Ba, 2014). The basic idea in these methods is to use a separate learning rate for each scalar parameter, and adapt these rates throughout the training process based on the historical values of the partial derivatives with respect to each parameter. The initial global learning rate _ϵ_ 0 is a tunable hyperparameter. A recent important development regarding neural network optimization is _batch_ _normal-_ _ization_ (Ioffe and Szegedy, 2015), which has shown to significantly speed up the optimization process. The method consists of adaptive reparametrization of inputs to each activation func tion. This is to address the simplifying assumptions made during the optimization where the gradients update each parameter assuming that the other layers do not change. In essence, the values after the affine transformation in a layer are normalized by the mean and standard deviation before being fed into the layer activation function. 7 2.2.2 Regularization The optimization of _θ_ from Eq. (6) alone yields a model that is prone to overfitting, i.e. it does not necessarily perform well for samples not seen in the training set. Hence, validation assessment is necessary where a separate set of samples that are not used in optimizing Eq. (6), called the _validation_ _set_, is employed to assess the accuracy of the model. One simple regular ization technique is _early_ _stopping_, where the model is assessed after each update (or number of updates) of _θ_ in Eq. (7); when the cost function on the validation set begins to increase, the optimization is early stopped. This is the stopping criteria in neural network optimization, which differs from conventional optimization where the criteria is generally based on the gra dient norm. Another set of regularization techniques are _parameter_ _norm_ _penalties_, where an additional term is added to the cost function: _Jreg_ ( _θ_ ) := <sup><u>1</u></sup> _N_ _N_ _i_ =1 _||_ y _i −_ _f_ ( x _i_ ; _θ_ ) _||_ <sup>2</sup> 2 <sup>+</sup> <sup>_α_</sup> <sup>Ω(</sup> <sup>_θ_</sup> <sup>)</sup> (8) For example, for _L_ <sup>2</sup> parameter norm, Ω( _θ_ ) = 2 <sup><u>1</u></sup> <sup>_||_</sup> <sup>_θ_</sup> <sup>_||_</sup> 2 <sup>2.</sup> <sup>The</sup> <sup>additional</sup> <sup>parameter</sup> <sup>_α_</sup> <sup>is</sup> <sup>a</sup> <sup>regular-</sup> ization _hyperparameter_ that is chosen using the validation set. More recently, _Dropout_ (Srivastava et al., 2014) has shown to be a very effective regulariza tion technique that approximates model averaging in neural networks. The technique consists of randomly dropping out units of the network during the optimization iteration, by which the optimizer “sees” a number of different “models” in the process. Since traditional model averag ing in neural networks is usually intractable, this approach serves as a proxy for averaging an exponential number of models. In practice, a _dropout_ _rate_ is chosen which indicates the prob ability of a unit being dropped out. This hyperparameter is tuned using a validation set. The authors in (Srivastava et al., 2014) suggested using a _max-norm_ constraint along with dropout, which consists of constraining the norm of some of the weights by a fixed constant _c_, tuned with a validation set. This allows for more aggressive optimization search without the possibility of weights blowing up. 2.2.3 Architecture design and hyperparameter tuning The design of the network architecture, i.e. defining the number of layers, the number of units for each layer, activation functions, regularizers, etc. is not a straightforward task. In principle, one can consider these parameters as additional hyperparameters and tune them using a validation set. However, hyperparameter optimization is an expensive task given that the objective function (performance on the validation set) is non-linear and non-differentiable with respect to the hyperparameters. In practice, heuristics and expertise are heavily employed in the design process to reduce the number of hyperparameters. Nevertheless, general guidelines 8 do exist for the design of neural network models. The following is a compilation of guidelines extracted from (Goodfellow et al., 2016; Bengio, 2012): - Begin with a few number of layers and units, and well-tested optimizers and regularizers. - Start with as few hyperparameters as possible to enable quick manual search to obtain some insight of the learning task. - Overfit, then regularize: increase the number of layers/units to overfit the training set, then apply regularization techniques to improve generalization. That is, we first want the network to be complex enough to approximate the target function, and then regularize it to perform well outside the training set. - Regarding the choice of activation functions, the current default recommendation is to use rectified linear units (ReLUs). These have beneficial properties for the optimization such as non-vanishing gradients. - Whether to use few large layers, or many small layers is an open debate. It is generally believed that many small layers generalize better, although the ultimate decision will largely depend on implementation and trial and error. - Early stopping should almost always be employed. - The learning rate _ϵ_ 0 is very influential in the model performance and should be fine-tuned. - If there is an architecture that performs well for a similar task, use it as the base archi tecture. Once the general architecture is selected, key hyperparameters should be optimized. Tra ditional techniques such as grid search and random search are normally prohibitive. In the current manuscript we employed the _Tree-Parzen Estimator_ (Bergstra et al., 2011), a sequential model-based hyperparameter optimization approach where a model is sequentially constructed to approximate the performance of hyperparameters based on historical measurements, and then subsequently choose new hyperparameters to test based on this model. Other hyperparameter optimization techniques include Bayesian optimization for neural networks (Snoek et al., 2012) and Hyperband (Li et al., 2016). #### 3 Methodology We first introduce some terminology to simplify the presentation. A basis function is _interior_ if its support region does _not_ touch the domain boundary (see Figure 2). For practical purposes, we limit the learning process to interior basis functions, i.e. we build a predictor to generate 9 Generate a set of realizations K 1 _, · · ·_ _,_ K _M_ Run MsFV for K 1 _, · · ·_ _,_ K _m_, where _m_ _≪_ _M_ to obtain ( _κ_ <sup>1</sup> _, φ_ <sup>1</sup> ) _, · · ·_ _,_ ( _κ_ <sup>_N_</sup> _, φ_ <sup>_N_</sup> ) Use ( _κ_ <sup>1</sup> _, φ_ <sup>1</sup> ) _, · · ·_ _,_ ( _κ_ <sup>_N_</sup> _, φ_ <sup>_N_</sup> ) to train basis predictor Use hybrid model to solve for K _m_ +1 _, · · ·_ _,_ K _M_ Evaluate statistical distribu tions for quantities of interest Figure 5: Workflow of the proposed method. interior basis functions while computing the remaining basis functions as usual from the local problems defined by Eq. (2). In practice, this should not be a major concern given that the number of interior basis functions is normally much larger than the number of non-interior basis functions (basis functions on the _edges_ and _vertices_ of the domain). In any case, it is pretty straightforward to train additional predictors for the remaining types of basis functions. We define a _permeability patch_ _κ_ <sup>_i_</sup> as the cropped region of the permeability field K that corre sponds to the support region of a basis function _φ_ <sup>_i_</sup> . In the learning framework, the permeability patches _κ_ <sup>1</sup> _, κ_ <sup>2</sup> _, · · ·_ _, κ_ <sup>_N_</sup> are our inputs, and the corresponding basis functions _φ_ <sup>1</sup> _, φ_ <sup>2</sup> _, · · ·_ _, φ_ <sup>_N_</sup> are our outputs. In practice, it is more convenient to work with the log-permeabilities, i.e. log _κ_ <sup>1</sup> _, · · ·_ log _κ_ <sup>_N_</sup> . For clarification, suppose we have an 81 _×_ 81 Cartesian grid, over which we defined a 9 _×_ 9 primal grid. Then there are 7 _×_ 7 = 49 interior basis functions, each with array size (number of fine cells in the support region) of 19 _×_ 19. The array size of each input permeability patch is 19 _×_ 19 _× d_, where _d_ = 1 for isotropic fields, and _d_ = 2 in the anisotropic case. The method we propose aims to speedup uncertainty quantification studies where multi scale methods are employed in the propagation task. In particular, we focus on the use of the MsFV method to solve Eq. (1) for large number of realizations of the permeability field K . Our method however could be applied to any multiscale method where the explicit gener ation of the basis functions is performed. Consider an uncertainty propagation task of solving Eq. (1) for K 1 _, · · ·_ _,_ K _M_ . Let _m_ _≪_ _M_ be the number of full MsFV runs that we can af 10 ford. For each K _i_ where _i_ = 1 _, · · ·_ _, m_, the MsFV simulation delivers a set of basis functions with their corresponding permeability patches. The union of these sets provides the learning dataset _{_ ( _κ_ <sup>1</sup> _, φ_ <sup>1</sup> ) _, · · ·_ _,_ ( _κ_ <sup>_N_</sup> _, φ_ <sup>_N_</sup> ) _}_ . This dataset is used to train a predictor model that maps from permeability patches _κ_ to basis functions _φ_ that has an evaluation cost that is much cheaper than solving the local problems. The model we employed here is a neural network. Once the model is trained, it is used to predict the basis functions in the subsequent runs for K _m_ +1 _,_ K _m_ +2 _, · · ·_ _,_ K _M_ . The end result is a hybrid approach where the MsFV formulation is modified to obtain the basis functions through a data-driven model instead of being computed from the local problems. Figure 5 summarises the workflow of the proposed method. To ensure the partition of unity property of the basis functions (which is not necessarily ful filled in the learning model), we perform a post-processing step on the generated basis functions as follows: _<u>φ</u>_ <sup>_i_</sup> <u>(</u> _<u>x</u>_ <u>)</u> _φ_ <sup>_i_</sup> _new_ <sup>(</sup> <sup>_x_</sup> <sup>) =</sup> <u>�</u> _k_ <sup>_φk_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> We note that the presented method benefits from the use of structured grids with coarse cells of same size. In the case of structured grids with cells of different sizes, the patches could be scaled to a unique input size. This is a standard preprocessing step in computer vision to handle images of different sizes. We also note that handling unstructured grids is not a straightforward task and is beyond the scope of the current manuscript. 3.1 Implementation and computational aspects The computational gain of the proposed method is achieved by replacing the solution of local problems by a constant number of matrix-vector multiplications followed by element-wise func tion evaluations. For a network of input and output sizes _n_ and hidden layers of size _m_, this means an evaluation complexity of _O_ ( _mn_ ). The constants associated with the evaluation cost will depend on the number of layers of the network. Efficient algorithms for solving systems of _n_ linear equations exist where complexities of _O_ ( _n_ log _n_ ) (FFT) or even _O_ ( _n_ ) (multigrid methods) are achieved, however the constants asso ciated with these algorithms are large, usually requiring a large value of _n_ to be economical. This is in contrast to the MsFV approach where small local problems are preferred. Likewise, there exist efficient algorithms to perform matrix-vector multiplications that are only justified in practice when the matrices and vectors are very large. Regarding the training of the neural network, this is performed in an _offline_ _phase_ as with other surrogate modelling techniques, and the justification of the cost will depend on the partic ular uncertainty quantification task at hand. The larger the uncertainty quantification task, the larger the time budget that can be assigned to the surrogate modelling process. As a practical note, it is worth mentioning that due to the surge of interest in neural networks and AI in gen 11 eral, efficient implementations have been intensively developed in recent years, both from the software and hardware sectors. Indeed, dedicated hardware devices are currently being released for various neural network implementations. 3.2 Other machine learning techniques The proposed algorithm is not limited to neural networks and other traditional machine learning techniques are indeed applicable such as Gaussian processes and support vector machines to model the basis function predictor. A number of reasons led us to choose the neural network model. First, neural networks are universal approximators (Hornik et al., 1989), meaning that they can fit any measurable function with arbitrary accuracy. This practically covers any function encountered in engineering applications. Secondly, neural networks scale very well with the size of the dataset, in contrast to Gaussian processes and support vector machines. This is desirable where the trends of the cost of numerical simulations and data storage are ever decreasing. Lastly, research in neural networks is characterized by a remarkably large and evolving body of literature from which we can benefit in the near future. Advances in the field is specially strong in problems related to computer vision, which shares a lot of features with our work. #### 4 Numerical experiments We consider the task of solving Eq. (1) over a unit square [0 _,_ 1] <sup>2</sup> _⊂_ R <sup>2</sup> . The domain is dis cretized into 81 _×_ 81 fine grid, with a primal coarse grid of 9 _×_ 9. For estimating the statistical distributions, we utilize _M_ = 1000 realizations of isotropic log-permeability fields generated assuming a zero mean gaussian random field with an exponential covariance of the form Cov( x 1 _,_ x 2) = _σ_ <sup>2</sup> exp - _−_ <sup>_<u>∥</u>_</sup> <sup><u>x</u></sup> <sup><u>1</u></sup> <sup>_<u>−</u>_</sup> <sup><u>x</u></sup> <sup><u>2</u></sup> <sup>_<u>∥</u>_</sup> _L_ where _∥·∥_ denotes the Euclidean norm. We choose _σ_ = 1 _._ 0, and we investigate three values for the correlation length: _L_ = 0 _._ 1, 0 _._ 2, and 0 _._ 4. 4.1 Learning process We assume a budget of _m_ = 20 full MsFV runs, obtaining a dataset of 980 samples (since each run yields 49 samples). The array sizes of the inputs (permeability patches) and outputs (basis functions) are 19 _×_ 19. We set aside 20% of the dataset for validation (this should be done at the level of the realizations, i.e. samples generated from 4 full MsFV runs). The architecture employed is a fully connected network with 1-hidden layer of size 1024 and ReLU activation function. Naturally, the input and output layers are of size 19 _×_ 19 = 12 Table 1: _R_ <sup>2</sup> -scores on different permeability types Correlation length _R_ <sup>2</sup> -score _L_ = 0 _._ 1 0 _._ 927 _L_ = 0 _._ 2 0 _._ 953 _L_ = 0 _._ 4 0 _._ 964 (a) Input log _κ_ (b) Target _φ_ (c) Predicted _φ_ <sup>ˆ</sup> (d) Difference _φ −_ _φ_ <sup>ˆ</sup> Figure 6: Performance of basis function predictor, case _L_ = 0 _._ 1 13 (a) Input log _κ_ (b) Target _φ_ (c) Predicted _φ_ <sup>ˆ</sup> (d) Difference _φ −_ _φ_ <sup>ˆ</sup> Figure 7: Performance of basis function predictor, case _L_ = 0 _._ 2 14 (a) Input log _κ_ (b) Target _φ_ (c) Predicted _φ_ <sup>ˆ</sup> (d) Difference _φ −_ _φ_ <sup>ˆ</sup> Figure 8: Performance of basis function predictor, case _L_ = 0 _._ 4 15 361, matching the size of the permeability patch and basis function. Additionally, we employ the hard sigmoid function as the activation of the output layer. This is to embed the prior knowledge that basis functions take values between 0 and 1. The hard sigmoid is the function _x ∈_ R _�→_ max(0 _,_ min(1 _,_ 0 _._ 2 _x_ + 0 _._ 5)). Although this choice of function is usually problematic for gradient-based optimizations, it gave good results when coupled with dropout and batch normalization. To train the network, the gradient-based optimizer Adam (Kingma and Ba, 2014) seemed more robust during our trials. The initial learning rate was set to _ϵ_ 0 = 10 <sup>_−_</sup> <sup>3</sup> . For regularization, a dropout rate of 5% after the hidden layer, and a max-norm constraint of 4 have proven useful. Additionally, early stopping is employed. All these hyperparameter values were chosen based on default recommendations along with some manual explorations. A convenient metric employed to report the performance of a trained model is the coefficient of determination (or _R_ <sup>2</sup> -score): _R_ <sup>2</sup> ( _f_ ) = 1 _−_ <u>�</u> _<u>∥φi −</u>_ _<u>φ</u>_ ˆ _i∥_ 2 <u>�</u> _∥φi_ _−_ _φ_ ¯ _∥_ 2 where _∥·∥_ denotes the _L_ <sup>2</sup> norm, _f_ is the trained model, _φ_ <sup>ˆ</sup> <sup>_i_</sup> = _f_ (log _κ_ <sup>_i_</sup> ) _,_ _i_ = 1 _,_ 2 _, · · ·_ _, Nval_ are the _predicted_ basis functions, _φ_ <sup>1</sup> _, φ_ <sup>2</sup> _, · · ·_ _, φ_ <sup>_Nval_</sup> are the _true_ basis functions, and _φ_ <sup>¯</sup> = <u>1</u> _Nval_ - _φi_ is the sample mean of the true basis functions. A score of 1 _._ 0 corresponds to perfect prediction, while a score below 0 means that the predictor performance is worse than a model that always predicts the sample mean. Table 1 shows the validation scores obtained on the three permeability types considered, i.e. correlation lengths _L_ = 0 _._ 1, 0 _._ 2 and 0 _._ 4. Figures 6, 7 and 8 show some of the predicted basis functions for cases _L_ = 0 _._ 1, 0 _._ 2 and 0 _._ 4, respectively. We see that the prediction is more challenging for the case of shortest correlation length. This is likely due to the permeability field being more heterogeneous for shorter correlation lengths. 4.1.1 Predictor uncertainty Error estimations of the predicted basis functions might be of interest to fully quantify the uncertainties in the results. Such estimations are readily available in machine learning models such as Gaussian processes. For neural networks, a number of methods such as Bootstrap aggregating (bagging) and others as discussed in (Tibshirani, 1996) could be employed. Another possibility is to employ the dropout technique as a Bayesian approximation method (Gal and Ghahramani, 2016). In our work, we consider the uncertainties in the predicted basis functions to be of second order and the presented numerical results support this assumption. 16 4.2 Hybrid model Once the neural network model is trained, we can use it to compute the basis functions in the MsFV formulation. To assess the effectiveness of this hybrid approach (MsFV-NN), we consider two test cases: _Quarter-five_ _spot_ _problem:_ In this problem, injection and production points are located at (0 _,_ 0) and (1 _,_ 1) of the unit square, respectively. No-flow boundary conditions are imposed. We assume unit injection/production rates, i.e. _q_ (0 _,_ 0) = 1 and _q_ (1 _,_ 1) = _−_ 1. _Uniform_ _flow_ _problem:_ Here, uniformly distributed inflow and outflow conditions are imposed on the left and right sides of the unit square, respectively. No-flow boundary conditions are imposed on the remaining top and bottom sides. A total inflow/outflow rate of 1 is assumed. For the unit square, this means _v ·_ ˆ _n_ = _−_ 1 and _v ·_ ˆ _n_ = 1 on the left and right sides, respectively, where _n_ ˆ denotes the outward-pointing unit normal to the boundary. In both cases, a pressure value of 0 is imposed at the center of the square to close the problem. The pressure Eq. (1) is solved using three methods: a standard cell-centered finite volume method at the fine-scale level which is taken as the reference “true” solution, the standard MsFV method, and the proposed hybrid method (MsFV-NN). Additionally, we also compute and compare the total velocities, which can be derived from the corresponding pressure solutions. In the reference solution, the total velocity can be derived using Darcy’s law ( _v_ = _−λ_ K _∇p_ where _λ_ is the total mobility, here assumed as _λ_ = 1), whereas in the MsFV and MsFV-NN methods, the total velocities are derived via a flux reconstruction step, as mentioned before. We take a further step and use the total velocity to solve a tracer flow problem. In this case, we solve the following advection equation: _ϕ_ <sup>_<u>∂c</u>_</sup> _∂t_ _ρw_ <sup>_<u>∂c</u>_</sup> _∂t_ <sup>+</sup> <sup>_∇·_</sup> <sup>(</sup> <sup>_cv_</sup> <sup>) =</sup> _ρ_ <sup>_<u>qw</u>_</sup> _w_ (9) where _c_ denotes the concentration of the injected fluid (in this case water), _ϕ_ denotes the domain porosity, _qw_ denotes sources/sinks of the injected fluid, and _ρw_ denotes the density of the injected fluid. In all cases, we assume water with dimensionless density of _ρw_ = 1 that is injected into a reservoir with constant porosity _ϕ_ = 0 _._ 2 initially containing only oil, i.e. _c_ ( x _, t_ = 0) = 0, which we assume to have the same viscosity as the injected fluid. Under these conditions the total velocity _v_ does not change in time. The simulation time for both test cases is from _t_ = 0 until _t_ = 0 _._ 4. In reservoir engineering, it is more convenient to work with pore volume injected (PVI) as the time unit, which expresses the ratio of the total volume of fluid injected until time _t_ and the reservoir pore volume (for constant injection, _tPV I_ = _qint/Vϕ_ where _Vϕ_ is the pore volume). Figures 9 and 10 show sample solutions for one realization of correlation length _L_ = 0 _._ 1, for the two test cases considered. We also show the contour plot of the difference between the reference and MsFV, the reference and MsFV-NN, and MsFV and MsFV-NN. 17 (a) Pressure solution for one realization. (b) Concentration solution at _t_ = 0 _._ 5 PVI for one realization. Figure 9: Quarter-five spot problem: Sample solution for one realization based on the reference (standard FVM), MsFV and MsFV-NN. 18 (a) Pressure solution for one realization. (b) Concentration solution at _t_ = 0 _._ 5 PVI for one realization. Figure 10: Uniform flow problem: Sample solution for one realization based on the reference (standard FVM), MsFV and MsFV-NN. 19 Table 2: Results of hyperparameter tuning. Dropout rate 5 _._ 4% Learning rate 3 _._ 1 _×_ 10 <sup>_−_</sup> <sup>3</sup> _R_ <sup>2</sup> -score 0 _._ 97 4.2.1 Comparison of errors The errors of the solutions (pressure, velocity, concentration) of MsFV and MsFV-NN are mea sured with respect to the reference solution using an area weighted norm. Let u = ( _u_ 1 _, · · ·_ _, un_ ) be a vector of values corresponding to cells Ω1 _, · · ·_ _,_ Ω _n_ and let _|_ Ω _i|_ be the area of cell _i_, we define the area weighted norm as _∥_ u _∥_ = ( <sup>�</sup> _i_ <sup>_|ui|_</sup> <sup>2</sup> <sup>_|_</sup> <sup>Ω</sup> <sup>_i|_</sup> <sup>)1</sup> <sup>_/_</sup> <sup>2.</sup> <sup>Using</sup> <sup>this</sup> <sup>notation,</sup> <sup>the</sup> <sup>pressure</sup> error ( _ep_ ), the velocity error ( _ev_ ), and the concentration error ( _ec_ ) are: _ep_ = <sup>_<u>∥</u>_</sup> <sup><u>p</u></sup> <sup>_ref_</sup> <sup>_<u>−</u>_</sup> <sup><u>p</u></sup> <sup>_<u>∥</u>_</sup> (10) _∥_ p <sup>_ref_</sup> _∥_ _y_ <sup>_ref_</sup> _∥_ _<u>x</u>_ _ev_ = <sup>_<u>∥</u>_</sup> <sup><u>v</u></sup> <sup>_ref_</sup> (11) _<u>x</u>_ <sup>_ref_</sup> _<u>−</u>_ <u>v</u> _<u>x∥</u>_ _<u>y</u>_ + <sup>_<u>∥</u>_</sup> <sup><u>v</u></sup> <sup>_ref_</sup> _<u>y</u>_ <sup>_ref_</sup> _<u>−</u>_ <u>v</u> _<u>y∥</u>_ _∥_ v _x_ <sup>_ref_</sup> _x_ <sup>_ref_</sup> _∥_ _∥_ v _y_ <sup>_ref_</sup> _ec_ = <sup><u>1</u></sup> _T_ - _T_ 0 _<u>∥</u>_ <u>c</u> <sup>_ref_</sup> <u>(</u> _<u>·, t</u>_ <u>)</u> _<u>−</u>_ <u>c</u> <u>(</u> _<u>·, t</u>_ <u>)</u> _<u>∥</u>_ _dt_ (12) _∥_ c <sup>_ref_</sup> ( _·, t_ ) _∥_ Figures 11 and 12 show scatter plots of the errors obtained by the MsFV and MsFV-NN. As expected, a better predictor performance (in terms of the _R_ <sup>2</sup> -score) corresponded to a better correlation between both errors. 4.2.2 Estimated distributions Finally, we compare all three methods in an uncertainty quantification task where we estimate the pressure _p_ at (1 _/_ 4 _,_ 1 _/_ 4), the total production _Q_, and the water breakthrough time _twb_ (time when water fraction reaches 1% at the production well). Figures 13 and 14 show the estimated distributions according to each method. We can see that the distributions given by MsFV and MsFV-NN are almost indistinguishable even for the less accurate predictor ( _L_ = 0 _._ 1). From these results, it is clear that the effectiveness of the hybrid model is attached to the effectiveness of the target model (MsFV). The hybrid model is expected to perform well as long as the target model itself serves as a good proxy to the “true” solution. 4.3 Hyperparameter tuning In this section, we show how to further improve the learning performance by fine-tuning the model with a hyperparameter optimization algorithm. Specifically, we employ the Tree-Parzen 20 (a) Case _L_ = 0 _._ 1 (b) Case _L_ = 0 _._ 2 (c) Case _L_ = 0 _._ 4 Figure 11: Quarter five spot problem: Comparison of errors in MsFV and MsFV-NN. 21 (a) Case _L_ = 0 _._ 1 (b) Case _L_ = 0 _._ 2 (c) Case _L_ = 0 _._ 4 Figure 12: Uniform flow problem: Comparison of errors in MsFV and MsFV-NN. 22 (a) Case _L_ = 0 _._ 1 (b) Case _L_ = 0 _._ 2 (c) Case _L_ = 0 _._ 4 Figure 13: Quarter five spot problem: Estimated distributions by MsFV (orange dashed line), MsFV-NN (green dotted line), and reference (blue line). 23 (a) Case _L_ = 0 _._ 1 (b) Case _L_ = 0 _._ 2 (c) Case _L_ = 0 _._ 4 Figure 14: Uniform flow problem: Estimated distributions by MsFV (orange dashed line), MsFV-NN (green dotted line), and reference (blue line). 24 (a) Quarter five spot problem ( _L_ = 0 _._ 1) (b) Uniform flow problem ( _L_ = 0 _._ 1) Figure 15: Comparison of errors in MsFV and MsFV-NN (tuned model, _L_ = 0 _._ 1). Improvements can be seen with respect to Figures 11(a) and 12(a). Estimator algorithm. We shall consider the case of _L_ = 0 _._ 1 where the trained predictor per formed with a score of 0 _._ 927. Previously, a dropout rate of 5% and a default learning rate of 10 <sup>_−_</sup> <sup>3</sup> have been fixed. Here we let the hyperparameter optimization algorithm tune the values for the dropout rate and the learning rate. Moreover, we also employ batch normalization to enhance the optimization process. Table 2 summarizes the hyperparameter optimization results under a budget of 20 iterations where we observe significant improvement in the _R_ <sup>2</sup> -score. Figure 15 shows the error scatter plot for the resulting hybrid model. An improvement in the correlation is observed (please compare with Figures 11 and 12). Figure 16 compares the estimated distributions for the quantities of interest where a strong agreement between the data-driven approach and the MsFV is observed. Finally, Table 3 presents summary statistics of the results obtained. Overall, we see that there are improvements in both the errors and the estimated distributions when the learning performance increases, as is expected. Of course, even more improvements can be achieved by further tuning the model, for example by increasing the number of iterations of the hyperparameter optimization, or by employing additional tools such as _L_ <sup>1</sup> and _L_ <sup>2</sup> regularizers. 25 (a) Quarter five spot problem ( _L_ = 0 _._ 1) (b) Uniform flow problem ( _L_ = 0 _._ 1) Figure 16: Estimated distributions (tuned model, _L_ = 0 _._ 1) by MsFV (orange dashed line), MsFV-NN (green dotted line), and reference (blue line). Compare with Figures 13(a) and 14(a). 26 Table 3: Summary statistics and point estimates ( _L_ = 0 _._ 1). (a) Quarter five spot problem Reference MsFV MsFV-NN Untuned _e_ ¯ _p_ - 0.0525 0.0560 0.0586 _sep_ - 0.0228 0.0226 0.0232 _e_ ¯ _v_ - 0.1312 0.1463 0.1654 _sev_ - 0.0216 0.0243 0.0231 _e_ ¯ _c_ - 0.0268 0.0298 0.0326 _sec_ - 0.0053 0.0068 0.0058 _p_ ¯(1 _/_ 4 _,_ 1 _/_ 4) 0.5283 0.5297 0.5303 0.5240 _sp_ (1 _/_ 4 _,_ 1 _/_ 4) 0.2075 0.2081 0.2092 0.2036 _Q_ ¯ 0.1910 0.1906 0.1906 0.1904 _sQ_ 0.0060 0.0062 0.0063 0.0062 _t_ ¯ _wb_ 0.4488 0.4404 0.4406 0.4402 _stwb_ 0.0639 0.0646 0.0650 0.0639 (b) Uniform flow problem Reference MsFV MsFV-NN Untuned _e_ ¯ _p_ - 0.0301 0.0357 0.0408 _sep_ - 0.0093 0.0105 0.0141 _e_ ¯ _v_ - 0.2412 0.2876 0.3504 _sev_ - 0.0267 0.0338 0.0420 _e_ ¯ _c_ - 0.0205 0.0228 0.0267 _sec_ - 0.0039 0.0043 0.0050 _p_ ¯(1 _/_ 4 _,_ 1 _/_ 4) 0.2724 0.2722 0.2732 0.2677 _sp_ (1 _/_ 4 _,_ 1 _/_ 4) 0.1160 0.1162 0.1181 0.1135 _Q_ ¯ 0.2339 0.2345 0.2352 0.2365 _sQ_ 0.0589 0.059 0.0590 0.0591 _t_ ¯ _wb_ 0.7460 0.7423 0.7436 0.7479 _stwb_ 0.1746 0.1743 0.1738 0.1737 27 Table 4: Time to generate 1000 basis functions using different methods. Method Time [sec] Sparse direct solver (UMFPACK) 2.14 GMRES ( `tol=1e-5` ) 7.21 GMRES ( `tol=1e-16` ) 23.77 NN prediction 0.389 NN (batch eval) 0.083 NN (batch eval) (GPU) 0.017 4.4 Computational gains For an estimate of the computational speedup provided by the proposed method, we compared the time taken to generate 1000 basis functions using the predictor vs. the standard approach of solving local problems. Since the MsFV method obtains the basis functions by solving local problems which involve many intermediary steps, and this could lead to data-derived overheads which are implementation-dependent, we decided to measure the time of solving the four local _2D_ _problems_ _only_, i.e. without accounting for the overheads of getting the local boundary conditions (which are obtained by solving the 1D problems) and assembling the local matrices. We employed two solvers for the local problems: GMRES iterative solver and UMFPACK direct solver, both highly optimized C-compiled packages provided in `numpy` / `scipy` . Table 4 summarises the run times obtained. These results were obtained using one thread (except for the last row which is run on GPU). Here, “batch eval” refers to the prediction of the _N_ basis functions “at once”: for a given input vector _κi, i_ = 1 _,_ 2 _, ..., N_, the predictor performs a matrix-vector multiplication on _κi_ . But this can be implemented as a matrix-matrix multiplication simply by building the matrix _K_ whose columns are the vectors _κi_, allowing for additional numerical optimizations. In this case, we see that the direct solver outperformed the iterative solver for the local problems since the local matrices are small, which is the common scenario in multiscale methods. We also see that the data-driven approach clearly outperforms the solver component, and if we add the overheads of solving the 1D problems plus the local matrix assembly, the computational advantage will be amplified. We note however that these times can vary depending on the implementation. In particular, different neural network architectures and different solvers for the system of equations may yield different times. Nevertheless, it is unlikely that solving the local problems will outperform a forward pass of a neural network, i.e. direct matrix-vector computations. 28 #### 5 Conclusions and remarks We have seen that for the presented subsurface flow problems, shallow neural networks per formed very well as a simple surrogate for the computation of basis functions in the multiscale finite volume method. Further, we draw the following remarks: - Results obtained for uncertainty propagation using MsFV and the proposed MsFV-NN method were practically indistinguishable. - The proposed method is applicable to any multiscale method where the sub-grid scales are captured numerically by solving local problems. - The proposed method is scalable with large coarse partitions (since more data samples are obtained per simulation run). In addition, we note that if the _data_ _distribution_ remains unchanged (or is similar to that of the training data), then the same trained predictor can be used for different problem conditions (for example, to perform well location optimization), and further computational gains can be achieved since we avoid training a new predictor. This is the situation in cases such as steady state flow or tracer flow. We have presented the first application of machine learning to capture sub-grid scale het erogeneities within a multiscale method. As our next step, we aim to study the application of the presented method for multiphase flow in porous media. Other possible research direc tions include extensions to more general permeability fields with anisotropy and channelized structures. #### References Jørg E Aarnes and Yalchin Efendiev. Mixed multiscale finite element methods for stochastic porous media flows. _SIAM_ _Journal_ _on_ _Scientific_ _Computing_, 30(5):2319–2339, 2008. Masoud Babaei, Ahmed H. Elsheikh, and Peter R. King. A comparison study between an adaptive quadtree grid and uniform grid upscaling for reservoir simulation. _Transport_ _in_ _Porous_ _Media_, 98(2):377–400, Jun 2013. ISSN 1573-1634. doi: 10.1007/s11242-013-0149-7. URL `[https://doi.org/10.1007/s11242-013-0149-7](https://doi.org/10.1007/s11242-013-0149-7)` . Yoshua Bengio. Practical recommendations for gradient-based training of deep architectures. In _Neural_ _networks:_ _Tricks_ _of_ _the_ _trade_, pages 437–478. Springer, 2012. James S Bergstra, R´emi Bardenet, Yoshua Bengio, and Bal´azs K´egl. Algorithms for hyper parameter optimization. In _Advances_ _in_ _Neural_ _Information_ _Processing_ _Systems_, pages 2546– 2554, 2011. 29 George Cybenko. Approximation by superpositions of a sigmoidal function. _Mathematics_ _of_ _control,_ _signals_ _and_ _systems_, 2(4):303–314, 1989. John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. _Journal of Machine Learning Research_, 12(Jul):2121–2159, 2011. Ahmed H. Elsheikh, Matthew Jackson, and Tara Laforce. Bayesian reservoir history matching considering model and parameter uncertainties. _Mathematical_ _Geosciences_, 44(5):515–543, Jul 2012. ISSN 1874-8953. doi: 10.1007/s11004-012-9397-2. URL `[https://doi.org/10.](https://doi.org/10.1007/s11004-012-9397-2)` `[1007/s11004-012-9397-2](https://doi.org/10.1007/s11004-012-9397-2)` . Ahmed H. Elsheikh, Mary F. Wheeler, and Ibrahim Hoteit. Nested sampling algorithm for subsurface flow model selection, uncertainty quantification, and nonlinear calibration. _Water_ _Resources_ _Research_, 49(12):8383–8399, 2013. ISSN 1944-7973. doi: 10.1002/2012WR013406. URL `[http://dx.doi.org/10.1002/2012WR013406](http://dx.doi.org/10.1002/2012WR013406)` . Ahmed H. Elsheikh, Vasily Demyanov, Reza Tavakoli, Mike A. Christie, and Mary F. Wheeler. Calibration of channelized subsurface flow models using nested sampling and soft probabilities. _Advances_ _in_ _Water_ _Resources_, 75:14 - 30, 2015. ISSN 0309-1708. doi: http://dx.doi.org/10.1016/j.advwatres.2014.10.006. URL `[http://www.sciencedirect.com/](http://www.sciencedirect.com/science/article/pii/S0309170814002085)` `[science/article/pii/S0309170814002085](http://www.sciencedirect.com/science/article/pii/S0309170814002085)` . Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. In _International_ _Conference_ _on_ _Machine_ _Learning_, pages 1050– 1059, 2016. Ian Goodfellow, Yoshua Bengio, and Aaron Courville. _Deep_ _Learning_ . MIT Press, 2016. `[http:](http://www.deeplearningbook.org)` `[//www.deeplearningbook.org](http://www.deeplearningbook.org)` . Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. _Neural_ _networks_, 2(5):359–366, 1989. Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Universal approximation of an un known mapping and its derivatives using multilayer feedforward networks. _Neural_ _networks_, 3(5):551–560, 1990. Thomas Y Hou and Xiao-Hui Wu. A multiscale finite element method for elliptic problems in composite materials and porous media. _Journal_ _of_ _computational_ _physics_, 134(1):169–189, 1997. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. _arXiv_ _preprint_ _arXiv:1502.03167_, 2015. 30 Kevin Jarrett, Koray Kavukcuoglu, Yann Lecun, et al. What is the best multi-stage architecture for object recognition? In _2009_ _IEEE_ _12th_ _International_ _Conference_ _on_ _Computer_ _Vision_, pages 2146–2153. IEEE, 2009. P Jenny, SH Lee, and HA Tchelepi. Multi-scale finite-volume method for elliptic problems in subsurface flow simulation. _Journal_ _of_ _Computational_ _Physics_, 187(1):47–67, 2003. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. _arXiv_ _preprint_ _arXiv:1412.6980_, 2014. Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hy perband: A novel bandit-based approach to hyperparameter optimization. _arXiv_ _preprint_ _arXiv:1603.06560_, 2016. Ivan Lunati and Patrick Jenny. Multiscale finite-volume method for compressible multiphase flow in porous media. _Journal_ _of_ _Computational_ _Physics_, 216(2):616–636, 2006. Ivan Lunati and Patrick Jenny. Multiscale finite-volume method for density-driven flow in porous media. _Computational_ _Geosciences_, 12(3):337–350, 2008. Olav Møyner, Knut-Andreas Lie, et al. A multiscale method based on restriction-smoothed basis functions suitable for general grids in high contrast media. In _SPE Reservoir Simulation_ _Symposium_ . Society of Petroleum Engineers, 2015. David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by back-propagating errors. _Cognitive_ _modeling_, 5(3):1, 1988. Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical Bayesian optimization of machine learning algorithms. In _Advances_ _in_ _neural_ _information_ _processing_ _systems_, pages 2951–2959, 2012. Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdi nov. Dropout: a simple way to prevent neural networks from overfitting. _Journal_ _of_ _Machine_ _Learning_ _Research_, 15(1):1929–1958, 2014. Robert Tibshirani. A comparison of some error estimates for neural network models. _Neural_ _Computation_, 8(1):152–163, 1996. Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. _COURSERA:_ _Neural_ _Networks_ _for_ _Machine_ _Learning_, 4(2), 2012. 31

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.