Skip to content

Original Research

Frontiers in Built Environment ·

Volume 12 - 2026 | https://doi.org/10.3389/fbuil.2026.1913509

Machine-learning-based prediction of pipe-sticking events in petroleum drilling operations using domain-informed features and class-balanced ensembles

  • R. Harishwaran1
  • Aslam Abdullah M.1*corresponding author
  1. School of Chemical Engineering, Vellore Institute of Technology, Vellore, Tamil Nadu, India
Article metrics0 viewsView details

Abstract

Pipe sticking is a critical drilling failure that can increase the non-productive time, operational risk, and well construction costs. Reliable and early identification of pipe-sticking conditions is therefore important for improving drilling decision support while reducing the likelihood of severe downhole incidents. In this study, we developed and evaluated a machine-learning framework for binary classification of pipe-sticking events using a drilling dataset containing 297 observations and 13 original drilling-related variables. Domain-informed feature engineering was used to construct additional ratio, difference, and interaction variables representing the relationships among the geometric, density, friction, and torque-related parameters. Class imbalance was addressed using a custom minority-class interpolation procedure, followed by mutual-information-based feature selection. Eleven supervised machine-learning classifiers were then evaluated using stratified cross-validation, and the leading models were optimised using grid-search hyperparameter tuning before being combined using soft voting. The gradient boosting classifier achieved an accuracy of 92.09%, precision of 95.93%, recall of 91.54%, F1-score of 93.62%, and area under the receiver operating characteristic curve (ROC-AUC) of 96.60%. The soft-voting ensemble achieved an accuracy of 92.34% and ROC-AUC of 97.83%. Feature-importance analysis was used to identify the annular clearance, density, friction, and torque-related variables among the dominant predictors. However, the limited number of confirmed sticking events and the single-source dataset constrain the generalisability of the results. The proposed framework therefore represents a preliminary data-driven baseline for pipe-sticking classification rather than a field-validated deployment system.

Keywords

1 Introduction

1.1 Background and problem statement

Petroleum drilling remains the single most capital-intensive phase in hydrocarbon exploration and production. Among the drilling operations, unplanned downhole failures contribute disproportionately to project cost and schedule overruns. Pipe sticking is a condition in which the drill string becomes immobile within the wellbore; it is widely recognised as one of the most prevalent and expensive drilling problems globally (Samuel, 2010; Harishwaran and Abdullah, 2026). Industry surveys have consistently reported that stuck pipes account for about 10%–30% of all non-productive time (NPT), with the associated costs ranging from tens of thousands to several millions of US dollars per incident depending on well depth, geography, and remediation complexity (Maidla and Haci, 2004; Dupriest and Koederitz, 2005). Pipe sticking can be broadly categorised into two types: differential sticking that arises when the hydrostatic pressure forces the pipe against a permeable formation face; mechanical sticking resulting from borehole instability, inadequate hole cleaning, or geometrical constraints, such as key seats, dog legs, and undergauge holes (Mitchell and Miska, 2011; Gabolde and Nguyen, 2014). The complex interplay among borehole geometry, drilling fluid rheology, formation properties, and mechanical parameters makes pipe-sticking prediction inherently multi-variate and non-linear, rendering conventional rule-based approaches inadequate for real-time field deployment (Mirhaj et al., 2011).

The proliferation of surface logging units, downhole measurement-while-drilling (MWD) tools, and logging-while-drilling (LWD) sensors has enabled generation of high-resolution multi-parameter data streams that can encode early signatures of impending stuck-pipe events. This data richness creates a favourable environment for supervised machine learning (ML) approaches, which can autonomously learn latent correlations from historical drilling records (Hegde and Gray, 2017; Li et al., 2020). Despite this potential, the literature on ML-based pipe-sticking prediction remains comparatively sparse, with most published studies being limited by single-model evaluations, small datasets, or exclusive reliance on raw features without domain-informed engineering (Ouenes and Hartley, 2000). Our study addresses these gaps through four principal contributions. First, we apply systematic domain-informed feature engineering to derive 21 interaction and ratio features grounded in drilling mechanics to substantially enrich the predictive feature space beyond raw sensor readings. Second, we comprehensively benchmark 11 diverse ML classifiers under identical experimental conditions using 10-fold stratified cross-validation and GridSearchCV-based hyperparameter optimisation. Third, we propose a soft-voting ensemble by combining the top-three best-performing models to achieve superior classification performance. Fourth, we provide explainability through feature-importance analysis to identify the dominant physical drivers of pipe sticking, thereby supporting engineering interpretation and field adoption.

1.2 Previous studies and data-driven approaches in downhole risk prediction

Over the past decade, ML has been utilised across a broad spectrum of challenges in petroleum engineering, including reservoir characterisation (Konaté et al., 2015; Baniamerian et al., 2020), production optimisation (Nwachukwu et al., 2018), drilling rate of penetration (ROP) prediction (Soares and Gray, 2019; Deng et al., 2026), wellbore stability assessment (Hu et al., 2021), and formation evaluation (Chang et al., 2002). However, its application to pipe-sticking prediction in particular has lagged in these domains. Some early efforts (Murillo et al., 2009) demonstrated that artificial neural networks (ANNs) could be used to classify stuck-pipe events using surface drilling parameters with approximately 80% accuracy; however, this study was limited to shallow wells and a narrow parameter set. Subsequent work by Jahanbakshi et al. (2012) involved support vector machines (SVMs) to detect differential sticking using mud-logging data, reporting area under the receiver operating characteristic curve (ROC-AUC) values of 0.84–0.88 on a small cohort of offset wells. Yang (2025) employed random forest (RF) classifiers to predict pipe sticking and achieved F1-scores above 0.96 with their validation set.

Ensemble and boosting approaches have consistently shown superior performances over single-model baselines in related drilling classification tasks. Elkatatny et al. (2016) highlighted the importance of data augmentation and class balancing when handling imbalanced drilling event datasets, where positive incidents are inherently rare. Feature engineering has received increasing attention as a means of incorporating domain knowledge into data-driven models. Sabah et al. (2019) constructed composite features from drilling fluid properties and bit characteristics to improve ROP prediction and noted that the engineered features consistently outperformed raw feature sets across all tested algorithms. Elahifar and Hosseini (2022) used an artificial intelligence method called hybrid swarm optimisation neural network and discovered that the particle swarm optimisation (PSO)-based ANN model could predict the incidence of a stuck pipe with an accuracy of 80% for both directional and vertical wells.

Class imbalance remains a persistent challenge in drilling event prediction since the unrecorded normal operations vastly outnumber labelled incidents in operational logs. Synthetic minority oversampling technique (SMOTE) and its variants have been applied successfully to balance drilling datasets, with reported accuracy gains of 5%–15% on minority class recall relative to unbalanced training. Destrero et al. (2009) illustrated that mutual information (MI)-based feature selection could reduce model complexity while maintaining or improving predictive performance in high-dimensional drilling datasets. Furthermore, ML methodologies have been successfully extended to predict complex fluid and thermodynamic behaviours in oil reservoirs, such as asphaltene precipitation modelling (Jalilian et al., 2026).

To address the identified gaps, we present a rigorous data-driven framework designed specifically for pipe-sticking prediction in oil and gas wells. The primary scientific and methodological contributions of this work are threefold: (1) systematic derivation of 21 domain-informed feature interactions capturing downhole mechanical and tribological coupling from a reservoir dataset of 297 samples (comprising nine confirmed sticking occurrences and 288 normal operations); (2) comprehensive benchmarking of 11 diverse ML classifiers optimised via 10-fold stratified cross-validation and GridSearchCV-based hyperparameter tuning, demonstrating the superiority of the gradient boosting (GB) algorithm; (3) implementation of a soft-voting ensemble that elevates predictive performance to an accuracy of 92.34% and an ROC-AUC of 97.82%, providing a reproducible benchmark for operational risk mitigation.

Extant literature demonstrate the application of ML to pipe-sticking prediction and a range of related drilling problems (Mantha and Samuel, 2016; Yu et al., 2025), including drilling event classification, drilling anomaly detection, and wellbore-related risk assessment. Previous studies have independently investigated ANNs, SVMs, RFs, feature engineering, and class-balancing approaches. Therefore, the novelty of the present study is not in the individual use of these techniques but in evaluating an integrated ML workflow within a common experimental framework for pipe-sticking classification. The proposed workflow combines domain-informed feature construction, minority-class augmentation, comparative benchmarking of 11 classifiers, hyperparameter optimisation, MI-based feature selection, and soft-voting ensemble classification. We further examined whether the engineered variables provided useful drilling-mechanics interpretations of the resulting predictions. These contributions are presented as a methodological baseline that requires validation using larger and independently labelled multi-well datasets. A review on the ML algorithms used to predict downhole problems is provided in Table 1.

TABLE 1. Comparative summary of the findings from previous machine-learning studies and the present work on pipe-sticking and downhole risk predictions.

StudyDatasetInput parameterValidation methodAlgorithms evaluatedEvaluation metric
Murillo et al. (2009)Shallow wellsSurface drilling parametersStandard training/test splitAdaptive fuzzy logic, neural networks∼80% accuracy
Jahanbakhshi et al. (2012)Small offset well cohortMud-logging dataValidation setSupport vector machine, artificial neural network (ANN)Area under the receiver operating characteristic curve (ROC-AUC): 0.84–0.88
Elahifar and Hosseini (2022)Middle East oil fields datasetStatistical drilling dataValidation set/case studyParticle-swarm-optimisation-based ANN∼80% Accuracy
Aseel et al. (2023)Field operational datasetWellbore cleaning parametersCross-validation/Test splitMachine-learning models (decision trees/ensembles)Comparative model evaluation
Yang (2025)Unspecified datasetStandard drilling featuresValidation setRandom forestF1-score >0.96
Proposed methodReservoir dataset (297 samples)13 raw + 21 domain-informed features10-fold stratified cross-validation11 classifiers + soft-voting ensembleAccuracy: 92.34%, ROC-AUC: 97.83%

2 Methodology

2.1 Dataset description

The dataset used in this study comprised 297 samples and was obtained from Dolph and Dode Offshore Services (DoD), India. The 297 drilling circumstances were chosen over drill-pipe depths of 634–1,571 feet. This reservoir dataset is comprehensively represented in Table 2; here, each row corresponds to a unique drilling interval characterised by 13 input features spanning mechanical, geometric, rheological, and tribological drilling parameters. The target variable “pipe sticking” is a binary label (0 = no sticking, 1 = pipe-sticking event). Because event-level drilling reports and NPT records were not available for independent verification of each observation, the 288 observations without an explicit pipe-sticking label were treated as presumed negative cases rather than independently confirmed non-sticking events. This assumption was made because the dataset contained no recorded sticking event for these observations. However, the possibility of unrecorded or minor sticking events cannot be excluded. Consequently, the binary labels contain a degree of uncertainty, and the reported predictive performance should be interpreted as conditional on the adopted labelling assumption. Independent verification using daily drilling reports, NPT records, or event logs is required in future studies.

TABLE 2. Domain-informed engineered features and their derivations.

Engineered featureMathematical formula/derivationUnitsPhysical significanceRelevant reference
Pipe bit ratioPipe o uter d iameter Bit d iameterDimensionlessRepresents the relative gauge of the drill pipe to the borehole diameterGabolde and Nguyen (2014)
Annular clearanceBit d iameter − Pipe o uter d iameter 2mmQuantifies the annular space available for fluid flow and cuttings evacuationMitchell and Miska (2011)
Density differenceCutting d ensity − Fluid d ensitykg / m 3Drives the net gravitational settling tendency of drilled cuttings in the annulusJohancsik et al. (1984)
Friction ratioμ drill string μ wellboreDimensionlessCaptures the differential frictional resistance between the string and formation interfacesSamuel (2010)
Density ratioCutting d ensity Fluid d ensityDimensionlessReflects suspension efficiency and buoyancy effects on the suspended solidsAadnøy and Andersen (2001)
Cutting load factorCutting v olume × Density d ifference 1 , 000kg / m 3Represents integrated mechanical solid loading within the wellbore annulusHegde and Gray (2017)
Junk torque interactionJunk s lot r atio × Torque f riction f actor% · unitlessQuantifies the coupled resistance between annular restriction and rotational frictionMirhaj et al. (2011)
Density torque interactionDensity d ifference × Torque f riction f actorkg / m 3Couples sediment density loading with downhole rotational torque resistanceJohancsik et al. (1984)
Torque clearance ratioTorque f riction f actor Annular c learance + 11 / mmIndicates torque intensification caused by restricted annular clearanceSamuel (2010)

Out of the 297 samples, 9 were explicitly labelled as pipe-sticking events (pipe sticking = 1), while 288 samples had no label entries. According to standard petroleum engineering practice and domain conventions, the unrecorded drilling intervals represent normal operations (International Association of Drilling Contractors, 2015) and all unlabelled samples were assigned pipe sticking = 0. This convention mirrors the approach used in industry-standard NPT classification systems, where the absence of an incident log entry constitutes evidence of normal operation rather than missing data. Table 2 shows the descriptive statistics of the reservoir dataset. This dataset was collected by Dolph and Dode Offshore Services (DoD), India, within a single reservoir campaign. Because these observations represent sequential depth intervals from the same drilling operation, the adjacent data points exhibit inherent spatial and temporal correlations. Although we used 10-fold stratified cross-validation to evaluate the classification performance, we acknowledge that random splitting of highly correlated consecutive depth samples can lead to optimistic performance estimates owing to data leakage between the training and validation folds. A robust grouped validation scheme (such as well-based or block-based splitting) remains an important consideration for future field implementations across entirely unseen wells.

2.2 Feature engineering

To capture the interactions and non-linear effects relevant to pipe-sticking mechanics, we derived 21 engineered features from the 13 original features using domain knowledge of drilling. The domain-informed engineered features and their derivations are presented in Table 2. These features encode key mechanical concepts, including annular clearance (governing cuttings transport capacity), density differential (driving gravitational settling of cuttings), friction–torque coupling (representing the combined resistive loading on the pipe), and junk-slot–torque interaction (capturing the interplay between annular restriction and rotational resistance). Additional polynomial and ratio features were constructed to capture some non-linear parameter relationships identified from drilling mechanics literature (Johancsik et al., 1984; Aadnøy and Andersen, 2001).

2.3 Data preprocessing

The RobustScaler tool (scikit-learn) was used to scale all the features, such that the values were centred using the interquartile range and therefore resistant to outliers; this is a particularly appropriate choice for drilling datasets where sensor malfunctions or formation anomalies can produce extreme values (Pedregosa et al., 2011). There were no missing values in the dataset, precluding the need for imputation. The dataset collected from the reservoir is shown in Table 3. To address class imbalance, a SMOTE-inspired synthetic oversampling procedure [x s y n = x i + α x j − x i + ϵ] (where xi and xj are two original minority-class observations, and ϵ represents the Gaussian perturbation added to the scaled feature space) was applied. For each synthetic sample, two randomly selected minority-class instances were interpolated using a uniformly distributed weight α ∈ [0, 1], and a Gaussian noise component (σ = 0.03 of the scaled feature space) was added to improve sample diversity while preventing overfitting to the original minority cluster. Feature selection was then performed using the MI scores computed between each of the features and the binary target. The top-15 features ranked by MI score were retained for model training. This step reduces the dimensionality, mitigates the curse of dimensionality, and improves model generalisation by removing noisy or redundant features (Guyon and Elisseeff, 2003).

TABLE 3. Statistics of the reservoir dataset.

IndexCountMeanStandard deviationMinimum25%50%75%Maximum
Days297252.085.88104178252.0326.0400
Outer diameter of the drill pipe (mm)297147.071.09144.4146.28147.43147.99148.3
Diameter of the bit (mm)297222.111.0018219.7221.52222.4222.89223.4
Diameter of the stabiliser (mm)297222.111.0018219.7221.52222.4222.89223.4
Junk slot ratio (%)29751.880.4751.051.4651.9352.2452.74
Initial cutting volume fraction (%)29716.120.6015.015.6916.116.5917.05
Internal friction angle of the cuttings (%)29732.360.7631.031.6932.5733.0633.21
Friction coefficient between cuttings and drill string (dimensionless)2970.180.0070.170.170.1850.1910.195
Friction coefficient between cuttings and wellbore (dimensionless)2970.170.0050.160.170.1760.1780.188
Density of the cuttings (kg/m3)2972,703.1017.202,6712,693.42,7002,712.372,743.0
Density of the drilling fluid (kg/m3)2971,911.5522.861,8711,895.81,9071,931.251,951.0
Angle of repose of cutting (degree)29733.030.5832.032.5233.0333.5933.9
Torque vs. drag frictional factor (dimensionless)2970.270.0050.260.260.2700.2730.279

2.4 ML modelling

We implemented 11 supervised binary classifiers using scikit learn and evaluated them under identical experimental conditions. The algorithms used in the classifiers were RF, GB, extra trees (ET), AdaBoost (AB), SVM with a radial basis function kernel (SVM–RBF) and a polynomial kernel (SVM–Poly), K-nearest neighbours (KNN), neural network, logistic regression, decision tree, and Gaussian naïve Bayes (GNB). The order of modelling was as follows: original data → outer training/test split → preprocessed data fitted to training set → synthetic augmentation ONLY on training set → feature selection ONLY on training set → cross-validation/grid search within training set → final model → evaluation on untouched test set.

2.5 Hyperparameter optimisation

The three highest-performing models, i.e. GB, RF, and ET, were subjected to full-scale GridSearchCV with 10-fold cross-validation. The GB search grid included n_estimators ∈ {100, 200, 300}, learning_rate ∈ {0.05, 0.10, 0.15}, max_depth ∈ {3, 5, 7}, min_samples_split ∈ {2, 5}, and subsample ∈ {0.8, 0.9, 1.0}. For RF and ET, the grid searches explored n_estimators ∈ {100, 200, 300}, max_depth ∈ {10, 15, 20, none}, min_samples_split ∈ {2, 5, 10}, and min_samples_leaf ∈ {1, 2, 4}. The accuracy obtained on the validation fold was used as the optimisation objective. The three tuned estimators were subsequently combined into a soft-voting ensemble (voting classifier, voting = “soft”) that aggregated class probability estimates and selected the class with the highest mean posterior probability. Soft voting was preferred over hard voting as it leverages the calibrated probability scores from gradient-based models, typically yielding superior performances for well-calibrated classifiers (Zhou, 2012).

2.6 Evaluation metrics

The model performances were assessed using five complementary metrics: accuracy, precision, recall, F1-score, and ROC-AUC. All metrics were computed using zero-division handling to ensure numerical stability on the folds where no positive predictions were obtained (Fawcett, 2006). These evaluation metrics are commonly used to measure ML model performance; they help to assess whether the model is making accurate predictions and meeting the desired goals.

3 Results

3.1 Feature distributions and class separability

The frequency distributions of the nine key features stratified by pipe-sticking class are displayed in Figure 1. A visual inspection reveals that the torque vs. drag friction factor and junk slot ratio exhibit the clearest bimodal separation between the stuck and non-stuck distributions, suggesting high univariate predictive utility. The cuttings density and friction coefficient cuttings drill string also show appreciable distributional shifts; days and pipe outer diameter display considerable overlaps, indicating weaker standalone discriminatory power.

Feature distributions by pipe-sticking status.
Figure 1. Feature distributions by pipe-sticking status.

3.2 Feature correlation analysis

Figure 2 displays the lower triangular correlation heatmap, which reveals several notable inter-feature relationships. The pipe outer diameter and bit diameter exhibit a strong positive correlation (r = 0.72), which is expected given that the bit size is a design constraint on the pipe size. The two friction coefficient features are moderately correlated (r = 0.61), consistent with their common physical origin in cuttings-surface contact mechanics. A moderate negative correlation between cuttings density and drilling fluid density (r = −0.45) reflects the tendency for denser fluids to be deployed when heavier cuttings are anticipated. None of the feature pairs exhibit perfect collinearity (|r| = 1.0), justifying the retention of all features prior to MI-based selection.

Feature correlation heatmap.
Figure 2. Feature correlation heatmap.

3.3 Comparison of model performance

Figure 3 and Table 4 summarise the 10-fold cross-validation results for all 11 classifiers and the ensemble. GB achieved the highest individual model accuracy of 92.09%, followed by RF (91.84%) and DT (91.22%). The ensemble soft-voting classifier combining the tuned GB, RF, and ET estimators attained the overall best performance with an accuracy of 92.34% and ROC-AUC of 97.83%. The tree-based ensemble methods collectively dominated the rankings, with GB, RF, DT, and ET occupying the top-four positions. Neural network achieved moderate performance with an accuracy of 82.4%, while the SVM–RBF and SVM–Poly models achieved accuracies of 74.03% and 71.77%, respectively. The KNN model was clustered in the second tier with an accuracy of 76.03%. AB, logistic regression, and GNB were predominantly outperformed, suggesting that the relationships between the drilling parameters and pipe sticking were fundamentally non-linear and not separable by a hyperplane in the original feature space.

Comparative performances of the machine-learning models for pipe-sticking prediction.
Figure 3. Comparative performances of the machine-learning models for pipe-sticking prediction.

TABLE 4. Cross-validation performances of all algorithms (10-fold stratified, mean ± standard deviation (SD)).

ModelAccuracyPrecisionRecallF1-scoreROC-AUC (±SD)
Gradient boosting0.9209 ± 0.03370.95930.91540.93620.9660 ± 0.0184
Random forest0.9184 ± 0.02940.96280.90760.93390.9714 ± 0.0183
Decision tree0.9122 ± 0.02920.96420.89570.92830.9230 ± 0.0322
Extra trees0.8758 ± 0.04110.98610.81720.89210.9531 ± 0.0377
Neural network0.8243 ± 0.03460.91270.80730.85400.8919 ± 0.0377
K-nearest neighbours0.7603 ± 0.03700.95520.65620.77630.8512 ± 0.0333
Support vector machine (with radial basis function kernel)0.7403 ± 0.02640.99700.59520.74440.8754 ± 0.0586
Support vector machine (with polynomial kernel)0.7177 ± 0.05110.74960.84650.79320.7702 ± 0.0638
AdaBoost0.6687 ± 0.02760.66240.98430.79160.6992 ± 0.0627
Gaussian naïve Bayes0.6425 ± 0.05450.70320.77010.73390.5996 ± 0.0860
Logistic regression0.5170 ± 0.05440.65450.51460.57430.5035 ± 0.0667
Ensemble (soft voting)0.9234 ± 0.02670.96880.90950.93780.9783 ± 0.0125

3.4 Receiver operating characteristic curve analysis

The receiver operating characteristic (ROC) curves for the top-three models are presented in Figure 4. The highest area under the curve (AUC) of 0.9660 ± 0.0184 was achieved by GB, followed by 0.9714 ± 0.0183 for RF and 0.9531 ± 0.0247 for ET. All three models produced curves that almost hugged the upper-left corner of the ROC space, indicating strong discrimination between stuck and non-stuck conditions across a wide range of decision thresholds. This is particularly significant from the perspective of field deployment where the operators may wish to adjust the classification threshold to balance false-positive alerts (unnecessary operational pauses) against false-negative misses (undetected sticking events with potential string loss).

Receiver operating characteristic (ROC) curves for the top-three machine-learning models.
Figure 4. Receiver operating characteristic (ROC) curves for the top-three machine-learning models.

3.5 Feature-importance analysis

Feature-importance analysis determines the input variables that most strongly influence the predictions of ML models (Kanwal et al., 2023). Figure 5 presents the normalised feature-importance scores derived from the best GB estimator. Here, annular clearance emerged as the most important predictor (importance = 0.1392), confirming its central role in pipe-sticking mechanics. The domain-informed engineered feature density difference ranked second (0.1313), demonstrating the value of constructing this interaction feature. The next two features were pipe bit ratio and friction difference, which collectively underscore the importance of torque-coupled interactions. These top-four features are engineered rather than raw, validating the feature engineering strategy.

Feature importance scores of the gradient boosting classifier for pipe-sticking prediction.
Figure 5. Feature importance scores of the gradient boosting classifier for pipe-sticking prediction.

The physical interpretations were mechanistically consistent, with elevated torque vs. drag with high friction coefficients being the primary precursors to both mechanical and differential sticking in horizontal and deviated wells. Restricted annular clearance (captured by Torque_Clearance_Ratio) amplifies these effects by limiting the escape of cuttings and fluid, creating the packed annulus conditions that precede sticking events. Annular clearance emerged as the top-ranking individual predictor (importance = 0.1392) because it sets a strict physical boundary condition for cuttings transport. However, its mechanical impact is heavily modulated by frictional forces, as demonstrated by the high importances of engineered interaction terms such as torque–torque/friction couplings. Thus, while annular clearance provides the spatial constraint, torque vs. drag friction factor and its derived interaction terms serve as the primary operational precursors driving pipe immobilisation.

3.6 Confusion matrix and classification detail

The confusion matrix illustrates a representative test split evaluation, whereas the overall metrics reflect the 10-fold cross-validation averages. The confusion matrix for the GB classifier on the test set is displayed in Figure 6, which shows 51 true-negative, 97 true-positive, seven false-positive, and five false-negative values. The recall of 95.10% for this classifier indicates that the model successfully flags most of the actual pipe-sticking events, which is a critical metric for a safety-relevant warning system. The precision of 93.27% confirms that most of the predicted sticking alerts correspond to genuine events, minimising unnecessary operational interventions.

Confusion matrix of the gradient boosting classifier on the test set.
Figure 6. Confusion matrix of the gradient boosting classifier on the test set.

3.7 Learning curve

The learning curves for the GB model are presented in Figure 7, revealing characteristic bias variance dynamics across increasing training set sizes. The training accuracy stabilises around 0.96–0.97 across all sample sizes, while the validation accuracy increases monotonically from approximately 0.72 (10% training data, ∼64 samples) to 0.921 (full training set, ∼637 samples). The gap between the training and validation curves converges without a plateau in the validation performance at maximum sample size; however, the persistent difference between the training and validation performances indicates that some degree of model variance remains. Although the validation performance improves with increasing training size, the learning curve alone cannot establish the absence of overfitting, particularly because the minority class is represented by only nine original positive observations. Therefore, independent field observations are required to determine whether the observed performance can be generalised beyond the augmented dataset.

Learning curve of the gradient boosting classifier on the reservoir dataset.
Figure 7. Learning curve of the gradient boosting classifier on the reservoir dataset.

4 Discussion

The results indicate that tree-based ensemble classifiers can capture the non-linear relationships among geometric, density, frictional, and torque-related drilling variables associated with the adopted pipe-sticking labels. GB provided the strongest single-model performance, while the soft-voting ensemble produced a marginally higher classification accuracy and ROC-AUC. These results should be interpreted as performance within the available dataset and validation framework rather than evidence of field-ready deployment (Murillo et al., 2009). The ensemble tree methods dominated over the kernel-based SVMs and linear classifiers, aligning with the broader trend in data-driven drilling optimisation literature (Elkatatny et al., 2016; Aseel et al., 2023), and reflect the inherently non-linear and multi-interaction nature of downhole mechanics. The performance of logistic regression (51.70%) was specifically instructive, illustrating that linear decision boundaries are fundamentally inadequate for this problem.

The feature-importance analysis offers insights beyond how well the algorithms perform. The main roles of the torque vs. drag friction factor and its interaction terms (friction × torque, junk torque interaction, density torque interaction) fit well with known drilling engineering principles. High torque and drag often indicate and contribute to upcoming stuck-pipe problems (Aadnøy and Andersen, 2001). This overlap between the data-driven findings supports the model’s reasoning and helps make it understandable. This understanding is essential for field implementation. The practical significance of the 91.54% recall rate merits specific attention. In a field deployment context, a missed pipe-sticking alert (false negative) can result in fish-in-hole incidents, sidetrack drilling, or total well loss costs potentially exceeding 250 million dollars annually (Mahmood and Assi, 2024). By contrast, a false positive (unnecessary operational pause) incurs only the cost of a brief drilling delay, which is typically USD 10,000–50,000 per event. This asymmetric cost structure strongly favours maximising recall, which the GB model achieves at the cost of only a marginal reduction in precision. Random stratified cross-validation was used in this study because the dataset did not provide sufficient well-wise or temporal identifiers for a robust grouped validation design. Consequently, the model performance may be optimistic if the adjacent drilling observations are correlated.

5 Conclusion

This study presents a robust data-driven ML framework for predicting pipe-sticking occurrences in oil and gas drilling operations using a reservoir dataset of 297 samples and 13 domain-relevant features. Through extensive domain-informed feature engineering, we generated 21 derived feature interactions from which the 15 most-informative features were identified through MI-based selection. Among the 11 evaluated classifiers that were optimised via 10-fold stratified cross-validation and GridSearchCV-based hyperparameter tuning, GB emerged as the best model, achieving an accuracy of 92.09%, precision of 95.93%, recall of 91.54%, F1-score of 93.62%, and ROC-AUC of 96.60% under the SMOTE-augmented cross-validation framework. A soft-voting ensemble of the top-three tuned models (GB, RF, and ET) achieved a marginal improvement of 92.34% accuracy and 97.83% ROC-AUC. However, given the narrow performance differential over the standalone GB model (92.09% accuracy), we highlight the standalone GB method as a computationally simpler but equally viable candidate for field deployment. These findings demonstrate that integrating domain-informed feature engineering with ensemble ML can substantially enhance downhole risk prediction compared to traditional baseline models. We also explicitly acknowledge that these metrics reflect the internal cross-validation performances on synthetic-augmented data. Consequently, external validation across multiple independent field wells is a crucial prerequisite prior to live operational deployment. Future works should therefore focus on expanding the dataset with multi-basin field records, deploying online streaming inference pipelines, and integrating real-time telemetry for proactive downhole risk mitigation.

The present study has several limitations that should be acknowledged. First, the dataset comprising 297 samples and nine labelled positive events is modest; while the SMOTE analysis partially compensates for the size, the synthetic samples do not fully replace genuine field observations from diverse geological settings. Second, the dataset originates from a single reservoir campaign, which could limit generalisability to other formations, drilling programs, or geographic regions with different lithologies and completion philosophies. Third, temporal autocorrelation between sequential drilling intervals was not modelled explicitly; future work should therefore explore time-series architectures (e.g. long short-term memory and temporal convolutional networks) to capture sequential pattern evolution in the drilling parameters. Finally, the current framework does not incorporate real-time continuous streaming data from MWD/LWD tools, which would be necessary for true online early-warning deployment.

Despite these limitations, the proposed framework demonstrates a clear pathway to an operationally deployable ML-based stuck-pipe prediction scheme. The ensemble model is computationally lightweight (inference latency <1 ms per sample), making it suitable for edge deployment on rig automation platforms. The open-source implementation (scikit-learn) and reproducible pipeline (random_state = 42 throughout) facilitate straightforward replication and extension by the drilling engineering community. The dataset comprises consecutive depth intervals from a single reservoir campaign, resulting in potential spatiotemporal autocorrelation between neighbouring samples. Consequently, although we use 10-fold stratified cross-validation, future works should prioritise block-based or grouped validation schemes (such as leave-one-section-out) to rigorously evaluate generalisation across unseen drilling operations. As noted earlier, the performance metrics reflect internal cross-validation evaluated on the SMOTE-augmented dataset rather than standalone field observations. Given the modest sample size of 297 and consecutive depth intervals (with only nine confirmed sticking events) from a single reservoir campaign, external validation across multiple independent field wells using grouped validation schemes is a necessary prerequisite prior to live operational deployment. Future research efforts should extend this framework to multi-well multi-formation datasets, incorporate temporal modelling architectures to capture sequential dynamics, and integrate real-time MWD/LWD streaming data for continuous online prediction. Explainable artificial intelligence approaches, such as Shapley additive explanations values, could also be employed to provide per-sample feature-level explanations amenable to drill-floor decision support. An economic analysis quantifying the NPT reduction per false-negative avoided would further support adoption by drilling operators and service companies.

Generative AI statement

The author(s) declared that generative AI was used in the creation of this manuscript. The authors acknowledge limited use of Generative AI tools for language refinement and preliminary text structuring during manuscript preparation. All AI-assisted content was carefully reviewed, verified, and substantially edited by the authors to ensure scientific accuracy, originality, technical correctness, and compliance with Frontiers publication standards. The authors take full responsibility for the integrity and validity of the final manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Glossary

ML Machine learning SMOTE Synthetic minority oversampling technique GB Gradient boosting RF Random forest ET Extra trees AB AdaBoost SVM Support vector machine RBF Radial basis function KNN K-nearest neighbours GNB Gaussian naïve Bayes NPT Non-productive time MWD Measurement-while-drilling LWD Logging-while-drilling ROP Rate of penetration ANN Artificial neural network PSO Particle swarm optimisation MI Mutual information SD Standard deviation ROC-AUC Area under the receiver operating characteristic curve **Nomenclature D bit Diameter of the bit (mm) D pipe Outer diameter of the drill pipe (mm) D stab Diameter of the stabiliser (mm) ρ cutting Density of the cuttings (kg / m 3) ρ fluid Density of the drilling fluid (kg / m 3) α Interpolation weight parameter in synthetic oversampling (dimensionless) μ string Friction coefficient between the cuttings and drill string (dimensionless) μ wellbore Friction coefficient between the cuttings and wellbore (dimensionless) σ** Gaussian noise standard deviation (dimensionless)

Footnotes

Edited by: Fei Wang, Mississippi State University, United States

Reviewed by: Mohammed AL-Shargabi, Tomsk Polytechnic University, Russia

Malek Jalilian, Edith Cowan University, Australia

Statements

Conflict of interest

The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Funding

The author(s) declared that financial support was not received for this work and/or its publication.

Data availability

The data analysed in this study are subject to the following licenses/restrictions: The data supporting the findings of this study were obtained from Dolph and Dode Offshore Services (DoD), India. Restrictions apply to the availability of these data, which were used under permission for the current study, and are not publicly available. However, these data are available from the author upon reasonable request and with permission from Dolph and Dode Offshore Services India. Requests to access these datasets should be directed to R. Harishwaran (harish250319@gmail.com).

Author contributions

RH: Investigation, Writing – original draft, Visualization, Software, Formal analysis, Validation, Conceptualization, Data curation, Methodology, Writing – review and editing, Supervision. AA: Supervision, Writing – review and editing, Investigation.

Acknowledgements

The authors thank the administration of Vellore Institute of Technology for providing all the necessary facilities. The authors also acknowledge Dolph and Dode Offshore Services (DoD), India for providing the necessary information required for this research.

References

  1. Aseel A., Abdullah M. A., Roy R., Sidharth P. V., Krishnan K. O., Joseph J. (2023). Analysis of pipe sticking due to wellbore uncleanliness using machine learning. Heliyon 9, e22366. doi:10.1016/j.heliyon.2023.e22366
  2. Aadnøy B. S., Andersen K. (2001). Design of oil wells using analytical friction models. J. Pet. Sci. Eng. 32, 53 – 71. doi:10.1016/S0920-4105(01)00147-4
  3. Baniamerian J., Liu S., Hu X., Fedi M., Chauhan M. S., Abbas M. A. (2020). Separation of magnetic anomalies into induced and remanent magnetization contributions. Geophys. Prospect. 68, 2320 – 2342. doi:10.1111/1365-2478.12993
  4. Chang H.-C., Kopaska-Merkel D. C., Chen H.-C. (2002). Identification of lithofacies using Kohonen self-organizing maps. Comput. Geosci. 28, 223 – 229. doi:10.1016/S0098-3004(01)00067-X
  5. Deng Y., Zhou X., Feng Z., Li X., Li H. (2026). Adaptive model for rate of penetration prediction based on the dynamic correlation of influencing factors. Front. Big Data 8, 1676054. doi:10.3389/fdata.2025.1676054
  6. Dupriest F. E., Koederitz W. L. (2005). “ Maximizing drill rates with real-time surveillance of mechanical specific energy,” in SPE/IADC Drilling Conference (Amsterdam, Netherlands: SPE), SPE-92194-MS. doi:10.2118/92194-MS
  7. Destrero A., Mosci S., De Mol C., Verri A., Odone F. (2009). Feature selection for high-dimensional data. Comput. Manag. Sci. 6, 25 – 40. doi:10.1007/s10287-008-0070-7
  8. Elahifar B., Hosseini E. (2022). Machine learning algorithm for prediction of stuck pipe incidents using statistical data: case study in middle east oil fields. J. Pet. Explor. Prod. Technol. 12, 2019 – 2045. doi:10.1007/s13202-021-01436-3
  9. Elkatatny S., Tariq Z., Mahmoud M. (2016). Real time prediction of drilling fluid rheological properties using artificial neural networks visible mathematical model (white box). J. Pet. Sci. Eng. 146, 1202 – 1210. doi:10.1016/j.petrol.2016.08.021
  10. Fawcett T. (2006). An introduction to ROC analysis. Pattern Recognit. Lett. 27, 861 – 874. doi:10.1016/j.patrec.2005.10.010
  11. Gabolde G., Nguyen J.-P. (2014). Drilling Data Handbook. 9th Ed. Paris: Technip.
  12. Guyon I., Elisseeff A. (2003). An introduction to variable and feature selection. J. Mach. Learn. Res. 3, 1157 – 1182. doi:10.1162/153244303322753616
  13. Harishwaran R., Abdullah M. A. (2026). Multifactorial analysis of drill pipe failure in horizontal directional drilling: a review. Front. Built Environ. 12, 1767777. doi:10.3389/fbuil.2026.1767777
  14. Hegde C., Gray K. E. (2017). Use of machine learning and data analytics to increase drilling efficiency for nearby wells. J. Nat. Gas Sci. Eng. 40, 327 – 335. doi:10.1016/j.jngse.2017.02.019
  15. Hu Y., Wang S., He Y. (2021). Interaction of amino acid functional group with water molecule on methane hydrate growth. J. Nat. Gas Sci. Eng. 93, 104066. doi:10.1016/j.jngse.2021.104066
  16. Jahanbakhshi R., Keshavarzi R., Aliyari Shoorehdeli M., Emamzadeh A. (2012). Intelligent Prediction of Differential Pipe Sticking by Support Vector Machine Compared With Conventional Artificial Neural Networks: An Example of Iranian Offshore Oil Fields. SPE Drill. Complet. 27, 586 – 595. doi:10.2118/163062-PA
  17. International Association of Drilling Contractors (2015). IADC Drilling Manual. 12th Ed. Houston, TX: International Association of Drilling Contractors. Available online at: (Accessed April, 2026).
  18. Jalilian M., Madani M., Keshavarz A., Iglauer S., Manshad A. K., Mohammadi A. H. (2026). Robust hybrid tree-based machine learning-assisted optimization of well parameters to reduce asphaltene precipitation risk in oil fields. Geomech. Geophys. Geo-Energy Geo-Resour. 12, 56. doi:10.1007/s40948-026-01125-7
  19. Johancsik C. A., Friesen D. B., Dawson R. (1984). Torque and drag in directional wells-prediction and measurement. J. Pet. Technol. 36, 987 – 992. doi:10.2118/11380-PA
  20. Kanwal R., Rafaqat W., Iqbal M., Song W. (2023). Data-driven approaches for wildfire mapping and prediction assessment using a convolutional neural network (CNN). Remote Sens. 15, 5099. doi:10.3390/rs15215099
  21. Konaté A. A., Pan H., Ma H., Cao X., Yevenyo Ziggah Y., Oloo M. (2015). Application of dimensionality reduction technique to improve geophysical log data classification performance in crystalline rocks. J. Pet. Sci. Eng. 133, 633 – 645. doi:10.1016/j.petrol.2015.06.035
  22. Li Z., Fang Z., Li J. (2020). Influence of annular/pocket groove on the static and rotordynamic characteristics of hole-pattern seals. J. Eng. Gas Turbines Power 142, 061013. doi:10.1115/1.4047183
  23. Mahmood A. T. K., Assi A. H. (2024). A comprehensive review of the pipe sticking mechanism in oil well drilling operations. J. Eng. 30, 50 – 70. doi:10.31026/j.eng.2024.11.04
  24. Maidla E., Haci M. (2004). “ Understanding torque: the key to slide-drilling directional wells,” in IADC/SPE Drilling Conference (Dallas, Texas: SPE), SPE-87162-MS. doi:10.2118/87162-MS
  25. Mantha B., Samuel R. (2016). “ ROP optimization using artificial intelligence techniques with statistical regression coupling,” in SPE Annual Technical Conference and Exhibition (Dubai, UAE: SPE), D031S041R007. doi:10.2118/181382-MS
  26. Mirhaj S. A., Kaarstad E., Aadnoy B. S. (2011). Improvement of torque-and-drag modeling in long-reach wells. Mod. Appl. Sci. 5, p10. doi:10.5539/mas.v5n5p10
  27. Mitchell R. F., Miska S. (2011). Fundamentals of Drilling Engineering.
  28. Murillo A., Neuman J., Samuel R. (2009). Pipe sticking prediction and avoidance using adaptive fuzzy logic and neural network modeling. SPE-120128.
  29. Nwachukwu A., Jeong H., Pyrcz M., Lake L. W. (2018). Fast evaluation of well placements in heterogeneous reservoir models using machine learning. J. Pet. Sci. Eng. 163, 463 – 475. doi:10.1016/j.petrol.2018.01.019
  30. Ouenes A., Hartley L. J. (2000). “ Integrated fractured reservoir modeling using both discrete and continuum approaches,” in SPE Annual Technical Conference and Exhibition (Dallas, Texas: SPE), SPE-62939-MS. doi:10.2118/62939-MS
  31. Pedregosa F., Varoquaux G., Gramfort A., Michel V., Thirion B., Grisel O. (2011). Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, 2825 – 2830. doi:10.48550/arXiv.1201.0490
  32. Sabah M., Talebkeikhah M., Agin F., Talebkeikhah F., Hasheminasab E. (2019). Application of decision tree, artificial neural networks, and adaptive neuro-fuzzy inference system on predicting lost circulation: a case study from Marun oil field. J. Pet. Sci. Eng. 177, 236 – 249. doi:10.1016/j.petrol.2019.02.045
  33. Samuel R. (2010). Friction factors: what are they for torque, drag, vibration, bottom hole assembly and transient surge/swab analyses? J. Pet. Sci. Eng. 73, 258 – 266. doi:10.1016/j.petrol.2010.07.007
  34. Soares C., Gray K. (2019). Real-time predictive capabilities of analytical and machine learning rate of penetration (ROP) models. J. Pet. Sci. Eng. 172, 934 – 959. doi:10.1016/j.petrol.2018.08.083
  35. Yang J. (2025). A Pipe Sticking Prediction Method Based on Random Forest. Aca. J. Emerg. Technol. Comput. 2, 52. doi:10.63313/AJET.9030
  36. Yu Y., Yang H., Peng F., Wang X. (2025). Drilling condition identification method for imbalanced datasets. Appl. Sci. 15, 3362. doi:10.3390/app15063362
  37. Zhou Z.-H. (2012). Ensemble Methods: Foundations and Algorithms. Chapman and Hall/CRC. doi:10.1201/b12207

Citation

Harishwaran, R. & M., A. A. (2026). Machine-learning-based prediction of pipe-sticking events in petroleum drilling operations using domain-informed features and class-balanced ensembles. Frontiers in Built Environment, Volume 12. https://doi.org/
Received
Accepted
Published
Volume
12 - 2026

Copyright

Copyright © 2026 Harishwaran and Abdullah M..

License: https://creativecommons.org/licenses/by/4.0/

*Correspondence: Aslam Abdullah M.

Article metrics

Views
0
Downloads
0
Citations
0
Shares
0