LungXAI: Explainable Deep Learning for Multi-Class Lung Cancer Classification with RAG
Abstract
Globally, the mortality rate caused by lung cancer is rising than any other type of neoplasm. To detect and identify the lung cancer early artificial intelligence could be utilized. This research, therefore, proposes a LungXAI framework that combines the use of a fine-tuned CNN model with Grad-CAM and Retrieval Augmented Generation (RAG) to enhance the transparency and reliability. Bayesian optimized (BO) MobileNetV2 model is the backbone of the proposed framework, as it performed best with 98.70% accuracy and 0.99 AUC. To further increase the transparency of the classification process, Grad-CAM heatmaps were generated for the BO-MobileNetV2 model and used as overlays on the CT scans with which patients were originally diagnosed. The visual information produced from these heatmaps, along with information retrieved from the PubMed database, yielded the textual rationale behind the classification decision. Consequently, LungXAI aids the clinician in determining the diagnostic class and supports clinical understanding of the rationale through both visual and textual representations.