Abstract
BACKGROUND: Interstitial lung disease (ILD) is characterized by marked heterogeneity and an overall poor prognosis, with many patients experiencing rapid progression and high short-term mortality. Accurate early risk stratification remains challenging. This study aimed to develop and validate machine learning (ML) models for predicting short-term mortality in ILD and to explore the added prognostic value of nutritional indicators beyond the conventional ILD-GAP score. METHODS: We retrospectively enrolled 670 patients with ILD, including idiopathic pulmonary fibrosis (IPF, 35.1%), connective tissue disease–associated ILD (CTD-ILD, 47.9%), and chronic hypersensitivity pneumonitis (CHP, 17.0%), from a single-center cohort. The primary endpoint was all-cause mortality within 2 years. After data preprocessing and multiple imputation, recursive feature elimination was applied to select optimal predictors. Nine ML models were constructed and optimized using 10 rounds of tenfold cross-validation. Model performance was evaluated by AUC, calibration curves, Precision–Recall curves, and decision curve analysis. The best-performing model was interpreted using SHAP. In addition, the prognostic value of incorporating albumin (ALB) into the ILD-GAP score was assessed. RESULTS: Among the evaluated models, extreme gradient boosting (XGB) achieved the best overall performance. Key predictors included DLCO, age, LDH, ALB, and total protein. Incorporation of ALB into the ILD-GAP model significantly improved performance (AUC increased from 0.813 to 0.892 in the training set and from 0.848 to 0.940 in the testing set). SHAP analysis identified DLCO and albumin as major contributors to the model’s mortality predictions. Restricted cubic spline analyses identified clinically meaningful risk thresholds for these variables. CONCLUSIONS: Machine learning–based models, especially ensemble algorithms, enable accurate and practical prediction of short-term mortality in ILD. Nutritional status, reflected by ALB, provides substantial incremental prognostic value beyond the ILD-GAP score. Integrating routine clinical data with interpretable ML approaches offers an effective strategy for early identification of high-risk ILD patients and supports individualized clinical management. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12931-026-03631-4.