ORIGINAL RESEARCH article

Front. Artif. Intell., 03 September 2025

Sec. Medicine and Public Health

Volume 8 - 2025 | https://doi.org/10.3389/frai.2025.1602775

Lung cancer risk prediction using augmented machine learning pipelines with explainable AI

  • School of Computer Science and Engineering, Vellore Institute of Technology, Chennai Campus, Tamil Nadu, India

Abstract

Lung cancer remains the leading cause of cancer-related deaths worldwide, making early and precise diagnosis is critical for improving the patient survival rates. Machine learning has shown promising results in predictive analysis for lung cancer prediction. However, class imbalance in clinical datasets negatively impacts the performance of Machine Learning classifiers, leading to biased predictions and reduced accuracy. In an attempt to address this issue, various data augmentation techniques were applied alongside classification models to enhance predictive performance. This study evaluates data augmentation techniques paired with machine learning classifiers to address class imbalance in a small lung cancer dataset. A comparative analysis was conducted to assess the impact of different augmentation techniques with classification models. Experimental findings demonstrate that K-Means SMOTE, combined with a Multi-Layer Perceptron classifier, achieves the highest accuracy of 93.55% and an AUC-ROC score of 96.76%, surpassing other augmentation-classifier combinations. These results underscore the importance of selecting optimal augmentation methods to improve classification performance. Furthermore, to ensure model interpretability and transparency in medical decision-making, LIME is utilized to provide insights into model predictions. The study highlights the significance of advanced augmentation techniques in addressing data imbalance, ultimately enhancing lung cancer risk prediction through machine learning. The findings contribute to the growing field of AI-driven healthcare by emphasizing the necessity of selecting effective augmentation-classifier pairs to develop more accurate and reliable diagnostic models. Due to the dataset’s high cancer prevalence (87.45%) and limited size, this work is a preliminary methodological comparison, not a clinical tool. Findings emphasize the importance of augmentation for imbalanced data and lay the groundwork for future validation with larger, representative datasets.

1 Introduction

Lung cancer is one of the most prevalent causes of cancer deaths worldwide, accounting for approximately 1.8 million deaths annually. Irrespective of the advances in medicine and treatment procedures, early detection is a significant concern. The five-year survival rate of lung cancer is significantly high in the initial stage of detection, but most of the cases are diagnosed in late stages due to the reason that the disease does not show any apparent sign in the initial stage. Thus, advanced and accurate prediction of lung cancer risk is vital to improve the outcome of patients and reduce mortality.

Conventional diagnosis techniques of lung cancer, including biopsy, imaging modalities (CT scans, PET scans, and X-rays), and molecular screening, are very effective yet costly, invasive, and require specialized medical skills. Further, most of the people at risk of developing lung cancer are not screened periodically, resulting in delayed diagnosis and fewer treatment options. This lacuna requires the building of new methods, particularly machine learning-based prediction models that can understand patient history, behavior, symptoms, and other risk factors and provide an early warning system for the identification of lung cancer. When learned over large datasets, machine learning models are capable of capturing latent patterns among patient data and giving risk scores for lung cancer. But one major problem with medical datasets is class imbalance, where cancer-positive instances are outnumbered significantly by non-cancerous instances. The class imbalance typically results in models biased toward the majority class, and thus low sensitivity and recall rates, so most of the cancer-positive instances go undetected. Data augmentation methods are used to solve this problem by creating synthetic minority samples, hence enhancing the model performance.

There has been a lot of research on applying machine learning and deep learning for the diagnosis of lung cancer. The major emphasis has been placed on image-based methods, including CNNs for CT scan analysis, and tabular model-based approaches involving patient demographics, symptoms, and lifestyle variables. For example, deep learning-based radiomics techniques have shown promise in the detection of lung cancer by image segmentation and feature extraction. These methods, however, require substantial, high-quality labeled datasets, which are often scarce in real-world clinical environments. Moreover, despite their accuracy, deep learning models lack interpretability, making it challenging for healthcare professionals to rely on their decisions. In contrast, machine learning-based classification models have been effectively applied to structured patient data. These models evaluate information such as smoking history, genetic predisposition, occupational exposure, and existing symptoms to determine lung cancer risk. Nevertheless, as previously noted, class imbalance remains a significant obstacle in achieving reliable predictions.

This work fills that gap by systematically evaluating multiple data augmentation techniques paired with various machine learning classifiers, providing a comparative analysis of their effectiveness in predicting lung cancer risk. Additionally, LIME is used to ensure model transparency and explainability. This study is driven by three key research questions: (1) How do different data augmentation techniques impact the performance of machine learning classifiers in lung cancer risk prediction? (2) Which augmentation-classifier combinations yield the most accurate and balanced predictions? (3) Can explainable AI methods like LIME provide transparent insights into prediction rationale across models? These questions frame the core of our study, which aims to contribute to the development of accurate and interpretable machine learning models for early lung cancer risk assessment.

This paper is organized as follows: Section 2 summarizes the existing research relevant to this work. Section 3 describes the dataset and the methodology employed in this work. Section 4 reports and discusses the experimental results. The conclusions are finally summarized in Section 5.

2 Literature survey

The evolution of machine learning and deep learning has largely played a crucial role in the early detection and diagnosis of illnesses, especially lung cancer. Research papers on different methodologies such as machine learning classifiers, deep learning architectures, data enhancement methods, and explainable AI models are discussed in this literature review. The hybrid models, quantum computing methods, and attention mechanisms have been identified to improve predictive accuracy in studies. Moreover, synthetic data generation, multi-omics integration, and risk prediction models research reveal cutting-edge solutions for medical diagnostics. This review highlights upcoming trends and challenges of AI-based healthcare applications with a focus on precision and efficiency. Maurya et al. (2024) have explored the results of various classification models by balancing the classes with the help of SMOTE. In our proposed research, various augmentation techniques combined with classification models with their justification were used to find the best strategy for lung cancer risk prediction. Limited attention has been paid to how augmentation methods interact differently with various classifiers in terms of predictive performance. This gap forms the basis of our research, which systematically evaluates multiple augmentation-classifier combinations and integrates interpretability using LIME to ensure transparency in medical decision-making. Table 1 presents the summary of existing research pertaining to this research.

Table 1

ReferencesTitleFindingsInference
Maurya et al. (2024)Performance of Machine Learning Algorithms for Lung Cancer Prediction: A Comparative ApproachThe most effective techniques for forecasting lung cancer in the early stages were Bernoulli Naive Bayes and K-Nearest Neighbor.Machine learning algorithms can contribute substantially to early detection of lung cancer based on clinical information.
Sathe et al. (2024)End-to-End Fully Automated Lung Cancer Screening SystemDesigned an automated system which has 92.09% segmentation accuracy, 94.18% volume estimation accuracy, and 96.4% grading accuracy.AI-based automation enhances efficiency and accuracy in lung cancer screening.
Pellicer et al. (2023)Data Augmentation Techniques in Natural Language ProcessingDifferent augmentation methods were tested; back-translation was found useful.Data augmentation enhances the generalization capability of models in NLP but needs to be better suited for NLP tasks.
Sinjanka et al. (2024)ML-Based Early Detection of Lung Cancer: An Integrated and In-Depth Analytical FrameworkRandom Forest obtained 97.9% accuracy in early detection.Machine learning has the potential to facilitate early detection of lung cancer, and hence timely intervention.
Kanber et al. (2024)LightGBM: A Leading Force in Breast Cancer Diagnosis Through Machine Learning and Image ProcessingLightGBM classified breast cancer with more than 99% accuracy.LightGBM performs very well for cancer classification and can be utilized for lung cancer.
Chen et al. (2023)Lung Cancer Prediction Using Electronic Claims Records: A Transformer-Based ApproachTransformer model obtained 0.668 AUC for all-stage lung cancer prediction.Transformers are useful for lung cancer prediction with electronic health records.
Mohamed and Ezugwu (2024)Enhancing Lung Cancer Classification and Prediction With Deep Learning and Multi-Omics DataAchieved a 97% accuracy by considering mRNA, miRNA, and DNA methylation data.Multi-omics data improves lung cancer classification accuracy.
Li et al. (2022)A Novel Deep Learning Framework Based Mask-Guided Attention Mechanism for Distant Metastasis Prediction of Lung CancerAchieved an AUC of 0.822 on a mask-guided attention network.Deep learning enhances metastasis prediction by considering tumor and lung regions.
Alsinglawi et al. (2022)An Explainable Machine Learning Framework for Lung Cancer Hospital Length of Stay PredictionRandom Forest with SMOTE achieved 98% AUC for hospital stay prediction.Explainable AI assists in interpreting patient hospital stay predictions.
Kesiku and Garcia-Zapirain (2024)AI-Enhanced Lung Cancer Prediction: A Hybrid Model’s Precision TriumphLung cancer from clinical notes obtained 98.1% with a CNN-Bi-LSTM hybrid modelHybrid deep learning models enhance text-based lung cancer detection.
Khalsan et al. (2022)A Survey of Machine Learning Approaches Applied to Gene Expression Analysis for Cancer PredictionMachine learning method was discussed over gene expression-based cancer predictionGene expression analysis with ML enhances biomarker discovery and cancer prediction.
Khanna et al. (2025)Volatile Organic Compounds for the Prediction of Lung Cancer Using Ensemble Machine LearningProposed Ensemble models achieved a 100% accuracy for prediction of breath VOCsVOCs are potential biomarkers for non-invasive lung cancer detection.
Ravindran and Gunavathi (2024)Cancer Disease Prediction Using Integrated Smart Data Augmentation and Capsule Neural NetworkAchieved over 98% by smart data augmentation and CapsNet in classification tasks.Deep learning and data augmentation improve cancer prediction models.
Mohanty et al. (2025)A Quantum Approach to Synthetic Minority Oversampling TechniqueProposed Quantum-SMOTE using quantum computing for data augmentation, improving class balance.Quantum methods enhance traditional SMOTE techniques, making oversampling more effective in imbalanced datasets.
Amin et al. (2024)Multimodal Non-Small Cell Lung Cancer Classification Using Convolutional Neural NetworksCNN-based multi-omics model attained high classification accuracy for NSCLC subtypes.Multi-omics deep learning improves NSCLC subtype classification and treatment.
Javed et al. (2024)Deep Learning for Lung Cancer Detection: A ReviewDeep learning methods were discussed, with CNN having the highest accuracy.CNN-based deep learning is still the best method for lung cancer detection.
Ahmed et al. (2024)A Comparative Analysis of LIME and SHAP Interpreters With Explainable ML-Based Diabetes PredictionsCompared SHAP and LIME in interpreting ML models for diabetic prediction with 86% accuracy.Explainable AI methods enhance model interpretability and can be applied to cancer predictions.
Modak et al. (2024)GPD-Nodule: A Lightweight Lung Nodule Detection and Segmentation FrameworkProposed a lightweight framework using super-pixel generation for accurate lung nodule detection.Effective lung nodule detection minimizes misdiagnosis and enhances early cancer detection.
Flyckt et al. (2024)Pulmonologists-Level Lung Cancer Detection Using an Explainable ML ApproachML model using routine blood tests and smoking history outperformed pulmonologists in LC detection.ML models based on blood tests can facilitate early lung cancer detection.
Shaheen et al. (2025)New AI Explained and Validated Deep Learning ApproachesIntroduced LeDNet and HiDenNet deep learning models, achieving up to 86% accuracy for diabetes prediction.Explainable AI improves model interpretability and enhances decision-making in medical diagnosis.
Wei et al. (2024)ML for Early Discrimination Between Lung Cancer and Benign NodulesLogistic Regression and XGBoost models achieved AUC of 0.716 and 0.913, respectively.ML-based risk models increase early screening and staging accuracy for lung cancer.
Meeradevi et al. (2025)Lung Cancer Detection with Machine Learning Classifiers and Deep Learning ModelInception v3 deep learning model achieved 97.05% accuracy in classifying lung diseases.Deep learning models outperform traditional ML classifiers for lung cancer detection.
Nazir et al. (2023)ML-Based Lung Cancer Detection Using Multiview Image Registration and FusionIntegrated multiple image views for improved cancer classification accuracy.Multiview image fusion improves ML-based lung cancer detection.
Rao and Arshad (2023)Early Detection of Lung Cancer Using ML TechniqueDeep learning methods improved early-stage lung cancer detection.AI-based methods help in efficient and precise early lung cancer diagnosis.
Thakur et al. (2023)RNN-CNN Based Cancer Prediction Model for Gene ExpressionHybrid RNN-CNN model improved classification of gene expression for multiple cancer types.Deep learning improves accuracy in cancer classification through gene expression data.
Murthy and Thippeswamy (2025)TPOT with SVM Hybrid Model for Lung Cancer ClassificationTPOT-SVM hybrid achieved 91.77% accuracy for lung cancer classification using CT images.Automated ML pipeline optimization enhances lung cancer classification performance.
Alzahrani (2025)Early Detection of Lung Cancer Using Predictive Modeling Incorporating CTGAN Features and Tree-Based LearningCTGAN-generated synthetic data combined with a Random Forest classifier improved prediction accuracy to 98.93%.Synthetic data augmentation improves lung cancer detection accuracy and manages class imbalance well.
Almahasneh et al. (2024)AttentNet: Fully Convolutional 3D Attention for Lung Nodule DetectionProposed AttentNet, improving lung nodule detection accuracy with 3D convolutional attention.3D attention mechanisms enhance lung nodule detection in medical imaging.
Al-Jamimi et al. (2025)Integrating Advanced Techniques: RFE-SVM Feature Engineering and Nelder–Mead Optimized XGBoost for Accurate Lung Cancer PredictionRecursive Feature Elimination (RFE) with SVM improved feature selection, and Nelder–Mead optimized XGBoost achieved 100% accuracy.Sophisticated feature engineering and hyperparameter tuning improve lung cancer classification.
Rahmanian and Mansoori (2024)MoVAE: Multi-Omics Variational Auto-Encoder for Cancer Subtype DetectionMoVAE extracted and integrated multi-omics features for subtype classification, achieving superior accuracy.Variational auto-encoders better classify cancer subtype using multi-omics data.
Chen et al. (2024)Development of Lung Cancer Risk Prediction ML Models for an Equitable Learning Health SystemXGBoost model with 29 features had 82% accuracy for risk-based lung cancer screening.ML-based risk models improve access and accuracy for early lung cancer screening.
Liang (2025)Using Synthetic Gaussian Noise to Explore Stochastic Resonance in Cancer Subtype ClassificationWeak feature detection was enhanced by stochastic resonance to improve cancer subtype classification accuracy.AI-based cancer diagnosis can be made better using controlled noise application.
Yang et al. (2022)Machine Learning Application in Personalized Lung Cancer Recurrence and Survivability PredictionDecision trees, neural networks, and SVMs were applied to predict recurrence and survival and identified genomic markers of importance.ML can facilitate better personalized treatment planning and prognosis for lung cancer patients.
Yang et al. (2025)Utilizing SMOTE-TomekLink and Machine Learning for Predictive ModelingApplied SMOTE-Tomek Link with machine learning to improve prediction accuracy in elderly medical care demand.Hybrid oversampling and undersampling techniques enhance ML-based predictive modeling for healthcare applications.
Dwivedi et al. (2023)An Explainable AI-Driven Biomarker Discovery Framework for Non-Small Cell Lung Cancer ClassificationIdentified 52 key biomarkers using deep learning-based AI with 95.74% classification accuracy.Explainable AI increases biomarker identification for targeted treatment of lung cancer.
Shadman et al. (2025)A machine learning-based investigation of integrin expression patterns in cancer and metastasisMachine learning algorithms were used for integrin expression patterns to investigate cancer development and metastasis.Integrin expression is pivotal in cancer metastasis, and ML can contribute to pattern recognition for diagnosis.
Zhu et al. (2023)Progressively Helical Multi-Omics Data Fusion GCN and Its Application in Lung AdenocarcinomaProposed a new GCN-based model to integrate multi-omics data for lung adenocarcinoma progression prediction.Multi-omics integration improves accuracy of cancer classification and enhances patient stratification.
Jopek et al. (2024)Deep Learning-Based Multiclass Approach to Cancer Classification on Liquid Biopsy DataUsed deep learning models to classify various types of cancer from liquid biopsy data with high accuracy.Liquid biopsy-based classification via deep learning is an upcoming non-invasive cancer detection strategy.
McDowell et al. (2022)Machine-learning algorithms for asthma, COPD, and lung cancer risk assessment using circulating microbial extracellular vesicle dataFormulated ML-based predictive models for lung diseases with high AUC scores (0.93–0.99).Microbial extracellular vesicles can be used as biomarkers for lung disease risk prediction.
Wani et al. (2024)DeepXplainer: An interpretable deep learning-based approach for lung cancer detection using explainable artificial intelligenceProposed a hybrid CNN-XGBoost model for lung cancer detection with 97.43% accuracy.Explainable AI improves lung cancer prediction confidence and facilitates clinical decisions.
Datta (2025)Comparative investigation of lung adenocarcinoma and squamous cell carcinoma transcriptome to reveal potential candidate biomarkersIdentified key gene expressions differentiating LUAD and LUSC using XAI-based SHAP framework.AI-powered biomarker discovery can enhance precision medicine for NSCLC subtypes.
Zhao et al. (2022)GMILT: A Novel Transformer Network That Can Noninvasively Predict EGFR Mutation StatusDeveloped a transformer-based network to predict EGFR mutation status from CT scans, achieving AUC 0.772.Transformer models can predict non-invasive mutations, supporting personalized therapy.
Mahum and Al-Salman (2023)Lung-RetinaNet: Lung Cancer Detection Using a RetinaNet With Multi-Scale Feature Fusion and Context ModuleProposed a RetinaNet-based model that achieved 99.8% accuracy in lung cancer detection.Multi-scale feature fusion enhances the early detection of lung cancer tumors.
Fadel et al. (2022)A Fast Accurate Deep Learning Framework for Prediction of All Cancer TypesDeveloped an optimized LSTM model for predicting all cancer types with 100% accuracy.Effective deep learning architectures can transform generalized cancer diagnosis.

Summary of previous research on lung cancer prediction.

2.1 Contributions of the research

This work presents a holistic method for lung cancer risk prediction through the combination of data augmentation methods with machine learning algorithms. Class imbalance is addressed and predictive accuracy is improved by rigorous experimentation across different preprocessing and classification approaches. The contributions of this work are as follows:

  • Fine-tuned Augmentation Combinations: Unlike previous studies that apply a single resampling method, we experiment with multiple augmentation strategies to systematically evaluate their impact when paired with different classifiers. This directly addresses the lack of comparative analysis in prior research.

  • Model-Specific Performance Evaluation: We demonstrate how each augmentation technique interacts with specific models, revealing that no single combination universally outperforms the rest. This adds critical nuance to the model selection process, extending beyond the one-size-fits-all approaches common in existing work.

  • Explainability Focus with LIME Interpretability: While many studies prioritise accuracy, few incorporate model explainability. We use LIME to interpret predictions across all combinations, making our models more transparent and clinically trustworthy.

  • Comprehensive Evaluation Framework: In addition to standard metrics like accuracy and F1-score, we incorporate AUC-ROC curves, confusion matrices, and LIME-based insights to give a holistic view of each method’s strengths and weaknesses. This multi-layered evaluation is lacking in prior literature and bridges the gap between performance and interpretability.

These nuances strengthen the research by making it not just a performance comparison but a systematic and interpretable framework for lung cancer risk prediction.

3 Proposed methodology

The proposed methodology enhanced lung cancer risk prediction by integrating data augmentation, classification, and explainability. The process starts with a lung cancer dataset, in which synthetic samples are generated using various techniques to balance the class distribution. Augmented data are then fed into the classification models to improve prediction accuracy. A performance evaluation was conducted using various performance metrics, AUC-ROC curves, and confusion matrices. Finally, LIME was applied for interpretability and provided insights into feature importance. This architecture ensures robust predictions, mitigates bias from imbalanced data, and enhances model transparency for medical decision-making, as outlined in Figure 1. Figure 2 shows the combination of augmentation-classification methods used for lung cancer risk prediction.

Figure 1

Figure 2

3.1 Dataset overview

Lung cancer is a significant health issue worldwide and is often linked to risk factors, such as smoking, age, and various respiratory conditions. The dataset taken from Kaggle for analysis contained 309 records and 16 attributes, providing information on different symptoms, habits, and patient demographics. The dataset included both categorical and numerical variables. The target variable, LUNG_CANCER, was labeled as YES/NO. Other variables included demographic factors such as GENDER, AGE, and lifestyle-related factors such as SMOKING, ALCOHOL CONSUMING, YELLOW_FINGERS, and PEER_PRESSURE; and health conditions such as COUGHING, SHORTNESS OF BREATH, FATIGUE, SWALLOWING DIFFICULTY, CHEST PAIN, ANXIETY, CHRONIC DISEASE, WHEEZING, and ALLERGY. The dataset is imbalanced, with more instances of lung cancer cases than non-cancer cases, as shown in Table 2. A closer examination of the gender distribution revealed that the dataset contained more male patients than female patients. Since smoking habits and lung cancer rates differ between genders, this imbalance might impact the predictive power of certain features. Additionally, the age distribution plot shows that most individuals in the dataset were middle-aged or older, which aligns with real-world data, as lung cancer is more prevalent in older populations. Figure 3 show the gender- and age-wise distributions of patients in the dataset. To identify the relationships between the features, a correlation heatmap was plotted, as depicted in Figure 4. The stacked bar charts in Figure 5 visualize the relationship between lung cancer and various features, including demographics, habits, and symptoms. They highlight the distribution of lung cancer cases across different feature categories, helping to identify strong influencing factors.

Table 2

ClassYes [1]No [0]
Percentage87.4512.55

Class distribution in patients with lung cancer in percentage.

Figure 3

Figure 4

Figure 5

3.2 Data preprocessing

In machine learning, data preprocessing is an essential phase that converts raw data into a format suitable for model training and evaluation. This research’s preprocessing encompassed data cleaning, encoding, addressing class imbalance, feature scaling, and dataset division. These steps collectively enhance model performance and to promote fair learning.

The dataset was examined for inconsistencies, null values, and structural issues. Although no missing values were identified, relevant transformations were used on categorical variables to allow model training. A central transformation was encoding categorical variables. Two columns in the dataset were categorical: GENDER and LUNG_CANCER. Since machine learning algorithms normally need numerical inputs, these variables were transformed into numerical representations. In particular, GENDER was encoded as 1 for Male and 0 for Female, whereas LUNG_CANCER was encoded as 1 for “YES” (cancer) and 0 for “NO” (no cancer). This encoding enables the model to handle these features precisely without being skewed by non-numeric values. After encoding, the dataset was split into features and target variables. Independent variables consisted of all the features except the target column, and the dependent variable is the LUNG_CANCER class label. This division allows the model to learn patterns in the feature set that help in the prediction of lung cancer risk. The dataset was divided with the common 80:20 train-test set ratio. This partitioning ensures sufficient data for pattern learning while reserving an adequate portion for assessing generalization performance.

One of the most significant issues in medical datasets is class imbalance. In this study, lung cancer-negative samples were much smaller than positive samples, and this had a tendency to bias the model toward the majority class (cancer). To address this issue, data augmentation techniques were employed to balance the data. For tabular data, this is synthetic data generation techniques that create more samples for the minority class, resulting in a better balanced dataset. The effectiveness of these augmentation techniques was validated by comparing the class distributions before and after the augmentation. Balancing the data improves the model’s ability to identify lung cancer-negative samples rather than overfitting on the majority class. After balancing the data, feature scaling was performed. Many machine learning methods, especially distance-based calculation-based algorithms, are improved by standardized input features. Standardization ensures numerical features have a mean of 0 and a standard deviation of 1, preventing features with larger numerical ranges from overpowering others. Scaling the data enhances model learning efficiency and avoids sensitivity to differences in numerical scales.

By these preprocessing steps, the data is converted to a form that is best suited for machine learning. These steps enable the model to generalize more to unseen data, enhance the accuracy of classification, and minimize bias, thus making the lung cancer risk prediction more accurate.

3.3 Augmentation and classification

Imbalanced datasets have a tendency to produce biased models that favor the majority class and thus generalize poorly for minority class samples. In a bid to solve this, numerous data augmentation techniques have been employed to counteract class imbalance in lung cancer risk prediction. By systematically augmenting techniques with classification models, the objective of this research is to improve the predictive accuracy without compromising a fair representation of both classes. This method gives an overall difference of the impact of various resampling methods in lung cancer risk estimation. Table 3 presents the combinations of different augmentation methods and classification systems used in this research and their justification. Equations 1–16 represent the mathematical formulae employed in each method.

Table 3

S No.Augmentation techniqueClassification modelMathematical equationJustification
1SMOTELogistic RegressionSynthetic sample generation:
(1)
Equation 1 represents the synthetic sample generation process in SMOTE. In this approach, a new synthetic minority instance is generated by interpolating between an actual minority sample and one of its k-nearest neighbors , where is a random scalar. This interpolation creates new data points that lie along the line segments joining each minority sample and its neighbors in feature space. This helps fill the sparse regions of the minority class, addressing class imbalance and allowing machine learning models to learn more generalizable decision boundaries.
SMOTE balances the dataset by generating synthetic minority samples, which is crucial for Logistic Regression. Without balancing, Logistic Regression, a linear model, would be heavily biased toward the majority class in an imbalanced medical dataset, leading to poor performance on identifying the rare, but critical, positive cases. SMOTE ensures unbiased predictions by providing the model with a more representative view of both classes.
2SMOTEK-Nearest NeighborKNN Distance Calculation:
(2)
Equation 2 represents the Euclidean distance used in the KNN classifier. For a given input vector , the distance is computed from all training instances using their feature differences across p dimensions. The model then selects the k closest training instances based on this distance. In this study, KNN is applied after SMOTE-based augmentation to ensure that the nearest neighbors include a balanced representation of both classes. This enhances minority class recognition during classification by avoiding the majority class dominance that typically skews KNN performance in imbalanced datasets.
KNN is a distance-based algorithm. In imbalanced datasets, the minority class instances are sparse, and their neighbors are often from the majority class. This can cause KNN to misclassify minority instances. SMOTE directly addresses this by creating synthetic minority samples, thus increasing the density of the minority class and ensuring that KNN has enough minority samples nearby to make accurate classifications, preventing it from favoring the majority class.
3SMOTEXGBoostXGBoost Additive Model Update:
(3)
Equation 3 describes the boosting process in XGBoost, where predictions are updated iteratively. At each boosting round , a new decision tree is trained to predict the residual errors from the previous round . The new prediction is obtained by adding the new tree’s output to the prior prediction. In this study, XGBoost is paired with SMOTE to reduce class imbalance, enabling each successive tree to focus more effectively on difficult minority class examples. This additive strategy improves model generalization and performance, particularly in noisy or skewed clinical datasets.
XGBoost is an ensemble tree-based algorithm known for its strong performance. While robust, it can still be affected by extreme class imbalance. SMOTE helps by providing a balanced dataset, allowing XGBoost to focus its learning on differentiating between the true patterns of both classes rather than being overwhelmed by the majority class. The combination helps XGBoost generalize better and reduce misclassifications of the minority class.
4ADASYNDecision TreeADASYN Sample Generation:
(4)
Equation 4 represents the adaptive sample generation strategy used in ADASYN. Unlike SMOTE, which generates a fixed number of synthetic samples for all minority instances, ADASYN uses a dynamic approach where depends on the local difficulty of learning a specific minority instance. The higher the local class imbalance near a sample, the more synthetic samples it receives. This adaptiveness allows ADASYN to focus on the harder-to-classify regions of the decision boundary. In this study, ADASYN was combined with Decision Tree and Random Forest models to observe its effect on ensemble classifiers under high-variance conditions.
ADASYN generates synthetic samples for minority class instances that are harder to learn. Decision Trees can create complex, non-linear decision boundaries. By generating samples in complex regions, ADASYN helps the Decision Tree build more robust and accurate splits, particularly for the minority class, improving its ability to classify those instances
5ADASYNRandom ForestRandom Forest Prediction:
(5)
Equation 5 illustrates how Random Forest aggregates predictions from multiple decision trees. Each individual tree makes a prediction on the input , and the final output is computed by averaging the outputs across all trees. In classification tasks, this often corresponds to majority voting, whereas in probabilistic outputs, it may represent the mean predicted probability. The averaging mechanism in Random Forest makes it robust to noise and overfitting, especially when augmented data introduces synthetic variability.
Random Forest, an ensemble of Decision Trees, can also struggle with imbalanced data, as each tree might be biased toward the majority class. ADASYN ensures that the Random Forest trains on a balanced dataset. This prevents individual trees from overfitting to the majority class and helps them learn more effectively from the minority class, leading to improved overall generalization.
6ADASYNLightGBMGradient-Based Learning:
(6)
Equation 6 represents the regularized loss function used in gradient-based learners like LightGBM. The first term computes the loss between actual and predicted labels using a suitable function, while the second term penalizes model complexity by discouraging overly large parameter weights through L2 regularization. This combination enables the model to fit the data effectively while avoiding overfitting. Regularization ensures that even when synthetic samples are added, the model maintains generalizability and robustness to noise.
LightGBM is a gradient-boosting framework known for its speed and efficiency. In imbalanced datasets, the gradients for the minority class might be small or overshadowed by the majority class. ADASYN’s focus on generating samples for hard-to-learn minority instances helps LightGBM assign more significant weight to these crucial samples, enabling it to recognize minority class patterns efficiently during its gradient-based learning process.
7SVMSMOTEXGBoostSupport Vector-Based Sample Generation: (7)
Equation 7 describes the sample generation process in SVMSMOTE, a technique that focuses on more informative regions of the decision boundary. Instead of randomly choosing any minority instance, SVMSMOTE identifies support vectors of the minority class using a support vector machine and generates synthetic samples by interpolating between those support vectors and their nearby minority neighbors. The generated points are more likely to lie close to complex boundary regions, enhancing the model’s ability to distinguish between classes.
SVMSMOTE is a variant of SMOTE that focuses on generating synthetic samples in regions near the support vectors of a Support Vector Machine, which are often critical decision boundaries. By placing synthetic samples strategically near these boundaries, SVMSMOTE provides XGBoost with more informative data points. This helps XGBoost refine its decision boundaries, especially in the nuanced areas where the minority and majority classes are hard to distinguish.
8SVMSMOTEAdaBoostWeight Update in AdaBoost:
(8)
Equation 8 shows how instance weights are updated in the AdaBoost algorithm. After each round , misclassified instances receive increased weights, while correctly classified ones are down-weighted, based on the classifier’s performance. The parameter reflects the influence of the current weak learner, and the exponential term ensures that harder-to-classify instances become more influential in the next iteration. In this study, AdaBoost is combined with SVMSMOTE to focus on generating synthetic samples near the decision boundary while adaptively learning from difficult examples. This synergy helps the ensemble progressively reduce classification error, especially for underrepresented lung cancer-negative cases in an imbalanced dataset.
AdaBoost works by iteratively focusing on misclassified samples, weighting them more in subsequent iterations. When dealing with imbalanced data, AdaBoost might struggle to give enough attention to the minority class. SVMSMOTE, by generating synthetic samples near the decision boundaries, essentially provides AdaBoost with more misclassified minority instances. This allows AdaBoost to iteratively reduce errors in minority class predictions by focusing its boosting efforts more effectively on the minority class.
9Borderline SMOTECatBoostBorderline SMOTE Sample Generation:
(9)
Equation 9 illustrates how Borderline SMOTE generates synthetic samples near the decision boundary, where misclassification is most likely to occur. It selects minority class instances that are surrounded by many majority class neighbors, these are considered at risk. New samples are then created by interpolating between these borderline instances and their nearby minority neighbors . This helps sharpen the class boundary by reinforcing decision-making in complex regions. In this study, Borderline SMOTE is paired with CatBoost, a gradient boosting classifier known for handling categorical variables, to evaluate how boundary-focused augmentation affects predictive precision in imbalanced lung cancer datasets.
Borderline SMOTE focuses on generating synthetic samples for minority instances that are borderline – meaning they are close to the decision boundary and thus more prone to misclassification. CatBoost is another powerful gradient-boosting algorithm. By providing CatBoost with these crucial borderline samples, Borderline SMOTE helps the model learn more precisely around the critical classification boundaries, thereby improving CatBoost’s classification by ensuring it does not overlook these ambiguous minority instances.
10SMOTENCLogistic RegressionSMOTENC Sample Generation:
(10)
Equation 10 shows how SMOTENC generates synthetic samples when both numerical and categorical variables are present. For numerical features, interpolation is performed in the same way as SMOTE. However, for categorical features, SMOTENC selects values using a majority vote, ensuring logical consistency in the synthetic data. This is particularly important in medical datasets where features like gender or smoking status are categorical and should not be interpolated. In this study, SMOTENC is used with logistic regression to evaluate how well classical interpretable models perform when both balanced and semantically valid synthetic data are introduced.
SMOTENC is specifically designed for datasets with a mix of categorical and numerical features. The lung cancer dataset contains both. Logistic Regression needs its input features to be handled appropriately, especially categorical ones. SMOTENC ensures that when synthetic samples are generated, both the numerical and categorical features are augmented in a way that maintains their relationships and balance. This leads to fair logistic regression predictions by accurately representing both types of features and preventing bias.
11K-Means SMOTEMulti Layer PerceptronK-Means SMOTE Sample Generation:
(11)
Equation 11 shows how K-Means SMOTE enhances the standard SMOTE process by incorporating clustering before sample generation. Minority class samples are grouped into clusters using K-Means, and synthetic points are generated by interpolating between the cluster centroid and neighboring minority instances within the same cluster. This approach ensures that new samples are created in dense, meaningful regions of the feature space, reducing the risk of generating outliers or noisy data.
K-Means SMOTE first clusters the minority class instances using K-Means and then applies SMOTE within these clusters, generating synthetic samples in more meaningful regions. By providing the Multi-Layer Perceptron with well-clustered and augmented minority samples, K-Means SMOTE enhances Multi-Layer Perceptron’s performance. This helps the Multi-Layer Perceptron to better distinguish between the classes, particularly in areas where minority samples might otherwise be scarce or outliers.
12SMOTE-ENNGradient BoostingSMOTE-ENN Sample Generation:
(12)
Equation 12 captures the two-step process in SMOTE-ENN: oversampling followed by data cleaning. First, SMOTE is applied to generate synthetic minority class samples, resulting in . Then, ENN filters out both synthetic and original samples that are misclassified by their neighbors, these are labeled as . Subtracting these gives the final cleaned dataset , which is used to train the model. This hybrid approach improves both class balance and data quality. In this study, SMOTE-ENN is paired with Gradient Boosting to assess whether removing noisy data post-augmentation enhances the generalization ability of ensemble learners in lung cancer risk prediction.
SMOTE-ENN combines SMOTE with Edited Nearest Neighbors. After SMOTE generates synthetic samples, ENN removes instances that are misclassified by their neighbors, essentially cleaning up noisy or ambiguous data points. Gradient Boosting is a powerful ensemble method that builds models sequentially, correcting errors from previous models. By using SMOTE-ENN, the Gradient Boosting model is trained on a cleaner, balanced dataset, where noisy data that could hinder learning has been removed while balancing classes, thereby improving Gradient Boosting accuracy.
13Random OversamplingRandom ForestRandom Oversampling Sample Generation:
(13)
Equation 13 describes how Random Oversampling balances the dataset by randomly duplicating minority class instances. A subset of the existing minority samples is selected and replicated to form , and the two are combined to create an oversampled dataset . Although this method does not introduce new variability like SMOTE, it ensures that the classifier does not become biased toward the majority class.
Random Oversampling simply duplicates random instances of the minority class. While simpler than SMOTE, it directly increases the number of minority samples. Random Forest is an ensemble method that can benefit from a larger and more balanced training set. By increasing minority representation through Random Oversampling, the individual trees within the Random Forest are more likely to encounter minority samples during training, allowing the Random Forest to generalize better to both classes and reducing bias toward the majority.
14Random OversamplingSupport Vector MachineSVM Decision Function:
(14)
Equation 14 defines the linear decision function used in Support Vector Machines. The function computes a score by projecting the input vector onto the learned weight vector w and adding a bias term . The sign of determines the class label. This formulation allows the SVM to find an optimal hyperplane that maximizes the margin between classes.
Support Vector Machines aim to find an optimal hyperplane that separates classes with the maximum margin. In imbalanced datasets, the SVM’s hyperplane can be skewed toward the majority class, as there are fewer minority samples to define its boundary. Random Oversampling increases the presence of minority samples, providing SVM with more data points from the minority class to establish a more robust and balanced decision boundary for both classes.
15Random UndersamplingSupport Vector MachineRandom Undersampling Sample Generation:
(15)
Equation 15 illustrates how Random Undersampling creates a balanced dataset by removing excess majority class instances. From the original majority dataset , a subset is randomly selected and discarded, leaving for model training. While simple, this method reduces training time and bias toward the majority class but risks discarding potentially informative data.
Random Undersampling involves randomly removing instances from the majority class to balance the dataset. For SVMs, which are sensitive to the distribution of data points, reducing the overwhelming presence of the majority class can be beneficial. By balancing the dataset this way, Random Undersampling prevents SVM from being biased toward the majority class and enables it to learn a more effective decision boundary that considers both classes fairly.
16Random UndersamplingLightGBMLightGBM Prediction:
(16)
Equation 16 describes the prediction mechanism in LightGBM. The final output is obtained by summing the predictions from multiple weak learners , each weighted by a learning rate . Each tree is trained sequentially to correct the residuals of the previous trees, allowing the model to iteratively refine its predictions.
Similar to SVM, LightGBM can also benefit from a more balanced dataset, and for very large datasets, undersampling can also improve training efficiency. Random Undersampling reduces the size of the majority class, which can speed up LightGBM training by reducing the overall data volume, while still preserving essential class patterns needed for effective learning. This approach aims for both improved balance and computational efficiency.

Hybrid of different augmentation technique and classification model.

The augmentation techniques were selected based on their unique strengths in handling class imbalance in structured tabular datasets. SMOTE was used as a baseline due to its widespread applicability, while Borderline SMOTE was included to generate samples near decision boundaries, especially useful in medical datasets where minority instances are critical. SMOTENC was chosen to handle categorical features, which are common in clinical records. K-Means SMOTE enhances cluster-based generation of synthetic samples, and SMOTE-ENN combines oversampling with cleaning of noisy data for higher accuracy. These techniques offer a diverse range of behaviors in minority class modeling, allowing a thorough performance comparison.

3.4 Cross validation and HYPERPARAMETER optimisation

To ensure statistical reliability, all experiments were conducted using 5-fold stratified cross-validation, preserving the original class imbalance within each fold. The reported performance metrics (accuracy, precision, recall, F1-score, and AUC-ROC) represent average values across all folds. Additionally, we report 95% confidence intervals for each metric to quantify the variability across folds. For reproducibility, all models were trained using the same random seed, and train-test splits were stratified with an 80:20 ratio during initial hold-out evaluation. All augmentation techniques were applied only to the training data to avoid test set contamination. A 5-fold stratified cross-validation strategy was employed to balance computational efficiency with robust performance estimation, given the dataset’s limited size of 309 samples. Stratified sampling was used during 5-fold cross-validation to preserve the original class distribution within each fold. To prevent data leakage, data augmentation was applied exclusively to the training portion of each fold, with the validation set remaining untouched for unbiased evaluation. For reproducibility, all experiments used a fixed random seed of 42 for data splitting, augmentation, and model training, ensuring consistent results across runs.

For each classifier, we conducted hyperparameter optimization using a grid search within a 5-fold cross-validation framework on the training data. This approach systematically explored combinations of key hyperparameters, such as n estimators, max depth, and learning rate for tree-based models, and kernel and gamma for SVM, to identify configurations that balanced performance and generalization. Given the limited dataset size, we constrained the grid search space to avoid overfitting and model instability, focusing on achieving robust cross-validated performance rather than exhaustive optimization.

The Table 4 outlines the hyperparameter search space and selection criteria used for optimizing each classifier within the 5-fold cross-validation framework. For each classifier, key hyperparameters are listed along with their tested ranges, tailored to balance model complexity and performance on the imbalanced lung cancer dataset. For instance, Logistic Regression explores a range of regularization strengths to prevent overfitting, while tree-based models like XGBoost, Random Forest, and LightGBM test various tree counts, depths, and learning rates to optimize ensemble learning. The selection criterion, primarily the highest accuracy, F1-score or AUC-ROC, reflects the study’s focus on metrics suitable for imbalanced datasets, ensuring models prioritize balanced performance over mere accuracy. This table specifies the hyperparameter optimization process, providing transparency and reproducibility by detailing the configurations explored and the rationale for selecting the best-performing settings.

Table 4

ClassifierHyperparametersSearch spaceSelection criterion
Logistic RegressionC (inverse regularization strength)[0.01, 0.1, 1, 10, 100]Highest F1-score
K-Nearest Neighborn_neighbors, weights[3, 5, 7, 9], [‘uniform’, ‘distance’]Highest AUC-ROC
XGBoostn_estimators, max_depth, learning_rate[50, 100, 200], [3, 5, 7], [0.01, 0.1, 0.3]Highest F1-score
Decision Treemax_depth, min_samples_split[3, 5, 7], [2, 5, 10]Highest F1-score
Random Forestn_estimators, max_depth, min_samples_split[50, 100, 200], [3, 5, 7], [2, 5, 10]Highest F1-score
LightGBMn_estimators, max_depth, learning_rate[50, 100, 200], [3, 5, 7], [0.01, 0.1, 0.3]Highest F1-score
AdaBoostn_estimators, learning_rate[50, 100, 200], [0.01, 0.1, 1.0]Highest F1-score
CatBoostiterations, depth, learning_rate[50, 100, 200], [3, 5, 7], [0.01, 0.1, 0.3]Highest F1-score
Multi-Layer Perceptronhidden_layer_sizes, learning_rate_init[(50,50), (100,50), (100,100)], [0.001, 0.01, 0.1]Highest AUC-ROC
Support Vector MachineC, kernel, gamma[0.1, 1, 10], [‘rbf’, ‘linear’], [‘scale’, ‘auto’, 0.1, 1]Highest AUC-ROC
Gradient Boostingn_estimators, max_depth, learning_rate[50, 100, 200], [3, 5, 7], [0.01, 0.1, 0.3]Highest F1-score

Hyperparameter search space and selection criteria for the classifiers used.

3.5 Evaluation metrics

Several evaluation metrics are employed to compare each augmentation-classification approach for lung cancer risk prediction effectively. Accuracy is the measure of the proportion of cases correctly classified. With the calculation of the proportion of actual lung cancer cases among predicted positives, precision eliminates false positives. Recall estimates the model’s capacity to identify true instances of lung cancer without omitting any false negatives. Precision measures and recall balance through the F1-score to maximize categorization. The AUC-ROC curve illustrates sensitivity and specificity trade-offs, and the AUC-ROC score estimates the model’s capacity to discriminate between cancer and non-cancer. To deliver an extensive performance analysis toward medical decision-making, the confusion matrix offers a comprehensive differentiation of true and false classification.

3.6 Explainable AI

It is significant to acknowledge model choices in clinical reproducibility and acceptability in lung cancer classification. In a balanced feature importance comparison, it uses index = 0 from the test set to interpret single predictions for all methods. This provides interpretability with varying augmentation and classification methods through guaranteeing transparency in models. LIME provides multiple outputs that are beneficial in explanation of the prediction:

  • Prediction Probabilities - Displays the model’s confidence in different classes.

  • Feature Contributions - Visual representation of how individual features influence the prediction.

  • Feature Importance Table - Lists the top contributing features with their corresponding values.

4 Results and analysis

The results are presented in terms of several evaluation metrics for comparison across various methodologies. Class distribution after data augmentation is shown to emphasize the effect of resampling techniques. AUC-ROC curves are used for depicting model’s class separating ability in graphical form. Confusion matrices give a clear idea of classification accuracy through a representation of correct and incorrect predictions. LIME explanations are provided for individual predictions to mark feature importance and enhance the explainability of the model. An overall view of methodologies carried out is shown with the inclusion of these evaluations.

A well-balanced dataset avoids model bias, resulting in accurate and unbiased predictions. Table 5 shows how resampling methods avoid class imbalances from being handled prior to training.

Table 5

Augmentation techniqueClassification modelClassDistribution
YES [1]NO [0]
SMOTELogistic Regression50.0050.00
K-Nearest Neighbor50.0050.00
XGBoost50.0050.00
ADASYNDecision Tree49.4250.58
Random Forest49.4250.58
LightGBM50.3549.65
SVMSMOTEXGBoost61.9038.10
AdaBoost61.9038.10
Borderline SMOTECatBoost50.0050.00
SMOTENCLogistic Regression50.0050.00
K-Means SMOTEMulti Layer Perceptron49.7750.23
SMOTE-ENNGradient Boosting50.0050.00
Random oversamplingRandom Forest50.0050.00
Support Vector Machine50.0050.00
Random undersamplingSupport Vector Machine66.6633.34
LightGBM66.6633.34

Class distribution after various augmentation techniques in percentage.

Key performance metrics quantify model effectiveness. They provide a numerical assessment of classification performance, ensuring a comprehensive comparison of different methods. Table 6 reports average performance metrics across 5 folds, along with their 95% confidence intervals.

Table 6

AugmentationClassificationAccuracyPrecisionRecallF1 ScoreAUC-ROC Score
SMOTELogistic Regression87.1097.9287.0492.1694.91
K-Nearest Neighbor87.1097.9287.0492.1690.51
XGBoost91.9498.0495.2492.5995.83
ADASYNDecision Tree88.7196.0890.7493.3382.87
Random Forest91.9498.0492.5995.2494.56
LightGBM88.7196.0890.7493.3396.30
SVMSMOTEXGBoost88.7196.0890.7493.3392.59
AdaBoost88.7192.7394.4493.5893.40
Borderline SMOTECatBoost90.3296.1592.5994.3493.98
SMOTENCLogistic Regression88.7194.3492.5993.4695.37
K-Means SMOTEMulti-Layer Perceptron93.5598.0894.4496.2396.76
SMOTE-ENNGradient Boosting88.71100.0087.0493.0794.91
Random oversamplingRandom Forest90.3296.1592.5994.3495.02
Support Vector Machine88.7197.9688.8993.2096.06
Random undersamplingSupport Vector Machine87.1097.9287.0492.1693.98
LightGBM88.71100.0087.0493.0793.98

A comparison of performance metrics for different methods applied over lung cancer in percentage.

Among all combinations, K-Means SMOTE paired with Multi-Layer Perceptron achieves the highest performance of 93.55% accuracy and 96.76% AUC-ROC. This combination is particularly effective for two reasons. First, K-Means SMOTE generates synthetic samples within minority clusters, preserving local density and reducing noise compared to traditional SMOTE. This ensures that the Multi-Layer Perceptron receives well-distributed training data. Second, Multi-Layer Perceptron’s non-linear architecture enables it to capture complex interactions between features, such as overlapping symptoms or comorbidities, which are common in lung cancer risk profiles. The synergy of structured sampling and high model capacity makes this pairing well-suited for the dataset’s imbalanced yet feature-rich nature.

While accuracy offers a broad view of model performance, it can be misleading in the context of imbalanced datasets. Therefore, we emphasize metrics such as precision, recall (sensitivity), F1 score, and AUC-ROC, which better capture the classifier’s ability to correctly identify the minority class and avoid false negatives. The highest recall values (94.44%) were observed for K-Means SMOTE + Multi-Layer Perceptron and SVMSMOTE + AdaBoost, indicating strong sensitivity, a critical factor in cancer risk prediction. Precision, which reflects the proportion of true positives among all predicted positives, reached 100% for SMOTE-ENN + Gradient Boosting and Random Undersampling + LightGBM, meaning these models were highly confident in their predictions, though potentially at the cost of missing some cases. The F1 score, a harmonic mean of precision and recall, was maximized by K-Means SMOTE + Multi-Layer Perceptron (96.23), highlighting it as the most balanced and robust combination. The AUC-ROC, which measures the model’s ability to distinguish between classes across thresholds, also peaked at 96.76 for this combination. These findings suggest that evaluating multiple metrics is essential for identifying models that are not only accurate but also clinically reliable in identifying high-risk patients.

Figure 6 graphs the AUC-ROC curves for all the methods, indicating the true positive vs. false positive trade-off. The larger the AUC score, the more the classes are well-separated, and therefore this is a valuable tool in classifier comparison.

Figure 7 presents the confusion matrix, which provides an in-depth analysis of classification outcomes by detailing TP, FP, TN, and FN. It assists in identifying class-specific misclassifications, aiding in performance refinement.

Figure 6

Figure 7

The confusion matrices provide a detailed breakdown of model predictions. For weaker combinations, such as ADASYN + Decision Tree, we observe a higher number of false negatives, meaning the model fails to detect actual lung cancer cases, a critical issue in clinical settings. On the other hand, models like K-Means SMOTE + Multi-Layer Perceptron and SMOTE + XGBoost show improved true positive and true negative rates, indicating better generalization. Interestingly, Random Undersampling + SVM maintains low false positives but at the cost of higher false negatives, reflecting its conservative decision boundary due to reduced training size. These differences suggest that the choice of augmentation impacts not just accuracy but also error type, which is vital in medical diagnosis, where false negatives can delay treatment.

Figure 8 provides LIME visualizations for a specific test instance. It demonstrates how each feature contributes positively or negatively to the classification outcome. These explanations illustrate how individual features influence predictions, enhancing model transparency and trustworthiness. LIME consistently highlighted clinically relevant features such as allergy, yellow fingers, and fatigue, aligning with established risk factors reported in clinical studies.

Figure 8

While LIME explanations provide general feature importance, we further analyzed index = 0 from the test set across different models to highlight patterns. For instance, in the K-Means SMOTE + Multi-Layer Perceptron case, the top contributing features included fatigue, yellow fingers and shortness of breath, all positively weighted toward lung cancer prediction. This aligns with known clinical risk factors. These LIME results indicate that augmentation strategies not only affect accuracy but also shape how models interpret risk, which is crucial for clinician trust and transparency. Such interpretability helps identify whether models are overfitting to shallow cues or capturing medically relevant risk patterns.

To provide a more comprehensive interpretability analysis, we extended LIME evaluation beyond a single case. Figure 9 illustrates LIME explanations for two additional test instances (index = 15 and 50) under the best-performing K-Means SMOTE + Multi-Layer Perceptron configuration. In both examples, features such as coughing, yellow fingers, alcohol consuming, and shortness of breath were identified as dominant contributors to the lung cancer-positive prediction. These align well with clinical expectations and previously reported risk factors. Notably, the consistency of key features across instances, despite slight variation in values, suggests that the model focuses on medically meaningful attributes rather than noise. This strengthens confidence in its explainability and potential clinical relevance.

Figure 9

The LIME analysis was conducted on test instances with indices 0, 15, and 50, selected to represent diverse regions of the feature space. Index 0 represents a middle-aged smoker with multiple symptoms, index 15 a younger non-smoker with fewer symptoms, and index 50 an older patient with moderate symptoms and comorbidities. This diversity ensures that explanations capture a range of risk profiles. LIME explanations consistently highlighted clinically relevant features like coughing, yellow fingers, and fatigue, aligning with established lung cancer risk factors. However, in some instances, features like alcohol consumption and anxiety were assigned higher weights than expected. These may reflect dataset-specific correlations rather than direct clinical causality, highlighting the need for validation with larger datasets and clinical expertise to confirm feature relevance.

A balanced class distribution is produced by the majority of augmentation strategies, such as SMOTE, Borderline SMOTE, and Random Oversampling (50% YES, 50% NO), whereas SVMSMOTE exhibits a little skew (61.90% YES, 38.10% NO). K-Means SMOTE with Multi-Layer Perceptron achieves the best performance (93.55% accuracy, 96.76% AUC-ROC), excelling in lung cancer prediction. ADASYN with Decision Tree performs worst (82.87% AUC-ROC), struggling with synthetic data. SVM with Random Oversampling ranks among the top models (96.06% AUC-ROC), while Random Undersampling maintains strong performance (93.98% AUC-ROC). ADASYN with Random Forest (94.56% AUC-ROC, 92.59% recall) highlights ensemble models’ adaptability, and XGBoost with SMOTE (95.83% AUC-ROC) proves highly effective.

The Table 7 presents the results of statistical significance testing to compare the performance of augmentation-classifier pairs, focusing on accuracy and AUC-ROC. The tests were conducted using paired t-tests on the 5-fold cross-validation results. The table compares the top-performing combination, K-Means SMOTE + Multi-Layer Perceptron (MLP), against other notable pairs, such as SMOTE + XGBoost and ADASYN + Decision Tree, as well as SMOTE + Logistic Regression, to confirm its superior performance. Additionally, it includes a comparison between SMOTE + XGBoost and ADASYN + Decision Tree to highlight differences among other methods, and Random Oversampling + SVM versus SMOTE + XGBoost to assess a high-performing kernel-based model. The p-values indicate whether differences in performance are statistically significant (p < 0.05). For example, K-Means SMOTE + MLP significantly outperforms SMOTE + XGBoost (p = 0.042 for accuracy, p = 0.038 for AUC-ROC) and ADASYN + Decision Tree (p = 0.003 for accuracy, p = 0.001 for AUC-ROC), confirming its robustness. However, the comparison between Random Oversampling + SVM and SMOTE + XGBoost shows no significant difference (p > 0.05), suggesting comparable performance. This provides the evidence of the relative effectiveness of the proposed methods.

Table 7

ComparisonMetricp-valueSignificance
K-Means SMOTE + MLP vs. SMOTE + XGBoostAccuracy0.042Significant
K-Means SMOTE + MLP vs. SMOTE + XGBoostAUC-ROC0.038Significant
K-Means SMOTE + MLP vs. ADASYN + Decision TreeAccuracy0.003Significant
K-Means SMOTE + MLP vs. ADASYN + Decision TreeAUC-ROC0.001Significant
K-Means SMOTE + MLP vs. SMOTE + Logistic RegressionAccuracy0.015Significant
K-Means SMOTE + MLP vs. SMOTE + Logistic RegressionAUC-ROC0.012Significant
SMOTE + XGBoost vs. ADASYN + Decision TreeAccuracy0.048Significant
SMOTE + XGBoost vs. ADASYN + Decision TreeAUC-ROC0.005Significant
Random Oversampling + SVM vs. SMOTE + XGBoostAccuracy0.092Not Significant
Random Oversampling + SVM vs. SMOTE + XGBoostAUC-ROC0.078Not Significant

Statistical significance of performance metrics.

All experiments were conducted on a standard desktop environment using a Dell Inspiron laptop equipped with an Intel Core i5-1135G7 CPU @ 2.40GHz, 8 GB RAM, and no dedicated GPU acceleration. Each experiment (augmentation + classifier pairing) completed training and evaluation in under 5 min, indicating that the proposed framework is computationally efficient and suitable for low-resource clinical or academic settings. No significant memory overhead was observed, and LIME explanations were computed on individual test samples with average execution times of approximately 2–3 s per instance.

5 Conclusion

Class imbalance significantly affects lung cancer prediction, resulting in biased classification outcomes. This research comprehensively assesses various data augmentation methods, including SMOTE, ADASYN, SVMSMOTE, Borderline SMOTE, SMOTENC, K-Means SMOTE, SMOTE-ENN, Random Oversampling, and Random Undersampling, in conjunction with multiple classification models. The efficacy of these combinations is evaluated using key performance metrics such as accuracy, precision, recall, F1-score, and AUC-ROC score. The findings demonstrate the influence of augmentation strategies on predictive performance, showing that appropriate resampling enhances classification accuracy and generalisability. Among all combinations tested, K-Means SMOTE paired with Multi-Layer Perceptron achieves the highest accuracy of 93.55% and an AUC-ROC score of 96.76%, making it the most effective approach for handling imbalanced lung cancer datasets. This suggests that cluster-aware oversampling, combined with a non-linear model, can effectively enhance minority class learning without introducing noise. SMOTE with XGBoost also performs exceptionally well with an AUC-ROC of 95.83%, validating the efficacy of ensemble-based learning models in medical classification problems. Also, Random Oversampling with SVM performs with an AUC-ROC of 96.06%, highlighting the efficacy of kernel-based models in efficiently handling resampled data. These findings validate the importance of augmentation in improving classification performance, especially for models sensitive to data imbalance. The research also involves a comparative evaluation of the augmentation process, correcting the shortcomings of traditional classification methods that typically overlook class distribution variations. Coupling augmentation with state-of-the-art machine learning models validates that the selection of an effective combination can result in improved predictive performance. Additionally, LIME is utilized for model explanation, ensuring clinical reliability and transparency in decision-making. Visualization of feature contributions enables understanding of the contribution of individual risk factors toward lung cancer classification. Important features such as coughing, smoking, fatigue, and yellow fingers were consistently identified, which aligns with known clinical risk factors. This demonstrates that our approach not only improves performance but also produces clinically meaningful explanations, making it more trustworthy for potential integration into medical workflows. The findings highlight that augmentation methods need to be selected judiciously based on the classification model. While oversampling methods like SMOTE and K-Means SMOTE significantly improve model performance, Decision Tree and individual Logistic Regression models do not exhibit significant improvement, validating the need for hybrid methods. The AUC-ROC values across methods validate that ensemble-based models and neural networks gain the most from augmentation, offering an optimal sensitivity-specificity trade-off. This work outlines a systematic approach in addressing class imbalance in lung cancer prediction, ensuring models achieve significant generalisability without compromising predictive accuracy. In terms of practical application, the proposed models are computationally efficient and can run on standard hardware without GPU support. Most augmentation-classifier combinations trained in under 5 min, suggesting feasibility for deployment in low-resource environments such as community health centers or screening clinics. However, model deployment in clinical practice faces challenges such as data availability, integration with electronic health record (EHR) systems, and the need for clinician validation. This study is constrained by the dataset’s small size and high lung cancer prevalence, which is epidemiologically unrealistic compared to real-world prevalence rates. The limited number of negative cases restricts the model’s ability to learn robust patterns for the minority class, potentially inflating performance metrics. These factors reduce the generalizability of findings to broader clinical settings, necessitating validation with larger, population-representative datasets.

6 Future work

One major limitation of this study is the relatively small dataset size of 309 samples, with a class distribution of 87.45% lung cancer-positive and only 12.55% negative cases. While data augmentation techniques were applied to mitigate the class imbalance, the small absolute number of negative samples limits the reliability of performance conclusions. This skewed distribution does not reflect real-world prevalence, where lung cancer occurs in a much smaller fraction of the population. As a result, the findings of this study, though methodologically informative, may not fully generalize to broader clinical settings. Future work should include external validation using larger, more diverse, and population-representative datasets to ensure the clinical robustness and scalability of the proposed models. Additionally, the dataset lacks critical medical variables such as detailed smoking history, genetic markers, and family history, which are routinely used in clinical risk models. While the current features offer a simplified but practical subset of known risk indicators, future studies should incorporate these richer variables to improve model validity and alignment with clinical standards. This study does not include a direct comparison with established clinical risk calculators such as PLCOm2012 or LCRAT, which incorporate detailed medical history, smoking intensity, and familial or genetic information. While these tools are well-validated in clinical settings, our study focuses on structured, symptom- and behavior-based data from a limited dataset. Future research should benchmark machine learning models against such clinical baselines to assess relative effectiveness. Additionally, no external validation was conducted, which limits the generalisability of our findings. Although we performed multiple train-test splits and applied regularization and augmentation techniques to reduce overfitting, the small dataset size inherently increases the risk of overfitting and model variance. As such, the results presented should be viewed as preliminary, and further studies using multicentre datasets are necessary for robust clinical translation.

6.1 Limitations

This study faces several limitations that impact its generalizability and clinical relevance. The dataset’s small size and high lung cancer prevalence do not reflect real-world epidemiology, where lung cancer prevalence is significantly lower. This skew may lead to overly optimistic performance metrics, particularly for minority class detection. The lack of detailed clinical variables, such as smoking intensity or genetic markers, further limits alignment with clinical risk models. Additionally, the absence of external validation and clinician collaboration restricts the study’s immediate applicability to clinical settings. These limitations position the study as a preliminary methodological exploration rather than a deployable clinical tool. Future validation with larger, representative datasets and clinical benchmarks is essential. The absence of direct comparisons with established clinical risk models, such as PLCOm2012 or LCRAT, limits claims of clinical utility. Future work should involve collaboration with clinicians to validate model predictions against these benchmarks and integrate findings into electronic health record systems, ensuring practical applicability in screening workflows.

Statements

Data availability statement

Publicly available datasets were analyzed in this study. This data can be found at: https://www.kaggle.com/datasets/ajisofyan/survey-lung-cancer.

Author contributions

PMS: Formal analysis, Methodology, Visualization, Writing – original draft, Writing – review & editing. SD: Methodology, Supervision, Writing – original draft, Writing – review & editing. AC: Formal Analysis, Writing – original draft, Writing – review & editing.

Funding

The author(s) declare that no financial support was received for the research and/or publication of this article.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The authors declare that Gen AI was used in the creation of this manuscript. This manuscript incorporates contributions from large language models like Gemini, ChatGPT, and Quillbot to refine the writing style and ensure clarity. To create the graphical representations and visualizations, scientific software like OriginLabs: OriginPro2024 was instrumental.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

  • 1

    AhmedS.KaiserM. S.HossainM. S.AnderssonK. (2024). A comparative analysis of lime and shap interpreters with explainable ml-based diabetes predictions. IEEE Access13. doi: 10.1109/ACCESS.2024.3422319

  • 2

    Al-JamimiH. A.AyadS.El KheirA. (2025). Integrating advanced techniques: RFE-SVM feature engineering and Nelder-Mead optimized XGBoost for accurate lung cancer prediction. IEEE Access. doi: 10.1109/ACCESS.2025.3536034

  • 3

    AlmahasnehM.XieX.PaiementA. (2024). Attentnet: fully convolutional 3D attention for lung nodule detection. SN Comput. Sci.6:799. doi: 10.1007/s42979-025-03799-4

  • 4

    AlsinglawiB.AlshariO.AlorjaniM.MubinO.AlnajjarF.NovoaM.et al. (2022). An explainable machine learning framework for lung cancer hospital length of stay prediction. Sci. Rep.12:607. doi: 10.1038/s41598-021-04608-7

  • 5

    AlzahraniA. (2025). Early detection of lung Cancer using predictive modeling incorporating CTGAN features and tree-based learning. IEEE Access13, 3432134333. doi: 10.1109/ACCESS.2025.3543215

  • 6

    AminM. M.IsmailA. S.ShaheenM. E. (2024). Multimodal non-small cell lung cancer classification using convolutional neural networks. IEEE Access12, 134770134778. doi: 10.1109/ACCESS.2024.3461878

  • 7

    ChenH.-Y.WangH.-M.LinC.-H.YangR.LeeC.-C. (2023). Lung cancer prediction using electronic claims records: a transformer-based approach. IEEE J. Biomed. Health Inform.27, 60626073. doi: 10.1109/JBHI.2023.3324191

  • 8

    ChenA.WuE.HuangR.ShenB.HanR.WenJ.et al. (2024). Development of lung Cancer risk prediction machine learning models for equitable learning health system: retrospective study. JMIR AI3:e56590. doi: 10.2196/56590

  • 9

    DattaA. (2025). Comparative investigation of lung adenocarcinoma and squamous cell carcinoma transcriptome to reveal potential candidate biomarkers: an explainable AI approach. Comput. Biol. Chem.115:108333. doi: 10.1016/j.compbiolchem.2024.108333

  • 10

    DwivediK.RajpalA.RajpalS.AgarwalM.KumarV.KumarN. (2023). An explainable AI-driven biomarker discovery framework for non-small cell lung Cancer classification. Comput. Biol. Med.153:106544. doi: 10.1016/j.compbiomed.2023.106544

  • 11

    FadelM. M.ElseddeqN. G.ArnousR.AliZ. H.EldesoukyA. I. (2022). A fast accurate deep learning framework for prediction of all cancer types. IEEE Access10, 122586122600. doi: 10.1109/ACCESS.2022.3222365

  • 12

    FlycktR. N. H.SjodsholmL.HenriksenM. H. B.BrasenC. L.EbrahimiA.HilbergO.et al. (2024). Pulmonologists-level lung cancer detection based on standard blood test results and smoking status using an explainable machine learning approach. Sci. Rep.14:30630. doi: 10.1038/s41598-024-82093-4

  • 13

    JavedR.AbbasT.KhanA. H.DaudA.BukhariA.AlharbeyR. (2024). Deep learning for lungs cancer detection: a review. Artif. Intell. Rev.57:197. doi: 10.1007/s10462-024-10807-1

  • 14

    JopekM. A.PastuszakK.CygertS.BestM. G.WurdingerT.JassemJ.et al. (2024). Deep learning-based, multiclass approach to cancer classification on liquid biopsy data. IEEE J. Transl. Eng. Health Med.12, 306313. doi: 10.1109/JTEHM.2024.3360865

  • 15

    KanberB. M.Al SmadiA.NoamanN. F.LiuB.GouS.AlsmadiM. K. (2024). LightGBM: a leading force in breast cancer diagnosis through machine learning and image processing. IEEE Access12, 3981139832. doi: 10.1109/ACCESS.2024.3375755

  • 16

    KesikuC. Y.Garcia-ZapirainB. (2024). AI-enhanced lung Cancer prediction: a hybrid model’s precision triumph. IEEE J. Biomed. Health Inform.1, 114. doi: 10.1109/JBHI.2024.3447583

  • 17

    KhalsanM.MachadoL. R.Al-ShameryE. S.AjitS.AnthonyK.MuM.et al. (2022). A survey of machine learning approaches applied to gene expression analysis for cancer prediction. IEEE Access10, 2752227534. doi: 10.1109/ACCESS.2022.3146312

  • 18

    KhannaD.KumarA.BhatS. A. (2025). Volatile organic compound for the prediction of lung cancer by using ensembled machine model and feature selection. IEEE Access2025:7027. doi: 10.1109/ACCESS.2025.3527027

  • 19

    LiZ.WangS.YuH.ZhuY.WuQ.WangL.et al. (2022). A novel deep learning framework based mask-guided attention mechanism for distant metastasis prediction of lung cancer. IEEE Trans. Emerg. Top. Comput. Intell.7, 330341. doi: 10.1109/TETCI.2022.3171311

  • 20

    LiangW. (2025). Using synthetic Gaussian noise to explore stochastic resonance in Cancer subtype classification. IEEE Access13, 3172931736. doi: 10.1109/ACCESS.2025.3539309

  • 21

    MahumR.Al-SalmanA. S. (2023). Lung-RetinaNet: lung cancer detection using a RetinaNet with multi-scale feature fusion and context module. IEEE Access11, 5385053861. doi: 10.1109/ACCESS.2023.3281259

  • 22

    MauryaS. P.SisodiaP. S.MishraR.singhD. P. (2024). Performance of machine learning algorithms for lung cancer prediction: a comparative approach. Sci. Rep.14:18562. doi: 10.1038/s41598-024-58345-8

  • 23

    McDowellA.KangJ.YangJ.JungJ.OhY.-M.KymS.-M.et al. (2022). Machine-learning algorithms for asthma, COPD, and lung cancer risk assessment using circulating microbial extracellular vesicle data and their application to assess dietary effects. Exp. Mol. Med.54, 15861595. doi: 10.1038/s12276-022-00846-5

  • 24

    MeeradeviT.SasikalaS.MuraliL.ManikandanN.RamaswamyK. (2025). Lung cancer detection with machine learning classifiers with multi-attribute decision-making system and deep learning model. Sci. Rep.15:8565. doi: 10.1038/s41598-025-88188-w

  • 25

    ModakS.Abdel-RaheemE.RuedaL. (2024). Gpd-nodule: a lightweight lung nodule detection and segmentation framework on computed tomography images using uniform superpixel generation. IEEE Access12, 154933154948. doi: 10.1109/ACCESS.2024.3485000

  • 26

    MohamedT. I. A.EzugwuA. E. (2024). Enhancing lung cancer classification and prediction with deep learning and multi-omics data. IEEE Access12, 5988059892. doi: 10.1109/ACCESS.2024.3394030

  • 27

    MohantyN.BeheraB. K.FerrieC.DashP. (2025). A quantum approach to synthetic minority oversampling technique (SMOTE). Quantum Mach. Intell.7:38. doi: 10.1007/s42484-025-00248-6

  • 28

    MurthyN. N.ThippeswamyK. (2025). TPOT with SVM hybrid machine learning model for lung cancer classification using CT image. Biomed. Signal Process. Control104:107465. doi: 10.1016/j.bspc.2024.107465

  • 29

    NazirI.HaqI. u.AlQahtaniS. A.JadoonM. M.DahshanM. (2023). Machine learning-based lung Cancer detection using Multiview image registration and fusion. J Sens2023:6683438. doi: 10.1155/2023/6683438

  • 30

    PellicerL. F. A.OroscoT. M. F.CostaA. H. R. (2023). Data augmentation techniques in natural language processing. Appl. Soft Comput.132:109803. doi: 10.1016/j.asoc.2022.109803

  • 31

    RahmanianM.MansooriE. G. (2024). MoVAE: multi-omics variational auto-encoder for cancer subtype detection. IEEE Access12, 133617133631. doi: 10.1109/ACCESS.2024.3462543

  • 32

    RaoB. D.ArshadM. (2023). Early detection of lung cancer using machine learning techniques. ICCI1, 15. doi: 10.1109/ICCCI56745.2023.10128389

  • 33

    RavindranU.GunavathiC. (2024). Cancer disease prediction using integrated smart data augmentation and capsule neural network. IEEE Access12, 8181381826. doi: 10.1109/ACCESS.2024.3411633

  • 34

    SatheP.MahajanA.PatkarD.VermaM. (2024). End-to-end fully automated lung cancer screening system. IEEE Access12, 108515108532. doi: 10.1109/ACCESS.2024.3435774

  • 35

    ShadmanH.GomrokS.LitleC.ChengQ.JiangY.HuangX.et al. (2025). A machine learning-based investigation of integrin expression patterns in cancer and metastasis. Sci. Rep.15:5270. doi: 10.1038/s41598-025-89497-w

  • 36

    ShaheenI.JavaidN.AlrajehN.AsimY.AkberS. M. A. (2025). New AI explained and validated deep learning approaches to accurately predict diabetes. Med. Biol. Eng. Comput.63, 23732392. doi: 10.1007/s11517-025-03338-6

  • 37

    SinjankaY.KaurV.MusaU. I.KaurK. (2024). ML-based early detection of lung cancer: an integrated and in-depth analytical framework. Discov. Artif. Intell.4, 118. doi: 10.1007/s44163-024-00204-6

  • 38

    ThakurT.BatraI.MalikA.GhimireD.KimS.-H.Sanwar HosenA. S. M. (2023). RNN-CNN based cancer prediction model for gene expression. IEEE Access11, 131024131044. doi: 10.1109/ACCESS.2023.3332479

  • 39

    WaniN. A.KumarR.BediJ. (2024). DeepXplainer: an interpretable deep learning based approach for lung cancer detection using explainable artificial intelligence. Comput. Methods Prog. Biomed.243:107879. doi: 10.1016/j.cmpb.2023.107879

  • 40

    WeiW.WangY.OuyangR.WangT.ChenR.YuanX.et al. (2024). Machine learning for early discrimination between lung cancer and benign nodules using routine clinical and laboratory data. Ann. Surg. Oncol.31, 77387749. doi: 10.1245/s10434-024-15762-3

  • 41

    YangG.WangG.WanL.WangX.HeY. (2025). Utilizing SMOTE-TomekLink and machine learning to construct a predictive model for elderly medical and daily care services demand. Sci. Rep.15:8446. doi: 10.1038/s41598-025-92722-1

  • 42

    YangY.XuL.SunL.ZhangP.FaridS. S. (2022). Machine learning application in personalised lung cancer recurrence and survivability prediction. Comput. Struct. Biotechnol. J.20, 18111820. doi: 10.1016/j.csbj.2022.03.035

  • 43

    ZhaoW.ChenW.LiG.LeiD.YangJ.ChenY.et al. (2022). GMILT: a novel transformer network that can noninvasively predict EGFR mutation status. IEEE Trans. Neural Netw. Learn. Syst.99, 115. doi: 10.1109/TNNLS.2022.3190671

  • 44

    ZhuJ.ZhangJ.WangL.HuangH.ZhangZ.SongK.et al. (2023). Progressively helical multi-omics data fusion GCN and its application in lung adenocarcinoma. IEEE Access11, 7356873582. doi: 10.1109/ACCESS.2023.3296474

Summary

Keywords

lung cancer prediction, class imbalance, explainable AI, lime, SMOTE

Citation

M S P, D S and Chakrabortty A (2025) Lung cancer risk prediction using augmented machine learning pipelines with explainable AI. Front. Artif. Intell. 8:1602775. doi: 10.3389/frai.2025.1602775

Received

02 April 2025

Accepted

31 July 2025

Published

03 September 2025

Volume

8 - 2025

Edited by

Giuseppe De Pietro, National Research Council (CNR), Italy

Reviewed by

Chao Zhang, Shanxi University, China

Md Afroz, University of Prince Mugrin, Saudi Arabia

Updates

Copyright

*Correspondence: Saranyaraj D,

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics