Contrastive Learning for Semi-Supervised Deep Regression with Generalized Ordinal Rankings from Spectral Seriation
This is the official implementation of GCLSS (Generalized CLSS) and CLSS (NeurIPS 2023 "Semi-Supervised Contrastive Learning for Deep Regression with Ordinal Rankings from Spectral Seriation").
In this series of works, we have extended contrastive regression methods to allow both labeled and unlabeled data to be used in the semi-supervised setting, thereby reducing the dependence on costly annotations:
- We construct the feature similarity matrix with both labeled and unlabeled samples to reflect inter-sample relationships, and an accurate ordinal ranking can be recovered through spectral seriation algorithms;
- Labeled samples provides the regularization with guidance from the ground-truth label information, making the ranking more reliable;
- We utilize the dynamic programming algorithm to select robust features;
- The recovered ordinal relationship is used for contrastive learning on unlabeled samples;
- We provide theoretical guarantees and empirical verification through experiments on various datasets.
Implementations for the three tasks (a synthetic dataset, and two real-world datasets (AgeDB-DIR, UTKFace)) are provided in the separate folders.
We have employed four datasets to verigy our model and alongside sota methods, including IXI, AgeDB-DIR, UTKFace, and BVCC dataset.
The IXI dataset can be downloaded at https://brain-development.org/ixi-dataset/;
The AgeDB-DIR dataset can be downloaded at https://ibug.doc.ic.ac.uk/resources/agedb/;
The UTKFace dataset can be downloaded at https://susanqq.github.io/UTKFace/;
The BVCC dataset can be downloaded at https://zenodo.org/records/6572573.
The previous required files with CLSS models are shared at CLSS models
The required files with GCLSS models are also shared at GCLSS models
Links are also available in the folders for the individual tasks.
-
Environment
create a new environment
conda create -n gclss python=3.9
and install with the requirements.txt:
pip install -r requirements.txt
-
Train and Evaluation
Please run scripts in each folder with corresponding instructions.
-
Experimental results
IXI results
Synthetic dataset results
AgeDB-DIR and UTKFace datasets results
- Contact: WANG Ce ([email protected]) and DAI Weihang ([email protected])
If this code is useful for your research, please consider citing:
@inproceedings{dai2023semi,
title={Semi-Supervised Contrastive Learning for Deep Regression with Ordinal Rankings from Spectral Seriation},
author={Dai, Weihang and Yao, DU and Bai, Hanru and Cheng, Kwang-Ting and Li, Xiaomeng},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems},
year={2023}
}