An explainable dual-branch transformer–ConvNeXt framework for robust lung histopathology classification
Authors:
Open Access
- 11 September 2026
- journal article
- research article
- Published by Frontiers Media SA in Frontiers in Oncology
- Vol. 16, 1907746
Abstract
Introduction: Accurate histopathological discrimination of lung adenocarcinoma (ACA) and squamous cell carcinoma (SCC) from benign tissue is a clinically demanding task in which the two malignant subtypes are frequently confused even by trained pathologists. Methods: We present a dual-branch deep learning framework that couples a hierarchical shifted-window vision transformer (SwinV2-CR-Tiny) with a fully-convolutional masked-autoencoder-pretrained convolutional network (ConvNeXtV2-Tiny) to capture complementary global-contextual and local-textural representations of haematoxylin-and-eosin (H&E) stained tissue. The two branches are integrated through a learnable cross-feature gating module, refined by feature-space gated-modulation heads, and compressed by an Electric-Eel-Foraging-Optimizer (EEFO)-driven feature-selection stage. A Crested-Porcupine-Optimizer (CPO) calibrates class weighting and a Fennec-Fox-Optimizer (FFO) tunes per-class decision thresholds, while training combines Macenko stain normalization, CLAHE, MixUp/CutMix augmentation, a focal loss with label smoothing, Sharpness-Aware Minimization (SAM) and Stochastic Weight Averaging (SWA). Predictive uncertainty is quantified by Monte-Carlo (MC) dropout and model decisions are explained with Grad-CAM++ and Integrated Gradients. The model was evaluated on a stratified 70/15/15 partition of the LC25000 lung cohort (15,000 images; 5,000 per class). Results: The proposed model attains a test accuracy of 94.04%, macro-F1 of 0.9404, macro one-vs-rest AUC of 0.9886 and Cohen's κ of 0.9107, with near-perfect benign separation (sensitivity 0.999) and the residual error concentrated in the clinically expected ACA↔SCC confusion. Contrary to our prior expectation, MC-dropout predictive uncertainty did not separate misclassified from correctly classified cases on this cohort (mean across-pass standard deviation 0.0261 for errors versus 0.0269 for correct predictions). We additionally report a negative calibration finding: the model is systematically under-confident and naive temperature scaling increased the expected calibration error. Discussion: The negative uncertainty result is attributed to the same confidence-suppressing training objective and is reported rather than omitted. We further discuss the data-provenance characteristics of LC25000 that constrain the interpretation of absolute accuracy. The framework offers an interpret-able, transparently-evaluated decision-support pipeline whose error profile aligns with established lung-cancer histomorphology.Keywords
This publication has 19 references indexed in Scilit:
- Crested Porcupine Optimizer: A new nature-inspired metaheuristicKnowledge-Based Systems, 2023
- Electric eel foraging optimization: A new bio-inspired optimizer for engineering applicationsExpert Systems with Applications, 2023
- Fennec Fox Optimization: A New Nature-Inspired Optimization AlgorithmIEEE Access, 2022
- Malignancy Detection in Lung and Colon Histopathology Images Using Transfer Learning With Class Selective Image ProcessingIEEE Access, 2022
- Deep neural network models for computational histopathology: A surveyMedical Image Analysis, 2021
- A survey on deep learning in medical image analysisMedical Image Analysis, 2017
- Classification and Mutation Prediction from Non-Small Cell Lung Cancer Histopathology Images using Deep LearningbioRxiv, 2017
- Dermatologist-level classification of skin cancer with deep neural networksNature, 2017
- Visualizing data2009
- Contrast Limited Adaptive Histogram Equalization1994