AI-Based X-Ray Analysis for Early Thoracic Disease Detection
Abstract
Thoracic diseases remain among the leading causes of death worldwide, with over 20.5 million cardiovascular and 3.5 million pulmonary deaths reported in 2021. Chest X-ray (CXR) diagnosis still relies heavily on radiologists, whose varying expertise can lead to slow, subjective, and inconsistent reports. Deep learning offers faster analysis but typically demands computational resources beyond the reach of many clinics. To address this, we developed a lightweight system that uses a Small Language Model (SLM) to analyze CXR images, predict pathologies and their locations, and generate structured radiology reports—making advanced diagnostics accessible to low-resource clinics. Trained and evaluated on 14 disease classes from the NIH ChestX-ray14 dataset using patient-wise splits, our best model achieved a mean test AUC of 0.8037 (range: 0.6970–0.8945), with Emphysema (0.8945) and Hernia (0.8865) as the strongest classes. It also achieved 0.8895 accuracy, 0.9220 specificity, 0.4941 sensitivity, 0.4044 F1-score, and 0.3472 AUPRC.