arXiv:2610.40699eess.IVOct 2026

Manuscript Offprint

arXiv:2610.40699

CalibCause: A Quality-Gated, Interpretable and Calibrated Deep Learning Framework for Diabetic Retinopathy Grading

Sohaib Sulman, Muhammad Atif Saeed, Akhtar Jamil, Alaa Ali Hameed, Roland Aydin

Sohaib Sulman*

Department of Data Science and

Artificial Intelligence

National University of Computer and

Emerging Sciences (FAST-NUCES)

Islamabad 44000, Pakistan

i248068@isb.nu.edu.pk

Muhammad Atif Saeed

Department of Data Science and

Artificial Intelligence

National University of Computer and

Emerging Sciences (FAST-NUCES)

Islamabad 44000, Pakistan

atif.saeed@isb.nu.edu.pk

Akhtar Jamil

Department of Computer Science

National University of Computer and

Emerging Sciences (FAST-NUCES)

Islamabad 44000, Pakistan

akhtar.jamil@nu.edu.pk

Alaa Ali Hameed

Department of Computer Engineering

Istinye University

Istanbul 34408, Turkey

alaa.hameed@istinye.edu.tr

Roland Aydin

German Research Center for

Artificial Intelligence (DFKI)

Saarbrücken, Germany

roland.aydin@uni-saarland.de

ABSTRACT

PURPOSE: Most deep learning systems for diabetic retinopathy (DR) grading are reported on one data source and say little about how they behave on a new camera or grading team, how sure they are of a given grade, or why they chose it. We built CalibCause, a quality-gated mixture-of-experts grader that adds per-expert visual explanations, a quality signal that needs no manual labels, a compact distilled student, and calibrated confidence with deferral. We tested it against a plain ConvNeXt-Tiny trained with the same recipe.

METHODS: We used 51,310 fundus images from EyePACS, DDR and APTOS 2019, treated as three acquisition environments, and IDRiD and DeepDRiD for external testing. Models were compared on a pooled test split and by leave-one-environment-out (LOEO) testing, with paired bootstrap intervals, a second training seed, and a diagnostic that refits the four grade thresholds on 200 labelled images from the new site.

RESULTS: On the pooled test split the label-free student (27.8M parameters, 52% fewer than its teacher) reached quadratic weighted kappa (QWK) 0.863 and accuracy 0.865. In LOEO testing the mean QWK of the label-free model (0.741) was close to that of the plain baseline (0.743); the two were not distinguishable on DDR and APTOS, and the baseline was higher on held-out EyePACS (0.547 vs. 0.533). The adversarial invariance block did not improve held-out accuracy. Refitting the grade thresholds on 200 images raised held-out EyePACS QWK from 0.533 to 0.621 for the label-free model and from 0.524 to 0.597 for the full model, but only from 0.547 to 0.565 for the plain baseline.

*Corresponding author.

After vector scaling, expected calibration error was 0.025–0.036 for all five CalibCause models, and deferring the least confident 20% of images raised the student's accuracy from 0.865 to 0.923.

CONCLUSION: CalibCause matches a plain ConvNeXt-Tiny in cross-site accuracy while adding explanations, label-free quality conditioning, a compact student and a usable confidence signal. It does not make grading site-invariant by itself. Part of the loss on a new site is a shift in the grade thresholds, which a small local sample partly repairs.

Keywords Diabetic retinopathy · Mixture of experts · Domain generalisation · Knowledge distillation · Calibration · Explainability

1 Introduction

Diabetic retinopathy (DR) remains one of the main causes of preventable vision loss in working-age adults, and regular fundus photography is how most screening programmes find it early. Deep learning has made automated grading of these photographs practical [1–4], and models trained on curated images now come close to human graders. Photographs from routine screening are messier, with poor illumination and blur, and a model trained mostly on clean images may behave unpredictably on them.

Image quality is also tied to disease. QGDR [5] describes this as quality–severity coupling: poorer images tend to belong to patients with more advanced disease. In their data the share of referable DR rose from 17.4% to 27.8% as image quality fell on EyeQ [6], and from 28.6% to 81.9% on DDR. A quality filter therefore discards the images most likely to come from patients who need referral. QGDR instead uses quality as a signal that conditions the grader, in line with earlier quality-aware work [7, 8].

That design leaves several practical questions open. It was trained within one data source at a time and tested on two external sets, but no training source was held out in turn, so it says little about how a model trained on several sites transfers to a new camera, clinic or grading team. Site-to-site variation is a known cause of failure in DR grading [9, 10] and in medical imaging more broadly [11]. Its multi-expert structure is harder to inspect than a single network, and a compact version was left to future work, although distillation has been used for DR classification [12]. Its quality signal came from human quality labels, which are costly to collect: even recent continuous quality scores rely on ratings by ophthalmologists [13]. Finally, DR grades depend on who assigned them: grader variability and the reference standard change what a model appears to learn [14], even under the same international severity scale [15].

We built CalibCause to address these questions in one fundus-only framework. It adds an environment-adversarial block that discourages the shared representation from encoding the data source [16]; per-expert visual explanations [17]; a label-free quality gate; a distilled single-stream student [18]; and post-hoc calibration [19] used to defer uncertain cases. We evaluated all of these against a plain ConvNeXt-Tiny baseline trained with the same recipe, on a pooled split, with each source held out in turn, and on two external datasets.

The comparison with the plain baseline shapes what we can and cannot claim. CalibCause matched it on cross-site accuracy but did not beat it, and the adversarial block did not help held-out accuracy. What it adds is what a plain classifier does not provide by itself: inspectable routing and Grad-CAM outputs, a quality signal that needs no manual labels, a student half the size of the teacher that outperformed it, and a confidence score good enough to support deferral. We also show that part of the large drop on a held-out site is a shift in where the grade boundaries fall, which can be repaired with a small local sample.

References (35)