Secure pulmonary diagnosis using transformer-based approach to X-ray classification with KL divergence optimization

  • Vatsala Anand
  • , Mohammed Shuaib
  • , Irfanullah Khan
  • , Mehran Ullah*
  • , Shadab Alam
  • *Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Introduction: Lung disease classification plays a significant part in the early discovery and determination of respiratory conditions. Methods: This paper proposes a novel approach for lung disease classification utilizing two advanced deep learning models, MedViT and Swin Transformer, applied to the Lung X-Ray Image Dataset that includes 10,425 X-ray images categorized into three classes: Normal with 3,750 images, Lung Opacity with 3,375 images, and Viral Pneumonia with 3,300 images. A series of data augmentation methods, including geometric and photometric augmentation, are applied to improve model performance and generalization. Results: The results illustrate that both MedViT and Swin Transformer accomplish promising classification accuracy, with MedViT showing particular strength in medical image-specific feature learning due to its hybrid convolutional and transformer design. The impact of different loss functions is also examined, where Kullback-Leibler Divergence yields the highest accuracy and effectively handles class imbalance. The best-performing MedViT model achieves an accuracy of 98.6% with a loss of 0.09. Discussion: These findings highlight the potential of transformer-based models, particularly MedViT, for reliable clinical decision support in automated lung disease classification.

Original languageEnglish
Article number1716066
JournalFrontiers in Medicine
Volume12
DOIs
StatePublished - 2025

Bibliographical note

Publisher Copyright:
Copyright © 2025 Anand, Shuaib, Khan, Ullah and Alam.

Keywords

  • chest X-ray analysis
  • deep learning
  • lung disease classification
  • medical image augmentation
  • pulmonary disease classification
  • secure medical diagnostics

ASJC Scopus subject areas

  • General Medicine

Fingerprint

Dive into the research topics of 'Secure pulmonary diagnosis using transformer-based approach to X-ray classification with KL divergence optimization'. Together they form a unique fingerprint.

Cite this