Contrastive Order Learning: A General Framework for Ordinal Regression
Abstract
We propose contrastive order learning (ConOrd), a contrastive learning framework for ordinal regression that integrates the strengths of contrastive learning and order learning. While contrastive learning effectively leverages all samples in a batch, it typically ignores the inherent ordering among rank labels. Conversely, order learning explicitly models label ordinality but often relies on local, margin-based comparisons, limiting its ability to capture global ordinal structure. ConOrd addresses these limitations by introducing a contrastive order loss with soft affinity and disparity weights based on rank differences, enabling fine-grained modeling of ordinal relationships across all sample pairs within a batch. Extensive experiments on a range of ordinal regression tasks, including facial age estimation, blind image quality assessment, and blind video quality assessment, demonstrate that ConOrd consistently achieves state-of-the-art performance and generalizes well across diverse ordinal regression scenarios. The source code is available at https://github.com/cwlee00/ConOrd.
Lay Summary
Many real-world AI systems need to predict values that have a natural order, such as a person’s age from a face image, the quality of an image, or the quality of a video. This is harder than ordinary classification because nearby labels, such as ages 24 and 25, can look very similar, while far-apart labels should clearly be treated differently. Existing methods often either compare only a few examples at a time or simplify ordered differences into hard “similar” or “different” decisions. We propose Contrastive Order Learning, or ConOrd, a training method that teaches a model to place examples with similar ranks close together and examples with very different ranks far apart. Instead of making hard positive-or-negative decisions, ConOrd softly weighs every pair of training examples according to how far apart their labels are. This allows the model to use richer information from each training batch while preserving the ordering among labels. Across age estimation, image quality assessment, and video quality assessment benchmarks, ConOrd improves prediction accuracy over previous methods. This approach can help build more reliable AI systems for tasks where “how much more” or “how much less” matters, not just which category an example belongs to.