XACT-TB an explainable hybrid CNN–swin transformer framework for tuberculosis screening from chest X-ray images
摘要
Tuberculosis remains a major global public health challenge, and chest X ray imaging is widely used for population level screening due to its accessibility and low cost. However, existing deep learning approaches based solely on convolutional or transformer architectures often struggle to simultaneously capture complementary local and global representations, while also providing limited interpretability, which restricts clinical trust and deployment.
ObjectiveThis study aims to develop an interpretable deep learning framework for automated tuberculosis detection from chest X ray images by integrating complementary feature representations with transparent visual explanations.
MethodsThe proposed XACT TB framework is evaluated on a tuberculosis chest X ray database consisting of tuberculosis and normal images collected from public and agreement based sources. Preprocessing includes contrast limited adaptive histogram equalization, noise removal, and controlled data augmentation applied only to the training set to address class imbalance. The architecture employs a dual branch design in which a custom convolutional neural network extracts local discriminative features and provides Grad CAM based visual explanations, while a Swin Transformer models global contextual dependencies with attention map visualization. The extracted features are fused and classified using a support vector machine.
ResultsThe proposed model achieves a ROC AUC of 1.000 and an accuracy of 99.44 percent, with sensitivity of 99.41 percent, specificity of 99.53 percent, precision of 99.37 percent, and F1 score of 99.38 percent on the evaluated dataset. Visual explanations from Grad CAM and transformer attention maps highlight relevant lung regions and provide complementary interpretability without altering the training process.
ConclusionThe proposed XACT TB framework provides accurate and interpretable tuberculosis detection from chest X ray images by combining convolutional and transformer based representations with transparent visual explanation. The results demonstrate the potential of the framework to support reliable and explainable computer aided tuberculosis screening under the reported evaluation setting.