An intelligent lung cancer detection from computed tomography images using robust optimal deep transfer learning with XAI model Authors: B Prabha, M Poonkodi, M Premalatha Published: 2026 ABSTRACT AbstractLung cancer remains as one such leading cause of cancer related mortality around the world, demanding precise and early detection through intelligent and effective diagnostic systems. This model presents a Modified Shark Smell Optimization (MSSO) aided Deep Transfer Learning framework for explainable lung cancer detection using Computed Tomography (CT) images. The workflow begins with preprocessing input image carried by segmentation using DeepLabV3 + model to, precisely isolate lung regions and thus eradicate background noise. The features segmented are further processed using Enriched DNN model for enhancing the robustness of feature and to reduce redundancy. Subsequently, the MSSO approach is employed for attaining most relevant and discriminative feature subset for classification. An optimized feature subset s then classified with the use of Deep Transfer Learning-based Inception ResNetV2 model, which enhances recognition accuracy and ensures fast convergence. For enhancing transparency of model and clinical trust, Explainable AI (XAI) is incorporated using GradCAM + + for visualizing critical lung regions thus contributing to decision making process. An experimental outcome on LIDC-IDRI dataset demonstrates that proposed hybrid MSSO-InceptionResNetV2 scheme attains superior accuracy, sensitivity, specificity, ROC, and precision with reduced FPR and computational time on comparing traditional models considered. Hence, the proposed scheme offers reliable and interpretable solutions for automated diagnosis of lung cancer, offering significant potential for clinical integration, early intervention, and enhanced patient prognosis.Keywords: Lung cancer, Automated detection, DeepLabV3 + segmentation, Enriched DNN feature extraction, GradCAM++, Deep transfer learning-based inception ResNetV2 model Introduction Lung cancer is one such leading cancer-related cause for death globally, primarily due to delayed diagnosis and limited accuracy in an early detection stage. According to World Health Organization (WHO), high mortality rate is because of late diagnosis primarily, when the disease has progressed already to more advanced stages [1]. Early diagnosis plays a significant part in enhancing survival rates and outcomes. Recently, medical imaging modalities like computed tomography (CT) and Positron Emission Tomography (PET) becomes essential diagnostic tools to detect and monitor lung cancer. Moreover, manual CT image interpretation by radiologists is labor-intensive, prone to inter-observer variability, and time-consuming mostly leading to delayed detection or misdiagnosis [2]. Furthermore, various challenges persist in attaining optimal diagnostic accuracy like noise presence, overlapping tissue structure, and high dimensionality of medical image features [3, 4]. For addressing these issues, CAD systems have emerged as effective approach for assisting clinicians to detect cancer regions automatically [5–8]. Existing CAD system mostly relies on handcrafted features and classical machine learning model that struggle with complex automatic variations and subtle textual differences in lung tissues. Recently, the advent of deep-learning based medical image analysis has been emerged as a promising solution for an automated and precise detection of cancer using Computed Tomography (CT) scans. Deep learning enables automatic hierarchical extraction of feature, decreasing dependency on manual feature engineering [9]. Moreover, various limitations persist like poor interpretability, higher computational cost, and redundant representation of feature, and overfitting due to limited annotated medical datasets. In diagnosis of lung cancer, segmentation accuracy becomes crucial, as inaccurate delineation of lung region could affect performance of classification effectively. More advanced schemes like DeepLabv3 + have shown a promise in semantic segmentation on combining atrous spatial pyramid pooling and encoder-decoder structures for preserving fine details. After segmentation, effective extraction of feature and selection are needed for reducing redundancy and enhancing model generalization. Metaheuristic optimization approach has proven effective for feature selection, among which Shark smell optimization (SSO) mimics the prey-tracking behavior of sharks [10–13]. Nonetheless, traditional SSO suffers from slow convergence and premature stagnation. Therefore, modified shark smell optimization (MSSO) model is proposed for enhancing global search ability and attain optimal selection of feature subset. For the purpose of classification, Deep transfer learning (DTL) models like InceptionResNetV2 leverage pre-trained deep architectures for improving accuracy, reduced training time, and addresses scarcity of data issues that are common in medical imaging [14–16]. Further, for ensuring clinical transparency and trust, XAI models like Grad CAM + + will be integrated for visualizing discriminative regions that influence model decision. These visual explanations aid radiologists in validating and understanding prediction of model bridges gap among AI automation and clinical interpretability. Problem statement/motivation Despite significant growth in deep learning, existing CAD framework for lung cancer detection mostly suffer from limitations like inaccurate segmentation, redundant feature extraction, lack of interpretability, and limited optimization efficiency [17]. Existing feature selection scheme fails in handling higher-dimensional data efficiently, leading to decreased model generalization and accuracy. However, most deep learning classifiers act as “black boxes”, offering no insights to decision making model. Hence, there is a need for optimized, interpretable, and computationally effective deep learning framework competent of identifying and classifying lung cancer regions from CT images significantly. Objectives The key intention of this work is as follows: To develop an effective segmentation scheme with the use of DeepLabv3 + for accurate lung region extraction from CT images. To develop an effective segmentation scheme with the use of DeepLabv3 + for accurate lung region extraction from CT images. To design a modified shark smell optimization (MSSO) approach for optimal and discriminative selection of feature for enhancing classification efficiency. To design a modified shark smell optimization (MSSO) approach for optimal and discriminative selection of feature for enhancing classification efficiency. To implement a Deep transfer Learning based classifier using InceptionResNetV2 for accurate and robust lung cancer detection. To implement a Deep transfer Learning based classifier using InceptionResNetV2 for accurate and robust lung cancer detection. To integrate Explainable AI (XAI) model like Grad CAM + + to visualize and interpreting regions influencing classification decision. To integrate Explainable AI (XAI) model like Grad CAM + + to visualize and interpreting regions influencing classification decision. To validate suggested performance framework with the use of standard evaluation metrics like accuracy, specificity, sensitivity and compare them with existing models for demonstrating their reliability and effectiveness for clinical setting applications. To validate suggested performance framework with the use of standard evaluation metrics like accuracy, specificity, sensitivity and compare them with existing models for demonstrating their reliability and effectiveness for clinical setting applications. Manuscript structure The upcoming sections of this manuscript are structured as shown: Sect II is the related works employed thus far related to the detection and classification of lung cancer abnormalities. Sect III is the proposed model description narrating entire working flow methodology. Sect IV is the performance analysis carried for proposed section and comparison with existing methodologies. Sect V is the overall conclusion of proposed methodology. Related works Several deep learning dependent models have been explored for automated lung cancer detection with the use of CT images, focusing on segmentation, feature extraction, and classification. Moreover, traditional models often face some challenges like redundant features, poor generalization, and limited interpretability, thus motivating the need for optimized and explainable hybrid model. Radiomic models demonstrates potential for an accurate diagnosis and prognostications was suggested in [18]. A delineating practice of tumor region of interest termed segmentation which was a key bottleneck in the development generalized model of classification. A failure report was reported as 4.35% on using iMRRN for segmenting lesions of tumor in CT images of lung cancer CT dataset. A fully automatic pulmonary nodule segmentation scheme was suggested in [19] to implement at the final diagnosis stage (after disease stage recognition) and included to classification framework as immense practical assistance for radiologists and medical personnel. To the best of knowledge, this model employs CAD model with lung cancer classification, nodule segmentation, and malignancy stage recognition with the use of traditional ML approaches. A hybrid metaheuristic and CNN model was presented in the work [20]. An architecture of CNN was computed by model vector solution. A resultant solution vector was then passed to Ebola optimization search approach (EOSA) for selecting better combination of weights and bias for training CNN model so as to handle classification issue. After training EOSA-CNN hybrid model thoroughly, optimal configuration was attained yielding better performance. Another study was conducted in the work [21] investigating comprehensive into deep learning model for automated detection of lung cancer with the use of CT and chest x-ray data. This examines several neural network architectures, preprocessing models, and training models for enhancing both diagnostic accuracy and computational efficiency. This in turn contributes to the advancement of deep learning dependent medical image analysis for the detection of lung cancer. The study was presented in [22] focusing on classifying and detecting pulmonary nodules (malignant and benign) from CT scans using automated deep learning systems. This in turn adopts various existing detection models like faster R-CNN, YOLOv3, and SSD estimating on LIDC-IDRI dataset. The outcome results in notable decrease in false positive rate (FPR) and respective enhancement in the overall detection accuracy. In the work [1], a hybrid metaheuristic model termed Spotted Hyena Optimization integrating with Seagull algorithm was presented for effectual selection of feature. The scheme selects optimal subsets with highly relevant features from biomedical dataset like LIDC-IDRI and chest x-rays. The quality of data was improved using bicubic interpolation for removal of noise and DCGAN-based augmentation of data. A refined features were then classified using a hybrid CNN-LSTM model, attaining precise classification among normal and abnormal lung patterns. A novel scheme was presented in [23] for early and precise diagnosis termed cancer cell detection with the use of hybrid neural network (CCDC HNN). The features were extracted from CT scan image using deep neural networks. The feature extraction accuracy is significant for detecting cancerous cells in early stages for saving patient from fatal disease. In this approach, advanced 3D-CNN was utilized for improving diagnosis accuracy. A deep learning-based scheme was suggested in work [24] which was the fastest growing medical imaging topics, with rapidly emerging applications spanning medical image dependent and textural based modalities. Using deep learning based medical imaging tools, clinicians could detect and classifying lung nodules more quickly and accurately. This work presents recent development of deep learning aided imaging scheme for early detection of lung cancer. The work suggested in [25] intends at increasing entire prediction accuracy together with reduced processing time with the use of multispacer image in the pooling layer of convolution neural network. The suggested scheme has autoencoder model for improving overall accuracy, for predicting lung cancer using multispace image in pooling layer and Adam approach for optimization. The suggested solution offers higher classification accuracy together with less processing time on comparing existing models. A study was implemented in [26] for identifying early-stage lung cancer through intelligent deep learning-based classifier. The research analyzed multiple imaging modalities and identified that CT scan to be superior due to low noise levels. The features extracted from segmented CT images were classified using advanced learning model, yielding enhanced accuracy in early cancer detection and categorization. Research gap identified Though, several deep learning and optimization-based framework was proposed for lung cancer detection, most traditional scheme face limitations like inaccurate segmentation, redundant or irrelevant extraction of feature, higher computational cost, and model interpretability lack. Several studies focus on classification without integrating effective optimization or explainable AI scheme. Hence, there is a need for unified, optimized, and explainable deep learning model which enhances segmentation accuracy, improved feature selection, and offers transparent decision support for reliable diagnosis of lung cancer. Proposed work The proposed model introduces a modified shark smell optimization (MSSO) aided deep transfer learning scheme employed for attaining accurate and explainable lung cancer detection from CT images as shown in Fig. 1. The system incorporates advanced segmentation, optimal feature selection, and deep learning aided classification for enhancing precision of diagnosis. In addition, explainable AI models are integrated to ensure interpretability and transparency in clinical decision-making. Entire working flow of proposed model Preprocessing of input image data The input image data is acquired and preprocessing is carried. Preprocessing plays a crucial part in enhancing CT image quality thereby ensuring reliable performance of proposed lung cancer detection model. A raw CT scan mostly comprises of noise, irrelevant background structures, and variation in intensity which can impact segmentation and feature extraction accuracy in a negative manner. Hence, a series of preprocessing functions are carried before model training. Initially, image resizing and normalization is employed for maintaining uniform dimension and intensity ranges over entire samples. This model ensures consistent input for deep learning scheme. Subsequently, noise reduction is attained with the use of filtering model like median or Gaussian filtering that aids in preserving significant structural details on suppressing random variations. A contrast enhancement model like contrast limited adaptive histogram equalization (CLAHE) is employed for highlighting subtle tumor regions and enhance nodules visibility. For enhancing segmentation accuracy, lung region extraction is carried for removing non-lung areas such as ribs and background tissues, isolating ROI for efficient feature learning. At last, data augmentation model like rotating, flipping, translation, and scaling is employed for increasing the diversity of data and preventing overfitting issue during training. This preprocessing function enhances quality of data collectively, thus reducing computational complexity and improving robustness of proposed MSSO aided deep learning model. Semantic DeepLab v3 + segmentation Semantic segmentation is a key step in the field of medical image analysis, aiming at assigning a class label for each pixel in an image. In the suggested model, DeepLabv3 + is used for precise lung region and nodule segmentation from CT images. DeepLabv3 + improves pixel-level classification on combining Atrous spatial pyramid pooling (ASPP) with encoder-decoder structure, thus allowing them to capture both fine spatial details and huge contextual information’s. Let input CT image be signified as: In this H and W denotes height and width of image, and C signifies number of channels (like RGB or grayscale). Atrous convolution Instead of standard convolutions, DeepLabv3 + employs atrous (dilated) convolutions for enlarging the receptive field without enhancing parameters number. The atrous convolution function will be expressed as follows: In this, x denotes input feature map, w denotes convolution filter, r signifies dilation rate, and y[i] denotes output feature at point i. A higher r allows network for capturing multi-scale contextual information that are needed to detect lung nodules of varied sizes. Atrous spatial pyramid pooling (ASPP) ASPP employs multiple parallel atrous convolutions having varied dilation rates for extracting multi-scale features. Formally, ASPP output will be expressed as follows: Here, signifies atrous convolution with dilation rate and N signifies number of parallel convolutional branches. Encoder-decoder structure The encoder captures rich semantic information over deep feature extraction, whereas decoder refines boundaries of segmentation. The decoder restores spatial resolution using upsampling and skip connections which is expressed as follows: In this, signifies low level features from earlier encoder layers and S represents final refined segmentation map. Loss function A network is trained with the use of pixel-wise cross-entropy loss and is defined by: represents the ground truth label and denotes predicted probability for class c at pixel i. By this mechanism, DeepLabv3 + efficiently classifies lung tissues from background and thus isolates cancer nodules with higher precision, offering robust foundation for downstream feature extraction and classification. The pseudocode of this is given below. Algorithm 1Semantic segmentation using DeepLabv3+Input: CT image I(x, y)Output: Segmented lung regionsStep 1: Preprocess input image I(x, y)Resize, normalize, and enhance contrastStep 2: Extract deep feature maps with the use of encoder CNN layers: Step 3: Apply Atrous Spatial Pyramid Pooling (ASPP): For each dilation rate: Step 4: Decode higher level features & refine boundaries: Step 5: Generate segmentation map: Step 6: Compute pixel wise cross entropy loss: Step 7: Optimize network parameters using backpropagation Semantic segmentation using DeepLabv3+ Step 3: Apply Atrous Spatial Pyramid Pooling (ASPP): Step 4: Decode higher level features & refine boundaries: The segmented output map S(x, y) highlights precise lung and nodule regions for further process of feature extraction and classification. Enriched DNN based feature extraction After successful segmentation using DeepLabv3+, next process includes extraction of discriminative features from segmented lung regions for enabling precise classification. The feature extraction transforms higher-dimensional image data to a set of representative attributes which describes texture, shape, and intensity features of lung regions. In suggested model, Enriched Deep Neural Network (DNN) is used for the purpose of feature extraction, ensuring capture of both global and local information’s that are relevant to the identification of lung cancer. Let the segmented image be signified as , where H, W, and C signify height, width, and channels number, correspondingly. DNN extracts hierarchical features through multiple convolutional and pooling layers that could be derived mathematically by: In this, denotes output feature map at l layer, and signfiies learnable weights and biases, signifies convolution operation, and represents the activation function like ReLU. These extracted features captures both lower-level visual details like edges and textures and high-level abstract representation like tumor shape, nodule density. For further enhancing discriminative abilities and reduce redundancy, global average pooling (GAP) is employed and is signified as: In this, signifies the averaged response of feature channel j. A final output is the compact feature vector which serves as input for the MSSO approach for optimal selection of features. This deep feature extraction process ensures that only most significant and appropriate features are retained for classification process, enhancing efficiency of model, reducing overfitting, and supporting precise lung cancer detection. Modified shark smell optimization-based feature selection This section describes employed modified shark smell optimization approach. To extract extracting most discriminative and relevant features subset, a Modified Shark Smell optimization algorithm is employed. This metaheuristic scheme identifies optimal features by maximizing fitness function value, ensuring enhanced performance of classification. The model is inspired biologically by foraging and hunting sharks’ behaviors, characterized by both rotational and forward movement which enables them for locating their prey effectively. In this model, movement of shark is mathematically modelled for simulating their natural foraging process. The initial velocity vectors for NP shark population will be expressed by: At the time of searching process, each shark exhibits inertia as it swims, and velocity of every dimension will be updated as per the following equation: In this, and k signifies phase or iteration number. OF is the objective function. In this, denotes step size coefficient controlling movement, at which and are random numbers in range [0,1], signifying stochastic gradient components. A parameter denotes inertia or momentum coefficient which regulates previous velocity influence on present one. Figure 2 shows the flow chart of MSSO approach. For ensuring stability, velocity magnitude will be constrained as follows: flow chart of MSSO approach In this, denotes velocity scaling factor at k iteration. Once the velocity is identified, shark’s new position will be updated by: In this, shows time interval for kth iteration. Sharks adjust their paths continuously over rotational search, mimicking their tendency for circle areas with high odor intensity. This local search in turn enhances convergence accuracy and diversity solution. The candidate search position at rotational movement will be estimated by: In this, m=(1,2,…,M), denotes perturbation factor, and M is the number of local search points. At last, shark thus updates their position on selecting points with maximum objective function value, signifying strongest odor like most promising solution. In this, signifies forward motion and signifies rotational movement. A shark chooses position having high evaluation index as their next location. Thus, from this process MSSO approach effectively balances exploration and exploitation at feature selection leading to optimal feature subset selection which improves model accuracy and robustness significantly. Deep transfer inception ResNetV2 for classification Inception ResNet V2 is a deep convolutional architecture which combines strengths of Inception modules and Residual learning, enabling effective extraction of feature with decreased vanishing gradient issues. In the suggested scheme, transfer learning is used on initialization network with pretrained weights from ImageNet dataset, allowing the model for leveraging generalized visual features and thus adapt them for lung cancer CT image classification. Let the input CT image be signified as: In this, H, W, and C signify height, width, and number of channels correspondingly. A pretrained inception ResNetV2 feature extractor is signified as: Here, f(.) signifies forward propagation over stacked Inception ResNetV2 blocks. Each block thus performs parallel convolutions transformations followed by residual mapping and is denoted by: In this, x signifies input to block and R(x) signifies transformed output after inception style convolutions. This residual formulation stabilizes training by accelerating convergence. The extracted deep feature vector F is then passed to classification head. A global average pooling layer transforms feature maps to compact representation and is signified as: At last, SoftMax classifier produces each class probability label by: In this, K signifies number of output class like benign and malignant and , signify trainable weights and bias of classified layer. At fine tuning, last layers of model will be retrained for adopting: In this, is the learning rate and denotes loss function. This transfer aided strategy ensures fast convergence needs few training samples and enhances performance of classifier, making Inception ResNetV2 highly appropriate for medical image analysis. Algorithm 2Deep transfer learning-based Inception ResNetV2Input: Lung CT image dataset, pretrained Inception ResNetV2 weights(ImageNet), learning rate, batch size B, epochs E, number of class K.Output: Trained classification model MBeginStep 1: load Inception ResNetV2 pre-trained model with weightStep 2: Freeze initial layers for retaining generic learned featuresStep 3: Replace final layers with custom classifier GAP, fully connected layer (dense k units), SoftMax activation.Step 4: Split dataset D to training, validation, and test setsStep 5: For epoch = 1 to E do For each batch of B image (Xbatch, Ybatch) do a. preprocess image (resize, normalization) b. Forward propagate batch through model: ;, c. compute loss L using cross entropy d. Backpropagate to update only trainable weights End for Estimate model accuracy on validation set If validation accuracy enhances: Save model weights End forStep 6: Test trained model M on test data and compute performance metricsReturn MEnd Deep transfer learning-based Inception ResNetV2 The integration of transfer learning with Inception ResNetV2 enables highly discriminative feature representations, resulting in reliable and robust lung cancer classification. This model ensures enhanced diagnostic accuracy thereby reducing the dependency on large training datasets. Generating visualizations using XAI (Grad CAM++) Grad-CAM + + is employed for offering visual interpretability of model prediction on generating heatmaps which highlights most influence regions in CT images employed for classification. This in turn computes positive gradients of targeted class with respect to final convolutions feature maps, allowing fine localization of significant image regions on comparing standard Grad-CAM. A resultant heat-map is overlaid on original image for showing specific lung regions which contributes to predicted outcomes, thus enhancing transparency, model trust, and aiding radiologists in validating AI based diagnostic decisions. For enhancing the model interpretability, Gradient based class activation mapping++ (Grad CAM++) is employed for visualizing critical regions in CT image which influence decision of model classification. Grad CAM + + offers a weighted localization heatmap on using positive gradients of targeted class corresponding to final convolution maps, thus highlighting most informative image regions. Let signify kth feature map of final convolution layer and signifies class c score. Grad CAM + + computes significance weights by: A corresponding class-discriminative heatmap will be attained by: A resultant heatmap is superimposed on original CT image for visually interpreting regions that are contributing mostly to predicted class. A visualization aids radiologists validate model predictions, enhances trust in AI based diagnosis, and thus ensures transparency in clinical decision support system. Performance analysis This section discusses the experimental outcomes attained from proposed scheme, including performance evaluation, comparative analysis, and visualization outcomes. The findings confirm that significant enhancement in accuracy, robustness, and interpretability. Dataset description The proposed model performance is assessed with the use of Lung Image Database Consortium and Image Database Resource Initiative (LIDC-IDRI) dataset [27]. The repository LIDC-IDRI is one such huge publicly available lung CT imaging dataset, comprising 1018 thoracic CT scans accompanied with detailed radiologist annotations stored in XML format. Totally, dataset consists of 244,527 slices that are collected from 1010 patients. Each lung nodule in dataset is categorized as five rating classes depending on malignancy level. The nodules labeled as classes 1 and 2 are considered as benign, while those assigned to class 4 and 5 signify malignant classes. Class 3 nodules are considered as non-nodule or indeterminate. Performance and comparative analysis Figure 3 compares the classification accuracy of various models over three classes like benign, malignant, and normal. The suggested scheme consistently attains high accuracy for entire classes. Traditional scheme such as LCC-CITENN, LCDD-CTI-ResNet, LN-CTI-U-Net, and LCDMIA-TCGAN shows slightly low performance, specifically for malignant class. Overall, the outcome demonstrates that suggested scheme improves classification accuracy significantly over entire categories, indicating superior robustness and reliability on comparing traditional models. Comparative analysis of accuracy for each class Figure 4 shows comparison of sensitivity metric for various models over three classes like benign, malignant, and normal. The suggested scheme consistently attains high sensitivity for entire classes. Existing models like LCC-CITENN, LCDD-CTI-ResNet, LN-CTI-U-Net, and LCDMIA-TCGAN shows slightly low performance, precisely for malignant class. Overall, the outcome demonstrates that suggested scheme improves sensitivity significantly over entire categories, indicating superior robustness and reliability on comparing traditional scheme. Comparative analysis of sensitivity for each class Figure 5 shows comparison of precision metric for various models over three classes like benign, malignant, and normal. The suggested scheme consistently attains high precision for entire classes. Existing models like LCC-CITENN, LCDD-CTI-ResNet, LN-CTI-U-Net, and LCDMIA-TCGAN shows slightly low performance, precisely for malignant class. Overall, the outcome demonstrates that suggested scheme improves precision significantly over entire categories, indicating superior robustness and reliability on comparing traditional techniques. Comparative analysis of precision for each class Figure 6 compares the specificity analysis of various models over three classes like benign, malignant, and normal. The suggested scheme consistently attains high specificity for entire classes. Traditional scheme such as LCC-CITENN, LCDD-CTI-ResNet, LN-CTI-U-Net, and LCDMIA-TCGAN shows slightly low performance, specifically for malignant class. Overall, the outcome demonstrates that suggested scheme improves specificity significantly over entire categories, indicating superior robustness and reliability on comparing traditional models. Comparative analysis of specificity for each class Figure 7 compares the FPR analysis of various models over three classes like benign, malignant, and normal. The suggested scheme consistently attains low FPR for entire classes. Traditional scheme such as LCC-CITENN, LCDD-CTI-ResNet, LN-CTI-U-Net, and LCDMIA-TCGAN shows slightly high FPR. In total, the outcome demonstrates that suggested scheme improves classification accuracy significantly over entire categories, indicating superior robustness and reliability on comparing traditional techniques. Comparative analysis of FPR for each class Figure 8 shows that both training and validation accuracy increase steadily with number of epochs, starting below 0.90 and reaching up to 0.96 by epoch 10. The validation accuracy is slightly higher than training accuracy throughout, and both curves show consistent improvement, suggesting better performance without any overfitting issue. Training vs. validation accuracy Figure 9 shows training vs. validation loss curve. The outcome shows that both training and validation loss steadily decreases with increasing number of epochs. A consistent decrease in loss, with validation loss always being slightly low than training loss, which indicates that model is effectively learning and does not show any overfitting. In total, model attains low loss and high accuracy on both training and validation data as training progresses, confirming better generalization and reliable performance. Training vs. validation loss Figure 10 is the ROC analysis made for AUC of proposed and various existing models. The result based on ROC analysis shows that the proposed model outperforms traditional models significantly with AUC of 0.999. The proposed model compared attain high AUC score of 0.999 which demonstrates better discrimination among true and false positives. It confirms that the suggested scheme attains superior classification performance and more accurate predictions on comparing traditional models. ROC analysis Figure 11 is the confusion matrix representation which shows that proposed model attains high classification extremely over entire categories. The confusion matrix indicates that almost all benign, malignant, and normal cases are identified correctly, with only a handful of misclassifications. This shows that scheme is highly reliable, with better sensitivity and specificity for entire class Confusion matrix representation Figure 12 is the representation of input image, preprocessed image, ground truth image, segmented image and predicted output label. Figure 13 is the generation of output visualizations by means GradCAM + + technique. (a) input image, (b) preprocessed image, (c) Ground truth image and (d) segmented image, and (e) predicted outcome Generating output visualizations by GradCAM++ Figures 12 and 13 highlights the regions within lung CT slices which contributes most significantly to the decision of final classification. Warmer color intensities show high relevance scores showing that the model predominantly focus on lesion regions that are clinically meaningful rather than a background structures. This qualitative analysis guarantees the transparency and reliability of representations learned and thus supports the classification outcomes robustness. Table 1 represents the overall comparison of proposed scheme with existing models for various metrics like accuracy, precision, sensitivity, ROC, and computational time. The suggested model offers high performance on comparing entire models. The computational time is lower on comparing other traditional models with ROC value of 0.999, meaning it can correctly identify nearly all classes with minimal errors and rapid processing. This in turn demonstrates that the model outstands effectively in reliability for classification tasks on comparing existing schemes. Table 1Overall comparison of proposed scheme with existing modelsMethodsAccuracy (%)Precision (%)Sensitivity (%)Computational Time (s)RoCProposed99.7599.6199.8498.130.999LCDMIA-TCGAN [28]99.5498.2798.6799.210.998Crasta et al. (2024) [29]91.8692.3494.25263.310.932Youssef et al. (2023) [30]94.5795.2193.60283.230.934Ragab et al. (2023) [31]92.9293.2193.32232.420.964Gautam et al. (2024) [32]96.4696.5695.46173.310.925Quasar et al. (2024) [33]97.3897.2996.60163.230.914Siddiqui et al. (2023) [34]95.7996.1993.84292.420.921Gulsoy & Kablan (2025) [35]98.7897.9198.15123.310.961Wu et al. (2023) [36]97.6797.7897.45152.420.902 Overall comparison of proposed scheme with existing models The key limitation of this proposed model is mentioned as follows: Though, the proposed model demonstrates stronger performance, it is estimated on single public dataset, and their computational complexity might be enhanced for huge scale clinical deployment. In addition, a reliance on optimized deep features might need careful tuning of parameter on applied to data from varied imaging protocols. Conclusion This study presents a robust and intelligent lung cancer detection model, which integrates semantic segmentation, enriched feature learning, optimized feature selection, deep transfer learning-based classification, and explainable visualization. The adoption of DeepLabV3 + network ensures accurate segmentation of lung regions, efficiently suppressing irrelevant structures and noise. The segmented features are refined further using Enriched DNN to enhance feature discrimination and minimizing redundancy. The feature relevance is optimized to improve classifier performance using MSSO resulting in faster convergence. The final diagnosis was carried by Deep Transfer learning based InceptionResNetV2 scheme which offers high accuracy of classification with reduced computational complexity. Also, XAI integration using GradCAM + + enhances the interpretability by highlighting critical lung regions visually contributing to decision, thus enhancing clinical acceptance. Experimental analysis on various metrics like accuracy, precision, specificity, sensitivity, FPR, ROC, and computation time shows that proposed model offers enhanced outcome on comparing existing methodologies. This framework demonstrates a strong potential for real-time clinical deployment, enabling early detection of lung cancer and aiding radiologists in decision making process. In future, this work can be extended by integrating multi-modal medical data, 3D CT imaging, and federated learning for privacy preserving diagnosis. Acknowledgements The authors acknowledge the National Cancer Institute and the Foundation for the National Institutes of Health, and their critical role in the creation of the free publicly available LIDC/IDRI Database used in this study. Also, The authors thank the management of Vellore Institute of Technology, Chennai campus and School of Computer Science and Engineering (SCOPE) for the effective research work and coordination. Author contributions Dr. Prabha B conceived the research idea, designed the overall methodology, and supervised the development of the Modified Shark Smell Optimization (MSSO)-aided Deep Transfer Learning framework. She also led the integration of Explainable AI (XAI) components and finalized the manuscript.Dr. M. Poonkodi contributed to the implementation of preprocessing and segmentation using the DeepLabV3+ model, experimental evaluation on the LIDC-IDRI dataset, and performance analysis of the proposed MSSO-InceptionResNetV2 architecture. She was also involved in the preparation of the experimental results and visualization.Dr. Premalatha M provided expert guidance on deep learning model optimization and validation strategies, reviewed the analytical results, and contributed to manuscript refinement, ensuring technical soundness and clarity.All authors have read and approved the final version of the manuscript. Funding Open access funding provided by Vellore Institute of Technology. This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors. This work is a part of regular academic institutional research work so there is no funding support. Data availability The datasets generated and/or analyzed during the current study are available in the LIDC-IDRI - Data from The Lung Image Database Consortium (LIDC) and Image Database Resource Initiative (IDRI): A completed reference database of lung nodules on CT scans repository available at 10.7937/K9/TCIA.2015.LO9QL9SX. Declarations Ethical approval The authors declare that this study did not involve any experiments on humans or animals. The research utilized publicly available benchmark datasets (LIDC-IDRI) for experimental evaluation, and all data were handled in compliance with relevant ethical standards and institutional guidelines. No personally identifiable information was used or disclosed. Consent for publication Not Applicable. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Data Availability Statement The datasets generated and/or analyzed during the current study are available in the LIDC-IDRI - Data from The Lung Image Database Consortium (LIDC) and Image Database Resource Initiative (IDRI): A completed reference database of lung nodules on CT scans repository available at 10.7937/K9/TCIA.2015.LO9QL9SX.