ORViT-DR: Ordinally-Robust Hybrid ViT for Low-Resolution Diabetic Retinopathy Grading
Authors: Soumit Kumar Kundu, Nabil Ashab, Bidhan Biswas, Shahadat Hossain Sohag, Saif Mahmud Parvez, Souvik Kumar Kundu, Zunayed Ahmed Rafi
Organizations: Department of Computer Science and Engineering, Dhaka International University, Dhaka, Bangladesh · KUET, Khulna, Bangladesh · Bangladesh Bank, Dhaka, Bangladesh
Diabetic retinopathy (DR) is one of the main causes of impaired vision. A good and reliable automated grading system can make the screening process safer and more accurate. Because DR stages progress gradually, the task of grading disease severity naturally follows an ordinal structure in which neighboring classes share similar visual characteristics. In this study, ORViT-DR, a hybrid deep learning framework, is designed to improve DR grading from low-resolution retinal images. The proposed approach combines convolutional feature extraction with transformer-based global context modeling through a pre-trained ViT-Hybrid backbone, which integrates BiT-ResNetv2 with a Vision Transformer architecture. The approach is tested on the RetinaMNIST subset of the MedMNISTv2 dataset, which contains 28x28 retinal fundus images annotated with five levels of disease severity. To promote stable training and better feature learning, the training strategy applies progressive layer unfreezing, layer-wise learning rate decay, exponential moving average (EMA) parameter updates, and ensemble-based prediction during inference. Experimental results on the official RetinaMNIST test set show that the proposed method achieves 57.00% classification accuracy, along with a quadratic weighted kappa score of 0.5963 and a macro-F1 score of 0.4293. These results suggest that hybrid CNN-Transformer architectures can provide effective representations for ordinal retinal image analysis.
Figures & tables
Split
Samples
Classes
Image Resolution
Train
1080
5 (No DR, Mild, Moderate, Severe, Proliferative)
28 × 28 (resized to 384 × 384 by the model processor)
Validation
120
Test
400
Table I: Baseline dataset statistics
Figure 1: Class distribution of the RetinaMNIST training split (imbalanced toward No DR).
Figure 2: ORViT-DR whole architecture. It is based on a hybrid CNN–Transformer backbone.
Partial unfreezing of transformer encoder + LayerNorm + head
LLRD
Decay factor 0.85, base LR 3×10−5 , head LR 3×10−4
Regularization
Label smoothing 0.1, dropout in head, gradient clipping (1.0)
MixUp/CutMix
MixUp α=0.3 ; CutMix α=1.0 , randomly sampled per batch
EMA
Decay 0.999 (applied on trainable parameters)
Table II: Training configuration and fine-tuning strategy
Figure 3: Confusion matrices for the best single checkpoint (56.25%) and top-3 uniform ensemble (57.00%).
Figure 4: Training curves produced by the implementation: (a) validation accuracy and (b) train/validation loss across stages.
Configuration
Δ Single + TTA (pp)
Δ Ensemble + TTA (pp)
No LLRD vs. With LLRD
-8.00
-2.25
Table III: Ablation study under a fixed seed setting (seed 42). Results are reported as relative performance changes.
Figure 5: One-vs-rest ROC curves for the top-3 ensemble. The per-class AUCs are shown in the legend.
Figure 6: Representative Grad-CAM visualizations on RetinaMNIST samples. From left to right: original image, Grad-CAM heatmap, and heatmap overlay. Warmer regions indicate a stronger positive contribution to the predicted class.
Zhejiang Key Laboratory of Accessible Perception and Intelligent Systems, College of Computer Science and Technology, Zhejiang University · Hangzhou Pujian Medical Technology Co., Ltd · Hangzhou Dianzi University +1