Lightweight Hybrid CNN-Transformer Architecture for Diabetic Retinopa-thy Grading from Fundus Images: A Feature Fusion Approach with Dual Explainability

Muthanna Journal of Engineering and Technology

Volume (14), Issue (4), Year (2026), Pages (60-75)

DOI:10.52113/3/eng/mjet/2026-14-04-/60-75

Research Article By:

Rasha Jamal Hindi

Corresponding author E-mail: rashajamal94@uomustansiriyah.edu.iq


ABSTRACT

Automated diabetic retinopathy grading using fundus images demands accurate, computationally efficient,  robust, and interpretable models. Although convolutional neural networks are effective at extracting local lesion patterns, they have limited ability to model long-range spatial relationships across the retina, while standard vision transformers provide global context at a substantially higher computational cost. To address this trade-off, this study proposes a lightweight hybrid CNN–Transformer framework that combines an EfficientNet-B0 backbone for local retinal feature extraction with a compact four-layer transformer branch for global contextual modeling. The final EfficientNet-B0 feature map is converted into spatial tokens and processed by the transformer, after which CNN and transformer representations are integrated through a learned feature-fusion module. The model contains only 6.2 million parameters and achieved strong five-class DR grading performance on APTOS 2019, with a quadratic weighted kappa of 0.920 under stratified five-fold cross-validation. External testing on MESSIDOR-2 further showed promising cross-dataset generalization, achieving 94.7% binary screening accuracy and a QWK of 0.891 without fine-tuning. In addition, Grad-CAM and attention rollout were used to provide complementary local and global explanations of model predictions. The results indicate that the proposed framework presents a concise and semantically meaningful method for DR grading and may facilitate future clinical decision-support assessments,  but future prospective validation with ophthalmologists re-mains required before its implementation in a real clinical setting.

Keywords:

diabetic retinopathy; lightweight deep learning; hybrid CNN-Transformer; feature fusion; explainable AI (XAI); generalizability validation

Get Full Access / pdf