Well-Grouped Validation and Explainable XGBoost Lithology Classification under Missing Well-Log Conditions
Abstract
To address challenges in actual logging interpretation—such as imbalanced lithology types, incomplete logging curves, and the difficulty of reliably evaluating cross-well generalization—this study performs intelligent lithology identification using the publicly available FORCE 2020 logging dataset. After preprocessing, the dataset comprises 98 wells, 1,170,511 depth samples, and 12 lithology types. Five conventional logging curves—natural gamma ray, bulk density, neutron porosity, acoustic transit time (DTC), and deep laterolog resistivity (RDEP)—are selected as input features. A 5-fold GroupKFold cross-validation ensures complete separation of training and test wells. XGBoost, LightGBM, and random forest classifiers are compared, together with various missing-value handling and class-weighting strategies. On this basis, model robustness to incomplete logging data is evaluated under three missing-data scenarios: random point missing, continuous interval missing, and entire-curve omission. For the entire-curve case, a compromise model structure is adopted. Out-of-fold predictions are used for per-class error diagnosis, and TreeSHAP is applied to interpret the model’s decision rationale. The results show that XGBoost, using native missing-value handling and no class weighting, achieves the most balanced cross-well performance, with an accuracy of 0.687, a Macro-F1 of 0.328, and an MCC of 0.430. Introducing 30% random missing points reduced Macro-F1 by 36.98% and MCC by 39.63%, indicating that class-balance metrics are more sensitive than overall accuracy. Considerable confusion exists between the sandstone–shale transitional lithology and pure shale; 67.02% of true transitional samples are misclassified as shale. SHAP analysis of class-wise contributions reveals that RDEP, RHOB, and DTC are the most important logging curves overall, and feature dependence varies significantly among different lithologies. These findings can serve as a reference for batch preliminary lithology screening, logging quality control, and manual review when logging data are incomplete.