This paper, presented at NeurIPS 2023, introduces a novel framework for semi-supervised deep regression. By leveraging a mathematical technique called spectral seriation, the authors find a way to use unlabeled data for contrastive learning—a feat previously thought to be restricted to classification tasks.
TL;DR
The authors propose CLSS (Contrastive Learning with Spectral Seriation), the first method to enable semi-supervised contrastive learning for regression. By recovering ordinal rankings from unlabeled feature similarities, the model can learn robust representations and improve prediction accuracy even when labeled data is scarce.
What Problem Does This Paper Address?
Contrastive learning has revolutionized deep learning by allowing models to learn from unlabeled data (e.g., SimCLR, MoCo). In classification, this is relatively straightforward: you assume two augmented views of the same image are a "positive pair."
However, regression is fundamentally different. In regression, the goal is to map inputs to a continuous scale. To learn a good feature space for regression, the distance between features should correspond to the distance between their continuous labels. If you lack labels (unlabeled data), you don't know how "far apart" two samples should be. Consequently, contrastive regression methods have historically been limited to fully labeled datasets. This is a major bottleneck in fields like medical imaging, where expert annotations (like "brain age" or "tumor size") are expensive and time-consuming to obtain.
Methods
The core innovation of CLSS is the use of Spectral Seriation to bridge the gap between unlabeled data and continuous labels.
- The Intuition: Even if a model isn't perfectly trained, its feature representations for unlabeled samples will still show some degree of similarity for samples that should have similar labels.
- Spectral Seriation: The authors use an algorithm that takes a similarity matrix of unlabeled samples and finds the best linear ordering (ranking) of those samples. This is done by calculating the Fiedler vector (the eigenvector corresponding to the smallest non-zero eigenvalue) of the Laplacian matrix derived from feature similarities.
- The CLSS Framework:
- Supervised Branch: Uses standard Mean Squared Error (MSE) and Supervised Contrastive (SC) loss on the small labeled portion of the data.
- Unsupervised Branch: For a batch of unlabeled data, the model computes a feature similarity matrix. It then applies spectral seriation to recover a "pseudo-ranking" ($R'$).
- Unsupervised Contrastive Loss ($L^{UC}$): Forces the feature similarities to align with the recovered rankings.
- Unsupervised Ranking Loss ($L^{UR}$): Forces the model’s actual scalar predictions to follow the same relative order as the recovered rankings.
- Differentiability: To make the ranking process work with backpropagation, the authors utilize a differentiable combinatorial solver.
Datasets
The authors evaluated CLSS across three distinct domains:
- Synthetic Non-linear Operator: A dataset involving the solution of stochastic partial differential equations (SPDEs), testing the model's ability to learn complex mathematical mappings.
- IXI Brain MRI: A medical dataset of 588 MRI scans used for "brain age" estimation. This represents a high-stakes real-world application where labels are scarce.
- AgeDB-DIR: A natural image dataset containing 16,488 face photographs for age estimation, specifically curated to test performance on imbalanced regression.
Key Insights and Ideas
- Rankings as a Proxy for Labels: The "aha moment" is realizing that while we can't guess the exact value of an unlabeled sample, we can often recover its relative rank compared to other samples in a batch.
- Error Correction: Spectral seriation is mathematically robust. The authors provide theoretical proofs showing that the algorithm can recover the correct ranking even if the feature similarities are noisy or corrupted, up to a certain bound.
- Dual-Purpose Supervision: The recovered rankings provide two signals: they help the "encoder" learn better features (via contrastive loss) and help the "regressor" produce more consistent values (via ranking loss).
Key Results
CLSS consistently outperformed state-of-the-art semi-supervised methods like Mean-teacher, Cross Pseudo-Label (CPS), and UCVME.
- Synthetic Data: CLSS improved the $R^2$ score by 3-4% over the next best alternative across all label-ratio settings (from 1/5 to 1/2 labels).
- Medical Imaging (IXI): On the Brain Age task, CLSS achieved a Mean Absolute Error (MAE) of 9.58 with only 1/5 of the labels, significantly better than the Supervised-only baseline (9.95) and Mean-teacher (11.23).
- Natural Images (AgeDB-DIR): CLSS maintained a lead even with extremely low label ratios (e.g., 1/30 of the data), showing its effectiveness in data-starved regimes.
Limitations and Future Work
- Computational Complexity: Calculating the similarity matrix and its eigenvalues scales quadratically ($O(N^2)$) with the number of samples. To manage this, the authors had to use relatively small sub-batches (10–32 samples) for the seriation step.
- Bootstrap Problem: The method relies on the model having a "warm start"—it needs to be able to produce somewhat meaningful feature similarities for the seriation to work. If the initial features are purely random, the recovered rankings may be inaccurate.
- Future Directions: The authors suggest exploring more efficient ways to scale spectral seriation to larger batches and applying the method to other continuous-value tasks like video-based heart rate estimation.
Summary updated