*2.4. Evaluation of the Prediction Model*

To quantitatively evaluate the performance of the prediction model, three statistical matrices were used, namely the mean absolute error (MAE), mean relative error (MRE) and coefficient of determination (R2), which are written as

$$\text{MAE} = \frac{1}{N} \sum\_{i=1}^{N} |y\_i - \mathcal{Y}\_i| \tag{8}$$

$$\text{MRE} = \frac{1}{N} \sum\_{i=1}^{N} \left| \frac{y\_i - \hat{y}\_i}{y\_i} \right| \tag{9}$$

$$\mathbf{R}^2 = \sum\_{i=1}^{N} (y\_i - \mathfrak{Y}\_i)^2 \bigg/ \sum\_{i=1}^{N} (y\_i - \overline{y})^2 \tag{10}$$

where *yi* and *y*ˆ*<sup>i</sup>* are the true and prediction models of the oil increment of conformance control, respectively, *y* is the mean value of the calculated oil increment of conformance control, and *n* is the number of data sample points.

#### **3. Results and Discussion**

#### *3.1. Training and Validation of the Prediction Model*

The exhaustive grid search approach integrated with the five-fold cross-validation shows that the XGBoost predictions are obviously affected by the hyperparameter setting. Table 5 gives the top five scenarios with the highest averaged R2. As can be observed, both the MTD (3) and the LR (<0.1) are relatively small among these top five scenarios, which is consistent with the previous studies [46,47,73] that recommended small MTD and LR values in order to attain the strong generalization capability. The MCM is consistent (7) among these five scenarios, which is larger than the default value given in [68]. A higher MCW value is beneficial to the improvement of generalization capability for the XGBoost model [74,75]. The number of trees (*n*) exhibits significant variations among these five scenarios, which indicates that this hyperparameter exhibits a minor effect on the prediction accuracy for the specific problem in this paper.

**Table 5.** Top five R2 for MTD, LR, MCW and *n,* determined with cross-validation.


Figure 6 depicts the prediction results of different plugging agents for training sets and testing sets using the constructed XGBoost prediction model (with the hyperparameter values producing the highest R2). It is shown that the sample points in the training sets for both N2-foam and gel are approximately located on the 45-degree line (Figure 6), representing relatively high training accuracies. The majority of the data points in the testing sets are grouped around the 45-degree line, although several outliers deviate obviously from the 45-degree line. Generally, the distribution of the data points in the testing sets exhibits a more scattered pattern than the training sets, which may be attributed to the uncertainties with the XGBoost modelling process [68]. Recall that the datasets were generated using numerical simulations based on stochastic geological models and that the information on the spatial heterogeneity was not included in the model input. As the spatial heterogeneity exerts non-negligible effect on the thermal recovery of heavy oil [76,77], the exclusion of information on spatial distribution of formation properties such as NTG, porosity and permeability inevitably result in predication inaccuracies. To possibly eliminate uncertainties with modeling process, we calculated average values of formation properties as input parameters for XGBoost model. However, the same formation parameters and input parameters inevitably include different spatial distributions. Nonetheless, the evaluation matrices, as shown in Table 6, demonstrate overall acceptable error ranges for the validation sets, indicating the constructed models have relatively strong robustness and generalization capability in predicting the unseen data. Besides, this paper is targeted at developing a prediction model for the preliminary screening of the conformance control performance, in order to quickly determine the most suitable well(s) for possible field applications of conformance control; thus, the modeling accuracies are generally acceptable from the perspective of engineering applications.

#### *3.2. Verification of the Model with Real CSS Horizontal Wells*

In this section, the constructed prediction model was further verified with real CSS horizontal wells in the P601 heavy oil reservoir of the Chunfeng Oilfield. Field production

practices suggest that the CSS horizontal wells in the target area can be generally grouped into three categories according to their production characteristics. The first type includes wells that exhibit relatively initial high oil production rates (>20 t/d) and subsequent sharply decreasing trends after approximately five to seven steam stimulation cycles (Figure 7a). The second type of wells are characterized with a gradual climbing trend of oil rates in the initial 5–7 steam stimulation cycles and then a decreasing trend after 7–10 steam stimulation cycles (Figure 7b). The peak oil rates are generally less than 20 t/d for these type of wells. The third type of wells demonstrate relatively low oil rates (<10 t/d) throughout the production life-span (Figure 7c), which were generally shut-in after only 5–10 steam stimulation cycles, due to uneconomic production rates (<2 t/d).

**Figure 6.** Cross plots of the true and prediction profile control oil increment using the XGBoost for the (**a**) N2-form and (**b**) gel.

**Table 6.** Summary of the evaluation matrices for N2-foam and gel.


**Figure 7.** The production performance of three categories of wells. (**a**) The wells of relatively initial high oil production rates and subsequent sharply decreasing trends. (**b**) The wells of a gradual climbing trend of oil rates in the initial cycles and then a decreasing trend. (**c**) The wells of relatively low oil rates throughout the production life span.

A number of six horizontal wells with production characteristics that can be categorized into one of the above three types were picked out from the target block. History matching and subsequent conformance control simulations were conducted for these wells (Figure 8). For each well, the properties for the N2-foam and gel were assigned with the same identical values as previously set. Operational parameters associated with N2-foam were set with an injection rate and total injection volume of 10,000 m3/d and 0.2 PV, respectively. Operational parameters associated with gel generation were the injection of polymer and xlinker, which were 0.2 PV and 0.02 PV, respectively.

**Figure 8.** *Cont*.

**Figure 8.** History matching of cumulative oil, oil rate, and water cut for three types of production wells. (**a**–**f**) History matching of cumulative oil and oil rates for P226, P235, P188, P185, X296 and X265, respectively. (**g**–**l**) History matching of water cut for P226, P235, P188, P185, X296 and X265, respectively. P226 well and P235 well belong to the first type, P188 well and P185 well belong to the second type and X296 and X265 belong to the third type.

Key reservoir parameters calibrated with history matching were used as inputs into the XGBoost model to estimate the conformance control performance. Figure 9 compares the predicted incremental oil productions using numerical simulations and using the XGBoost model. As can be observed, the incremental oil productions estimated with the XGBoost agree well with the simulated values for both the N2-foam and gel agents. The MAE and MRE for the N2-foam agent are 67.65 t and 7.99%, respectively. The MAE and MRE for gel agent are 132.68 t and 12.55%, respectively. These matrices suggest a relatively strong reliability of the constructed model for evaluating the conformance performance of real wells.

#### *3.3. Quantitative Evaluation of the Input Feature Importance*

In this section, the permutation importance (PI) [78,79] was used to quantify the effect of each input variable to the incremental oil production using different plugging agents. The PI is able to accurately evaluate the non-monotonicity of the input variable, which is superior to other commonly used measures, such as Pearson and Spearman correlation coefficients, which can only reflect linear correlations [78].

**Figure 9.** Comparisons of prediction results for profile control potential using the numerical simulation and XGBoost prediction model. (**a**) Potential of N2-foam profile control. (**b**) Potential of gel profile control.

Figure 10a showed that the NTG has the highest PI value and exerted the most significant influence on the potential of N2-foam conformance control among all the factors investigated. The net to gross can affect the value of geological reserves; therefore, the geological reserves can make a great impact on the potential of N2-foam conformance control. The PI of the N2-foam injection and variation coefficient of permeability are comparable, which are slightly higher than that of oil recovery and steam quality. The variation coefficient of permeability affected the degree of stratigraphic heterogeneity, and the heterogeneity, to some extent, impacted the potential of N2-foam conformance control. The steam quality can influence oil recovery of thermal recovery in the heavy oil reservoir, so the PI of steam quality was similar to that of oil recovery. The PI of the oil rate was less than the PI of the parameters mentioned above, and the oil rate can also affect the potential of N2-foam conformance control. The injector temperature, soaking time, porosity, water cut and production rate has the lower PI among all factors investigated and these parameters had little influence on the potential of N2-foam conformance control. As a summary, the ranking of input variables in terms of decreasing importance to the potential of N2-foam conformance control was net to gross>>N2-foam injection> variation coefficient of permeability>oil recovery>steam quality>oil rate>injector temperature>soaking time>porosity>water cut>production rate.

**Figure 10.** PI values for input variables in (**a**) N2-foam and (**b**) gel conformance control.

Figure 10b showed the results of permutation importance of gel conformance control. The process of calculation and sorting PI was similar to N2-foam conformance control, which need not be specifically described again. As a short summary, the ranking of input variables in terms of decreasing importance to the potential of gel conformance control were: oil recovery >> Net to gross > gel injection > steam quality > variation coefficient of permeability > oil rate > production rate > water cut > injector temperature > porosity > soaking time. Compared with the PI of N2-foam conformance control, the oil recovery before conformance control can exert more significant impact on the potential of gel conformance control. This is due to the different conformance control mechanisms of N2-foam and gel. Gel injected into formation blocks the steam channel and achieves the conformance control, while N2-foam implements conformance control through two processes, one is that N2 is an inert gas which can reduce the heat loss and maintain high temperature in formation, another is that foam prevents the flow of water and does not affect the flow of oil. Gel conformance control cannot hold the process of thermal recovery but N2-foam can keep this process. Therefore, the oil recovery of thermal recovery influenced by the potential of gel conformance control is more important than N2-foam conformance control.

#### **4. Conclusions**

By coupling supervised learning and reservoir numerical simulation techniques, this paper proposes a fast and accurate method for predicting the potential of conformance control for heavy oil after multi-cycle steam stimulation. We used the K-fold cross-validation integrated with the exhaustive grid search approach to optimize the hyperparameters of XGBoost. After training the boosting trees using a database obtained from numerical simulations, the trained XGBoost model is capable of predicting the potential of conformance

control for wells with better efficiency and accuracy. The performance of the new model was examined by statistical matrices, including mean absolute error (MAE), mean relative error (MRE) and coefficient of determination (R2). In addition, we used PI to quantify the importance of each input variable for the potential of conformance control for N2-foam and gel. Furthermore, this constructed model was implemented in real production wells of the Chunfeng oilfield and achieved excellent results. The key results are summarized as follows:


**Author Contributions:** Conceptualization, Z.X. and J.Z.; methodology, Z.X. and J.Z.; software, Z.X. and X.S.; validation, Z.X. and X.S.; formal analysis, Z.X. and J.Z.; investigation, Z.X.; resources, Q.F. and X.Z.; data curation, Z.X.; writing—original draft preparation, Z.X.; writing—review and editing, J.Z. and X.S.; visualization, Z.X. and X.Z.; supervision, Q.F. and Z.W.; project administration, and Z.W.; funding acquisition, Q.F. and X.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This study was completed under financial supports from the Fundamental Research Funds for the Central Universities (Grant No.21CX06021A).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data used in this study is available at request.

**Conflicts of Interest:** The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

#### **Appendix A**

Based on geological features of southern P601 block, we constructed the base geological model by using random geostatistical simulation (i.e., the sequential Gaussian–Bayesian simulation) [79]. The base geological model was imported to commercial numerical simulation software (i.e., CMG [38]) generating a base numerical simulation model. The grid top, net to gross ratio, permeability and porosity of numerical simulation model can be seen in Figures A1–A4, respectively.

**Figure A1.** Grid top of numerical simulation model.

**Figure A2.** Net to gross ratio of numerical simulation model.

**Figure A3.** Permeability of numerical simulation model.

**Figure A4.** Porosity of numerical simulation model.

#### **References**

