Title : Early and explainable prediction of treatment failure in cutaneous leishmaniasis using clinical, climatic, and spatial data: A nationwide machine learning study in Brazil, 2015-2025
Abstract:
Background: Treatment failure in cutaneous leishmaniasis (CL) remains a significant public health challenge in Brazil, contributing to persistent morbidity, relapse, and ongoing transmission. Early identification of patients at high risk of treatment failure is limited by the complex interaction of clinical, environmental, climatic, and spatial determinants. We aimed to develop and externally validate an explainable machine learning framework for early prediction of CL treatment failure using nationwide surveillance and geospatial data.
Methods: We conducted a retrospective nationwide study using confirmed CL cases reported to the Brazilian Notifiable Diseases Information System (SINAN) between January 2015 and December 2025. Clinical and demographic variables were linked with municipality-level climatic and environmental datasets, including rainfall, temperature, humidity, and normalized difference vegetation index (NDVI), deforestation intensity, altitude, and urbanization indicators. The primary outcome was treatment failure, defined as clinical non-cure at 90 days, relapse within 12 months, or treatment abandonment following first-line therapy. Machine learning models including Logistic Regression, Random Forest, XGBoost, LightGBM, and CatBoost were developed using stratified 10-fold cross-validation and externally validated across geographic regions and temporal subsets. Model interpretability was assessed using SHapley Additive exPlanations (SHAP).
Results: Among 184,327 confirmed CL patients included in the analysis, treatment failure occurred in 57,142 cases (31.0%). XGBoost demonstrated the highest predictive performance with an externally validated AUROC of 0.872, sensitivity of 82.1%, specificity of 79.3%, and F1-score of 0.78. Integration of climatic and spatial variables significantly improved predictive performance compared with clinical-only models (AUROC 0.74 vs 0.87; p<0.001). The strongest predictors of treatment failure included delayed treatment initiation, mucosal involvement, HIV coinfection, elevated rainfall variability, increased land surface temperature, multiple lesions, and deforestation intensity.
Conclusion: Explainable machine learning integrating nationwide clinical, climatic, and spatial data accurately predicted treatment failure in cutaneous leishmaniasis across Brazil. This framework may support early risk stratification, targeted surveillance, and precision public health interventions in endemic settings.
Keywords: Cutaneous Leishmaniasis; Machine Learning; Spatial Epidemiology

