Calibrated, explainable machine learning on routine laboratory data to characterize diagnostic assignment patterns in rheumatic diseases: a retrospective study of 12,085 patients
摘要
Overlap in routine laboratory profiles complicates differential diagnosis of rheumatic diseases, particularly seronegative spondyloarthritis. We examined whether models trained on routine labs reproduce diagnostic assignment patterns and yield calibrated, explainable probabilities.
MethodsWe analyzed a publicly available, fully de-identified dataset (n = 12,085). Adults (≥ 18 years) with confirmed diagnoses and ≤ 30% biomarker missingness were included. Nineteen routine variables (demographics, ESR/CRP, serology) plus four engineered features were used. Missingness (~ 14.5%) was imputed using MICE, variables were standardized, and the data were split 80/20 with stratification. Random Forest, LightGBM, XGBoost, CatBoost, and TabNet were trained with fixed, literature-informed hyperparameters. We assessed 5-fold CV, independent test performance, calibration (Brier/ECE), and SHAP; a predefined seronegative subgroup (RF/anti-CCP negative) was analyzed.
ResultsXGBoost achieved the highest test accuracy (85.48%); Random Forest (83.78%) was selected for detailed interpretation due to superior calibration. Performance varied by disease: SLE recall was 97.9% compared to ankylosing spondylitis (AS), 57.6%. Among 2,417 test cases, 381 (15.76%) were misclassified; the most frequent error was AS misclassified as RA (109; 28.6%). SHAP ranked ESR/CRP, RF/anti-CCP, HLA-B27, and C3/C4 as dominant contributors. In seronegative patients (n = 390), the prevalence of HLA-B27 was higher (+ 6.5%; p = 0.024), and the prevalence of anti-La was lower (–11.6%; p = 0.001).
ConclusionsRoutine laboratory data can be converted into calibrated, explainable probabilities that characterize diagnostic assignment patterns, rather than independent predictions. Given poor AS performance, the approach is not reliable for differentiating spondyloarthropathies from RA without additional clinical or imaging data. External/temporal validation, integration of clinical and imaging features, and prospective evaluation are needed.
Trial registrationNot applicable.