Application of Inter-Well Connectivity Analysis with a Data-Driven Method in the SAGD Development of Heavy Oil Reservoirs

: The development of heavy oil reservoirs in China is of great signiﬁcance to safeguard national energy security, but great challenges are faced due to the complex and heterogeneous reservoir properties. Inter-well connectivity analysis is critical to enhancing the development performance, as it is a good way to interpret ﬂuid ﬂow and provides a theoretical basis for injection-production optimization. Data-driven deep learning methods have been widely used in reservoir development and can be employed to develop surrogate models of injection and production and to infer inter-well connectivity. In this study, the model performance of a recurrent neural network (RNN) and its four variants were evaluated and compared in a temporal production prediction. The comparison results showed that bidirectional gated recurrent unit (Bi-GRU) is the optimal algorithm with the highest accuracy of 0.94. A surrogate model was established to simulate the inter-well connectivity of steam-assisted gravity drainage (SAGD) in the research area by utilizing the Bi-GRU algorithm. A global sensitivity analysis method, Fourier amplitude sensitivity testing (FAST), was introduced and combined with the surrogate model to explain the inﬂuence of the input variables on the output variables by quantitatively calculating the sensitivity of each variable. Quantitative results for the inter-well connectivity of SAGD were derived from the sensitivity analysis of the proposed method, which was effectively applied to typical linear patterns and ﬁve-spot patterns. Inter-well connectivity varied from 0.1 to 0.58 in test applications, and mutual corroboration with previous geological knowledge can further determine the distribution of the interlayer in the reservoir. The workﬂow proposed in this study provides a new direction for analyzing and inferring the inter-well connectivity of SAGD in Northeast China heavy oil reservoirs.


Introduction
Heavy oil is crude oil with a viscosity greater than 50 mPa•s or a degassed crude oil viscosity greater than 100 mPa•s.In general, heavy oil also has a large density.According to data released by the Energy Minerals Division of the American Association of Petroleum Geologists (AAPG) in 2019, global bitumen and heavy oil resources are estimated to be approximately 9380 × 10 8 t, with more than 80% located in Canada, Venezuela, and the United States [1][2][3].China has already discovered over 70 heavy oil fields in more than a dozen basins and is the world's fourth-largest country with heavy oil resources [4].Heavy oil is an important raw material for processing high-grade asphalt, high-grade engine oil, and aerospace fuel.However, heavy oil reservoirs have many types, are deeply buried, and are severely heterogeneous in terms of reservoir properties [5].Therefore, choosing the most effective technical means is critical for the efficient development of such reservoirs.
The development methods for heavy oil mainly include thermal-assisted and solventbased methods.Steam-assisted gravity drainage (SAGD), cyclic steam stimulation (CSS), and steam flooding have been widely used for more than 30 years [6].The viscosity of heavy oil is greatly affected by temperature and decreases rapidly with a minor increase in temperature.To enhance oil recovery (EOR), the main methods are lowering oil viscosity and increasing oil mobility [7,8].
Steam-assisted gravity drainage (SAGD) is a development technique that involves injecting steam to reduce the viscosity of heavy crude oil.It is a substitute development method after steam stimulation.SAGD technology typically places a horizontal well at the bottom of the reservoir as a production well and one horizontal well or multiple vertical wells above the production well as gas injection wells [9].Steam is injected into the oil layer from an upper well and rises to the top, where it comes in contact with the cool oil, which gradually condenses and forms a mixture of condensate and heated crude oil.The condensate water and heated crude oil are drained into the production well under the force of gravity and produced from it [10].The schematic diagram of SAGD is shown in Figure 1.In order to better characterize the fluid flow between injection and production wells and to provide a theoretical basis for injection-production optimization, inter-well connectivity analysis was employed to explain the contribution of injection wells to production wells and to quantitatively demonstrate the relationship between injection and production wells.
The development methods for heavy oil mainly include thermal-assisted and sol vent-based methods.Steam-assisted gravity drainage (SAGD), cyclic steam stimulation (CSS), and steam flooding have been widely used for more than 30 years [6].The viscos ity of heavy oil is greatly affected by temperature and decreases rapidly with a mino increase in temperature.To enhance oil recovery (EOR), the main methods are lowering oil viscosity and increasing oil mobility [7,8].
Steam-assisted gravity drainage (SAGD) is a development technique that involve injecting steam to reduce the viscosity of heavy crude oil.It is a substitute developmen method after steam stimulation.SAGD technology typically places a horizontal well a the bottom of the reservoir as a production well and one horizontal well or multiple ver tical wells above the production well as gas injection wells [9].Steam is injected into the oil layer from an upper well and rises to the top, where it comes in contact with the coo oil, which gradually condenses and forms a mixture of condensate and heated crude oil The condensate water and heated crude oil are drained into the production well unde the force of gravity and produced from it [10].The schematic diagram of SAGD is shown in Figure 1.In order to better characterize the fluid flow between injection and produc tion wells and to provide a theoretical basis for injection-production optimization, in ter-well connectivity analysis was employed to explain the contribution of injection well to production wells and to quantitatively demonstrate the relationship between injection and production wells.Over the past few decades, well connectivity analysis methods have mainly con sisted of two categories: experimental test analysis and data-based simulation analysis Experimental test analysis methods include the tracer test, interference well test, crude oi physicochemical analysis, physical simulation experiments, etc.
The tracer test is a powerful and practical technique for characterizing inter-wel connectivity by injecting tracers into the flow stream of a production or injection well to determine the hydraulic conductivity, effective porosity, preferential fluid paths, and velocities [11][12][13].Kumar et al. [14] analyzed well interference by evaluating tracer re covery and pressure response times and established an effective reservoir model to sim ulate well interference.This study provides a typical tool for understanding inter-wel connectivity between injection and production wells, which is useful for optimizing infil well drilling and well spacing.Hu et al. [15] found that low pore connectivity was re sponsible for the steep decline in the initial production stage of gas production wells in the Barnett Formation by analyzing tracer recovery.The experimental results were con sistent with the interpretation of pore connectivity using the percolation theory.
Crude oil chromatographic fingerprint analysis is a physicochemical analysis method This method obtains and analyzes geochemical information regarding the crude oil in the reservoir at the molecular level, extracts the effective geochemical parameters, and estab lishes the characteristic fingerprints of each crude oil sample for comparison in order to identify and determine the connectivity between reservoirs [16].Xu et al. [17] proposed a Over the past few decades, well connectivity analysis methods have mainly consisted of two categories: experimental test analysis and data-based simulation analysis.Experimental test analysis methods include the tracer test, interference well test, crude oil physicochemical analysis, physical simulation experiments, etc.
The tracer test is a powerful and practical technique for characterizing inter-well connectivity by injecting tracers into the flow stream of a production or injection well to determine the hydraulic conductivity, effective porosity, preferential fluid paths, and velocities [11][12][13].Kumar et al. [14] analyzed well interference by evaluating tracer recovery and pressure response times and established an effective reservoir model to simulate well interference.This study provides a typical tool for understanding inter-well connectivity between injection and production wells, which is useful for optimizing infill well drilling and well spacing.Hu et al. [15] found that low pore connectivity was responsible for the steep decline in the initial production stage of gas production wells in the Barnett Formation by analyzing tracer recovery.The experimental results were consistent with the interpretation of pore connectivity using the percolation theory.
Crude oil chromatographic fingerprint analysis is a physicochemical analysis method.This method obtains and analyzes geochemical information regarding the crude oil in the reservoir at the molecular level, extracts the effective geochemical parameters, and establishes the characteristic fingerprints of each crude oil sample for comparison in order to identify and determine the connectivity between reservoirs [16].Xu et al. [17] proposed a reservoir fluid connectivity identification method by utilizing clustering based on whole-oil gas chromatographic fingerprint analysis data.Dekker et al. [18] used multidimensional gas chromatography (MDGC) based on 123 light oils and condensate analysis results, proposing a detailed description of different fluids and reconstructing reservoir connectivity.
The tracer test and crude oil physicochemical analysis can accurately and quantitatively characterize inter-well connectivity, but such methods are time-consuming and expensive.During the reservoir development stage, it is impossible to routinely test each well.Physical model experiments are often used to simulate and infer well-to-well connectivity.Yu et al. [19] proposed a method to infer inter-well connectivity by developing physical models to simulate the pressure response of well interference.Wang et al. [20] designed and performed nine physical modeling experiments to study injection-production interference and infer inter-well connectivity.Physical methods solve the problems of time and cost related to the tracer test and crude oil physicochemical analysis, but they can only simulate a small portion of a reservoir.
Data-based simulation analysis is another method widely used to quantitatively characterize inter-well connectivity; for example, the correlation method, the physical model analysis method, and reservoir numerical simulation.Correlation analysis was developed to calculate the degree of linear correlation between two variables.The correlation coefficients are distributed between −1 and 1, with 1 representing a positive correlation, −1 representing a negative correlation, and 0 representing no correlation.Heffer et al. [21] proposed a method to determine inter-well interaction by calculating the Spearman's rank correlation coefficient between rates of injection and production wells.Tian and Horne [22] developed a modified Pearson correlation analysis method to infer connectivity that considered geological parameters.Pratama et al. [23] proposed an inter-well communication strength evaluation method derived from Spearman's rank correlation and classified well pairs based on clustering results.However, correlation analysis only calculates the linear relationship between oil production and injection and is unable to characterize the complex subsurface characteristics between well pairs.The physical model analysis method is a commonly used inter-well connectivity analysis method based on physical laws, such as the material balance equation and Darcy's law, employed to simulate the flow of subsurface fluids [24][25][26].Yousef et al. [27] developed a capacitance model to infer the communication between well pairs by considering the compressibility and transmissibility of the reservoir and fluid.Mirzayev et al. [28] proposed an alternative method solely using production and injection fluctuations based on the capacitance model theory and estimated inter-well connectivity in tight reservoirs.Wang et al. [29] improved capacitance resistance models by combining them with the stochastic simplex approximate gradient (StoSAG) optimization algorithm.This improved method revealed an inner relationship of multi-phase flow behaviors and could determine injector-producer connectivity.
Reservoir numerical simulation-based streamline simulation is a mature solution for providing multi-phase fluid flow analysis and interaction between well pairs based on well-fitted geological models [30][31][32].Tian et al. [33] combined finite volume reservoir simulation, streamline tracing, and inter-well flux evaluation to integrate a waterflood optimization method.This method quantified multi-phase fluxes and communication between injectors and producers.Mursyidah et al. [34] optimized a waterflood well pattern and enhanced oil recovery by utilizing a streamline simulator.Numerical simulation methods are computationally -intensive and resource-intensive, although they can quickly analyze connectivity.A great amount of reservoir geological research work, robust static geological models, well-fitted dynamic simulation models, and a powerful hash rate are the prerequisites for a simulation.
Artificial intelligence (AI)-based prediction and optimization methods have been widely applied in the upstream section of the oil and gas industry.Clustering analysis is an unsupervised vector quantization algorithm, which has been employed in evaluating oil and gas production dynamics and classifying reservoir facies [35][36][37].Regression algorithms, such as decision tree, random forest (RF), support vector machine (SVM), and Bayesian linear regression, are widely used supervised learning methods.Xue et al. [38] developed a shale gas production prediction workflow by utilizing a multi-objective RF regression algorithm.Huang et al. [39] quantitatively analyzed the main controlling factors for oil saturation variation in a waterflood sandstone reservoir by establishing an RF regression model.Neural network algorithms have more advantages than conventional regression algorithms in temporal prediction problems.Long short-term memory (LSTM) is a typical neural network algorithm used to forecast single-well or reservoir production that has been reported in many types of studies [40][41][42][43].Wei et al. [44] forecast saturation and pressure distribution in a carbonate reservoir by utilizing a convolutional LSTM (ConvLSTM) algorithm.
In this study, we propose an innovative data-driven method to quantitatively evaluate the inter-well connectivity of SAGD in heavy oil reservoirs in Northeast China.The obtained results are important indexes for evaluating the reservoir development effect and determining the optimal development strategies.The results also further deepen the understanding of geological achievements.This work has guiding significance for the production of heavy oil.
The sections are organized as follows: Section 2 introduces the reservoir background, the motivation of this study, and the overall workflow of the proposed method.Injectionproduction surrogate neural network model training, testing, and evaluation are described in Section 3. Section 4 proposes a global sensitivity analysis method to infer inter-well connectivity based on the optimal surrogate model.Finally, Section 5 presents the discussion and conclusions.

Reservoir Background and Development Challenges
Heavy oil contains a large number of heavy components, such as asphaltene and cementation.The structural forces of hydrogen bonding and molecular entanglement between the asphaltene dispersed phases and the cementation molecules results in the formation of a spatial network structure, in which the flow resistance between the molecules increases and the viscosity increases sharply [45].However, when the temperature of heavy oil exceeds the critical temperature of fluid change, the heavy oil will transform from a non-Newtonian fluid to a Newtonian fluid [46].Therefore, heating to reduce viscosity is currently one of the most common and economical means of developing heavy oil.
The research area in this study (the D84 study area) has a shallow burial depth, poor diagenesis, a loose rock structure, and low maturity, resulting in relatively good reservoir physical properties.However, the heterogeneity of the reservoir varies at different layers, in which different SAGD development well combination modes can be selected according to the reservoir characteristics.The effective thickness of the top reservoir X1 ranges from 10 to 25 m, the average porosity ranges from 22% to 31%, the average permeability ranges from 1000 to 2500 mD, and the reservoir heterogeneity coefficient is 0.46, which depicts a homogeneous reservoir that is suitable for double horizontal well SAGD development.Meanwhile, the effective thickness of the bottom reservoir X6 ranges from 42 to 85 m, the average porosity ranges from 20% to 27%, the average permeability ranges from 800 to 1100 mD, and the reservoir heterogeneity coefficient is 1.14, which depicts a heterogeneous reservoir suitable for SAGD development with a combination of vertical and horizontal wells [47].
In order to effectively study the inter-well connectivity of SAGD, the X6 reservoir was selected as the target layer in this study.The reservoir X6 has an unstable distribution and varying thickness for the interlayers.The interlayers mainly consist of shale, siltstone, and mudstone.The thickness and extension length of these interlayers have different effects on the inter-well connectivity of SAGD.Thin interlayers (less than 1.0 m thick) with short extensions may have a blocking effect on permeability in local areas, while thick interlayers (greater than 1.0 m thick) with longer extensions may affect the expansion of steam chambers.
An SAGD development method combining vertical and horizontal wells has a variety of injection-production schemes to choose from.If the injection-production scheme is unreasonable, it will have a low recovery degree problem.In general, a reservoir numerical simulation is a good solution; however, due to the influence of reservoir heterogeneity, the numerical simulation of the X6 reservoir is not ideal.The motivation of this study was to infer the connectivity between wells based on dynamic production data and to use the connectivity to optimize the injection-production scheme.

Workflow of the Study
The overall workflow is presented in Figure 2  tensions may have a blocking effect on permeability in local areas, while thick interlayer (greater than 1.0 m thick) with longer extensions may affect the expansion of steam cham bers.
An SAGD development method combining vertical and horizontal wells has a vari ety of injection-production schemes to choose from.If the injection-production scheme i unreasonable, it will have a low recovery degree problem.In general, a reservoir nu merical simulation is a good solution; however, due to the influence of reservoir hetero geneity, the numerical simulation of the X6 reservoir is not ideal.The motivation of thi study was to infer the connectivity between wells based on dynamic production data and to use the connectivity to optimize the injection-production scheme.

Workflow of the Study
The overall workflow is presented in Figure 2

Algorithm Selection
One of the shortcomings of traditional neural networks is the lack of persistence.Recurrent neural networks (RNNs) can imitate human continuous thinking, learn through loops, and retain previous information.Therefore, RNNs are widely used to deal with timeseries problems.The basic structure of unrolled RNN chain-loops is presented in Figure 3, where X t and h t are the input and output, which pass and carry previous information to the next iterative step.

Algorithm Selection
One of the shortcomings of traditional neural networks is the lack of persistence.Recurrent neural networks (RNNs) can imitate human continuous thinking, learn through loops, and retain previous information.Therefore, RNNs are widely used to deal with time-series problems.The basic structure of unrolled RNN chain-loops is presented in Figure 3, where Xt and ht are the input and output, which pass and carry previous information to the next iterative step.Long short-term memory (LSTM), which is derived from RNNs, is a special type of network that avoids the "long-term dependency" defect of RNNs, a concept that was first introduced by Hochreiter and Schmidhuber [48].The basic structure of LSTM is the same as that of the RNN, but the internal structure is more complex.As shown in Figure 4, there is only one tanh layer inside the RNN, while LSTM introduces a memory unit, forget gate, input gate, and output gate, respectively; controls the flow of information; and determines the input and output of information.The three gates are expressed as Equations ( 1)-( 6).The internal structure enables LSTM to selectively memorize and forget long-term information, effectively avoiding the problems of gradient vanishing and exploding and increasing the computational speed.

𝑓 = 𝜎 𝑊 ⋅ [ℎ , 𝑥 ] + 𝑏
(1) where  represents the forget gate; () = (1 +  ) is the sigmoid activation function that maps variables between 0 and 1;  and  denote the weight matrix and bias matrix of the forget gate, respectively; and ℎ refers to the output at the previous timestep  − 1.

𝑖 = 𝜎(𝑊 ⋅ [ℎ , 𝑥 ] + 𝑏 )
(2) where  is the input gate;  and  are the weight matrix and bias matrix of the input gate, respectively;  represents a new candidate value vector created by the tanh layer; tanh  = = denotes the hyperbolic tangent function that maps variables between −1 and 1; and  and  refer to the weight matrix and bias matrix of the cell state, respectively.
The new candidate value vector  is updated by the previous  multiplied by the forget gate  with  ⋅  added, as shown below: where  is the output gate;  and  are the weight and bias matrix of the output gate, respectively; and ℎ represents the output value of the current timestep , and also the input value of the next timestep  + 1.Long short-term memory (LSTM), which is derived from RNNs, is a special type of network that avoids the "long-term dependency" defect of RNNs, a concept that was first introduced by Hochreiter and Schmidhuber [48].The basic structure of LSTM is the same as that of the RNN, but the internal structure is more complex.As shown in Figure 4, there is only one tanh layer inside the RNN, while LSTM introduces a memory unit, forget gate, input gate, and output gate, respectively; controls the flow of information; and determines the input and output of information.The three gates are expressed as Equations ( 1)-( 6).The internal structure enables LSTM to selectively memorize and forget long-term information, effectively avoiding the problems of gradient vanishing and exploding and increasing the computational speed.
where f t represents the forget gate; σ(x) = (1 + e −x ) −1 is the sigmoid activation function that maps variables between 0 and 1; W f and b f denote the weight matrix and bias matrix of the forget gate, respectively; and h t−1 refers to the output at the previous timestep t − 1.
where i t is the input gate; W i and b i are the weight matrix and bias matrix of the input gate, respectively; C t represents a new candidate value vector created by the tanh layer; tanhx = sinhx cosh x = e x −e −x e x +e −x denotes the hyperbolic tangent function that maps variables between −1 and 1; and W c and b c refer to the weight matrix and bias matrix of the cell state, respectively.
The new candidate value vector C t is updated by the previous C t−1 multiplied by the forget gate f t with i t • C t added, as shown below: where  represents the "update gate" and  denotes the "reset gate".The reset gate controls what information should be forgotten at the previous timestep.When  tends to 0, the state information at  − 1 will be forgotten, and the hidden state ℎ will be reset to the current input information.The update gate decides whether to update the hidden state to the new state ℎ (the function is equivalent to merging the forget gate and the input gate in LSTM). and  are the weight and bias matrix of the update gate,  and  are the weight and bias matrix of the reset gate, and  and  are the weight and bias matrix of the output gate, respectively.The bidirectional recurrent neural network (Bi-RNN) was invented and introduced by Schuster and Paliwal [50].The Bi-RNN was designed to enhance the amount of input information by connecting two hidden layers, enabling some neural networks to capture the sequence information from both a backward direction (future to past) and a forward direction (past to future).Subsequently, the bidirectional recursive structure improved LSTM and the GRU to form Bi-LSTM and Bi-GRU, as shown in Figure 5.To further improve the LSTM performance, Cho et al. [49] introduced the gated recurrent unit (GRU) by combining the forget gate and the input gate into an "update gate" and merging the cell state and hidden state.The models developed by GRU are simpler and computationally cheaper than standard LSTMs.The internal structure of the GRU cell state is shown in Figure 4 and expressed as Equations ( 7)-( 10): where u t represents the "update gate" and r t denotes the "reset gate".The reset gate controls what information should be forgotten at the previous timestep.When r t tends to 0, the state information at t − 1 will be forgotten, and the hidden state h t will be reset to the current input information.The update gate decides whether to update the hidden state to the new state h t (the function is equivalent to merging the forget gate and the input gate in LSTM).W u and b u are the weight and bias matrix of the update gate, W r and b r are the weight and bias matrix of the reset gate, and W h and b h are the weight and bias matrix of the output gate, respectively.The bidirectional recurrent neural network (Bi-RNN) was invented and introduced by Schuster and Paliwal [50].The Bi-RNN was designed to enhance the amount of input information by connecting two hidden layers, enabling some neural networks to capture the sequence information from both a backward direction (future to past) and a forward direction (past to future).Subsequently, the bidirectional recursive structure improved LSTM and the GRU to form Bi-LSTM and Bi-GRU, as shown in Figure 5.
The bidirectional recurrent neural network (Bi-RNN) was invented and introduced by Schuster and Paliwal [50].The Bi-RNN was designed to enhance the amount of input information by connecting two hidden layers, enabling some neural networks to capture the sequence information from both a backward direction (future to past) and a forward direction (past to future).Subsequently, the bidirectional recursive structure improved LSTM and the GRU to form Bi-LSTM and Bi-GRU, as shown in Figure 5.

Model Structure, Training, and Evaluation
The selection of variables is an important part of the process of building an injectionproduction surrogate model.Linear patterns and five-spot patterns with vertical wells as the injection wells and horizontal wells as the production wells are two typical well layouts in the X6 reservoir, as shown in Figure 6.Several variables were selected to develop the surrogate model and to determine the interaction between injectors and producers, as presented in Table 1.

Model Structure, Training, and Evaluation
The selection of variables is an important part of the process of building an injection-production surrogate model.Linear patterns and five-spot patterns with vertical wells as the injection wells and horizontal wells as the production wells are two typical well layouts in the X6 reservoir, as shown in Figure 6.Several variables were selected to develop the surrogate model and to determine the interaction between injectors and producers, as presented in Table 1.The input variables were gas injection rate, injection pressure, and well opening status, and the output variable was gas production rate.The surrogate model was built to simulate the injection-production relationship and to infer inter-well connectivity.
The root mean square error (RMSE) and mean absolute error (MAE) were introduced to evaluate the performance of the surrogate models based on different algorithms, as shown in Equations ( 11) and (12).In order to better compare the performance  The input variables were gas injection rate, injection pressure, and well opening status, and the output variable was gas production rate.The surrogate model was built to simulate the injection-production relationship and to infer inter-well connectivity.
The root mean square error (RMSE) and mean absolute error (MAE) were introduced to evaluate the performance of the surrogate models based on different algorithms, as shown in Equations ( 11) and (12).In order to better compare the performance between the algorithms, the accuracy evaluation criteria are defined in Equations ( 11)-( 15): where δ i is the relative deviation; δ represents the average absolute relative deviation; A refers to the accuracy; y Pred i denotes the prediction result; y Actual i stands for the actual value; and y is the mean of y Actual i .
In order to build a more accurate surrogate model, the RNN algorithm and its four variant algorithms mentioned above were tested based on optimized model parameters.Figure 7 presents the historical gas production of the producer and the prediction results of different algorithm models.The actual historical data for the first 3000 days since the producer was put into production were input into the model training, and the data for the last 300 days were used as the test set to check the model accuracy.
where  is the relative deviation;  ̅ represents the average absolute relative deviation;  refers to the accuracy;  denotes the prediction result;  stands for the actual value; and  is the mean of  .In order to build a more accurate surrogate model, the RNN algorithm and its four variant algorithms mentioned above were tested based on optimized model parameters.Figure 7 presents the historical gas production of the producer and the prediction results of different algorithm models.The actual historical data for the first 3000 days since the producer was put into production were input into the model training, and the data for the last 300 days were used as the test set to check the model accuracy.The calculation results for the RMSE, MAE, and accuracy for the prediction and the actual data are shown in Figure 8.The Bi-GRU algorithm achieved the best performance and the best fitting effect among these algorithms.Comparisons elucidated that, on one hand, the prediction accuracy of the simple RNN algorithm was lower than that of its variants; on the other hand, the introduction of the bidirectional recursive neural network significantly enhanced the model performance in the time series production prediction problem.Therefore, the gas production prediction model based on the Bi-GRU algorithm was employed as the surrogate model for the analysis of connectivity between wells in this study.The calculation results for the RMSE, MAE, and accuracy for the prediction and the actual data are shown in Figure 8.The Bi-GRU algorithm achieved the best performance and the best fitting effect among these algorithms.Comparisons elucidated that, on one hand, the prediction accuracy of the simple RNN algorithm was lower than that of its variants; on the other hand, the introduction of the bidirectional recursive neural network significantly enhanced the model performance in the time series production prediction problem.Therefore, the gas production prediction model based on the Bi-GRU algorithm was employed as the surrogate model for the analysis of connectivity between wells in this study.

Sensitivity Analysis Methods
SAGD development in heavy oil reservoirs is a complex process, and it is difficu quantitatively measure the impact of injection wells on production wells.Sensiti analysis is an effective tool to deal with such problems and includes two categories: lo sensitivity analysis and global sensitivity analysis.
Local sensitivity analysis utilizes a variation of model output to determine the s sitivity of one input variable by changing the value of the input variable while keep the rest of the variables' nominal values.Common local sensitivity analysis methods clude the one-factor-at-a-time method and the derivative-based local method.Th methods are mature and simple to implement, but there are still pitfalls.Local sensiti analysis restricts the values of variables to a limited range, making the results unrob and ineffective for nonlinear models.Global sensitivity analyses are methods that s ultaneously consider the effect of all input variables on the model output and incl regression analysis, variance-based methods, and variogram analysis of response faces methods.
Analysis of variance (ANOVA) methods quantify the uncertainty of input and o put variables as probability distributions and decompose the output variance into c ponents attributable to input variables.Therefore, the sensitivity of one output to other input variable is measured by the amount of output variance caused by that in Variance-based sensitivity analysis methods can be expressed as Equations ( 16)-( 22): where  represents a model and  is a set of input variables, 0 ≤  ≤ 1,  = 1, … ANOVA decomposition is expressed as: The integral of each term is 0 when  is implied as a constant: The conditional variance representing the contribution of each term to the t variance of () is:

Analysis of Inter-Well Connectivity of SAGD 4.1. Sensitivity Analysis Methods
SAGD development in heavy oil reservoirs is a complex process, and it is difficult to quantitatively measure the impact of injection wells on production wells.Sensitivity analysis is an effective tool to deal with such problems and includes two categories: local sensitivity analysis and global sensitivity analysis.
Local sensitivity analysis utilizes a variation of model output to determine the sensitivity of one input variable by changing the value of the input variable while keeping the rest of the variables' nominal values.Common local sensitivity analysis methods include the one-factor-at-a-time method and the derivative-based local method.These methods are mature and simple to implement, but there are still pitfalls.Local sensitivity analysis restricts the values of variables to a limited range, making the results unrobust and ineffective for nonlinear models.Global sensitivity analyses are methods that simultaneously consider the effect of all input variables on the model output and include regression analysis, variance-based methods, and variogram analysis of response surfaces methods.
Analysis of variance (ANOVA) methods quantify the uncertainty of input and output variables as probability distributions and decompose the output variance into components attributable to input variables.Therefore, the sensitivity of one output to the other input variable is measured by the amount of output variance caused by that input.Variance-based sensitivity analysis methods can be expressed as Equations ( 16)-( 22): where Y represents a model and X is a set of input variables, 0 ANOVA decomposition is expressed as: The integral of each term is 0 when f 0 is implied as a constant: The conditional variance representing the contribution of each term to the total variance of f (X) is: Energies 2023, 16, 3134 11 of 17 The sum of all conditional variances is the total variance V: The sensitivity coefficient is defined as: The first-order sensitivity of the input variable X i to the model output is expressed as:

Fourier Amplitude Sensitivity Testing Method
Fourier amplitude sensitivity testing (FAST) is a classical global sensitivity analysis method based on variance analysis and the Fourier transform that was introduced by Cukier et al. [51][52][53].The main idea of the FAST method is to utilize periodic sampling methods and Fourier transformation to decompose the variance of the model output into the partial contribution variance of each input variable.The contribution of the input variables to model uncertainty is measured by the ratio of partial variance to model output variance.The FAST method is expressed as Equations ( 23)- (33).
Assume that all input parameters {x 1 , . . . ,x n } can be defined as parameter space: where f j x j is the probability density function of the input parameters.FAST introduces a signal for each input variable.Variance of output is decomposed into contribution variance of input variables by Fourier transformation.A periodic function introduced by FAST is defined as: x j = G θ j (24) x j (s) = G j sin w j s where x j is a random variable ranging from 0 to 2π; G θ j represents a periodic function used to generate samples of parameter x i ; G j refers to the conversion operator; s ranges between [−∞, +∞]; and w j denotes the frequency of each variable.Equation ( 26) is a widely used periodic function: The model output is expanded into the Fourier series form as: The Fourier coefficients are defined as: where j is a positive integer frequency.
The Fourier series module is defined as: The variance of each input variable x i is expressed as: where N is the number of samples, p ∈ Z; and pω j ≤ 1 2 (N − 1).The total variance is expressed as: The first-order sensitivity of input variable X i to the model output is expressed as:

Connectivity Inferring Results
In this section, FAST was implemented to quantify the sensitivity of the input variables based on the well-fitted Bi-GRU surrogate model.The sensitivity calculation results for the two types of well layouts (five-spot pattern and linear pattern) are shown in Table 2. inter-well connectivity between the injector and the producer is defined in Equation (34).The calculation of total sensitivity excludes choke size because the effect of choke size comes from the producer itself, not from the injectors.
where C k represents the inter-well connectivity between injector k and producer; S IP k is the sensitivity of the injection pressure of injector k; S GIR k denotes the sensitivity of the gas injection rate of injector k; and S Total refers to the sum of the sensitivity of all the variables.The inter-well connectivity results of the two typical well layouts were quantified based on the proposed method.Figure 9a presents the effect of three injectors on the producer in the linear pattern, and Figure 9b illustrates the relationship between the four injectors and the producer.We found that the connectivity between some injection wells and production wells was poor.Combined with the reservoir geological characteristics, there are thick interlayers above the injection wells with poor connectivity, which affects the expansion of the steam chamber.The injected steam cannot overlap with the upper part of the interlayer and only expands horizontally in the lower part.This leads to a decrease in reservoir thickness between the injector and producer wells and affects the recovery rate.

Conclusions
Inter-well connectivity is a significant index for evaluating the performance of reservoir development and determining optimization strategies.In this study, we evaluated the performance of five different SAGD temporal neural network algorithms in a heavy oil reservoir and developed a well-fitted production prediction model as the surrogate model based on the Bi-GRU algorithm.We introduced a global sensitivity analysis method, FAST, to quantify the effect of the input variables on the output variable and inferred the inter-well connectivity derived from the sensitivity.The specific conclusions are as follows: 1.The performance of the model based on the RNN and its four variants was evaluated and compared in a temporal production prediction.The comparison results showed that Bi-GRU was the optimal algorithm with an accuracy of 0.94.A surrogate model based on the Bi-GRU algorithm was established in this study, which fit well with the production of the producers and provided a basis for connectivity analysis; 2. We introduced the global sensitivity analysis method FAST into the surrogate model, which explained the influence of the input variables on the output variable by quantitatively calculating the sensitivity of each variable; 3. The method proposed in this study combined a surrogate model with a sensitivity analysis method to obtain quantitative results for the inter-well connectivity, and it was effectively applied to two SAGD well layouts (linear pattern and five-spot pattern) combining horizontal and vertical wells.Inter-well connectivity varied from 0.1 to 0.58 in test applications, and mutual corroboration with previous geological knowledge can further determine the distribution of the interlayer in the reservoir.
The method proposed in this study provides a new idea for the analysis of the inter-well connectivity of SAGD.

Discussion
Based on this study, we obtained the following inspirations from the connectivity inference results, from which our future work will be derived: 1.The accuracy of geological data is restricted to a small range due to technical limitations.Combining geological data with the connectivity-inferring results from actual We found that the connectivity between some injection wells and production wells was poor.Combined with the reservoir geological characteristics, there are thick interlayers above the injection wells with poor connectivity, which affects the expansion of the steam chamber.The injected steam cannot overlap with the upper part of the interlayer and only expands horizontally in the lower part.This leads to a decrease in reservoir thickness between the injector and producer wells and affects the recovery rate.

Conclusions
Inter-well connectivity is a significant index for evaluating the performance of reservoir development and determining optimization strategies.In this study, we evaluated the performance of five different SAGD temporal neural network algorithms in a heavy oil reservoir and developed a well-fitted production prediction model as the surrogate model based on the Bi-GRU algorithm.We introduced a global sensitivity analysis method, FAST, to quantify the effect of the input variables on the output variable and inferred the inter-well connectivity derived from the sensitivity.The specific conclusions are as follows: 1.
The performance of the model based on the RNN and its four variants was evaluated and compared in a temporal production prediction.The comparison results showed that Bi-GRU was the optimal algorithm with an accuracy of 0.94.A surrogate model based on the Bi-GRU algorithm was established in this study, which fit well with the production of the producers and provided a basis for connectivity analysis; 2.
We introduced the global sensitivity analysis method FAST into the surrogate model, which explained the influence of the input variables on the output variable by quantitatively calculating the sensitivity of each variable; 3.
The method proposed in this study combined a surrogate model with a sensitivity analysis method to obtain quantitative results for the inter-well connectivity, and it was effectively applied to two SAGD well layouts (linear pattern and five-spot pattern) combining horizontal and vertical wells.Inter-well connectivity varied from 0.1 to 0.58 in test applications, and mutual corroboration with previous geological knowledge can further determine the distribution of the interlayer in the reservoir.The method proposed in this study provides a new idea for the analysis of the inter-well connectivity of SAGD.

Discussion
Based on this study, we obtained the following inspirations from the connectivity inference results, from which our future work will be derived: 1.
The accuracy of geological data is restricted to a small range due to technical limitations.Combining geological data with the connectivity-inferring results from actual dynamic performance can help determine the distribution of reservoir interlayers and thief zones and reduce uncertainty regarding the characterization of the reservoir; 2.
Inter-well connectivity results based on the proposed method can help adjust the current well pattern and optimize the current injection-production scheme.For a well-connected injector-producer, regular monitoring is necessary to avoid gas breakthrough; other development methods, such as nitrogen injection-assisted SAGD technology, can effectively reduce the heat transfer rate of steam to the overlying strata and improve the sweep efficiency of lower steam.For injectors and producers with poor connectivity, optimization of the well trajectory, reservoir stimulation measures, and well-type stimulation are optional countermeasures.In future work, we plan to evaluate the impact of different development methods on inter-well connectivity and define dynamic connectivity as development progresses.
and has four parts: (a) collect and process the original data and establish a dataset for model training; (b) develop a well-fitted production-injection surrogate model by testing and evaluating different algorithms; (c) determine the effect of the injectors on the producer based on a global sensitivity analysis method; and (d) infer the inter-well connectivity derived from the effects.
and has four parts: (a) collect and pro cess the original data and establish a dataset for model training; (b) develop a well-fitted production-injection surrogate model by testing and evaluating different algorithms; (c determine the effect of the injectors on the producer based on a global sensitivity analysi method; and (d) infer the inter-well connectivity derived from the effects.

Figure 2 .
Figure 2. Workflow of the proposed method.

Figure 2 .
Figure 2. Workflow of the proposed method.
is the output gate; W o and b o are the weight and bias matrix of the output gate, respectively; and h t represents the output value of the current timestep t, and also the input value of the next timestep t + 1.

Figure 6 .
Figure 6.Two types of SAGD well layouts in the X6 reservoir: (a,b) linear pattern; (c,d) five-spot pattern.

Figure 6 .
Figure 6.Two types of SAGD well layouts in the X6 reservoir: (a,b) linear pattern; (c,d) five-spot pattern.

Figure 7 .
Figure 7.Comparison of prediction results of the five models: (a) history data and prediction results; (b) prediction results.

Figure 7 .
Figure 7.Comparison of prediction results of the five models: (a) history data and prediction results; (b) prediction results.

Table 1 .
Variables of model training.

Table 1 .
Variables of model training.

Table 2 .
Sensitivity calculation results for two types of well layouts.

S j (Linear Pattern) S j (Five-Spot Pattern)
Author Contributions: Conceptualization, S.H. and A.J.; methodology, S.H. and A.J.; software, S.H. and C.W.; validation, A.J. and X.Z.; formal analysis, S.H. and X.S.; investigation, X.Z. and S.H.; resources, A.J.; data curation, X.Z.; writing-original draft preparation, S.H.; writing-review and editing, S.H., A.J. and C.W.; visualization, X.S. and T.X.; supervision, A.J. and X.Z.; project administration, A.J.; funding acquisition, A.J. All authors have read and agreed to the published version of the manuscript.This research was funded by the Science and Technology Project of China National Petroleum Corporation during the 14th Five-Year Plan, grant number 2021DJ1703.Due to the confidentiality of the company, the data that support the findings of this research are unavailable.Data may be available from the corresponding author upon reasonable request.The authors declare no conflict of interest. Funding: