Dual context attentive feature network: an interpretable dual-pathway deep learning framework for accurate gastrointestinal endoscopic image classification
Related Experiment Videos
Omar AlOmair1, Zohaib Khurshid2
1Department of Internal Medicine, College of Medicine, King Faisal University, Al-Ahsa, Kingdom of Saudi Arabia.
Background:
Gastrointestinal (GI) diseases such as colorectal cancer and inflammatory bowel disease (IBD) contribute substantially to global morbidity, with colorectal cancer accounting for nearly 10% of all cancer diagnoses worldwide. Many existing artificial intelligence (AI) models suffer from limited generalizability and poor clinical interpretability. This study aimed to develop and evaluate an explainable AI (XAI) framework for classifying GI diseases from endoscopic images.
Methods:
Public datasets from the Simula Research Laboratory were used: Hyper-Kvasir (10,662 images) for training, Kvasir-V1 (4,000 images) for validation, and Kvasir-V2 (8,000 images) as an independent test set. Two convolutional neural network (CNN) architectures, GastroNet-dilated multi-scale attention (DMSA) (a proposed DMSA Network) and M2ShallowNet (a lightweight hybrid model), were designed for complementary feature extraction. Deep features were fused using a dual context attentive feature network (DCAF-Net) followed by Aquila Optimizer (AO)-based feature-weight refinement without introducing additional trainable fusion parameters. Performance was assessed using accuracy, precision, recall, F1-score, receiver operating characteristic (ROC) analysis, and statistical testing. Interpretability was examined using gradient-weighted class activation mapping++ (Grad-CAM++) and SHapley Additive exPlanations (SHAP).
Results:
The best-performing classifier, a multilayer perceptron (MLP), achieved an accuracy of 97.21%, precision of 97.27%, recall of 97.21%, Matthews correlation coefficient (MCC) of 96.82%, and F1-score of 97.21% on the independent test set. ROC analysis demonstrated excellent class separability, and statistical testing confirmed reliable generalization. XAI results highlighted regions that qualitatively correspond to pathological areas; formal clinical validation of these interpretations was not performed in this study.
Conclusions:
The proposed framework offers a promising research prototype for AI-assisted GI disease classification. Its potential for real-world endoscopic deployment requires further prospective validation before clinical adoption.