Skip to Content
ProcessesProcesses
  • Article
  • Open Access

23 May 2026

21 Pages

Ensemble Feature Engineering and Crayfish Optimization Algorithm-Optimized Random Forest for Productivity Prediction in High-Water-Cut Offshore Reservoirs

,
,
,
,
and
College of Petroleum Engineering, Yangtze University, Wuhan 430100, China
*
Author to whom correspondence should be addressed.

Abstract

Precise forecasting of the initial productivity rates of infill wells is essential for the effective exploitation of offshore reservoirs characterized by high water-cut. However, conventional reservoir simulation and basic machine learning models often suffer from high computational complexity and low interpretability. This research introduces a hybrid data-driven framework that combines ensemble feature engineering with a random forest model optimized through the crayfish optimization algorithm. The primary controlling factors were identified through a majority voting mechanism involving five feature selection algorithms. Subsequently, the COA was utilized to optimize the parameters of the random forest algorithm to improve its predictive robustness. The proposed EFE-COA-RF model achieves a testing MAE of 6.831 and an R2 of 0.954, outperforming standard machine learning models and other optimization-based variants. The complete training process requires approximately 10.8 min, whereas the prediction time for the testing set is approximately 0.03 s. These results demonstrate that the proposed framework provides an accurate, interpretable, and efficient tool for rapid productivity evaluation in mature offshore oilfields.

1. Introduction

As global offshore oilfields increasingly enter their mature developmental stages, characterized by high water-cut, the strategic implementation of infill wells has become a pivotal approach for enhancing oil recovery (EOR) and mitigating production decline [1,2,3,4,5,6]. Mature basins worldwide—such as those in the North Sea, the Gulf of Mexico, and China’s Bohai Bay—face the daunting challenges of escalating water-cuts, increasingly complex fluid distribution, and high operational costs [7,8,9]. In this context, the precise and rapid prediction of initial productivity for infill wells is no longer merely a technical requirement but a critical prerequisite for the sustainable management of offshore energy resources and effective investment risk control [10,11,12,13].
Traditional methodologies for productivity assessment primarily rely on numerical reservoir simulation and analytical logging interpretation models [14,15,16,17]. While physically grounded, numerical simulation is often hindered by immense computational costs, a heavy reliance on exhaustive static and dynamic data, and the inherent complexity of history matching in highly heterogeneous reservoirs [18,19,20,21,22,23]. Although analytical methods offer faster computation, they struggle to capture complex non-linear relationships under multi-factor coupling [24,25,26,27,28]. Recently, early machine learning applications (e.g., shallow neural networks) have improved efficiency. However, they frequently encounter the “curse of dimensionality” and are prone to trapping in local optima when dealing with high-dimensional, noisy offshore reservoir datasets, leading to insufficient predictive robustness [29,30,31].
To address these challenges, the present study introduces a hybrid data-driven framework that combines Ensemble Feature Engineering (EFE) with a Random Forest (RF) model optimized through the Crayfish Optimization Algorithm (COA). The reason for constructing a hybrid framework is twofold. First, the productivity of infill wells in high-water-cut offshore reservoirs is controlled by multiple static and dynamic factors. A single feature selection method may introduce methodological bias because different algorithms capture different types of relationships, such as linear correlation, nonlinear contribution, tree-based impurity reduction, or grey relational similarity. Therefore, the ensemble feature engineering module was introduced to integrate five heterogeneous feature selection methods and identify more robust primary controlling factors through a majority voting strategy. Second, although random forest has strong nonlinear modeling ability and robustness to noise, its performance is still sensitive to hyperparameters such as n_estimators, max_depth, min_samples_split, min_samples_leaf, and max_features. Manual parameter adjustment or grid search is inefficient and may fail to locate an appropriate parameter combination in a nonlinear and multimodal search space. Therefore, the crayfish optimization algorithm was introduced to automatically optimize the RF hyperparameters and improve the generalization ability of the model.
The efficacy of the proposed framework has been validated using practical application data from the offshore P oilfield. First, a “majority voting” mechanism—integrating five different algorithms, including Grey Relational Analysis (GRA), Pearson correlation, and SHapley Additive exPlanations (SHAP), among others—is implemented to scientifically identify the primary controlling factors. Subsequently, the COA, an advanced meta-heuristic framework, is employed to optimize the hyperparameters of the RF model. By effectively balancing exploration and exploitation processes, the COA demonstrates greater robustness relative to conventional meta-heuristic methods such as Particle Swarm Optimization (PSO) and Genetic Algorithms (GAs) when addressing the non-convex and multi-modal objective functions commonly encountered in reservoir data analysis. By performing multidimensional comparisons among the EFE-COA-RF model, standard machine learning benchmarks, and other meta-heuristic variants, the mechanisms by which primary controlling factors affect infill-well productivity have been explored. The findings have demonstrated that the proposed hybrid model not only improves predictive accuracy but also enhances the interpretability of data-driven models, thereby providing a practical tool for intelligent decision-making in high-water-cut offshore reservoir development.

2. Methodology

2.1. Data Acquisition and Pre-Processing

The dataset used in this study was derived from actual field data of a mature high-water-cut offshore P oilfield located in the South China Sea. The dataset utilized in this study comprises 442 infill wells. Two normalization strategies were adopted for different modeling stages. In the EFE stage, Min-Max normalization was used to scale all input features into the interval [0, 1], which ensured compatibility with grey relational analysis and correlation-based feature evaluation. In the COA-RF modeling stage, Z-score normalization was applied to standardize feature distributions, thereby reducing the influence of dimensional differences and improving the convergence stability of hyperparameter optimization. Features with severe missing values were excluded to prevent the introduction of noise or the disruption of the authentic physical distribution. The remaining sample data are sufficient to characterize the dynamic and static coupled attributes governing the initial productivity of infill wells. The normalization function is defined as:
x n o r m = x − x min x max − x min
where x n o r m is the normalized feature observation, dimensionless, scaled to the interval [ 0 , 1 ] . x is the raw observation value of the feature in the original data space. The minimum value of the respective feature observed throughout the training set is denoted as x m i n . Conversely, the maximum value of the corresponding feature across the training set is represented as x m a x . The same training-set-derived parameters were then applied to transform the testing set.

2.2. Ensemble Feature Engineering Framework

When processing high-dimensional reservoir engineering data, individual feature selection algorithms often exhibit specific mathematical biases. To enhance the robustness of feature selection, this study proposes an Ensemble Feature Engineering framework based on a majority voting mechanism. This framework integrates five heterogeneous evaluation dimensions: linear regression ( A 1 ), grey relational analysis ( A 2 ), mean decrease in impurity ( A 3 ), Pearson correlation ( A 4 ), and SHAP Attribution ( A 5 ). SHAP values were calculated using TreeExplainer based on a preliminary RF model trained on the training set, with n_estimators = 100, max_depth = None, min_samples_split = 2, min_samples_leaf = 1, and a fixed random seed. The mean absolute SHAP value was used as the feature importance score. MDI was calculated by accumulating the weighted impurity decrease over all split nodes and averaging it across all trees. The final dataset consisted of continuous variables only; therefore, categorical encoding was not required. For each algorithm, the normalized feature importance scores are subjected to a voting and filtering mechanism, mathematically expressed as follows [32,33]:
V i = ∑ k = 1 5 I ( f i , A k )
F ^ = { f i ∈ F ∣ V i ≥ τ }
F is the initial set of input features, denoted as F = { f 1 , f 2 , … , f n } , where n is the total number of input variables. f i is the i -th physical feature variable within set F . A k is the k -th feature evaluation algorithm ( k ∈ { 1 , 2 , 3 , 4 , 5 } ). I ( ⋅ ) is an indicator function. I = 1 if feature f i ranks within the top 70% of importance under algorithm A k ; otherwise, I = 0 . The top 70% threshold was used to avoid overly aggressive filtering at the first screening stage, whereas the requirement that a feature must be selected by at least three methods ensured that the final feature subset was supported by multiple heterogeneous evaluation criteria. This design helps balance feature retention and noise reduction. V i is the cumulative ensemble voting score assigned to feature f i . τ is the stringent decision threshold, which is set to τ = 3 in this study, ensuring features are validated by at least three disparate mathematical perspectives. F ^ is the final extracted set of primary controlling factors.

2.3. Mathematical Formulation of the Crayfish Optimization Algorithm

The crayfish optimization algorithm constitutes a metaheuristic computational method [34] that performs efficient optimization within the hyperparameter space by simulating the summer resort and competition behaviors of crayfish under varying environmental temperatures ( T ). When the temperature is high ( T > 30 ), the algorithm enters the summer resort stage (global exploration), where individuals migrate towards the current global optimal solution:
X i t + 1 = X i t + C 2 ⋅ r a n d ⋅ ( X c a v e − X i t )
When the temperature is lower ( T ≤ 30 ), the algorithm transitions to the competition stage (local exploitation and escape), perturbing individual positions based on randomly selected peers:
X i t + 1 = X i t − X z t + X c a v e
where t is the current iteration number. X i t is the position vector of the i -th crayfish at the t -th iteration, representing a candidate hyperparameter solution. X i t + 1 is the updated position vector of the i -th crayfish for the subsequent iteration. X c a v e is the global optimal position (best hyperparameter combination) identified by the swarm thus far. C 2 is a non-linear temperature regulation factor descending with iterations, controlling the transition from global exploration to local exploitation. r a n d is a random vector uniformly distributed in the interval ( 0 , 1 ) . X z t is the position vector of a randomly selected peer crayfish at the t -th iteration, introducing perturbation to avoid local optima. T is the environmental temperature parameter, acting as the state variable triggering algorithmic phase shifts.
The COA-based hyperparameter optimization process consists of the following steps. First, a population of crayfish individuals is randomly initialized within the predefined hyperparameter search space, where each individual represents a candidate RF hyperparameter combination. Second, the fitness value of each individual is evaluated using the average MAE obtained from k-fold cross-validation on the training set. Third, the environmental temperature factor is updated to determine the behavioral stage of the population. Under high-temperature conditions, the population tends to perform global exploration, whereas under low-temperature conditions, local exploitation and peer competition are emphasized. Fourth, the position of each individual is updated according to the corresponding behavioral rule, and boundary constraints are applied to ensure that all candidate solutions remain within the predefined search range. Finally, the global best solution is updated iteratively until the maximum number of iterations is reached.
Compared with PSO, COA does not simply drive all individuals toward the current global best solution. Instead, its temperature-regulated behavioral transition and peer perturbation mechanism help maintain population diversity and reduce the risk of premature convergence. Compared with GA, COA avoids excessive dependence on crossover and mutation probabilities, thereby reducing the complexity of algorithm-specific parameter tuning. Compared with GWO, COA provides a more flexible stage-switching mechanism between global exploration and local exploitation, which is beneficial for handling nonlinear, non-convex, and multimodal hyperparameter search spaces. These characteristics make COA suitable for optimizing RF hyperparameters in reservoir productivity prediction, where the response surface of the objective function is often irregular and affected by complex geological and production factors.

2.4. EFE-COA-RF Framework

The random forest algorithm is shown in Figure 1. In this study, the feature matrix reduced by EFE is fed into the RF model [35], and the COA [36] is utilized to globally optimize its critical hyperparameter combinations. To enhance the model’s generalization ability and prevent overfitting, the fitness function within the proposed framework is defined as the mean absolute error calculated via k-fold cross-validation on the training dataset. The mathematical logic is expressed as follows:
min Fitness = 1 K ∑ j = 1 K 1 N t e s t ∑ p = 1 N t e s t | y p − y ^ p | j
where Fitness is the objective optimization function. A reduced value signifies enhanced predictive accuracy and improved generalization performance of the random forest model given the specified hyperparameters. K is the number of folds in the cross-validation process. Set to K = 10 in this study. j is the index of the current fold during cross-validation ( j ∈ { 1 , 2 , … , K } ). N t e s t represents the total quantity of samples designated for the validation subset within each fold. p is the index of the current sample within the validation subset. y p is the actual measured initial productivity value of the p -th infill well sample. y ^ p is the predicted initial productivity value of the p -th sample generated by the RF model under the current hyperparameter configuration.
Figure 1. Random forest algorithm.
By iteratively updating the position vector X i t , the COA swarm identifies the optimal hyperparameter vector that minimizes the fitness function, thereby constructing the ultimate predictive model for the initial productivity of infill wells.

2.5. Workflow of the EFE-COA-RF Predictive Model

The specific workflow of the EFE-COA-RF model for predicting the initial productivity (the first 12 months) of infill wells in high-water-cut offshore reservoirs is detailed below, with the comprehensive procedure illustrated in Figure 2. The model is implemented in Python (Version 3.10, Python Software Foundation, Wilmington, DE, USA).
Figure 2. EFE-COA-RF model.
(1)
Data pre-processing: Rigorous pre-processing is conducted on the raw data collected from the oilfield. This phase encompasses the imputation or removal of missing values, outlier detection, and the elimination of duplicated records to ensure overall data integrity.
(2)
Dimensionality reduction: A combined feature engineering methodology is utilized to achieve dimensionality reduction within the feature space. By isolating the primary controlling factors, this step not only mitigates the burden of data acquisition in actual oilfield operations but also significantly enhances the model’s practical field applicability.
(3)
Data partitioning and swarm initialization: The pre-processed dataset was randomly shuffled and subsequently divided into two subsets: a testing set comprising 30% of the samples and a training set consisting of the remaining 70%. Subsequently, the crayfish optimization algorithm population is initialized, and the fitness value of each individual crayfish is evaluated based on a strictly defined fitness function.
(4)
Iterative optimization: The locations and conditions of individual crayfish are continuously adjusted to investigate the hyperparameter solution space, employing the fundamental mathematical formulations of the COA. The fitness of every individual is continuously re-evaluated based on its updated position. This iterative optimization process terminates when the process concludes upon reaching the predetermined maximum number of iterations or upon the identification of the globally optimal parameters.
(5)
Model finalization and prediction: The optimal hyperparameters obtained through the COA are applied to the random forest regressor. The model is then systematically retrained using the training set. Ultimately, the optimized EFE-COA-RF model is employed on the previously unseen testing dataset to generate the final predictions of initial productivity.

3. Application and Case Study

3.1. Summary of the Designated Reservoir

The research concentrates on the P oilfield, a representative mature offshore high-water-cut reservoir located in the South China Sea. According to field geological interpretation, the reservoir is a clastic sandstone reservoir characterized by relatively strong vertical and lateral heterogeneity. The P oilfield operates under normal pressure and temperature conditions. Due to weak edge-water drive and insufficient natural energy, artificial pressure maintenance through water injection was implemented during the early development stage. At present, the reservoir has entered a mature high-water-cut development stage. In this study, the reservoir is classified as a high-water-cut reservoir because its current total water cut has reached 84.7%. Following common reservoir engineering practice, a water cut higher than 80% generally indicates a high-water-cut or mature waterflooding stage. The daily water injection volume is recorded at 6.19 × 10 4 m3/d, resulting in a cumulative voidage replacement ratio of 0.89. Such intricate fluid properties and advanced water-cut conditions present significant challenges for the accurate prediction of initial productivity for infill wells. Comprehensive physical characteristics of the P oilfield are presented in Table 1. The dataset used for model construction was obtained from the production performance records, logging interpretation results, reservoir property data, and development engineering parameters of infill wells in this field.
Table 1. Partial parameters of an offshore P oilfield.

3.2. Dataset Construction and Data Cleaning

The dataset used in this study was derived from actual field data of a mature high-water-cut offshore P oilfield located in the South China Sea. The original dataset included 442 infill wells. After missing-value detection, duplicate checking, outlier screening, and removal of features with severe data sparsity, 336 valid samples were retained for model development. The target variable was the initial productivity of infill wells, represented by the cumulative oil production during the first 12 months. The input variables included geological, reservoir, and engineering factors, such as true vertical thickness, permeability, crude oil viscosity, perforated thickness, mobility, formation flow coefficient, coefficient of variation, porosity, oil saturation, shale content, permeability breakthrough coefficient, production pressure differential, inclination angle, and average water cut. Specifically, the inclination angle in degrees ( θ d e g ) was derived by means of the following procedure:
  • Determine the accurate vertical thickness ( h v ) and measured thickness ( h m ) from logging and experimental data.
  • Calculate the inclination in radians ( θ r a d ) using the geometric relationship:
    θ r a d = arccos h v h m
  • Convert the radians to degrees:
    θ d e g = θ r a d × 180 π
Data quality was assessed by performing missing value detection and generating a heatmap (Figure 3). In the heatmap, deep red indicates missing values, while deep blue represents complete data. The visualization reveals significant data sparsity in the formation variation coefficient, permeability breakthrough coefficient, and production pressure differential. Consequently, these three features were excluded, and samples containing remaining missing values were removed to ensure data integrity. Subsequent checks for duplicates and outliers confirmed the dataset’s consistency. The summary of the pre-processed dataset appeared in Table 2, providing an overview of the mathematical distribution, including mean, standard deviation, and quartiles for each feature. The wide ranges of permeability, crude oil viscosity, mobility, formation flow coefficient, and average water cut indicate that the dataset covers substantial reservoir heterogeneity and complex production conditions.
Figure 3. Heatmap of missing values.
Table 2. The initial productivity prediction dataset.

3.3. Identification of Main Controlling Factors Based on Ensemble Feature Engineering

Following data pre-processing, an advanced feature engineering procedure was conducted on the infill well dataset. Considering the inherent limitations of individual feature selection methods, for example, a lack of dynamic robustness and sensitivity to noise in small samples [37], this study proposes an ensemble feature engineering framework. By integrating five heterogeneous algorithms, namely linear regression, Pearson correlation coefficient, GRA, SHAP, and Mean Decrease Impurity (MDI) [38], this framework establishes a more resilient and objective feature evaluation system.
The implementation of the EFE framework follows a systematic workflow (Figure 4). First, the dataset is processed through the five algorithms to calculate their respective evaluation metrics: fitting coefficients, grey relational grades, mean absolute SHAP values, absolute Pearson coefficients and importance scores. Second, each method ranks and selects the top 70% of features based on its specific criteria. Subsequently, a majority voting scheme is implemented, whereby a feature is identified as a primary controlling factor only if it is consistently selected by three or more individual methods.
Figure 4. Flow diagram of the approach.
The experimental results for each sub-method are illustrated in Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9. Within these frameworks, an elevated metric value indicates a more robust association between the input feature and initial productivity. By applying the majority voting logic, the final ensemble selection results are visualized in Figure 10. The analysis indicates that the primary controlling factors for the 12-month initial productivity of infill wells in the P Oilfield are: perforated thickness, porosity, oil saturation, permeability, mobility, formation flow coefficient and average water cut.
Figure 5. Linear regression method.
Figure 6. Grey relational analysis.
Figure 7. SHAP method.
Figure 8. Pearson correlation coefficient method.
Figure 9. MDI-Based method.
Figure 10. Ensemble feature engineering.
The selected primary controlling factors are physically consistent with reservoir engineering mechanisms. Perforated thickness determines the effective producing interval and controls the contact area between the wellbore and the reservoir. Porosity reflects the storage capacity of the reservoir and is closely related to the movable fluid volume. Oil saturation indicates the available oil content; higher oil saturation generally corresponds to stronger oil productivity. Permeability and mobility directly determine the flow capacity of fluids in porous media, and higher values reduce flow resistance near the wellbore. The formation flow coefficient integrates the effects of permeability, effective thickness, and fluid viscosity, thereby representing the comprehensive flow capacity of the reservoir. Average water cut reflects the degree of water invasion and reservoir development maturity. In high-water-cut reservoirs, excessive water production reduces effective oil contribution and increases the uncertainty of infill-well productivity. Therefore, the selected features are not only statistically significant but also physically meaningful for infill-well productivity prediction.

3.4. Model Training and Hyperparameter Optimization

To ensure fair comparison, all baseline models were trained and evaluated using the same training/testing split, the same EFE-selected feature subset, the same evaluation metrics, and a consistent cross-validation-based tuning strategy. For models suitable for COA-based tuning, COA was used to optimize their major hyperparameters. For models with substantially different parameter structures, an equivalent cross-validation-based tuning procedure was adopted. The testing set remained completely unseen during normalization parameter estimation, feature selection, hyperparameter optimization, and model selection. Following feature engineering, Z-score normalization was applied to the infill well dataset to eliminate dimensional disparities among disparate features, thereby enhancing convergence stability during training. The standardized dataset was subsequently partitioned into a training set and a testing set using a randomized sampling approach with a 70%:30% ratio.
To optimize the predictive accuracy of the RF model, the COA was employed for automated hyperparameter tuning. The fitness function was established as the average MAE derived from 10-fold cross-validation performed on the training dataset. This approach was implemented to enhance the model’s generalizability and reduce the risk of overfitting.
The COA was configured to operate with a population size of 50 individuals and was set to run for a maximum of 100 iterations. The convergence trajectory of hyperparameter optimization is illustrated in Figure 11. The convergence curve in Figure 11 indicates that the MAE decreases rapidly during the early iterations and gradually stabilizes in the later stage. This trend suggests that COA first performs broad global exploration and then switches to local exploitation for refining promising hyperparameter regions. No obvious oscillation or premature stagnation was observed during the optimization process, indicating stable convergence behavior. The computational time of the proposed framework was also recorded on a standard personal computer equipped with an Intel Core i5 CPU, 32 GB RAM, and Python 3.10, without GPU acceleration. The complete training process, including EFE feature selection, COA-based hyperparameter optimization, 10-fold cross-validation, and final RF training, required approximately 10.8 min. After training, the prediction time for the testing set was approximately 0.03 s, demonstrating that the proposed model can provide rapid productivity prediction for practical field applications. The resulting optimal hyperparameter configuration is summarized in Table 3. The relatively small optimized values of n_estimators = 11 and max_depth = 6 can be attributed to the reduced feature space obtained by the EFE module and the moderate sample size of the dataset. After redundant variables were removed, a compact RF structure was sufficient to capture the dominant nonlinear relationships. Increasing the number of trees or tree depth did not further improve testing performance but increased the risk of overfitting and computational cost. The finalized EFE-COA-RF model was then utilized to predict the initial productivity of infill wells, with benchmarks established via the hyperbolic decline model. As depicted in Figure 12, the EFE-COA-RF model attained a Mean Absolute Error (MAE) of 6.496 on the training dataset and 6.831 on the testing dataset. These results demonstrably validate the superior accuracy and robustness of the proposed framework for productivity forecasting in complex offshore high-water-cut reservoirs.
Figure 11. Convergence curve of the COA-based hyperparameter optimization process for the EFE-COA-RF model. The fitness value is defined as the average MAE obtained from 10-fold cross-validation.
Table 3. Best parameter values for the EFE-COA-RF model.
Figure 12. Results of initial productivity prediction using the EFE-COA-RF model.
The main computational cost of the proposed EFE-COA-RF framework arises from repeated RF training during COA-based hyperparameter optimization. If the population size is denoted as N , the maximum number of iterations as T , the number of cross-validation folds as K , and the computational cost of training one RF model as C R F ; the approximate computational complexity of the COA optimization process can be expressed as O ( N × T × K × C R F ) . In this study, N = 50 , T = 100 and K = 10 . Although the optimization process increases the offline training cost, the final trained model can rapidly predict new samples, making the framework suitable for practical productivity evaluation.

4. Results Comparison and Discussion

To further substantiate the enhanced performance of the proposed EFE-COA-RF framework in forecasting the initial productivity of infill wells within offshore reservoirs characterized by high water-cut, its predictive performance was systematically compared with other mainstream machine learning models utilizing the same ensemble feature engineering, including Random Forest (EFE-RF), Decision Tree (EFE-DT), XGBoost (EFE-XGBoost), and Support Vector Regression (EFE-SVR). In this study, the actual measured production data from the offshore oilfield were employed as the ground truth (labels) for model training and testing. To rigorously assess the predictive superiority of the proposed hybrid framework, the results obtained from the traditional hyperbolic decline model were employed as a conventional baseline for performance comparison. This ensures that the EFE-COA-RF model is validated against real-world physical outcomes rather than merely approximating empirical formulas. Quantitative evaluation was conducted using Mean Absolute Error, Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the coefficient of determination ( R 2 ). The comparative results are summarized in Figure 13, Figure 14, Figure 15 and Figure 16 and Table 4.
Figure 13. Results of the EFE-RF model.
Figure 14. Results of the EFE-DT model.
Figure 15. Results of the EFE-XGBoost model.
Figure 16. Results of the EFE-SVR model.
Table 4. A Comparative analysis of the performance.
The analysis demonstrates that among the baseline models, EFE-RF exhibits superior predictive performance. Building upon this, the EFE-COA-RF model achieves a significant enhancement in accuracy by incorporating precise hyperparameter optimization. To verify the search efficiency of the framework, a lateral comparison was performed with Ensemble Feature Engineering and Bayesian-optimized Random Forest (EFE-Bayesian-RF) and Ensemble Feature Engineering and Particle Swarm Optimization-optimized Random Forest (EFE-PSO-RF). As illustrated in Figure 17 and Figure 18 and Table 5, the performance of EFE-Bayesian-RF and EFE-PSO-RF is relatively limited on the testing set. In contrast, the EFE-COA-RF model consistently leads across all evaluation metrics.
Figure 17. Forecasting outcomes derived from the EFE-Bayesian-RF model.
Figure 18. Forecasting outcomes of the EFE-PSO-RF model.
Table 5. Comparative analysis.
The mechanisms contributing to the good performance of the EFE-COA-RF model are categorized into three aspects:
Multidimensional feature purification and denoising: Through the ensemble feature engineering mechanism, the model eliminates biases inherent in individual feature selection methods. By precisely extracting the primary controlling factors with the highest explanatory power from raw static and dynamic factors, the framework effectively mitigates noise interference caused by redundant features.
Global optimization and parameter adaptability: The COA proficiently optimizes the hyperparameter settings of the random forest model, thereby enhancing its capacity to accurately accommodate the distinct feature distributions characteristic of high-water-cut reservoir datasets. The utilization of a global search to determine the optimal solution substantially mitigates predictive bias.
Structural balance and enhanced robustness: By synergistically optimizing parameters such as m i n _ s a m p l e s _ s p l i t and m a x _ d e p t h , the EFE-COA-RF framework regulates the randomness of data sampling while balancing individual tree complexity. This mechanism enhances model robustness and suppresses overfitting, providing superior traversal capability across complex, non-convex, and multimodal hyperparameter spaces.
The comparison with EFE-PSO-RF and EFE-Bayesian-RF further confirms the search efficiency of COA. Although PSO achieved a lower training error, its testing error was higher than that of COA, indicating a greater risk of overfitting or premature convergence. In contrast, COA achieved a better balance between training accuracy and testing generalization. The present comparative experiments have already included PSO and Bayesian optimization; therefore, GA and GWO are further discussed from the perspective of algorithmic mechanisms. Future work will further incorporate GA-optimized RF and GWO-optimized RF variants for broader benchmarking. Compared with GA, which relies on crossover and mutation operators, COA has fewer algorithm-specific parameters and a more direct position-updating mechanism. Compared with GWO, COA introduces temperature-regulated behavioral switching and peer disturbance, which can enhance population diversity during the search process. Therefore, COA is more suitable for optimizing RF hyperparameters in the complex and multimodal search space of reservoir productivity prediction.
Although the proposed EFE-COA-RF framework shows promising performance for the offshore P oilfield, its generalizability to other offshore oilfields should be further evaluated. The workflow is modular and can be transferred to other reservoirs by re-performing feature selection and hyperparameter optimization using local datasets. However, direct model transfer may be influenced by differences in lithology, fluid properties, reservoir heterogeneity, waterflooding history, well spacing, and production management strategy. Therefore, when the framework is applied to another offshore field, local data should be used to recalibrate or retrain the model.
In real-time field deployment, several practical challenges should also be considered. First, reliable prediction depends on continuous and high-quality data acquisition from production monitoring systems, logging interpretation, and reservoir management platforms. Second, missing data, delayed data updates, sensor noise, and inconsistent data formats may affect prediction stability. Third, as reservoir conditions evolve during long-term waterflooding and infill-well development, periodic model updating is necessary to avoid performance degradation. Finally, integration with field decision-making systems requires a standardized data pipeline, automatic preprocessing, model monitoring, and uncertainty assessment. Future work will focus on multi-field validation, uncertainty quantification, and real-time model updating to improve the robustness and applicability of the proposed framework.

5. Conclusions

To overcome the difficulties associated with predicting the initial productivity of infill wells in offshore reservoirs characterized by high water-cut, this research proposes a hybrid data-driven framework that combines ensemble feature engineering with a random forest model optimized using the crayfish optimization algorithm. Through systematic comparisons with the hyperbolic decline model and various machine learning algorithms, the following conclusions have been derived:
(1)
The proposed EFE method—integrating linear regression, GRA, SHAP, Pearson Correlation, and MDI—successfully overcomes the limitations of traditional single-feature selection methods regarding nonlinear representation and robustness. Seven primary controlling factors influencing the 12-month initial productivity were identified: mobility, perforated thickness, formation flow coefficient, porosity, oil saturation, permeability and average water cut. These findings provide a quantitative basis for reservoir sensitivity analysis, confirming that initial productivity can be accurately characterized using these core parameters under established reservoir conditions. More importantly, the seven selected dominant factors reduce the number of parameters that need to be continuously monitored in field applications, thereby lowering real-time data acquisition costs and improving the economic efficiency of infill-well productivity evaluation.
(2)
Comparative experiments have demonstrated that the EFE-COA-RF model achieves a testing MAE of 6.831, outperforming EFE-Bayesian-RF and EFE-PSO-RF under identical conditions. The convergence behavior indicates that COA can rapidly reduce the cross-validation MAE during the early search stage and gradually stabilize in later iterations, suggesting an effective balance between global exploration and local exploitation. This confirms that COA is capable of identifying a robust RF hyperparameter combination in a nonlinear and multimodal search space.
(3)
In terms of computational efficiency, the complete training process of the proposed EFE-COA-RF framework, including ensemble feature engineering, COA-based hyperparameter optimization, 10-fold cross-validation, and final RF model training, required approximately 10.8 min on a standard personal computer with 16 GB RAM. After training, the prediction time for the testing set was only 0.03 s, indicating that the proposed framework can provide near-real-time productivity evaluation and is suitable for rapid decision-making in offshore oilfield development.
Nevertheless, the dataset used in this study was obtained from a single offshore oilfield. The direct transferability of the trained model to other fields may be affected by differences in lithology, reservoir heterogeneity, fluid properties, waterflooding history, well spacing, and production management strategies. Future work will focus on multi-field validation, uncertainty quantification, and real-time model updating.

Author Contributions

W.X.: Conceptualization, Methodology, Software, Formal analysis, Writing—original draft. Z.W.: Data curation, Investigation. X.D.: Validation, Visualization. C.T.: Resources, Supervision. C.D.: Writing—review & editing. F.M.: Funding acquisition, Project administration, Supervision, Writing—review & editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Major Science and Technology Projects in China (Grant No. 2024ZD1406502) and the China Scholarship Council (CSC No. 202610930013).

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author(s).

Conflicts of Interest

The authors affirm that they have no identifiable financial interests or personal relationships that could have potentially influenced the research presented in this manuscript.

Abbreviations

EOREnhance Oil Recovery
EFEEnsemble Feature Engineering
COACrayfish Optimization Algorithm
RFRandom Forest
COA-RFCrayfish Optimization Algorithm-optimized Random Forest
GRAGrey Relational Analysis
SHAPSHapley Additive exPlanations
PSOParticle Swarm Optimization
GAGenetic Algorithms
EFE-COA-RFEnsemble Feature Engineering and Crayfish Optimization Algorithm-optimized Random Forest
MDIMean Decrease Impurity
EFE-RFEnsemble Feature Engineering and Random Forest
EFE-DTEnsemble Feature Engineering and Decision Tree
EFE-XGBoostEnsemble Feature Engineering and XGBoost
EFE-SVREnsemble Feature Engineering and Support Vector Regression
MSEMean Squared Error
RMSERoot Mean Squared Error
EFE-Bayesian-RFEnsemble Feature Engineering and Bayesian-optimized Random Forest
EFE-PSO-RFEnsemble Feature Engineering and Particle Swarm Optimization-optimized Random Forest
MAEMean Absolute Error
R2The coefficient of determination

References

  1. Li, T.; Tan, J.; Yuan, Z.; Li, Z.; Ma, J. Research and practice of development models during the continental heavy oil field’s extra-high water cut stage in the Bohai Sea. J. Phys. Conf. Ser. 2024, 2834, 012155. [Google Scholar] [CrossRef] [Scilit]
  2. Ma, F.; Altalbawy, F.M.A.; Patel, P.; Manjunatha, R.; Kalia, R.; Formanova, S.; Naveen, P.R.; Joshi, K.K.; Sinha, A.; Kandahari, A.Y.; et al. Predictive modeling of oil rate for wells under gas lift using machine learning. Sci. Rep. 2025, 15, 27765. [Google Scholar] [CrossRef] [Scilit]
  3. Hu, X.; Wang, F.; Li, W.; Chang, B.; Zhang, B.; Wang, B.; Mao, J. Refined reservoir mapping while drilling for a strategic exploitation of deep-development reservoirs. Sci. Rep. 2026, 16, 9302. [Google Scholar] [CrossRef] [Scilit]
  4. Tang, L.; Wang, T.; Liu, Y.; Zhou, H. Methane Interface Desorption Mechanism in Geological Reservoirs after Natural Gas Hydrate Decomposition. Reserv. Sci. 2026, 2, 172–188. [Google Scholar] [CrossRef] [Scilit]
  5. Brantson, E.T.; Obeng, S.D.A.; Ocran, D.; Duodu, E.K.; Iyiola, Z.O.; Adjei, E.J.; Adu-Awuku, J.; Owusu, A.G. Evaluating Enthalpy Production in Geothermal Reservoirs: Insights from Response Surface Methodology and Advanced Machine Learning Techniques. Reserv. Sci. 2026, 2, 151–171. [Google Scholar] [CrossRef] [Scilit]
  6. Zhou, X.; Yang, F.; Chen, Z.; Su, Y. Mechanistic Insights and Engineering Strategies for Wellbore Integrity Control in Polar Permafrost Reservoirs. Reserv. Sci. 2026, 2, 126–150. [Google Scholar] [CrossRef] [Scilit]
  7. Ma, K.; Li, A.; Guo, S.; Pang, J.; Xue, Y.; Zhou, Z. Techniques for improving the waterflooding of oil fields during the high water-cut stage. Oil Gas Sci. Technol. 2019, 74, 69. [Google Scholar] [CrossRef] [Scilit]
  8. Xue, L.; Liu, P.; Zhang, Y. Status and prospect of improved oil recovery technology of high water cut reservoirs. Water 2023, 15, 1342. [Google Scholar] [CrossRef] [Scilit]
  9. Yuan, Z.; Yang, B.; Yang, L.; Gu, W.; Chen, X.; Kang, B.; Li, C.; Zhang, H. Water-cut rising mechanism and optimized water injection technology for deepwater turbidite sandstone oilfield: A case study of AKPO Oilfield in Niger Delta Basin, West Africa. Pet. Explor. Dev. 2018, 45, 302–311. [Google Scholar] [CrossRef] [Scilit]
  10. Rahmanifard, H.; Gates, I. A comprehensive review of data-driven approaches for forecasting production from unconventional reservoirs: Best practices and future directions. Artif. Intell. Rev. 2024, 57, 213. [Google Scholar] [CrossRef] [Scilit]
  11. Muhammad, S.I.; Makwashi, N.; Abdulsalam, A.; Tijjani, I.I. Data-driven approach in reservoir production forecast: Comparison of machine learning and deep learning. In Proceedings of the SPE Nigeria Annual International Conference and Exhibition, Lagos, Nigeria, 4–6 August 2025. SPE-2025-D021S007R005. [Google Scholar]
  12. Du, E.; Liu, Y.; Xue, L.; Zhu, X.; Song, L. A data-driven model for production prediction of strongly heterogeneous reservoir under uncertainty. Geoenergy Sci. Eng. 2023, 223, 211542. [Google Scholar] [CrossRef] [Scilit]
  13. Noshi, C.I.; Eissa, M.R.; Abdalla, R.M. An intelligent data driven approach for production prediction. In Proceedings of the Offshore Technology Conference, Houston, TX, USA, 6–9 May 2019. OTC-29505-MS. [Google Scholar]
  14. Noorollahi, Y.; Itoi, R. Production capacity estimation by reservoir numerical simulation of northwest (NW) Sabalan geothermal field, Iran. Energy 2011, 36, 4552–4569. [Google Scholar] [CrossRef] [Scilit]
  15. Ding, Y.; Renard, G.; Weill, L. Representation of wells in numerical reservoir simulation. SPE Reserv. Eval. Eng. 1998, 1, 18–23. [Google Scholar] [CrossRef] [Scilit]
  16. Sikanyika, E.W.; Wu, Z.; Mbarouk, M.S.; Mafimba, A.M.; Elbaloula, H.A.; Jiang, S. Numerical simulation of the oil production performance of different well patterns with water injection. Energies 2022, 16, 91. [Google Scholar] [CrossRef] [Scilit]
  17. Jalilinasrabady, S.; Tanaka, T.; Itoi, R.; Goto, H. Numerical simulation and production prediction assessment of Takigami geothermal reservoir. Energy 2021, 236, 121503. [Google Scholar] [CrossRef] [Scilit]
  18. Finol, A.; Ali, S.M.F. Numerical simulation of oil production with simultaneous ground subsidence. Soc. Pet. Eng. J. 1975, 15, 411–424. [Google Scholar] [CrossRef] [Scilit]
  19. Nsulangi, P.T.; Kafuku, J.M.; Liang, G.Z. Application of hybrid numerical reservoir simulation and artificial neural network for evaluating reservoir performance under waterflooding. Pet. Res. 2025, 10, 564–576. [Google Scholar] [CrossRef] [Scilit]
  20. Hepguler, G.; Barua, S.; Bard, W. Integration of a field surface and production network with a reservoir simulator. SPE Comput. Appl. 1997, 9, 88–92. [Google Scholar] [CrossRef] [Scilit]
  21. Zhang, J.; Yao, Y.; Yin, Z. Fluid production from NGH reservoir: Fundamental physics, numerical model, and reservoir simulation. In Challenges and Recent Advances in Sustainable Oil and Gas Recovery and Transportation; Gulf Professional Publishing: Houston, TX, USA, 2023; pp. 53–80. [Google Scholar]
  22. Zhang, P.; Zhang, Y.; Zhang, W.; Tian, S. Numerical simulation of gas production from natural gas hydrate deposits with multi-branch wells: Influence of reservoir properties. Energy 2022, 238, 121738. [Google Scholar] [CrossRef] [Scilit]
  23. Zhang, J.; Feng, Q.; Zhang, X.; Hu, Q.; Wen, S.; Chen, D.; Zhai, Y.; Yan, X. Multi-fractured horizontal well for improved coalbed methane production in eastern Ordos basin, China: Field observations and numerical simulations. J. Pet. Sci. Eng. 2020, 194, 107488. [Google Scholar] [CrossRef] [Scilit]
  24. Muradkhanli, L. Neural networks for prediction of oil production. IFAC-PapersOnLine 2018, 51, 415–417. [Google Scholar] [CrossRef] [Scilit]
  25. Wang, Y.; Lv, Y.; Guo, D.; Zhang, S.; Jiao, S. A novel multi-input AlexNet prediction model for oil and gas production. Math. Probl. Eng. 2018, 2018, 5076547. [Google Scholar] [CrossRef] [Scilit]
  26. Li, X.; Chan, C.W.; Nguyen, H.H. Application of the Neural Decision Tree approach for prediction of petroleum production. J. Pet. Sci. Eng. 2013, 104, 11–16. [Google Scholar] [CrossRef] [Scilit]
  27. Mahdavi, Z.; Khademi, M. Prediction of oil production with: Data mining, neuro-fuzzy and linear regression. Int. J. Comput. Theory Eng. 2012, 4, 446. [Google Scholar] [CrossRef] [Scilit]
  28. Alkinani, H.H.; Al-Hameedi, A.T.; Dunn-Norman, S.; Flori, R.E.; Alsaba, M.T.; Amer, A.S. Applications of artificial neural networks in the petroleum industry: A review. In Proceedings of the SPE Middle East Oil and Gas Show and Conference, Manama, Bahrain, 18–21 March 2019. SPE-195071-MS. [Google Scholar]
  29. Cao, Q.; Banerjee, R.; Gupta, S.; Li, J.; Zhou, W.; Jeyachandra, B. Data driven production forecasting using machine learning. In Proceedings of the SPE Argentina Exploration and Production of Unconventional Resources Symposium, Pilar, Argentina, 1–3 June 2016. SPE-180984-MS. [Google Scholar]
  30. Li, Y.; Han, Y. Decline curve analysis for production forecasting based on machine learning. In Proceedings of the SPE Symposium: Production Enhancement and Cost Optimisation, Kuala Lumpur, Malaysia, 7–8 November 2017. SPE-189253-MS. [Google Scholar]
  31. Johan, D.C.; Shukla, P.; Shrivastava, K.; Koley, M. Data-driven completion optimization for unconventional assets. In Proceedings of the 11th Unconventional Resources Technology Conference, Denver, CO, USA, 13–15 June 2023. [Google Scholar]
  32. Guyon, I.; Elisseeff, A. An Introduction to Variable and Feature Selection. J. Mach. Learn. Res. 2003, 3, 1157–1182. [Google Scholar]
  33. Saeys, Y.; Inza, I.; Larrañaga, P. A Review of Feature Selection Techniques in Bioinformatics. Bioinformatics 2007, 23, 2507–2517. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  34. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
  35. Rigatti, S.J. Random forest. J. Insur. Med. 2017, 47, 31–39. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  36. Jia, H.; Rao, H.; Wen, C.; Mirjalili, S. Crayfish optimization algorithm. Artif. Intell. Rev. 2023, 56, 1919–1979. [Google Scholar] [CrossRef] [Scilit]
  37. Ning, Y.; Schumann, H.; Jin, G. Application of data mining to small data sets: Identification of key production drivers in heterogeneous unconventional resources. SPE Reserv. Eval. Eng. 2023, 26, 411–421. [Google Scholar] [CrossRef] [Scilit]
  38. Ding, Z.; Lu, C.; Chen, L.; Chong, Q.; Dong, Y.; Xia, W.; Meng, F. Production decline rate prediction for offshore high water-cut reservoirs by integrating moth–flame optimization with extreme gradient boosting tree. Processes 2025, 13, 2266. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.