Research map / Label-efficient and robust learning / Recognition and long-tail
CLOC: Contrastive Learning for Ordinal Classification with Multi-Margin N-pair Loss
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes CLOC, a contrastive ordinal classification method with learnable cumulative class-pair margins trained via a multi-margin n-pair loss, evaluated on five real image datasets and one synthetic biased dataset.
Problem
Ordinal classification treats all adjacent-rank errors as equally costly, ignoring that some class boundaries (e.g., pre-cancerous vs cancerous, minor vs adult) matter more.
Approach
A multi-margin n-pair contrastive loss with C-1 learnable (optionally constrained) cumulative margins between consecutive ranks, jointly with cross-entropy and trained in two phases (learn margins, then freeze them), giving flexible, controllable decision boundaries.
Key results
- CLOC reaches 0.7379 accuracy on IDRiD versus 0.6408 for the second best (MWR), and 0.6302 on Adience, outperforming all listed ordinal and contrastive baselines on all five datasets.
- On a synthetic biased IDRiD training set, CLOC with a fixed critical margin reaches 0.7087 accuracy, over 7.9% above the second best (GOL, 0.6117).
- Ablation shows learning C-1 separate margins beats a single shared learned margin or fixed margins of 1 on most datasets.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use CLOC with separately learned margins instead of the strongest listed baseline | Ordinal classification with ResNet-50 · Adience, HID, KOA, IDRiD, and BRACS test sets | accuracy: Adience: 0.6250 -> 0.6302; HID: 0.5780 -> 0.6208; KOA: 0.6439 -> 0.6673; IDRiD: 0.6408 -> 0.7379; BRACS: 0.5754 -> 0.603 | Helped |
| Use CLOC instead of the strongest listed baseline | Ordinal classification with ResNet-50 · Adience, HID, KOA, IDRiD, and BRACS test sets | mean absolute error: Adience: 0.4300 -> 0.4100; HID: 0.5500 -> 0.5534; KOA: 0.4330 -> 0.4167; IDRiD: 0.5972 -> 0.4078; BRACS: 0.7060 -> 0.705 | Mixed |
| Set all margins to 1 instead of learning separate margins (ablation) | CLOC · Adience and KOA test sets | accuracy: Adience: 0.6302 -> 0.6306; KOA: 0.6673 -> 0.6612 | No clear effect |
| Set all margins to 1 instead of learning separate margins (ablation) | CLOC · HID, IDRiD, and BRACS test sets | accuracy: HID: 0.6208 -> 0.6492; IDRiD: 0.7379 -> 0.7184; BRACS: 0.6035 -> 0.5912 | Hurt |
| Use one shared learnable value for all C − 1 margins instead of separate learnable margins (ablation) | CLOC · Adience, HID, KOA, IDRiD, and BRACS test sets | accuracy: Adience: 0.6302 -> 0.5939; HID: 0.6208 -> 0.5944; KOA: 0.6673 -> 0.6594; IDRiD: 0.7379 -> 0.7184; BRACS: 0.6035 -> 0.586 | Hurt |
| Add the second phase, freezing learned margins while refining the representation (ablation) | CLOC with C − 1 separately learned margins · Adience, HID, KOA, IDRiD, and BRACS test sets | accuracy: Adience: 0.5852 -> 0.6302; HID: 0.6028 -> 0.6208; KOA: 0.6600 -> 0.6673; IDRiD: 0.7282 -> 0.7379; BRACS: 0.5930 -> 0.603 | Helped |
| Fix the critical margin between grades 1 and 2 to a larger value | CLOC on biased IDRiD training data · IDRiD test | accuracy: 0.6602 -> 0.7087 | Helped |
| Fix the critical margin between grades 1 and 2 to a larger value | CLOC on biased IDRiD training data · IDRiD test | mean absolute error: 0.5340 -> 0.4272 | Helped |
Surprising findings
- Constraining a critical margin reduces errors at that boundary but lowers overall accuracy (e.g., KOA 0.6673 to 0.6431, HID 0.6280 to 0.5640).
Limitations
- Performance decreases on datasets with a large number of classes, possibly due to optimizing many margins.
- Margins may collapse toward zero during joint training, requiring precautionary measures and early stopping.
- Controlling critical margins trades off overall accuracy.
Experimental setup
Datasets: Adience Historical Colour Image Dating (HID) Knee Osteoarthritis (KOA) IDRiD BRACS
Benchmarks: Adience HID KOA IDRiD BRACS
Metrics: accuracy mean absolute error
Baselines: ORCNN POE GOL MWR RnC SimCLR SupCon DINO
Builds on: SupCon Rank-N-Contrast n-pair loss cross-entropy
Closest papers by meaning
- A Tale of Two Classes: Adapting Supervised Contrastive Learning to Binary Imbalanced Datasets (CVPR 2025 · similarity 0.84)
- STARC-9: A Large-scale Dataset for Multi-Class Tissue Classification for CRC Histopathology (NeurIPS 2025 · similarity 0.82)
- DyCON: Dynamic Uncertainty-aware Consistency and Contrastive Learning for Semi-supervised Medical Image Segmentation (CVPR 2025 · similarity 0.82)
- SLACE: A Monotone and Balance-Sensitive Loss Function for Ordinal Regression (AAAI 2025 · similarity 0.82)
- Interpretable Vision-Language Survival Analysis with Ordinal Inductive Bias for Computational Pathology (ICLR 2025 · similarity 0.82)
- Contrastive Learning for Clinical Outcome Prediction with Partial Data Sources (ICML 2024 · similarity 0.82)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
