Surface Torque Prediction and Wellbore Stability Optimization in Horizontal Wells Using ANN and GBR Dynamic Machine Learning Models
Abstract
In horizontal drilling, where traditional analytical models repeatedly fail to capture the nonlinear frictional dynamics that emerge throughout extended lateral portions, surface torque and early identification of wellbore instability remain crucial unresolved difficulties. A machine-learning-based approach for forecasting surface torque and maximizing wellbore stability in horizontal wells is presented in this work. The study evaluates how well Artificial Neural Networks (ANN) and Gradient Boosted Regression (GBR) models capture nonlinear drilling behavior and outperform earlier machine learning methods. The scope focuses on horizontal well sections where the risks of instability, drag accumulation, and frictional forces are most noticeable. A unified dataset of 27,753 samples, including 30 operational parameters, directional surveys, and petrophysical data under several drilling runs, was created by compiling, cleaning, and depth-aligning field drilling data from two horizontal wells. To find the main factors influencing surface torque behavior, feature selection and importance analysis were carried out. Two machine learning models were developed: a deep ANN with four hidden layers and a tuned GBR model. Both models were trained on 80% of the dataset and tested on the remaining 20%, with performance measured using RMSE, MAE, R2, residual analysis, and cross-validation. ANN-T explained 99.8% of the variance in surface torque with a relative prediction accuracy of 93.97%, while GBR-T achieved an R2 of 1.000 with an 80% lower RMSE. For wellbore stability, ANN-S reached 96.2% classification accuracy and GBR-S reached 98.2%, which is higher than the 94% reported in comparable prior work. Both models performed better than earlier SVM, Random Forest, and CNN-based approaches, with stronger generalization supported by the use of multi-run data and integrated survey geometry. Feature importance and SHAP results indicate that torque is largely controlled by well geometry and mechanical loading, while tool shock level was the strongest predictor of stick-slip behavior.