Look at What Matters: Learning Lesion Prototypes from Severity Labels for Domain-Generalized Diabetic Retinopathy Grading

Ziyang Zhang, Juming Xiong, Yanfan Zhu, Yuechen Yang, Junchao Zhu, Zhengyi Lu, Chongyu Qu, Yiming Zhong, Yalin Zheng, Yuankai Huo, He ZhaoarXiv 2026

TL;DR

Deep learning models diagnosing eye disease often fail in new hospitals because they cheat—latching onto camera quirks and image edges rather than actual medical symptoms. This paper introduces Look at What Matters (LWM), a framework that forces a neural network to base its diagnoses strictly on visual "prototypes" of retinal lesions, learned using only overall severity scores without a single pixel-level annotation. By structurally cutting off the model's ability to use global background shortcuts, it generalizes dramatically better to unseen clinics and messy, degraded images.

What Problem Does This Paper Address?

Diabetic retinopathy (DR) is a leading cause of blindness, graded on a scale from 0 (healthy) to 4 (proliferative) based on retinal photographs. While deep learning excels at grading DR on familiar datasets, performance often tanks when deployed in a new hospital—a classic domain generalization problem caused by differing cameras, lighting, and demographics.

Models stumble because standard classifiers exploit spurious correlations (like dataset-specific color casts or border artifacts) rather than true pathology. Even models designed to learn localized "prototypes" (reusable visual templates) tend to fire diffusely across healthy tissue if left unconstrained, or rely on a parallel global feature pathway that bypasses the prototypes altogether. Meanwhile, training models on pixel-level lesion masks isn't scalable because expert pixel annotations are extraordinarily expensive to collect. The authors ask: Can we force a model to find lesions using only cheap, image-level severity grades, and make those lesions the sole bottleneck for its final decision?

Figure 1. Illustrative motivation for lesion grounded prototype learning on unseen domains. Unconstrained prototype responses can be diffuse, whereas our learned responses are more localized around retinal lesions in these examples. The two most activated prototypes are shown for each method. Pixel annotations are high- lighted only for visualization and are never used for training.

Methods

LWM pairs a standard Swin-T backbone (extracting fine and coarse spatial features) with four clever, pathology-grounded mechanisms:

Figure 2. Overview of the proposed LWM framework for domain-generalized DR grading.
  • Competitive Prototype Assignment & Clinical MIL: At both feature scales, learnable "lesion" and "background" prototypes compete in a zero-sum game (via softmax) to claim every spatial patch. Using Multiple Instance Learning (MIL)—treating an image as a bag of patches—clinical rules provide weak supervision: Grade 0 images must suppress lesion prototypes, while Grade $\ge 2$ images must activate them. Grade 1 images are excluded from bag labels because tiny microaneurysms can vanish at feature-map resolution.
  • Strict Additive Ordinal Bottleneck: There is no global feature classifier. The presence scores of the 14 lesion prototypes are fed into a tiny, 19-parameter additive ordinal regression head. Because disease grades are ordered, each prototype adds a positive weight toward pushing the score over sequential severity thresholds.
  • Lesion Evidence Preservation: To survive blurry or noisy scans, an Exponential Moving Average (EMA) "teacher" model views a clean image while the "student" views a degraded version (blur, noise, low-res), forcing feature alignment specifically anchored at regions where lesion prototypes fire.
  • Spatial Shortcut Mitigation: Models love memorizing fixed $(x,y)$ coordinates (like the edge of the eyeball). LWM tracks historical activation coordinates across batches and penalizes prototypes that stubbornly fire in the exact same spots across different patients.

Datasets

The authors evaluate LWM using six public color fundus datasets standardized to the 5-stage DR scale: FGADR, APTOS, DDR, IDRiD, Messidor-2, and DeepDRiD.

No new datasets are introduced. Evaluation follows a strict leave-one-domain-out (LODO) protocol: training on five datasets using only image-level severity grades, and testing on the sixth unseen dataset. Pixel-level lesion masks (available in DDR, IDRiD, and FGADR) are kept strictly locked away for post-hoc evaluation.

Key Insights and Ideas

  • Less capacity in the head means better generalization: Swapping the tiny 19-parameter additive ordinal head for a flexible MLP—using the exact same prototype inputs—causes generalization performance (QWK) to drop sharply from 0.761 to 0.715. Restricting how evidence combines prevents the head from re-inventing domain-specific shortcuts.
  • True causal interpretability: Because the grading head is purely additive, you can inspect the exact percentage a specific lesion cluster contributed to a patient's diagnosis. Intervening at test time by zeroing out the top 7 contributing prototypes collapses grading performance to zero, proving the model genuinely relies on them.
Visualizing fine and coarse prototype activations alongside their exact mathematical contribution to the predicted DR grade.
  • It works as a universal plug-in: The authors bolted their severity-guided supervision onto five existing prototype architectures (like ProtoPNet and PIP-Net). Across the board, the proportion of prototypes actually responding to real lesions jumped from 5.4% to 68.8%, and average grading kappa leaped from 0.355 to 0.624.

Key Results

  • State-of-the-Art Generalization: Across the six unseen domains, LWM achieves a mean Quadratic Weighted Kappa (QWK, an ordinal accuracy metric) of 0.761, beating the strongest general domain-generalization baseline (VREx, 0.725) by 0.036, the best DR-specific baseline (EvidOrd, 0.723) by 0.038, and standard Swin-T ERM (0.710) by 0.051. It also leads in accuracy (0.618) and macro F1 (0.511).
  • Zero-Annotation Localization: Despite never seeing a bounding box or mask, LWM's prototypes localize tiny microaneurysms on unseen DDR and IDRiD datasets with Average Precision around 0.42 and 0.61, vastly outperforming Grad-CAM heatmaps from competing models (which hover near 0.10).
  • Degradation Robustness: Under synthetic blur and half-resolution tests, LWM's QWK barely flinches (dropping just 0.004 and 0.003, respectively), whereas standard ERM drops by 0.053 and 0.059.

Limitations and Future Work

While a dedicated "Limitations" section is not explicitly separated in the paper, the authors note two concrete constraints in their methodology and analysis:

  • Unresolved Grade 1 Lesions: Subtle microaneurysms in mild DR (Grade 1) can be lost at downsampled feature-map resolutions, requiring the authors to exclude Grade 1 images from positive/negative MIL bag supervision.
  • Evaluation Sensitivity to Annotation Style: On the FGADR dataset, differences in how human experts annotated small lesions complicated direct pixel-level localization comparisons.

Explicit directions for future work are not discussed in the paper beyond establishing pathology-grounded decision-making as an effective path for generalizable medical AI.

Summary updated

Abstract

Deep learning models for diabetic retinopathy (DR) grading often generalize poorly to unseen imaging domains, in part because predictions may exploit correlations specific to source datasets rather than retinal pathology. We address this challenge by constructing grading decisions from lesion evidence learned using only image severity labels. Clinical implications of DR grades provide multiple instance constraints that guide competitive learning of lesion and background prototypes at multiple scales. An additive ordinal scoring model then predicts severity exclusively from individual lesion prototype responses, explicitly connecting learned evidence with grading decisions without a global feature classification pathway. To improve the reliability of this evidence, we introduce teacher guided preservation under image degradations and spatial regularization against persistent coordinate preferences. Across six public DR datasets under a leave one domain out protocol, our method attains a mean quadratic weighted kappa of 0.761, outperforming the strongest competing method by 0.036. Localization and prototype removal analyses show that the learned responses align with retinal lesions and contribute to grading decisions. Experiments across five other prototype architectures and under image degradations further demonstrate the generality and robustness of the approach.
BibTeX
@misc{zhang2026look,
  author = {Ziyang Zhang and Juming Xiong and Yanfan Zhu and Yuechen Yang and Junchao Zhu and Zhengyi Lu and Chongyu Qu and Yiming Zhong and Yalin Zheng and Yuankai Huo and He Zhao},
  title = {{Look at What Matters: Learning Lesion Prototypes from Severity Labels for Domain-Generalized Diabetic Retinopathy Grading}},
  year = {2026},
  eprint = {2611.33671},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33671},
}
Figure