Preserving Ordinality in Diabetic Retinopathy Grading through a Distribution-Based Loss Function

Publication date

2026

Authors

Stelter, Lena
Corbetta, ValentinaISNI 0000000518030731
Lakbir, SoufyanORCID 0000-0002-8521-4408ISNI 0000000503983038
Beets-Tan, Regina
Cruz, Ricardo PM
Cardoso, Jaime S
Silva, WilsonORCID 0000-0002-4080-9328ISNI 0000000518163972

Editors

Advisors

Supervisors

DOI

Document Type

/dk/atira/pure/researchoutput/researchoutputtypes/contributiontojournal/conferencearticle
Open Access logo

License

cc_by

Abstract

Diabetic Retinopathy (DR) is a neurovascular complication of diabetes and the leading cause of blindness in adults in developed countries. Because DR progresses through ordered severity levels, its grading is naturally an ordinal classification problem. Yet, most deep learning methods treat it as a categorical task, disregarding the inherent class order and worsening performance under class imbalance. In this work, we introduce a novel ordinal loss function that emphasizes the predictive tendencies of the whole model output rather than the class output probabilities individually. This design promotes unimodal predictions aligned with the underlying severity scale and is particularly robust to class imbalance. To place our method in context, we also evaluate a range of existing ordinal approaches on five publicly available DR datasets. with cross-entropy serving as a nominal baseline. Extensive experiments demonstrate that our proposed loss function consistently preserves the ordinal structure of DR grades, even under severe imbalance, outperforming both nominal and alternative ordinal formulations. The code is publicly available at https: //github.com/Trustworthy-AI-UU-NKI/ Ordinal-DR-Grading.

Keywords

Software, Control and Systems Engineering, Statistics and Probability, Artificial Intelligence, SDG 3 - Good Health and Well-being

Citation

Stelter, L, Corbetta, V, Lakbir, S, Beets-Tan, R, Cruz, R PM, Cardoso, J S & Silva, W 2026, 'Preserving Ordinality in Diabetic Retinopathy Grading through a Distribution-Based Loss Function', Proceedings of Machine Learning Research, vol. 307, pp. 388-414. < https://proceedings.mlr.press/v307/stelter26a.html >