A research team from the Faculty of Computers and Information Sciences at Ain Shams University has introduced an attention-guided deep learning framework that significantly refines the automated severity grading of diabetic retinopathy from retinal fundus photographs. Diabetic retinopathy represents one of the most widespread microvascular complications associated with diabetes mellitus and remains a predominant driver of preventable visual impairment among working-age populations internationally. With global diabetes prevalence estimated by the World Health Organization at approximately 422 million individuals, large segments of the population face progressive risks of retinal degradation. Conventional diagnostic pathways rely extensively on manual examinations of retinal fundus images conducted by licensed ophthalmologists, representing a diagnostic process that is inherently resource-intensive, slow, and subjective. Access barriers to specialized eye clinics in rural and underserved areas further compound these diagnostic delays. To establish scalable screening, the investigators engineered ARA-ConvNeXt, an architecture combining a modernized convolutional backbone with stage-selective attention refinement and auxiliary intermediate supervision, reaching a 92.08 percent five-class classification accuracy and a quadratic weighted kappa of 0.9597 on the benchmark APTOS 2019 Blindness Detection dataset.
Automated grading of diabetic retinopathy presents distinct computational hurdles that conventional convolutional models struggle to resolve concurrently. Disease progression is defined across five ordinal categories ranging from healthy tissue to proliferative retinopathy, demanding that neural networks identify minute, fine-grained pathological variations between consecutive stages while coping with profound dataset class imbalances where non-diseased images drastically outnumber severe cases. Furthermore, screening systems must capture both microscopic focal lesions, including microaneurysms and punctate hemorrhages, and broad morphological structures across the retinal background while maintaining an economical parameter profile suitable for practical deployment. To address these structural requirements, the authors implemented ConvNeXt-Tiny as their baseline feature extractor, initialized with ImageNet pre-trained weights to speed convergence and foster generalizable representations. ConvNeXt redesigns classic convolutional architectures by incorporating contemporary structural principles adapted from Vision Transformers while retaining the operational efficiency of pure convolutions. Operating across four progressive processing tiers, the backbone gradually expands channel depths from 96 through 192 and 384 up to 768 while systematically scaling down spatial dimensions through strided convolutional layers, encompassing approximately 29 million parameters.
The computational workflow initiates with a specialized three-step image preprocessing routine configured to mitigate illumination disparities and accentuate microscopic ocular anomalies across all fundus photographs prior to neural processing. Standard retinal photography inherently includes broad black margins surrounding the circular ocular aperture that carry no diagnostic utility and introduce extraneous border noise. The authors implemented an automated circle-cropping procedure that converts input images to grayscale, identifies non-black zones using binary thresholding, computes a minimum enclosing circle around the primary contour, and reduces the extraction radius by five percent to excise perimeter artifacts. This cropping phase eliminates roughly 20 to 30 percent of non-informative background pixels, directly lowering computational demands and centering subsequent feature extraction on actual retinal structures. Because variable camera hardware, exposure settings, and patient anatomical variances introduce significant illumination shifts across fundus collections, the team applied Ben Graham local illumination normalization, subtracting a locally averaged Gaussian-blurred variant of each image. Finally, Contrast Limited Adaptive Histogram Equalization was applied exclusively to the luminance channel within the LAB color space using a clip limit of 2.0 and an eight-by-eight grid, boosting the visual definition of subtle microaneurysms.
Rather than relying entirely on deep backbone processing, ARA-ConvNeXt incorporates stage-selective attention refinement designed to optimize feature maps after the sequential backbone steps have concluded. The foundational ConvNeXt-Tiny network processes 299 by 299 pixel RGB inputs through a patch embedding stem utilizing a four-by-four convolution with stride four, transforming the input into a tensor of 96 channels across a 74 by 74 spatial dimension. The architecture subsequently progresses across Stage 0 with three blocks, Stage 1 with three blocks yielding 192 channels at 37 by 37 spatial resolution, Stage 2 containing nine blocks producing 384 channels at 18 by 18 resolution, and Stage 3 featuring three blocks generating 768 channels at a nine by nine resolution. The authors observed that early stages capture low-level textural primitives that gain little advantage from channel-specific recalibration. Consequently, attention modules are concentrated specifically on intermediate and deep layers, using Efficient Channel Attention across Stages 2 and 3 alongside a Convolutional Block Attention Module placed at Stage 2 to integrate spatial and channel refinement simultaneously.
The integration of Efficient Channel Attention provides parameter-efficient channel modeling by capturing localized channel interactions via one-dimensional convolutions with a kernel size of three following global average pooling, avoiding the dimensionality reduction bottlenecks characteristic of standard squeeze-and-excitation blocks. In Stage 2, this channel recalibration is paired with the dual-stage Convolutional Block Attention Module, which applies shared multi-layer perceptron processing across average-pooled and max-pooled channel descriptors using a reduction ratio of 16, followed by a spatial attention submodule driven by a seven-by-seven spatial convolution. The enhanced feature representations are directed exclusively to classification pathways without altering the feedforward stream between internal backbone stages. To aggregate spatially distributed features, the framework replaces conventional global average pooling with learnable Generalized Mean pooling across both classification branches. Because pathological lesions vary considerably in physical footprint across the ocular fundus, the Generalized Mean pooling exponent was initialized at 3.0 and dynamically adjusted during training within boundaries of 0.1 and 10.0, allowing the model to smoothly interpolate between uniform average pooling and selective maximum pooling.
Supervision within ARA-ConvNeXt is organized through a multi-task framework incorporating two distinct classification pathways that derive predictions from different hierarchical depths of the network. The primary classification head processes Stage 3 features through Efficient Channel Attention, learnable Generalized Mean pooling, and a three-layer multi-layer perceptron configured with 768, 768, 384, and 5 units. Operating concurrently, an auxiliary classification head draws features from Stage 2 after sequential processing through Efficient Channel Attention, the Convolutional Block Attention Module, and a separate Generalized Mean pooling layer, terminating in a three-layer perceptron dimensioned at 384, 384, 192, and 5 units. Both projection heads incorporate Layer Normalization, ReLU activation, and a dropout rate of 0.35. During model training, the auxiliary branch is assigned a loss weight factor of 0.4, supplying intermediate gradient feedback that regularizes lower-level representations without overpowering the primary optimization objective. When executing inferences on validation or test sets, the auxiliary classification head is completely decoupled, ensuring that final patient predictions stem exclusively from the primary classification head.
To mitigate the extreme class imbalance characteristic of clinical fundus archives, the authors developed a specialized loss formulation combining Label-Distribution-Aware Margin loss with Focal Loss. Under standard cross-entropy criteria, neural models frequently favor majority classifications at the expense of rare disease presentations. The Label-Distribution-Aware Margin function addresses this disparity by enforcing class-dependent margin offsets proportional to the inverse fourth root of class sample frequencies, scaled by a factor of 30.0 with a maximum margin parameter of 0.5. This boundary adjustment forces larger separation margins around underrepresented clinical categories. The resulting margin-adjusted logits are subsequently evaluated using Focal Loss, which applies a modulating exponent of 1.5 and a balance parameter of 0.25 to downweight easily classified background cases while concentrating gradient updates on ambiguous samples. Training optimization utilized AdamW with decoupled weight decay of 0.0001, differential learning rates across heads and backbone, and a OneCycle learning rate schedule with cosine annealing over 75 epochs. Extensive data mixing via Mixup and CutMix was applied to 30 percent of batches.
The experimental validation utilized the Asia Pacific Tele-Ophthalmology Society 2019 Blindness Detection dataset, which comprises 3,662 retinal fundus images gathered from diverse individuals across rural regions in India. The underlying photography captures varied demographic groups exhibiting the full spectrum of diabetic retinopathy manifestations categorized according to the International Clinical Diabetic Retinopathy Disease Severity Scale. Within the compiled corpus, 1,805 images (49 percent) are graded as No DR, 370 images (10 percent) represent Mild DR with early microaneurysms, 999 images (28 percent) exhibit Moderate DR marked by dot-and-blot hemorrhages and exudates, 193 images (5 percent) display Severe DR with extensive microvascular abnormalities, and 295 images (8 percent) show Proliferative DR characterized by fragile neovascularization. Because the public repository lacks anonymized patient identification codes, patient-level isolation was impossible, prompting the researchers to partition the imagery randomly at the image level into a training partition of 2,930 images (80 percent), a validation cohort of 366 images (10 percent), and a held-out test evaluation set containing 366 images (10 percent).
Evaluated on the independent 366-sample test cohort, ARA-ConvNeXt recorded an overall classification accuracy of 92.08 percent alongside a quadratic weighted kappa of 0.9597, demonstrating high concordance with verified expert grading across ordinal tiers. Macro-averaged area under the receiver operating characteristic curve reached 0.9631, supported by a macro-averaged F1-score of 0.8411, macro precision of 0.8687, and macro recall of 0.8215. Per-class assessments revealed exceptional performance in identifying healthy retinas, with Class 0 achieving 99.49 percent precision and 99.49 percent recall based on a single misclassified image out of 195 normal test cases. Such specificity is essential in screening environments to prevent false alarms and unneeded hospital referrals. Performance remained solid in identifying Mild DR with 90.48 percent precision and 86.36 percent recall, Moderate DR with 80.00 percent precision and 91.14 percent recall, and Proliferative DR with 95.65 percent precision and 75.86 percent recall.
The principal diagnostic challenge centered on Class 3, representing severe non-proliferative retinopathy, where the network recorded a precision of 68.75 percent and a lower recall of 57.89 percent, accompanied by a wide 95 percent Wilson confidence interval spanning 36.3 to 76.9 percent due to the limited sample size of 19 test cases. Confusion matrix evaluations showed that all eight misclassified severe cases were designated as moderate retinopathy rather than assigned to healthy or mild categories. The authors noted that distinguishing adjacent transitional stages remains difficult under constrained sample volumes, emphasizing that severe-stage grading requires further calibration before clinical adoption. Analysis of global prediction errors showed diagonal dominance across the confusion matrix with mistakes confined entirely to adjacent stages, avoiding catastrophic errors such as confusing healthy retinas with proliferative disease. In supplementary secondary analyses of simplified task formulations, combining all diseased classes into a single category yielded 99.45 percent binary classification accuracy, while merging moderate and severe cases into a combined category produced 94.81 percent four-class accuracy.
Systematic ablation trials documented the individual performance contributions provided by each structural and procedural innovation within the architecture. Removing the entire suite of attention, pooling, and auxiliary enhancements to yield a plain ConvNeXt-Tiny baseline dropped accuracy to 87.70 percent and kappa to 0.9162, establishing a 4.38 percentage point deficit compared to the complete model. Excising Efficient Channel Attention modules reduced accuracy by 3.01 percentage points, while isolating and removing the Convolutional Block Attention Module triggered a 2.74 percentage point decline. Omitting the auxiliary supervision head, which simultaneously eliminated the intermediate attention module, caused a 2.46 percentage point reduction in accuracy and reduced kappa by 0.0311, confirming the regularizing utility of mid-level gradient feedback. Transitioning from learnable Generalized Mean pooling back to conventional average pooling yielded an identical 2.46 percentage point accuracy loss. The most severe performance degradation occurred when disabling Mixup and CutMix data augmentations, which caused accuracy to decline by 4.65 percentage points, dropped kappa to 0.8987, and triggered complete classification collapse for Class 3 with zero percent precision and recall.
When positioned alongside recent published models evaluated on the APTOS dataset, the reported 92.08 percent accuracy and 0.9597 kappa compare favorably against the 82.0 percent accuracy reported by Wong and colleagues using an ensemble of ShuffleNet and ResNet-18, the 86.0 percent accuracy achieved by Dihin and co-workers with a wavelet-enhanced Swin Transformer, and the 89.6 percent accuracy and 0.9300 kappa attained by Shakibania and associates utilizing a dual-branch framework. However, the authors explicitly emphasized that because official competition test labels remain private, external studies utilize divergent data partitions, distinct cross-dataset pre-training regimens, and differing image preprocessing methodologies, precluding direct head-to-head equivalence. With approximately 29 million parameters, ARA-ConvNeXt achieves its predictive capacity within a single shared convolutional backbone, maintaining a compact computational profile that avoids the memory footprints of multi-backbone ensembles or multi-source transformer pre-training regimes. Before prospective clinical implementation can be considered, the investigators identified essential future validation steps, including testing across independent external databases such as Messidor, EyePACS, and DDR, exploring patient-stratified cohort splits, and integrating Bayesian uncertainty estimation to flag ambiguous retinal scans for secondary human expert review.
Subject of Research: Deep learning architecture using stage-selective attention for diabetic retinopathy severity classification
Article Title: Auxiliary refinement attention-enhanced ConvNeXt for diabetic retinopathy severity classification
Article References: Al-Sebaay, H. Y., El-Saadawy, H., Al-Berry, M. N., & Amin, S. E.-S. (2026). Auxiliary refinement attention-enhanced ConvNeXt for diabetic retinopathy severity classification. Frontiers in Computer Science, 8, 1948647. https://doi.org/10.3389/fcomp.2026.1948647
Image Credits: AI Generated
DOI: 10.3389/fcomp.2026.1948647
Keywords: diabetic retinopathy, deep learning, ConvNeXt, attention mechanisms, medical image classification, fundus photography, APTOS 2019, computer vision, multi-task learning, focal loss, LDAM, data preprocessing, efficient channel attention, CBAM, generalized mean pooling, ordinal classification, retinal imaging
News Source: Blake Davidson. (November 27, 2026). Attention-Enhanced ConvNeXt Architecture Improves Diabetic Retinopathy Severity Grading Accuracy. Scienmag.



