Retinal fundus images frequently carry more than one disease, and public fundus datasets are heterogeneous and severely long-tailed. Clinical triage suggests a staged design, in which a screening gate, a disease-group router and group-specific classifiers operate in sequence, but it is unclear whether this hierarchy earns its complexity. We present a controlled comparison of three architectures on a unified 39-target label space built from RFMiD 1.0, RFMiD 2.0 and ODIR-5K (12,652 images): (i) a three-stage gated cascade of eight models, (ii) a flat model with 39 independent sigmoid outputs, and (iii) a label-correlation model that replaces the flat linear head with 39 learned label queries and a two-layer transformer decoder. All three share one Swin-V2-B backbone, one preprocessing pipeline and one training protocol, so differences are attributable to the architecture. Staging offers no consistent advantage: tracing every missed disease instance to the stage that lost it shows that the two coarse gates discard 34.2% of true instances while the fine-grained classifiers lose only 6.7%, and the gates' hard zeros depress the cascade's macro-AUC to 0.747. Label-correlation modeling gives the largest single gain, raising the detection rate from 0.621 to 0.682 (0.689 with test-time augmentation). Blending the flat and label-correlation models under four-view test-time augmentation is the best configuration on six of eight metrics (exact match 0.694, micro-F1 0.678, macro-F1 0.456, macro-AUC 0.972). On definition-matched class subsets it matches or exceeds four recent studies on macro- and micro-F1, most clearly on low-support pathologies. We also show that ensembling a gated cascade with continuous-output models is harmful, and that per-source negative sampling is needed to remove a dataset shortcut that otherwise yields a spurious AUC of 1.000.
Figures & tables
Source
Train
Val
Test
Native labels
ODIR-5K (per eye) [ 7 ]
6,092
861
1,642
8 categories + keywords
RFMiD 1.0 [ 4 ]
1,920
640
640
46 conditions
RFMiD 2.0 [ 6 ]
508
177
172
49 conditions
Merged
8,520
1,678
2,454
39 scored targets
of which healthy
3,652
617
1,005
TABLE I: Merged dataset. Each source keeps its official split.
Stage 2
Stage 3
Group
Diseases
Train
AUC
AP
AUC
AP
G1 Vascular
DR HR HTN BRVO CRVO TV CWS PRH MCA
2,554
.970
.969
.971
.673
G2 Exudative
ARMD DN EDN CSR CME RPEC MHL ERM PT
698
.932
.775
.926
.582
G3 Optic disc
ODC GLA ODP ODE AION TD ST
806
.902
.745
.942
.660
G4 Structural
MYA TSLN LS RT RD CF
694
.978
.933
.983
.919
G5 Media
MH CAT
656
.969
.874
.983 †
.948 †
TABLE II: Disease groups, training images per group and validation performance of the Stage-2 router (per group) and the Stage-3 classifiers (macro over the group).
Fig. 1: The four systems compared. (A) Healthy images exit at Stage 1; unhealthy images are routed to every group that fires, and each routed group’s classifier makes the fine-grained call. (B) One linear head predicts all 39 targets. (C) 39 label queries attend to the image tokens and to each other. (D) The best configuration blends (B) and (C) under four-view TTA.
Model
Out.
Images
LR
Batch
Ep.
Pat.
Monitor
Stage 1
2 s
8,520
10−5
8
60
8
AUC
Stage 2
7
4,868
2⋅10−5
8
30
7
macro-AUC
Stage 3 ( × 6)
2–9
162–2,554
2⋅10−5
8
30
7
macro-AP
Flat
39
8,520
2⋅10−5
8
30
7
macro-AP
Label-corr.
39
8,520
2⋅10−5
16
25
6
macro-AP
TABLE III: Training settings. All models: Swin-V2-B at 384 px, AdamW, weight decay 10−2 , warm-up then cosine decay, batch size 4 with gradient accumulation (Batch: effective batch). s Softmax; all other heads are sigmoid.
Threshold τ1
.10
.20
.30
.50
.70
.90
Unhealthy recall
.896
.876
.862
.845
.825
.770
Healthy recall
.799
.853
.887
.912
.940
.968
Accuracy
.861
.867
.871
.870
.867
.843
TABLE IV: Stage-1 operating point on validation (1,061 unhealthy, 617 healthy images).
Stage 1 accuracy / AUC
.852 / .928
Stage 1 sensitivity / specificity
.795 / .933
Diseased images rejected at Stage 1
297 of 1,449
Stage 2 macro-AUC on received images
.955
Exact group set / exact disease set
.732 / .687
Images: correct healthy / exact set / partial
942 / 744 / 213
Images: total miss / false alarm
492 / 63
TABLE V: Three-stage cascade on the test split ( n=2,454 ), all upstream errors propagated.
Fig. 2: Loss cascade: the stage at which each true disease instance of the test split is lost. The two coarse gates account for 34.2% of all instances.
Image
Truth
Cascade
Flat
4719_right
DR
exits at Stage 1 ( s1=0.24 ): DR ×
DR ×
rfmid_1_20
MHL, TSLN, LS
G2 not routed: MHL × ; TSLN × at Stage 3; LS ✓; DR FP
LS ✓; MHL × ; TSLN ×
3903_left
healthy
s1=0.61 , routed to G3: GLA FP
GLA FP
rfmid_1_240
TSLN, MH
TSLN ✓, MH ✓
TSLN ✓, MH ✓
2322_right
CAT
CAT ✓
CAT ✓
TABLE VI: Case studies on test images (✓ found, × missed, FP false positive).
Configuration
Exact
Jaccard
micro-F1
macro-F1
F1 well
macro-AUC
macro-AP
Detection
1
Flat baseline
.6789
.7229
.6642
.4426
.5767
.9430
.5048
.6207
2
Flat + TTA × 4
.6817
.7248
.6637
.4420
.5707
.9470
.5144
.6056
3
Flat + TTA × 4 + re-tuned thresholds
.6764
.7273
.6653
.4444
.5748
.9470
.5144
.6492
4
Three-stage cascade
.6870
.7278
.6495
.3917
.5248
.7467 ∗
.3713 ∗
.5939
5
Cascade + flat ensemble ( w=0.5 )
.6817
.7248
.6543
.4154
.5615
.9500
.5213
.5934
6
Label-correlation
.6679
.7239
.6577
.4518
.5573
.9662
.4599
.6818
TABLE VII: Ablation on the test split (2,454 images, 39 targets). All thresholds and blend weights are selected on validation. F1 well : macro-F1 over the 23 targets with ≥10 test positives. Best value per column in bold.
Fig. 3: Ablation at a glance (values of Table VII ). The shaded row is the best configuration; the label-correlation rows carry the highest detection.
Fig. 4: Test F1 for the 16 most frequent targets (number of test positives under each code).
Target
n
Cascade
Flat
Best
AP
Thr.
Target
n
Cascade
Flat
Best
AP
Thr.
DR
630
.762
.778
.785
.880
.70
RT
13
.316
.375
.421
.367
.35
ARMD
112
.594
.627
.650
.657
.40
CRVO
11
.632
.667
.667
.669
.72
MH
111
.764
.745
.745
.854
.90
CME
10
.286
.444
.588
.636
–
MYA
105
.802
.812
.838
.902
.68
TV
8
.000
.182
.235
.276
–
ODC
98
.532
.571
.627
.687
.80
CWS
8
.154
.400
.500
.363
–
CAT
95
.856
.829
.840
.922
.55
TD
8
.375
.182
.154
.211
–
TABLE VIII: Per-target test results, ordered by number of test positives ( n ). F1 of the three-stage cascade (native decisions), the flat model and the best configuration (flat + label-correlation ensemble + TTA); AP and decision threshold of the best configuration (“–”: default 0.5, fewer than ten validation positives). Best F1 per target in bold.
Flat
Three-stage cascade
Source
n
macro-F1
Exact
macro-F1
Exact
Detection
ODIR-5K
1,642
.625
.746
.614
.757
.611
RFMiD 1.0
640
.375
.566
.335
.567
.602
RFMiD 2.0
172
.319
.459
.272
.465
.447
TABLE IX: Test performance by source dataset.
Study
Data
n
macro-F1
micro-F1
macro-AP
C-Tran [ 8 ]
MuReD
15
.657 / .638
–
.704 / .685 a
Dual CNN [ 12 ]
MuReD
15
.657 / .403
.726 / .548
.704 / .582 b
ASL cascade [ 13 ]
RFMiD
26
.478 / .476
.702 / .626
.530 / .539
12 models [ 11 ]
RFMiD
26
.478 / .340
.702 / .509
–
a Averaged over the comparator’s full label set. b Micro PR-AUC. For [ 11 ] , the best of twelve models per metric.