Enhancing Diabetic Retinopathy Classification Accuracy through Dual Attention Mechanism in Deep Learning

Abdul Hannan, Zahid Mahmood, Rizwan Qureshi, Hazrat Ali · 2025

Read Enhancing Diabetic Retinopathy Classification Accuracy through Dual Attention Mechanism in Deep Learning by Abdul Hannan, Zahid Mahmood, Rizwan Qureshi, Hazrat Ali (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-19199.txt.

Introduction

Abdul Hannan, Zahid Mahmood, Rizwan Qureshi, and Hazrat Ali improve automatic grading of diabetic eye disease, in a 2025 paper. Diabetes damages the retina over time, and photos of the back of the eye can reveal the stage. Automated reading could speed screening, but training sets hold many more mild cases than severe ones, which skews learning models.

The team add two attention blocks to a deep network: one that weighs the whole image and one that weighs each disease class. Three proven image networks serve as interchangeable backbones. Tests ran on two public sets of retinal photos. Attention that balances classes helps the model spot rare severe cases it would otherwise miss, a step toward fair screening tools.

Catalog record

CREATORAbdul Hannan, Zahid Mahmood, Rizwan Qureshi, Hazrat Ali
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE55 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-19199

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Enhancing Diabetic Retinopathy Classification Accuracy through Dual Attention Mechanism in Deep Learning Abdul Hannan, Zahid Mahmood, Rizwan Qureshi, Hazrat Ali Abstract Automatic classification of Diabetic Retinopathy (DR) can assist ophthalmologists in devising personalized treatment plans, making it a critical component of clinical practice. However, imbalanced data distribution in the dataset becomes a bottleneck in the generalization of deep learning models trained for DR classification. In this work, we combine global attention block (GAB) and category attention block (CAB) into the deep learning model, thus effectively overcoming the imbalanced data distribution problem in DR classification. Our proposed approach is based on an attention mechanism-based deep learning model that employs three pre-trained networks, namely, MobileNetV3-small, Efficientnet-b0, and DenseNet-169 as the backbone architecture. We evaluate the proposed method on two publicly available datasets of retinal fundoscopy images for DR. Experimental results show that on the APTOS dataset, the DenseNet-169 yielded 83.20% mean accuracy, followed by the MobileNetV3-small and EfficientNet-b0, which yielded 82% and 80% accuracies, respectively. On the EYEPACS dataset, the EfficientNet-b0 yielded a mean accuracy of 80%, while the DenseNet-169 and MobileNetV3-small yielded 75.43% and 76.68% accuracies, respectively. In addition, we also compute the F1-score of 82.0%, precision of 82.1%, sensitivity of 83.0%, specificity of 95.5%, and a kappa score of 88.2% for the experiments. Moreover, in our work, the MobileNetV3-small has 1.6 million parameters on the APTOS dataset and 0.90 million parameters on the EYEPACS dataset, which is comparatively less than other methods. The proposed approach achieves competitive performance that is at par with recently reported works on DR classification. keywords Attention mechanism, deep learning, diabetic retinopathy, image classification, medical imaging. 1 Introduction Diabetes Mellitus (DM) is a long-lasting sickness in which blood sugar levels increase due to the inability of the pancreas to secrete sufficient blood insulin Atwany et al 2022 ; Chen et al 2023 . The International Diabetes Federation (IDF) reports that over 537 million individuals between the ages of 20 and 79 worldwide have DM Federation 2021 . Over the past two decades, the prevalence of diabetes among adults has increased over threefold, and approximately 230 million people with diabetes, which is half of all cases, remain undiagnosed. An alarming estimate is that the global DM population is expected to increase to 643 million by the year 2030 and further to 783 million by 2045 Federation 2021 . Diabetic retinopathy (DR) is a complication of diabetes that affects small blood vessels in the retina, causes blockage and bleeding in the retina, and ultimately leads to vision loss. Moreover, DR can also affect human organs like the liver, heart, kidneys, and eyes. Therefore, early detection and treatment of the DR are crucial to prevent permanent damage. The primary abnormal characteristics observed in the DR consist of (i) microaneurysms, which is an early stage of the DR in which tiny red dots appear on the retina Yu et al 2022 . These dots are defined by sharp margins with a size of at most 125 \mu m. (ii) Hemorrhages, which are indicated by large spots on the retina surface with irregular margin sizes above 125 \mu mm. (iii) Hard exudates, which appear as a result of plasma leakage, become visible as yellow spots on the retina surface and span the outer retina layers with sharp margins. (iv) Soft exudates, which appear as a result of swelling of nerve fibers, have an oval-like appearance on the retina surface. Based on the nature and quantity of abnormalities observed in fundus images, the DR can be categorized into five distinct phases, which include the absence of (DR0), minor (DR1), moderate (DR2), severe (DR3), and proliferative (DR4) Federation 2021 . Deep learning methods have shown great promise in automatically classifying the distinct phases of diabetic retinopathy (DR), particularly through tailored CNN architectures Yang et al 2024 . In recent years, Convolutional Neural Networks (CNNs) have made significant strides and found extensive applications in computer vision tasks such as image classification, object detection, and semantic segmentation Li et al 2020 ; He et al 2016 ; Ren et al 2015 ; He et al 2017 ; Iqbal et al 2021 . These networks seamlessly combine feature extraction and classification into a unified process, leading to remarkable advancements in these domains. Moreover, CNNs have seen extensive utilization in the domain of retinal image analysis, thus playing an important role in tasks such as blood vessel segmentation Yang et al 2024 , identifying optic disc boundaries, and glaucoma screening Fu et al 2018a , Raghavendra et al 2018 ; Fu et al 2018b . While numerous deep learning methods have been introduced for diabetic retinopathy classification on balanced datasets, however, they often struggle to address the challenge of imbalanced datasets. Improving accuracy on imbalanced datasets poses a significant challenge for algorithms that demonstrate impressive accuracy on a balanced dataset, and are over-parameterized. Recently, two-stage CNN architecture to detect lesions and grade DR in fundus images has shown promising results Yang et al 2017 . This method addresses the DR grading process through a two-stage framework; however, the pipeline entails greater intricacy than a single-stage strategy. While CNN-based methods for grading DR have demonstrated favorable outcomes, their implementation in clinical practice remains challenging due to the inherent complexity of the task. One major difficulty arises from the striking similarities in color and texture among the five DR grades, making it prone to confusion during the grading process. This significantly hampers the performance of the model in making a distinction between the different classes. Furthermore, certain lesions within fundus images are minute, comprising only a few pixels. Hence, there is a need to explore newer methods that can achieve the task of DR classification and also effectively address the challenge of an unbalanced dataset. In this connection, we introduce an attention-based mechanism that uses pre-trained models as a backbone to perform the tasks of DR classification in retinal fundus images. Our main contributions are listed below. • We introduce a CNN-based approach while reducing the number of parameters, which automatically classifies the DR. The proposed method is trained and tested on two well-known publicly available APTOS and EYEPACS datasets. We focus on two crucial challenges. Initially, we tackle the challenge of imbalanced datasets, ensuring that appropriate accuracy is achieved. Later, we optimize the number of parameters utilized by the CNN algorithms, thereby improving their efficiency without compromising accuracy. • Our proposed DR classification approach incorporates the Global Attention Block (GAB) and Category Attention Block (CAB) into backbone networks, such as MobileNetV3-small, DenseNet-169, and EfficientNet-b0. The proposed approach exhibits three key characteristics for GAB and CAB. Firstly, GAB and CAB are distinct attention blocks with different functionalities. The GAB encompasses channel attention and spatial attention, while the CAB emphasizes category attention. By combining these two blocks, we enhance the performance of DR classification. Secondly, our model employs the CAB to produce class-specific attention feature maps in a category-oriented manner. Consequently, the model effectively captures more complex GAB and CAB features. This approach proves highly advantageous when dealing with imbalanced datasets in the context of DR grading tasks. • Our model employs the GAB (a global attention block) within a single-branch architecture specifically designed for Diabetic Retinopathy (DR) grading. The

Read the complete text