Machine Learning-Based Interpretable Screening for Osteoporosis in Tuberculosis Spondylitis Patients Using Blood Test Data: Development and External Validation of a Novel Web-Based Risk Calculator with Explainable Artificial Intelligence (XAI)
Authors:
Open Access
- 1 May 2025
- journal article
- research article
- Published by Taylor & Francis in Infection and Drug Resistance
- Vol. ume 18, 2797-2821
Abstract
Background: Tuberculosis spondylitis (TS), also known as Pott’s disease, is the most common destructive form of musculoskeletal tuberculosis and poses significant clinical challenges, particularly when complicated by osteoporosis. Osteoporosis exacerbates surgical outcomes and increases the risk of complications, making its accurate prediction crucial for effective patient management. Methods: This retrospective study included 906 TS patients from two medical centers between January 2016 and November 2022. We collected demographic information and blood test data from routine examinations. To address class imbalance, the synthetic minority oversampling technique (SMOTE) was applied. Feature selection was performed using LASSO, Boruta, and Recursive Feature Elimination (RFE) to identify key predictors of osteoporosis. Multiple machine learning (ML) algorithms, including logistic regression, random forest, and XGBoost, were trained and optimized using nested cross-validation and hyperparameter tuning. The optimal model was further refined through threshold tuning to enhance performance metrics. Model interpretability was achieved using SHapley Additive exPlanations (SHAP), and an online web application was developed for real-time clinical use. Results: Out of 906 patients, 60 were diagnosed with osteoporosis based on Dual-energy X-ray absorptiometry (DXA) measurements. Feature selection identified hemoglobin (HB), estimated glomerular filtration rate (eGFR), and cystatin C (CYS_C) as significant predictors. The logistic regression model exhibited the highest performance with an area under the receiver operating characteristic curve (AUC) of 0.826, which was externally validated with an AUC of 0.796. Threshold tuning optimized the decision threshold to 0.32, improving the F1-score and balancing sensitivity and specificity. SHAP analysis highlighted the critical roles of HB, eGFR, and CYS_C in osteoporosis prediction. The developed web application facilitates the model’s integration into clinical workflows, enabling healthcare professionals to make informed decisions at the bedside. Conclusion: This study successfully developed and validated an ML-based tool for predicting osteoporosis in TS patients using readily available clinical data. The model demonstrated robust predictive performance and was effectively integrated into a user-friendly online application, offering a practical solution to enhance surgical decision-making and improve patient outcomes in real-time clinical settings.Keywords
This publication has 60 references indexed in Scilit:
- Opportunistic Osteoporosis Screening Using Chest Radiographs With Deep Learning: Development and External Validation With a Cohort DatasetJournal of Bone and Mineral Research, 2020
- Opportunistic Screening Using Low-Dose CT and the Prevalence of Osteoporosis in China: A Nationwide, Multicenter StudyJournal of Bone and Mineral Research, 2020
- Correlation of bone mineral density with MRI T2* values in quantitative analysis of lumbar osteoporosisArchives of Osteoporosis, 2020
- Cervical Cancer Identification with Synthetic Minority Oversampling Technique and PCA Analysis using Random Forest ClassifierJournal of Medical Systems, 2019
- The Prevalence of Osteoporosis in China, a Nationwide, Multicenter DXA SurveyJournal of Bone and Mineral Research, 2019
- The epidemiology of osteoporosis, associated fragility fractures, and management gap in ChinaArchives of Osteoporosis, 2019
- Anemia and Risk of Fractures in Older Korean Adults: A Nationwide Population-Based StudyJournal of Bone and Mineral Research, 2019
- Is calcaneal quantitative ultrasound useful as a prescreen stratification tool for osteoporosis?Osteoporosis International, 2015
- The clinical diagnosis of osteoporosis: a position statement from the National Bone Health Alliance Working GroupOsteoporosis International, 2014
- Surgical treatment of acute TB spondylitis: indications and outcomesEuropean Spine Journal, 2012