Enriched lung cancer classification approach using an optimized hybrid deep learning approach

Sci Rep 2025 AI 10 Explanations View Original
Original Paper (PDF)

Unable to display PDF. Download it here or view on PMC.

Plain-English Explanations
Pages 1-2
The Challenge of Lung Cancer Diagnosis

Diagnostic limitations drive innovation. Lung cancer remains one of the deadliest diseases worldwide, and early detection is critical to improving survival rates. Conventional imaging tools such as CT scans and chest X-rays are currently the backbone of diagnosis, yet they require expert radiologist interpretation and carry inherent subjectivity that can lead to errors.

Distinguishing benign from malignant nodules is especially difficult because the two often share similar visual characteristics in shape, location, and structure. This ambiguity frequently forces clinicians to rely on invasive procedures like biopsy, adding cost, scheduling delays, and patient risk.

Machine learning methods such as Support Vector Machines have been applied to this problem, but they require manual feature extraction and struggle to reach optimal performance. Deep learning, which automatically learns features from images, has emerged as a more powerful path toward accurate, non-invasive lung cancer classification.

TL;DR: Traditional imaging and manual interpretation methods struggle to reliably distinguish benign from malignant lung nodules, motivating the development of automated deep learning classification systems.
Pages 2-3
Proposed Hybrid Framework Overview

A multi-stage automated pipeline. The authors propose a Lung Cancer Classification (LCC) system that combines image preprocessing, lesion segmentation, deep feature extraction, and hybrid optimization into a single end-to-end framework designed to classify CT scan nodules as benign or malignant.

The system introduces a novel optimization strategy called HHO-LOA, which fuses Horse Herd Optimization (HHO) with the Lion Optimization Algorithm (LOA). This hybrid balances global search (exploring many hyperparameter combinations) with local refinement (zeroing in on the best settings), addressing limitations seen in systems that rely on a single optimizer.

Classification is performed by a hybrid DCNN-LSTM model in which the Deep Convolutional Neural Network extracts spatial features from CT images while the Long Short-Term Memory network captures sequential dependencies among those features. Together these components target higher accuracy than either architecture achieves alone.

TL;DR: The proposed LCC framework combines adaptive preprocessing, dual-threshold segmentation, DCNN-based feature extraction, and a hybrid HHO-LOA optimizer to classify lung CT nodules accurately.
Pages 4-6
Data Preparation and Preprocessing

Dataset and image curation. The study uses the publicly available SPIE-AAPM-NCI Lung CT Challenge dataset, which contains volumetric CT images annotated by expert radiologists with nodule boundaries and malignancy labels. Samples with unclear or private lesion labels were excluded to ensure only well-defined benign and malignant cases were retained.

Each CT volume was preprocessed using an adaptive median filter that suppresses noise by replacing noisy pixels with the median value of surrounding pixels sorted by grey level. This step reduces high- and low-frequency noise while preserving diagnostically important edge detail.

Images were resampled, normalized, and cropped to 224 by 224 pixels centered on the nodule region. The dataset was split into 70% training, 15% validation, and 15% testing, with stratified sampling to preserve the balance of benign and malignant cases across all splits. Standard augmentation techniques including rotation, flipping, and contrast adjustment were applied to improve generalization.

Lesion segmentation used adaptive dual-thresholding with intensity values in the range of 90 to 140 Hounsfield units, chosen to match soft-tissue radiodensity characteristics. Histogram equalization normalized intensity distributions before thresholding, and threshold values were validated across multiple CT scanner types to ensure the approach generalizes beyond a single device.

TL;DR: CT images from the SPIE-AAPM-NCI dataset were denoised with adaptive median filtering, segmented using dual-threshold techniques, and split into training, validation, and test sets with augmentation to support robust model training.
Pages 6-8
DCNN Feature Extraction Architecture

Convolutional learning of spatial patterns. The DCNN uses stacked convolutional layers with small 3 by 3 by 3 kernels and ReLU activations to extract progressively abstract features from CT images. Each convolutional block is followed by batch normalization and max-pooling layers that reduce spatial dimensions while retaining the most diagnostically relevant information.

The network architecture consists of ten layers with approximately 67.1 million total parameters, beginning with 3D convolutional operations that detect low-level features like edges and textures and progressing toward high-level representations of nodule shape and boundary characteristics.

After the convolutional layers, a flattening operation converts the 3D feature maps into a sequential vector representation. This sequence is then passed to the LSTM classifier, allowing the model to treat spatially arranged features as a temporal sequence and capture long-range dependencies between distant regions of the CT image.

The use of small kernel sizes with padding preserves fine spatial detail throughout the network. Max-pooling after each convolutional block reduces computation and mitigates overfitting while ensuring that region-level structural information is retained for classification.

TL;DR: A 10-layer DCNN with 3D convolutions, batch normalization, and max-pooling extracts 67-million-parameter spatial feature representations from lung CT scans before passing them to the LSTM classifier.
Pages 7-9
LSTM Classifier and Gating Mechanisms

Sequential learning beyond standard CNNs. The LSTM classifier receives the flattened feature sequence from the DCNN and processes it using gating mechanisms that control which information is retained, updated, or discarded at each step. This allows the model to learn contextual associations between nodule features that are spatially separated within the CT image.

The LSTM unit contains four gates: the forget gate determines which information from the prior cell state to discard; the input gate selects which new information to store; the candidate cell state computes new values to update memory; and the output gate determines the final output at each step. These mechanisms prevent the vanishing gradient problem that plagues standard recurrent networks.

The LSTM head configuration consists of 256 units, a dropout layer, a dense fully connected layer with a single output neuron, and a sigmoid activation for binary classification. The total LSTM head contains approximately 787,700 parameters. After processing the full feature sequence, the final hidden state is passed through a softmax function to output the probability of the image being normal or cancerous.

Using LSTM for image features is justified because spatially arranged feature vectors can be reformulated as sequential data. LSTM then learns patterns across this spatial sequence, capturing relationships between lesion regions that a standard CNN classifier examining only local neighborhoods might miss, which is particularly valuable for weakly distinguished or non-local lung nodules.

TL;DR: The LSTM classifier processes DCNN-extracted features as sequential data using gating mechanisms that capture long-range spatial dependencies before issuing a binary classification decision.
Pages 8-10
Hybrid HHO-LOA Hyperparameter Optimization

Nature-inspired dual optimization. Horse Herd Optimization mimics the social movement of horse herds, with individuals exploring a broad hyperparameter space by moving toward the best-known configuration while incorporating random variation. This exploration phase generates diverse candidate hyperparameter sets that cover the search landscape efficiently.

The Lion Optimization Algorithm complements HHO by simulating the hunting and roaring behaviors of lion prides. After HHO identifies promising regions, LOA refines the best candidates through targeted exploitation, adjusting parameters with a convergence rate factor to maximize classification accuracy while keeping computational cost manageable.

The hybrid fitness function is defined as accuracy minus a penalty term proportional to computational cost, weighted by a trade-off parameter lambda. Cross-validation over values from 0.1 to 0.9 identified lambda equals 0.7 as the optimal balance, allowing the algorithm to prioritize accuracy without permitting excessive resource consumption. The final optimized parameters include a learning rate of 0.0001, 100 LSTM units, dropout of 0.2, weight decay of 0.01, and batch size of 32.

Stratified 5-fold cross-validation with dropout regularization, batch normalization, and early stopping was used throughout optimization to prevent overfitting. Performance variation across folds was less than 0.3%, confirming that the optimized hyperparameters generalize reliably rather than fitting to a particular data partition.

TL;DR: HHO explores diverse hyperparameter combinations while LOA refines the best candidates, together optimizing LSTM settings through a fitness function that balances classification accuracy against computational cost.
Pages 12, 13, 16, 17
Classification Performance and Ablation Study

Ablation confirms each component matters. The full model combining DCNN, LSTM, HHO, and LOA achieved 98.75% accuracy. Removing either optimizer reduced accuracy: using LOA alone reached 96.13% and using HHO alone reached 96.45%, while the unoptimized DCNN-LSTM baseline achieved only 94.82%. The DCNN with softmax only reached 92.37%, demonstrating that both the LSTM and hybrid optimization contribute meaningfully to overall performance.

In the full comparative evaluation against established DL-based classifiers (GW-CTO-DNN, FPSO-CNN, TPO-CNN, and LDA-MGSA-DNN), the HHO-LOA-DCNN-LSTM model achieved the highest accuracy at 99.65%, precision at 99.75%, recall at 99.23%, sensitivity at 99.13%, specificity at 98.65%, and F-score at 98.89%.

External validation on the SPIE-AAPM Lung CT Challenge dataset without fine-tuning yielded 94.62% accuracy, 92.78% precision, 91.45% recall, and an AUC of 0.948. This result demonstrates that the model maintains strong classification performance on data from sources and imaging conditions outside the training cohort.

Calibration metrics further support the model's reliability. The proposed model achieved a Brier Score of 0.042, Expected Calibration Error of 2.8%, Maximum Calibration Error of 6.1%, and Log Loss of 0.154 -- all the best values among compared architectures -- indicating that its predicted probabilities closely match actual outcomes and that clinicians can trust the confidence scores the model outputs.

TL;DR: The full HHO-LOA-DCNN-LSTM model achieved 98.75% accuracy on the primary dataset and 94.62% on external validation, outperforming all comparison models on accuracy, precision, recall, sensitivity, specificity, F-score, and calibration metrics.
Pages 19-21
Computational Efficiency and Baseline Comparisons

Faster with less hardware load. Among the five optimized DL models compared, the HHO-LOA-CNN-LSTM system completed inference in 150.1 seconds with only 4.64% CPU utilization. The slowest competitor, GW-CTO-DNN, required 262.6 seconds and 8.74% CPU, while FPSO-CNN took 257.4 seconds at 10.76% CPU utilization.

The model was also compared against recent state-of-the-art architectures including ConvNeXt, EfficientNetV2, Vision Transformer (ViT), ResNet50, ResNet101, ResNet152, EfficientNetB0, EfficientNetB3, and DenseNet121, all trained on identical data splits. The proposed DCNN-LSTM model achieved 98.75% accuracy and 98.7% AUC, outperforming all baselines while maintaining a competitive inference time of 150.1 seconds.

ConvNeXt achieved the second-highest accuracy at 97.20% and DenseNet121 reached 96.90%, while EfficientNetB0 had the lowest accuracy at 95.50% in exchange for the fastest inference at 130.5 seconds. The proposed model's 150.1-second inference time is slower than the most efficient baselines but substantially faster than ViT (178.2 s) and ResNet152 (190.1 s), which also scored lower on all accuracy metrics.

TL;DR: The proposed model achieves the highest classification accuracy and AUC among all compared architectures while requiring the shortest execution time and lowest CPU utilization of the five optimized DL classifiers tested.
Pages 15-16
Handling Class Imbalance

Addressing the rarity of malignant cases. The dataset used in this study contains approximately 80% benign nodules and only 20% malignant nodules, a common challenge in lung cancer imaging datasets that can cause classifiers to default to benign predictions and miss cancerous cases.

To counteract this imbalance, the authors applied SMOTE (Synthetic Minority Over-sampling Technique) to generate synthetic malignant nodule examples, expanding the minority class and providing the model with more instances from which to learn malignant-specific patterns.

Class weights were adjusted during training so that misclassifying a malignant nodule incurred a greater penalty than misclassifying a benign one, directing the model's attention toward the more dangerous error. Data augmentation including random rotations, flipping, and scaling was also applied to both classes to introduce variability and prevent the model from overfitting to common benign patterns.

Stratified cross-validation maintained the original benign-to-malignant ratio within each fold so that validation performance truly reflected behavior on an imbalanced population. Metrics including precision, recall, F1-score, and AUC were prioritized over simple accuracy to ensure that the model's ability to detect malignant nodules was fairly evaluated despite the class skew.

TL;DR: SMOTE oversampling, class-weight adjustment, data augmentation, and stratified cross-validation were combined to ensure the model learned to detect the minority malignant class reliably despite an 80/20 class imbalance.
Pages 20, 25
Clinical Relevance and Future Directions

A practical aid for radiologists. The HHO-LOA-DCNN-LSTM framework demonstrates that hybrid optimization of deep learning hyperparameters can yield diagnostic accuracy high enough to serve as a meaningful decision-support tool for radiologists, providing non-invasive classification of lung nodules without requiring biopsy in many cases.

Real-time deployment remains constrained by the computational demands of the model and the quality requirements of the CT scanner hardware. In clinical environments with limited GPU resources, inference times may extend beyond the approximately 150 seconds measured in controlled experiments, which could affect throughput in high-volume screening programs.

The authors acknowledge that a 2D slice-based approach was selected over 3D or volumetric transformer models primarily due to computational resource limitations. Three-dimensional models offer the ability to learn spatial continuity across CT slices, and the authors identify volumetric and transformer-based extensions as the most important direction for future work once computational and annotation constraints are resolved.

External validation on the SPIE-AAPM dataset without fine-tuning confirmed that the model generalizes across different imaging conditions and patient populations, providing early evidence that the framework could transfer to real-world clinical deployment with minimal modification.

TL;DR: The proposed framework offers a clinically relevant, non-invasive lung nodule classification tool, though real-time deployment is limited by computational requirements and the use of 2D slices rather than full volumetric analysis.
Citation: Open Access, 2025. Available at: PMC12569064.