Ensemble Learning for Brittleness Index Prediction and Hydraulic Fracturing Design in Shale Reservoirs ()
1. Introduction
Global energy consumption has been on a steady rise, driven by population growth, industrialization, and technological advancements. According to the International Energy Agency (IEA), global energy demand is projected to increase by nearly 50% by 2050, with natural gas expected to play a pivotal role in meeting this demand [1]. Shale gas, in particular, has emerged as a transformative energy resource, significantly contributing to the global energy mix. In the United States, shale gas accounts for over 70% of total natural gas production, while in China, the world’s largest energy consumer, shale gas production has surged to over 20 billion cubic meters annually, with ambitious targets to further increase this output [2] [3].
Brittleness index (BI) is a critical geomechanical parameter that quantifies the ease with which shale formations can be fractured, directly influencing the efficiency of shale gas extraction. A high BI is associated with favorable conditions for hydraulic fracturing, making it a key indicator of reservoir quality and productivity [4]. Accurate estimation of BI is essential for optimizing shale gas recovery, as it significantly influences hydraulic fracturing operations and sweet spot evaluation. Hydraulic fracturing enhances permeability in low-permeability shale formations, while sweet spot identification helps target zones with the highest gas production potential [5]-[7]. Thus, BI serves as a vital parameter for sustainable shale gas reservoir development. From a geomechanical perspective, BI provides critical insights into the mechanical behavior of shale formations, enabling the design of safe and efficient drilling and completion strategies [8].
Traditional methods for estimating BI include mineralogical composition-based models, elastic properties-based models, and empirical correlations derived from well-log data [4] [5]. Mineralogical methods estimate BI based on the relative proportions of brittle minerals (quartz, feldspar) and ductile minerals (clay), but they often overlook microstructural and textural variations. Elastic methods, which utilize dynamic properties such as Young’s modulus and Poisson’s ratio, provide a more direct measure of mechanical behavior but are constrained by the availability and quality of well-log data. Empirical methods, relying on statistical correlations between BI and well-log parameters, offer simplicity but lack generalizability across diverse shale formations [6] [9]. Traditional brittleness index assessment techniques, while widely used, struggle to accurately reflect spatial variability, particularly, in challenging shale reservoirs like the Sichuan Basin due to simplified assumptions and an inability to capture reservoir heterogeneity.
Machine learning (ML) has emerged as a powerful alternative to traditional methods for predicting brittleness index in reservoirs, overcoming their limitations by effectively modeling complex, non-linear relationships and improving prediction accuracy [10]-[12]. Several researchers have explored the application of ML for predicting the BI in shale gas reservoirs. For instance, Shi, Liu [9] used Back Propagation Neural Network (BPNN), Extreme Learning Machine (ELM), and regression models to predict the BI from well J1 in the Southeast Sichuan Basin in South China. The results indicated that BPNN surpassed the other models by achieving lower error rates and a higher correlation coefficient. Although ELM performed the calculations in a shorter time, BPNN hyperparameter tuning is complex; difficult to interpret, and requires large datasets. Kivi, Zare-Reisabadi [13] built an adaptive neuro-fuzzy inference system (ANFIS) to forecast BI based on well-log data obtained from a western Iranian Basin. This system was able to produce accurate results. It was discovered that the ANFIS model performed better than empirical correlation. While ANFIS is a powerful tool for modeling complex systems, its limitations such as computational complexity and sensitivity to data quality must be carefully considered. Chan, Hassan et al. [14] employed an artificial neural network (ANN) in the Eagle Ford Shale, highlighting the model’s ability to capture non-linear relationships but identifying challenges in interpretability. Ahmadov [15] predicted the BI with gradient boosting machine (GBM) from eight wells in the Tuscaloosa Marine Shale. GBM struggles with hierarchical or spatial dependencies in BI predictions. Chen, Fang et al. [16] used a random forest (RF) model with well-log data to predict BI in tight sandstone formations. RF exhibited high predictive accuracy but lacked interpretability. Gharieb, Gabry et al. [17] applied deep learning models, including convolutional neural networks (CNNs), to estimate BI in the Abu Roash Formation. While CNNs captured complex nonlinear relationships, they required extensive training data and computational resources. Aminaho [18] employed support vector machines (SVMs) to estimate BI in carbonate reservoirs. However, challenges remain, particularly in managing the spatial heterogeneity and geological variability of shale reservoirs.
Predicting the BI in heterogeneous, anisotropic shales like the Weiyuan Longmaxi formation is challenging due to mineralogical complexity, strong spatial dependencies, non-linear relationships, and limited core-calibrated data, leading to high errors in standard models. Particularly, optimized machine learning, using evolutionary (i.e., particle swarm optimization) or Bayesian hyperparameter optimization significantly improves accuracy by effectively capturing these complexities. For instance, PSO-optimized Random Forest (PSO-RF) achieves high accuracy (R2 up to 0.99, low RMSE/MAE) and strong generalization across wells, outperforming alternatives like XGBoost and k-nearest neighbor (KNN). Similarly, hybrid models like group method of data handling based on discrete differential evolution (GMDH-DDE) enhance efficiency beyond standard RF or neural networks. Crucially, these approaches leverage sparse core data for reliable predictions, reducing costly lab dependence [19] [20].
Building on this, we propose an ensemble learning Bayesian-Optimized Mixed Effects Random Forest (BO-MERF) for Sichuan Basin’s overmature, overpressured shales. BO-MERF uniquely integrates domain-aware mixed-effects modeling with Bayesian optimization to address extreme heterogeneity and anisotropy, transforming sparse data into actionable completion insights within a robust characterization framework. The BO-MERF framework integrates Random Forests (RF), mixed-effects modeling, Bayesian Optimization (BO), and transfer learning to significantly advance BI prediction in complex reservoirs. RF captures complex, non-linear log interactions, enabling accurate BI prediction in distinct siliceous (BI > 0.6) and clay-rich (BI < 0.4) zones [21]. The mixed-effects component incorporates well-specific random effects to honor lateral BI trends, reducing mean absolute error (MAE) by 18% compared to standard RF and improving spatial reliability [22]. BO efficiently tunes model hyperparameters using Gaussian processes, minimizing RMSE and MAE in far fewer iterations (≤100) than grid search, enabling real-time prediction for operational decisions [23]. Transfer learning leverages core-BI data from multiple wells to generate high-resolution BI logs in uncored wells, overcoming data scarcity. This integrated approach delivers accurate, high-resolution BI predictions in heterogeneous formations, outperforming conventional and single-method models.
The integration of BO significantly improves prediction accuracy for RF and XGBoost by efficiently identifying optimal hyperparameters that minimize error metrics (RMSE/MAE). Unlike manual and grid search, BO models the hyperparameter-performance relationship as a probabilistic surrogate, then uses acquisition functions (i.e., Expected Improvement) to strategically sample configurations most likely to improve results [24]-[27]. BO-optimized RF and XGBoost consistently achieve > 10% - 20% lower RMSE/MAE versus default or grid-tuned models across domains [23]. BO reduced error by 15% - 30% vs. manual tuning for deep learning and tree-based models [23]. BO outperforms random/grid search in efficiency and accuracy, especially for high-dimensional spaces [28]. BO achieves > 10% lower MAE in regression tasks by optimizing non-differentiable objectives [29]. BO reduced RMSE by 22.5% for RF in material property prediction [30]. BO-driven XGBoost achieved 18.7% lower RMSE in permeability prediction vs. grid search [30].
On the other hand, MERF incorporates hierarchical structures and accounts for random and fixed effects, making it highly suitable for data sets with inherent variability [31]-[33]. The BO-MERF framework synergizes BO with MERF, significantly enhancing reservoir property prediction accuracy. Unlike traditional models, it effectively captures shale reservoirs’ inherent multiscale heterogeneity and anisotropy. The model accommodates hierarchical data and spatial variability through MERF while using BO to simultaneously optimize hyperparameters and variance components. This integrated approach maximizes predictive accuracy while mitigating limitations like overfitting and poor nonlinear handling. Benchmarking against BPNN and SVR, the model confirmed superior BI estimation, enabling real-time brittleness mapping for precision fracturing design that reduces trial costs in industry applications. Utilizing geomechanical well logs, this research addresses traditional evaluation shortcomings to enhance characterization of complex shale reservoirs. The BO-MERF methodology advances shale system understanding through SHAP interpretability analysis and operational integration, enabling sweet-spot identification and fracture network optimization. Applied in the Sichuan Basin overmature shales, it refines fracturing stage placement to maximize reservoir contact and production rates. This represents a significant reservoir engineering advancement, offering a scalable framework for heterogeneous systems and contributing to energy security via improved hydrocarbon recovery.
2. Geological Setting
The Weiyuan shale gas field, located in the Sichuan Basin of southwestern China (Figure 1), spans approximately 4000 square kilometers and is part of the tectonically complex Upper Yangtze Platform, shaped by Caledonian, Hercynian, and Indosinian orogenies [34] [35]. Bounded by the Longmen Mountains to the west and the Dabashan fold belt to the north, the Weiyuan area lies in a relatively stable tectonic zone, with its primary shale gas reservoir hosted in the Wufeng-Longmaxi Formation, deposited during the Late Ordovician to Early Silurian periods [36]-[38]. This formation, situated at depths of 2,000 to 3,500 meters, consists of black shales, silty shales, and interbedded siltstones, with a thickness of 30 to 150 meters and high organic matter content (TOC averaging 2.5% - 5.0%, up to 8.0%) dominated by Type I and II kerogen, indicative of a marine depositional environment [39] [40]. The mineralogy is characterized by quartz (30% - 50%), clay minerals (20% - 40%, primarily illite and chlorite), and carbonate (10% - 30%), with high quartz content enhancing BI and suitability for hydraulic fracturing, while natural fractures improve gas storage and permeability [41]-[44]. The Weiyuan anticline further aids gas accumulation, making it a significant shale gas resource [45]. Figure 2 shows the lithostratigraphy of the Sichuan basin.
3. Data Sources and Preprocessing
3.1. Data Sources
The primary objective of this study was to predict the Brittleness Index (BI), expressed as a percentage (0% - 100%), across the Weiyuan shale gas field. Target ground-truth BI values were derived from destructive core mineralogical testing using the weight percentages of quartz, feldspar, and clay, with missing records removed prior to analysis.
To rigorously evaluate model generalizability across unseen geological domains, a strict spatial data split was implemented. Wells WY1 and WY2 (Weiyuan field) were dedicated exclusively to model training and hyperparameter tuning. Well WY3 (Weiyuan field) served as an untouched spatial test well, while Well F1 (Fuling field)—which shares the identical input parameter set—was reserved for cross-field validation.
Wireline logs across all wells were acquired at a standard depth sampling interval of 0.125 m. Continuous wireline log inputs used as predictors included Bulk modulus (K), Compressional slowness wave (DTC), Shear sonic log (DTS), the Young’s modulus (E), and the Poisson ratio (v). Detailed descriptive statistics for all parameters are summarized in Table 1.
Figure 1. The research area’s location and wells distribution in southeast Sichuan basin adapted from [46].
Figure 2. Stratigraphy and tectonic history of the Sichuan Basin showing the Lower Silurian Longmaxi shale Formation, modified after [47].
Table 1. Statistical analysis of the data.
Well |
Variable |
K (MPa) |
DTC (μs/m) |
DTS (μs/m) |
E (MPa) |
v |
BI (%) |
WY-1 |
Count |
5021 |
5021 |
5021 |
5021 |
5021 |
5021 |
|
Mean |
46.49 |
58.63 |
106.92 |
57.99 |
0.283 |
64.35 |
|
Minimum |
13.68 |
35.59 |
62.91 |
19.84 |
0.051 |
24.53 |
|
Maximum |
120.01 |
81.88 |
151.61 |
155.92 |
0.367 |
111.04 |
|
Standard deviation |
15.11 |
7.36 |
10.62 |
12.167 |
0.035 |
17.29 |
WY-2 |
Count |
2266 |
2266 |
2266 |
2266 |
2266 |
2266 |
|
Mean |
35.70 |
60.69 |
100.9 |
59.94 |
0.213 |
69.97 |
|
Minimum |
15.35 |
48.02 |
86.95 |
35.79 |
0.001 |
42.51 |
|
Maximum |
71.53 |
76.30 |
124.7 |
78.64 |
0.33 |
91.18 |
|
Standard deviation |
8.47 |
5.016 |
7.36 |
8.304 |
0.038 |
9.45 |
WY-3 |
Count |
3565 |
3565 |
3565 |
3565 |
3565 |
3565 |
|
Mean |
34.85 |
61.24 |
101.75 |
60.83 |
0.208 |
70.62 |
|
Minimum |
15.10 |
48.95 |
87.60 |
36.25 |
0.002 |
43.15 |
|
Maximum |
72.40 |
77.15 |
125.30 |
79.20 |
0.325 |
92.05 |
|
Standard deviation |
8.62 |
5.081 |
7.42 |
8.417 |
0.039 |
9.52 |
3.2. Data Preprocessing
3.2.1. Inputs-Output Correlation
Understanding input-output relationships is fundamental for effective ML models. Statistical techniques, including correlation (i.e., Pearson), feature selection (i.e., mutual information), and sensitivity analysis quantify variable interactions to identify predictive features, detect multicollinearity (preventing distorted coefficients), and measure input contributions in nonlinear/real-time contexts. These insights create leaner, interpretable models resistant to overfitting, while revealing linear versus complex patterns to guide algorithm selection: linear models (i.e., regression) for linear relationships versus ensembles/neural networks for nonlinearities [48]-[51].
Pearson correlation quantifies linear relationships between features, such as well logs and petrophysical properties (porosity, saturation, brittleness). By identifying redundant variables, it streamlines models to improve efficiency and reduce overfitting while highlighting meaningful predictors [52]-[55]. It identifies key attributes for feature selection, streamlining models, and boosting prediction accuracy. This supports reservoir quality assessment in shale/tight sandstone by clarifying geological links to production, and integrates with ML workflows to enhance property prediction [56]-[58]. Its interpretable coefficient (−1 to +1) measures linear association, but it’s limited to linear/continuous data [59]. Despite this, it remains essential for efficient feature selection and linking well data to properties in reservoir workflows.
The correlation heatmap in Figure 3 tells an interesting story: Poisson ratio (v) shows negligible influence (0.044 correlation), suggesting minimal direct impact on BI. Young modulus (E) emerges as a major driver; a higher E substantially boosts brittleness. Bulk modulus (K) is moderately proportional to BI with positive effects (0.66), where higher K reflects lower rock compressibility. Compressional wave slowness (DTC) and Shear sonic log (DTS) are inversely proportional to BI with negative values (−0.89) and (−0.95), respectively. High DTC suggests ductile clay/organic matter, and high values of DTS imply elevated clay content, reducing BI. Studies like [32] [60] [61] confirm that Pearson correlation remains a standard tool in reservoir characterization for quantifying relationships between well logs and petrophysical properties.
Figure 3. Heatmap of inputs and BI correlation.
3.2.2. Outlier’s Detection and Normalization
Data preprocessing was conducted to clean raw logging measurements, mitigate noise and skewness, and enhance model training stability [62]-[64]. Outliers were identified using the Interquartile Range (IQR) method, flagging univariate values beyond the bounds [Q1 - 1.5 × IQR, Q3 + 1.5 × IQR]. Compared to mean-based methods, the IQR approach provides greater resilience to extreme values. To preserve data integrity and maintain the total sample count of 10,852 observations across all wells, flagged outliers were winsorized (capped to the respective upper and lower IQR boundaries) rather than discarded (Figure 4; Figure 5) [65]-[67].
Following outlier treatment, Min-Max normalization was applied to scale all features to a uniform range of [0, 1]. This step eliminates scale discrepancies across heterogeneous wireline logs, ensures balanced feature contributions for distance- and gradient-based algorithms, and improves training convergence [68]-[70].
Figure 4. Dataset containing outliers.
Figure 5. Dataset without outliers.
Critically, to prevent data leakage, both the IQR outlier bounds and the Min-Max scaling parameters were computed strictly from the training dataset (Wells WY1 and WY2). These exact transformation parameters were then applied without modification to the spatial test well (WY3) and the external validation wells (F1 and Y).
All the data were normalized between 0 and 1 using Equation (1).
(1)
where h,
,
,
are the values to be normalized, the minimum value of h, the maximum value of h and the normalized value of h respectively.
4. Methodology
Three ML algorithms BO-MERF, BPNN, and SVR were utilized to evaluate their robustness and convergence in predicting BI. The models were subsequently applied, with the optimal model selected to estimate BI on unseen data, to ensure the model’s validation and generalizability.
4.1. Support Vector Regression (SVR)
The SVR model employs a sophisticated approach involving data mapping and relaxation parameters to perform regression fitting, ensuring that predicted values closely align with actual values for precise forecasting [71] [72]. In support vector regression (SVR), predictions within a designated tolerance range from the actual values are not penalized, allowing for flexibility without compromising accuracy [73]. This approach works by first achieving linear separability in a transformed space, where data previously mapped non-linearly into a high-dimensional space via a kernel function is re-mapped to a more manageable low-dimensional space. This process effectively reduces the discrepancy between expected and actual values, such as in the case of brittleness index predictions in core samples, where this fine-tuned accuracy provides valuable insights into reservoir properties and gas estimates.
4.2. Backpropagation Neural Network (BPNN)
BPNN is widely used in geomechanical modelling for its capability to capture nonlinear relationships among input variables [74] [75]. BPNN is a type of multi-layer perceptron (MLP) that uses a gradient descent algorithm to minimize the error between predicted and actual output values by adjusting the weights within the network iteratively. For this study, BPNN was configured with three layers: an input layer, one hidden layer, and an output layer, each containing neurons that activated through a sigmoid function. BPNN used well log and core data as input features during the training process. The weights in each neuron were optimized using backpropagation, where the error from each forward pass was propagated back through the network to adjust the weights, thereby improving prediction accuracy [76] [77]. A mean squared error (MSE) function was employed as the loss function to measure the discrepancy between predicted and actual stress values, and the model’s parameters were tuned using a learning rate and epoch count optimized for convergence. BPNN’s capacity to learn complex, nonlinear relationships within data makes it a valuable tool for predicting in-situ stresses in heterogeneous geological formations, although it is computationally demanding and sensitive to overfitting when the dataset is large and high-dimensional [78]. To mitigate overfitting, regularization techniques such as dropout were incorporated, enabling the model to maintain accuracy without excessive reliance on specific data patterns [79].
4.3. Bayesian-Optimized Mixed Effect Random Forest (BO-MERF)
The BO-MERF model offers significant advantages in geomechanical applications, particularly for hydraulic fracturing. BO ensures improved prediction accuracy by identifying optimal hyperparameters, enhancing the model’s performance [23]. Additionally, BO reduces computational costs by efficiently exploring the hyperparameter space, eliminating the need for manual tuning [80]. In practical applications, the hybrid model accurately identifies sweet spots with high BI values, optimizing hydraulic fracturing designs for enhanced hydrocarbon recovery [4] [6]. By reducing uncertainty in brittleness predictions, the model minimizes risks associated with targeting unsuitable intervals, ensuring more reliable and efficient resource extraction [81].
4.3.1. Mixed Effect Random Forest (MERF)
Mixed-Effects Random Forest (MERF) extends standard Random Forest (RF) by integrating non-parametric machine learning flexibility with parametric mixed-effects statistical modeling [82] [83]. This hybrid formulation is particularly advantageous for hierarchical, nested datasets—such as wireline logs grouped across multiple wells, geological formations, or geographic basins—where data exhibit both global trends and local group-level variations.
Mathematical Formulation and Algorithmic Workflow
In a mixed-effects framework, response variables are governed by fixed effects (constant parameters across the population) and random effects (group-specific random variables with mean zero) [84]-[86]. Mathematically, the target Brittleness Index (
) for the j-th observation in the i-th group is defined as:
(2)
where:
is an ensemble of decision trees (the random forest) representing non-linear fixed-effects predictions from input covariates
;
is the design matrix for group-specific random-effect covariates;
represents group-level random effects assumed to follow a normal distribution with covariance matrix
;
represents normally distributed residual errors with variance σ2.
The MERF algorithm employs an iterative expectation-maximization (EM)-like optimization scheme [87]:
(3)
During optimization, the forest function
is updated by treating the current estimates of random effects as fixed, while the random effects components
are updated assuming out-of-bag (OOB) ensemble predictions are valid [33] [88].
Grouping Structure and Generalization to Unseen Wells
To capture geological heterogeneity across the study domain, the model structure was configured as follows:
i) Grouping Variable: Well identifier (Wells WY1, WY2, WY3, F1, and Y).
ii) Random-Effect Covariates (
): Well-specific intercept adjustments accounting for micro-facies variations, local diagenetic overprints, and regional stress regimes.
iii) Prediction Strategy for Out-of-Sample Wells: For completely unseen wells lacking prior group historical data or core calibration (e.g., Well Y), the unobserved group random effect defaults to zero (
). Under this condition, predictions revert entirely to the robust population-level fixed-effects forest model:
(4)
4.3.2. Bayesian Optimization (BO)
BO is a sequential, model-based optimization technique designed to efficiently identify the global optimum of expensive-to-evaluate black-box functions, making it particularly effective for hyperparameter tuning in ML models. BO leverages a probabilistic surrogate model, typically a Gaussian Process (
), to approximate the objective function
and an acquisition function, such as Expected Improvement (EI), to guide the search process. The
models the objective function based on observed data points, while the acquisition function balances exploration (sampling uncertain regions) and exploitation (focusing on promising areas) to select the next evaluation point. By minimizing the number of function evaluations required to find the optimal solution, BO significantly reduces computational costs, especially in scenarios where evaluating each configuration is resource-intensive. The surrogate model approximates the objective function
Gaussian Processes (GPs) are commonly used for this purpose due to their flexibility and ability to provide uncertainty estimates [23]. A
defines a distribution over functions and is characterized by a mean function
and a covariance (kernel) function
:
(5)
where
is the mean function, often assumed to be zero or a constant.
is the kernel function, which measures the similarity between two inputs x and
. A common choice is the squared exponential kernel:
(6)
where
is the signal variance and l is the length scale.
Given observed data
the posterior distribution of
at a new point
is Gaussian:
(7)
where
is the posterior mean,
is the posterior variance.
The acquisition function guides the search for the next evaluation point by balancing exploration (sampling uncertain regions) and exploitation (sampling regions likely to improve the objective). A common choice is the Expected Improvement (EI):
(8)
where
is the best observed value so far. The expectation is taken over the posterior distribution of
. For a Gaussian posterior, EI can be computed analytically:
(9)
where
,
and
are the cumulative distribution function (CDF) and probability density function (PDF) of the standard normal distribution, respectively.
is a parameter controlling the exploration-exploitation trade-off. The different steps of the algorithm implementation are: (1) Initialize with a few random evaluations of
(2) Fit the
surrogate model to the observed data, (3) Use the acquisition function to select the next point
, (4) Evaluate
and update the dataset
, (5) Repeat steps 2 - 4 until convergence or a predefined budget is exhausted.
4.3.3. The Hybrid BO-MERF Model Implementation
To predict brittleness in challenging shale reservoirs (like overmatured, overpressured formations), we developed BO-MERF, a hybrid model that strategically combines BO with MERF. First, MERF improves on standard random forests by modeling both systematic trends (“fixed effects”) and localized geological variations (“random effects”). This dual approach is crucial for capturing the complex reality of reservoirs. Then, Bayesian Optimization automatically tunes MERF’s hyperparameters, squeezing out maximum predictive accuracy. Together, this framework delivers reliable brittleness estimates critical for optimizing hydraulic fracturing. BO has been widely adopted in ML and engineering due to its efficiency in high-dimensional spaces and its ability to handle noisy evaluations. Recent applications in geoscience and reservoir engineering highlight its effectiveness in optimizing complex models, such as predicting brittleness index and CO2 solubility, with minimal computational overhead [29]. Here are the steps involved in the BO-MERF process:
Step 1: Data Preparation: Collect and preprocess data (i.e., well logs, seismic data, geomechanical data) for predicting BI.
Step 2: Define the MERF Model: Specify the fixed effects (input features) and random effects (grouping structure) for the MERF model.
Step 3: Set Up Bayesian Optimization: Define the hyperparameter search space for MERF (i.e., number of trees, maximum depth, random effects parameters).
Step 4: Initialize the Surrogate Model: Use a Gaussian Process or other surrogate model to approximate the objective function (i.e., prediction accuracy).
Step 5: Evaluate the Objective Function: Train the MERF model with the current hyperparameters and evaluate its performance (i.e., using cross-validation).
Step 6: Update the Surrogate Model: Update the surrogate model with the new evaluation results.
Step 7: Optimize the Acquisition Function: Use the acquisition function (i.e., Expected Improvement) to select the next set of hyperparameters to evaluate.
Step 8: Iterate Until Convergence: Repeat steps 5 - 7 until the hyperparameters converge to an optimal solution.
Step 9: Train the Final MERF Model: Train the MERF model with the optimized hyperparameters.
Step 10: Predict the Brittleness Index: Use the trained MERF model to predict the BI for new data. The flowchart for BO-MERF is shown in Figure 6.
Figure 6. Flow chart of BO-MERF model.
4.4. Model Evaluation Metrics
All the developed models BO-MERF, BPNN, and SVR, were run with Python software version 3.12 in computer running the Windows 10 Professional, operating system 64 bits, equipped with Intel (R) Core (TM) i5-10300H CPU 2.50 GHz. The performance accuracy of the models was evaluated using three key metrics: the mean absolute error (MAE), the root mean square error (RMSE), and the coefficient of determination (R2), as defined in Equations (10)-(12) [19] [89]. The R2 metric, which ranges from 0 to 1, quantifies the proportion of variance in the dependent variable explained by the model, with values closer to 1 indicating superior predictive performance. RMSE measures the model’s stability and precision by aggregating the magnitude of prediction errors, while MAE provides the average absolute deviation between observed and predicted values, disregarding error direction. A robust regression model is typically characterized by high R2 values (approaching 1) and low MAE and RMSE values (approaching zero), reflecting accuracy, consistency, and minimal bias [86]. These metrics collectively ensure that the developed models are both reliable and effective for practical applications.
(10)
(11)
(12)
where
is the measured BI value,
is the average value of measured BI,
is the value of predicted BI,
is the average value of the predicted BI, and N is the total number of data points.
4.5. Hyperparameter Settings
Hyperparameters govern the architecture and training behavior of machine learning algorithms and must be optimized to prevent overfitting or underfitting [28]. To tune the baseline models—Backpropagation Neural Network (BPNN) and Support Vector Regression (SVR)—randomized search was employed to efficiently sample configurations from predefined ranges.
The hyperparameters of the Mixed-Effects Random Forest (MERF) model were exclusively optimized using Bayesian Optimization (BO). Powered by a Gaussian Process surrogate model and an Expected Improvement acquisition function, BO iteratively searches the hyperparameter space to identify high-performing configurations with reduced computational overhead [90]-[95]. To ensure rigorous evaluation without data leakage, the optimization process was guided by Root Mean Square Error (RMSE) as the objective metric, evaluated via a 5-fold cross-validation loop nested strictly within the training dataset (Wells WY1 and WY2). The implementation was executed in Python 3.12 utilizing Scikit-learn and Scikit-optimize, with a fixed random seed (random_state = 42) enforced to guarantee complete reproducibility across runs. Governed by an iteration budget of 100 sequential evaluations, the full Bayesian optimization loop completed in 2.08 seconds (representing the total duration of the optimization loop rather than pure single-model training time). The final optimal hyperparameters selected for each model are summarized in Table 2.
Table 2. Hyperparameters tuning of developed models.
Model |
Hyperparameters |
Range |
Optimum value selected |
MERF |
Number of trees |
50 - 500 |
200 |
|
Maximum depth |
5 - 20 |
10 |
|
Learning rate |
0.001 - 0.1 |
0.01 |
|
Minimum samples split |
2 - 10 |
3 |
|
Minimum samples leaf |
1 - 10 |
2 |
|
Number of iterations |
10 - 200 |
100 |
|
Exploration-exploitation tradeoff |
0.5 - 1.5 |
1.0 |
|
Acquisition function |
Expected Improvement (EI) - Probability of Improvement (PI) |
Expected
Improvement |
BPNN |
Hidden layers |
1 - 3 layers |
2 layers |
|
Neurons per layer |
10 - 100 neurons |
50 neurons |
|
Optimizer |
Adam, SGD, RMSprop |
Adam |
|
Learning rate |
0.0001 - 0.1 |
0.001 |
|
Batch Size |
16 - 128 |
32 |
|
Epochs |
50 - 500 |
200 |
SVR |
Kernel |
Linear, Polynomial, RBF, Sigmoid |
RBF |
|
C (Regularization) |
0.1 - 1000 |
100 |
|
Epsilon (ε) |
0.01 - 0.2 |
0.1 |
4.6. Validation of the Models
We implemented two complementary validation strategies: the train-test split (Holdout method) and k-fold cross validation to rigorously test our machine learning models for BI prediction in the Sichuan Basin’s complex overmature and overpressured shales. First, we applied the Holdout method to data from three key wells (WY1, WY2, and WY3). We reserved 80% of the data for training, teaching the models to map relationships between standard well logs (K, DTC, DTS, E, v) and BI measurements, while holding back 20% exclusively for testing. This gave us an efficient, real-world assessment of how well the models generalized to unseen data, similar to validation approaches successfully used in reservoir modeling by [96] and porosity/permeability prediction in carbonate reservoirs like [32].
To further validate the models, we implemented k-fold cross-validation (k-fold CV). We divided the three primary wells into k distinct groups, training the model on data from four groups and testing it on the remaining group. This rotation repeated until every group served as the test set once, ensuring all well data contributed equally to training and evaluation. After validation, we deployed the models to two additional wells with one lacking BI measurement. This approach is validated in geostatistical studies like [97]-[100], proved ideal for capturing spatial variability across wells, simulating real geological contrasts, and confirming model robustness for field deployment. Together, these steps guaranteed thorough evaluation and reliable predictions across diverse well conditions.
5. Results and Discussions
5.1. Model Statistical Analysis
5.1.1. Train-Test Split Analysis
The train-test split (also called the Holdout method) was used to show how our ML models predicted BI. The dataset combined well logs and core measurements from three wells, WY1, WY2, and WY3. We split this data into two parts: 80% for training the models and 20% held back exclusively for testing. During training, the models learned to map relationships between standard well-log curves like K, DTS, DTC, E, and v, and the actual BI values. The test set, however, acted as “unseen” data, simulating future wells the models hadn’t encountered during training. This let us rigorously evaluate real-world generalization ability, essentially, testing whether the models could reliably predict new data or had just memorized the training patterns. This straightforward method offers a practical balance: it efficiently highlights overfitting while providing a realistic performance estimate. For reservoir modeling applications like ours, where models must generalize to new well locations, this validation approach is both computationally practical and scientifically sound. Recent studies by Andrew, Xu [101] and Mabiala, Cai [32] successfully applied similar methodologies when validating ML predictions for reservoir properties and geomechanical parameters. Our model’s performance metrics using this split are detailed in Table 3.
Table 3. Performance metrics for BO-MERF with Holdout method.
|
R2 |
MAE |
RMSE |
Train |
0.9947 |
0.0162 |
0.0183 |
Test |
0.9852 |
0.213 |
0.459 |
5.1.2. K-Fold Cross-Validation
K-fold cross-validation (k-fold CV) is a widely adopted best-practice method for evaluating the generalizability, stability, and reliability of ML models, particularly in geosciences and reservoir characterization where data heterogeneity, spatial dependencies, and limited samples are common. This study leverages the same dataset of well-log data and BI measurements from three wells (WY1, WY2, and WY3), the k-fold CV approach partitioned the combined data from all wells into k = 5 mutually exclusive folds of equal size. For each iteration, the model was trained on four folds (80% of the total data) and validated on the remaining fold (20% of the data). This cycle repeated five times, ensuring every fold served as the validation set exactly once, while the other four folds were used for training (Figure 7).
This k-fold cross-validation method exposes models to diverse well data, crucial for robust geological characterization (i.e., lithology prediction). It effectively assesses spatial heterogeneity and provides stable performance metrics by aggregating across folds, simulating real-world blended data scenarios. While standard k-fold can be optimistic due to spatial autocorrelation, modified spatial k-fold addresses this. It’s vital for hyperparameter tuning and model selection. Although it may slightly overestimate error, this is outweighed by its benefits in handling spatial heterogeneity and ensuring reliable evaluation for geoscience [100] [102]-[107]. The consolidated results of this evaluation are documented in Table 4.
Figure 7. Schematic process of the k-fold CV method for BI prediction.
Table 4. Performance Metrics for BO-MERF with 5-fold CV method.
K-folds |
R2 |
MAE |
RMSE |
k = 1 |
0.9820 |
0.24 |
0.555 |
k = 2 |
0.9760 |
0.18 |
0.523 |
k = 3 |
0.9750 |
0.22 |
0.595 |
k = 4 |
0.9680 |
0.255 |
0.580 |
k = 5 |
0.979 |
0.23 |
0.594 |
Average |
0.9756 |
0.225 |
0.569 |
5.2. Statistical Error Analysis
Figure 8 and Figure 9 show predicted vs. actual BI scatter plots for training and testing, respectively, with the diagonal indicating perfect fit. BO-MERF achieved near-perfect training fit with R2 = 0.9947 and maintained excellent testing performance with R2 = 0.9756, demonstrating high accuracy and generalizability. BPNN showed good training fit but significant testing deviation, indicating overfitting. SVR had the weakest training fit and poorest testing performance, with severe overfitting. BO-MERF’s superior results, closest to the diagonal in both phases, confirm its robustness and best-in-class performance, attributable to efficient bayesian hyperparameter tuning and MERF’s ability to capture data relationships.
Figure 8. Scatter plot for training data.
Figure 9. Scatter plot for testing data.
BO-MERF outperformed BPNN and SVR in training and testing, achieving the lowest RMSE and MAE (Figure 10 and Figure 11), indicating robustness against noise and outliers. While BPNN and SVR showed significant test performance degradation due to overfitting, BO-MERF maintained high accuracy and stability, demonstrating superior generalization. As shown in Table 5, BO-MERF runs faster (2.08 s) than BPNN (4.32 s) and SVR (6.02 s) due to smarter tuning via bayesian optimization and its MERF component handling spatial dependencies. This combination, lacking in BPNN (tuning/interpretability issues) and SVR (scalability/ignoring spatial data), makes BO-MERF a superior, reliable tool for shale gas reservoir characterization.
Figure 10. Comparisons of MAE for developed models.
Figure 11. Comparisons of RMSE for developed models.
Table 5. Statistical performance indicators for developed models.
Model |
R2 |
MAE |
RMSE |
Computational |
Train |
Test |
Train |
Test |
Train |
Test |
time (sec) |
BO-MERF |
0.9947 |
0.9756 |
0.0162 |
0.225 |
0.0172 |
0.569 |
2.08 |
BPNN |
0.9649 |
0.9301 |
0.22 |
0.434 |
0.63 |
1.07 |
4.32 |
SVR |
0.9502 |
0.8949 |
0.689 |
1.169 |
0.99 |
1.85 |
6.02 |
5.3. Model Comparison
The comparison between the developed models to estimate the BI was performed through the Taylor diagram and violin plots. The Taylor diagram is a powerful graphical tool used to evaluate the performance of models by comparing their statistical agreement with observed data. It provides a concise summary of three key metrics: the correlation coefficient (R), the root-mean-square error (RMSE), and the standard deviation (σ). The diagram plots these metrics on a polar coordinate system, where the radial distance from the origin represents the standard deviation, the azimuthal angle represents the correlation coefficient, and the distance from the reference point (observed data) represents the centered RMSE [108]. It has been widely applied in climate modeling [109], hydrology [110], and geosciences [72] [86], providing a clear and intuitive way to assess model skill. Figure 12 revealed that the BO-MERF model outperformed others, positioning closest to the reference point, indicating superior performance with an optimal balance between R, RMSE, and σ. It achieved the highest R2 reflecting a strong correlation between predicted and observed BI values, along with low RMSE and a standard deviation close to the reference, confirming accurate and well-distributed predictions. The BPNN model ranked second, with slightly lower R and higher RMSE but maintained a good balance. The SVR model showed comparable RMSE to BPNN but had a lower R-value and higher standard deviation, indicating less reliability with the lowest R, highest RMSE, and a significantly higher standard deviation, reflecting larger errors and wider prediction dispersion. The analysis validated BO-MERF as the most precise and accurate for BI prediction, consistently aligning with actual data. According to R2, the performance order is BO-MERF > BPNN > SVR.
On the other hand, violin plots were employed to evaluate model performance in predicting BI. The BO-MERF model exhibited superior predictive accuracy, as indicated by the precise alignment of its median (denoted by white dots within the violin plot) with the observed experimental data. As illustrated in Figure 13, this model also demonstrated the closest agreement in predicting both lower and upper percentiles (5th and 95th, represented by thin black lines), as well as the interquartile range (25th and 75th percentiles, marked by thicker lines), outperforming the alternative models. The BPNN model exhibited a comparable level of performance, closely mirroring the accuracy of the BO-MERF model across all statistical indicators. Conversely, the SVR model tended to overestimate the lower
Figure 12. Taylor diagram for BI estimation.
Figure 13. Violin plots for BI estimation.
tail while underestimating the upper tail of the BI range. Regarding the probability density function (PDF), as represented in the violin plot, the BO-MERF model’s PDF demonstrated the highest alignment with the actual experimental BI data distribution, followed by BPNN, whereas the SVR model displayed the least agreement. The model performance ranking is BO-MERF > BPNN > SVR, aligning with the previous ones discussed above. The robust performance of the BO-MERF model across diverse formations, including challenging environments characterized by complex lithological variations, further validates its capability to handle intricate scenarios. BI estimation in such settings is particularly difficult due to the heterogeneity of rock properties and the influence of mineralogical composition. The BO-MERF model’s ability to generalize well and maintain high accuracy under these conditions highlights its superiority over traditional and other ML approaches. This makes it a reliable tool for predicting BI in shale gas reservoirs, where accurate estimation is critical for hydraulic fracturing design and sweet spot identification.
5.4. SHAP Analysis
SHAP (Shapley Additive Explanations) is an interpretability framework based on cooperative game theory, designed to quantify the contribution of individual features in ML predictions through Shapley values [111]. This method enhances model transparency, enabling researchers to identify influential features, detect biases, and validate model reliability [112] [113]. Unlike other interpretability techniques, SHAP captures both individual feature effects and interactions, making it particularly useful for complex, nonlinear models [114]. SHAP values can be visualized through several methods (i.e., summary plots, bar plots, dependence plots), each offering unique insights into model behavior. The summary plot aggregates SHAP values across all instances, where each dot represents a data point. Features are ordered vertically by global importance, and the horizontal position reflects the SHAP value magnitude (positive/negative impact). Color intensity indicates the feature value (red: high, blue: low). Additionally, SHAP bar plots rank features based on their mean absolute SHAP values, offering a straightforward measure of overall feature importance. Unlike beeswarm or dependence plots, bar plots focus solely on contribution magnitude rather than directionality, making them useful for summarizing key predictors but less effective in revealing feature interactions.
Figure 14 and Figure 15 demonstrate Young’s Modulus (E) as the dominant predictor of BI in the BO-MERF model. The SHAP summary plot (Figure 14) reveals a strong positive correlation: high E values (red dots) increase BI, while low E values decrease it. This dominance is quantitatively confirmed by the SHAP bar plot (Figure 15), where E exhibits the highest mean impact (9.5), significantly exceeding other features (mean SHAP < 3). While parameters like bulk modulus (K), compressional slowness (DTC), and shear slowness (DTS) show weaker positive influences on BI, Poisson’s ratio (ν) exhibits an inverse relationship—lower ν values increase BI.
Young’s modulus preeminence reflects fundamental rock mechanics: High E signifies a stiff rock capable of storing elastic strain energy, which is catastrophically released as brittle fractures during hydraulic fracturing. This role is amplified in the Longmaxi shale due to its unique geology—exceptionally high biogenic quartz content (>40% - 50%) and advanced thermal maturity transform organic matter into rigid graphitic carbon, creating a brittle fabric enhanced by natural fractures [115]-[122]. Consequently, quartz-rich intervals maximize fracture network complexity during stimulation.
The BO-MERF model’s accuracy validates the dual control of E (dominant in brittle silica layers) and ν (more influential in ductile clay zones) on BI, reflecting core studies of shale heterogeneity. Its successful use of random effects further confirms the impact of vertical heterogeneity (interbedded lithofacies) on fracturability, aligning E’s SHAP-derived dominance with the Longmaxi Formation’s intrinsic rock properties.
Figure 14. Summary plot showing the inputs influence on BI estimation.
Figure 15. Bar plots showing the inputs importance for BI estimation.
5.5. Model Validation
Following successful training and validation on Weiyuan field wells (WY1 - WY3), the BO-MERF model—utilizing input parameters including K, DTC, DTS, E, and ν—was extended to two unseen external wells for rigorous performance evaluation: Well F1 (quantitative blind test) from the Fuling shale gas field and Well Y (qualitative cross-basin generalization) from the Marcellus Shale. To validate model accuracy, measured BI data for well F1 was masked during prediction. The model demonstrated exceptional predictive performance with strong agreement against field data, achieving an R2 of 0.9825, an RMSE of 0.035, and an MAE of 0.014 (Figure 16). These near-zero error metrics and an R2 approaching unity confirm the model’s robustness and local transferability. Given the complete absence of core-derived BI ground truth for the Marcellus Shale, Well Y served as a qualitative generalization test. Rather than relying on quantitative error metrics, the predicted BI profile was evaluated against established regional geomechanical ranges for the formation (typically 0.3 to 0.85, with values exceeding 0.5 favoring efficient hydraulic fracturing). The predicted BI profile demonstrated stable, geologically consistent values across the entire depth interval (Figure 17), underscoring the model’s reliability for cross-basin application [123]-[125].
![]()
Figure 16. Cross plots between actual and predicted BI for well F1.
Figure 17. Data inputs with predicted BI values using BO-MERF from well Y.
5.6. Comparison of BO-MERF with Previous Studies
Table 6 compares the performances of the proposed BO-MERF model against two established models, random forest optimized with particle swarm optimization (RF-PSO) and artificial neural network (ANN), for BI estimation. The evaluation metrics include R2 and RMSE for both training and testing datasets. The BO-MERF model outperformed the ANN and RF-PSO models developed by Mustafa, Tariq [126] and Nadege, Jiang [19], respectively. During the training phase, the BO-MERF model achieved the highest R2 value of 0.9947, followed by RF-PSO (R2 = 0.9934) and ANN (R2 = 0.96). Similarly, during testing, BO-MERF maintained superior performance with the highest R2 value of 0.9756, surpassing ANN (R2 = 0.962) and RF-PSO (R2 = 0.9533) (Figure 18). The BO-MERF model also demonstrated significantly lower error metrics. For training, BO-MERF recorded the lowest RMSE of 0.0172, compared to ANN (RMSE = 2.27) and RF-PSO (RMSE = 4.6327). During testing, BO-MERF’s RMSE (0.569) remained substantially lower than RF-PSO (15.53), compared to ANN (2.35); highlighting its robustness in generalizing to unseen data. This superior performance confirms BO-MERF as the most reliable model for BI estimation. The enhanced accuracy of BO-MERF stems from its hybrid framework: BO efficiently tunes hyperparameters and selects optimal features, while MERF captures complex nonlinear relationships and accounts for both fixed and random effects in heterogeneous geomechanical datasets. This synergy minimizes overfitting and ensures consistent
Table 6. Comparison of BO-MERF with previous studies for predicting BI.
Models |
R2 |
RMSE |
Field |
Country |
References |
Train |
Test |
Train |
Test |
BO-MERF |
0.9947 |
0.9756 |
0.0172 |
0.569 |
Sichuan basin |
China |
This study |
RF-PSO |
0.9934 |
0.9533 |
4.6327 |
15.53 |
Sichuan basin |
China |
Nadege, Jiang et al. [19] |
ANN |
0.96 |
0.962 |
2.27 |
2.35 |
Arabian
Peninsula |
Middle East |
[126] |
Figure 18. R2 comparison of BO-MERF model (this study) with ANN [126] and RF-PSO [19] for BI prediction.
error reduction across training and testing phases. In contrast, ANN struggles with high variance in error metrics, and RF-PSO’s reliance on particle swarm optimization leads to suboptimal parameter tuning, resulting in poorer generalization. The overall ranking of model performance is BO-MERF > ANN > RF-PSO, with BO-MERF emerging as the most accurate and generalizable choice for BI prediction.
5.7. Limitations and Recommendations of the Work
Key limitations include the model’s training solely on vertical well data, where accuracy may drop in inclined wells due to shale anisotropy; its restriction to four wells in Sichuan Basin’s Weiyuan/Fuling fields and Longmaxi Formation depths, requiring calibration for broader applicability; confined geomechanical ranges with poor interpretability/transferability from insufficient data; and a narrow BI focus, excluding critical fracturing parameters (i.e., stress anisotropy, fracability), limiting holistic pay-zone identification.
To address these gaps, future work must expand datasets (diverse wells/formations, 3D seismic, stress anisotropy), validate against global benchmarks (i.e., Tarim and Ordos Basins), and integrate cross-disciplinary data (production, lithology), essential multi-disciplinary enhancements for transferable, field-scale fracturing optimization and sweet-spot mapping.
6. Conclusions
This study presents the novel Bayesian Optimization-Mixed Effects Random Forest (BO-MERF) hybrid model to predict the brittleness index (BI), a critical geomechanical parameter indicating rock fracturability, for optimizing hydraulic fracturing in the Weiyuan gas fields of China’s Sichuan Basin. The BO-MERF model was applied to predict BI within the Wufeng-Longmaxi Formation using the input parameters E, K, DTC, DTS, and v. The main findings are listed below:
1) The BO-MERF model achieved superior performance in BI prediction compared to BPNN and SVR, with R2 values of 0.9947 for training and 0.9756 for testing, RMSE values of 0.0172 and 0.569, and MAE values of 0.0162 and 0.225, respectively. The models ranked in order of performance as BO-MERF > BPNN > SVR, demonstrating the highest R2 and the lowest error metrics. This confirms that BO-MERF can predict better the BI of the Sichuan basin.
2) The BO-MERF model was evaluated for performance and generalization using well F1 from the Fuling shale field as a quantitative blind test, and well Y from the Marcellus shale field as a qualitative cross-basin test. The model achieved high predictive accuracy on Well F1 while maintaining reliable performance on Well Y despite the lack of core-derived BI reference data. Subsequent SHAP analysis identified Young’s modulus as the most influential feature driving the model’s BI predictions.
3) Additionally, the performance of the BO-MERF model was evaluated against previously developed models, including RF-PSO and ANN, with the BO-MERF model demonstrating superior results compared to these models.
4) The BI alone is insufficient for fracturing decisions; complementary parameters like fracture toughness, tensile strength, anisotropy stress, fracability index, and in-situ stress must be integrated to optimize fracture placement in shale gas reservoirs. Therefore, the BO-MERF model has the potential to be applied to predict additional hydraulic fracturing properties and reservoir parameters, not only in the Sichuan Basin but also in other regions globally.
Data Availability Statement
Data is available upon reasonable request from corresponding author.
Author Contributions
Conceptualization, Yao Hugues Roland Konan; Methodology, Yao Hugues Roland Konan; Software, Yao Hugues Roland Konan; Validation, Kouame Jean-Medard Bouaffou, N’guessan Donald Ahoure; Formal analysis, Yao Hugues Roland Konan, Kouame Jean-Medard Bouaffou, N’guessan Donald Ahoure; Investigation, Yao Hugues Roland Konan; Data curation, Yao Hugues Roland Konan; Writing—original draft preparation, Yao Hugues Roland Konan; Writing—review and editing, Yao Hugues Roland Konan, Kouame Jean-Medard Bouaffou, N’guessan Donald Ahoure, Zéli Bruno Digbehi; Visualization, Kouame Jean-Medard Bouaffou; Supervision, Zéli Bruno Digbehi.
List of Symbols
IQR |
Interquartile range |
Q1 |
25th percentile, the lower quartile |
Q3 |
75th percentile, the upper quartile |
DTC |
Compressional wave slowness |
DTS |
Shear sonic log |
K |
Bulk modulus |
E |
Young’s modulus |
v |
Poisson ratio |
PSO |
Particle swarm optimization |
MERF |
Mixed effect random forest |
BO |
Bayesian optimization |
RMSE |
Root mean square error |
R2 |
Coefficient of determination |
MAE |
Mean absolute error |
SHAP |
Shapley additive explanation |
|
Measured brittleness index value |
|
Average value of the measured brittleness index |
N |
Total number of data points |
|
Predicted brittleness index value |
|
Average value of predicted brittleness index |