Abstract
Self-supervised learning, particularly contrastive learning, has emerged as a powerful technique for training deep learning models without extensive manual labeling. However, standard contrastive frameworks often struggle with medical imaging data due to domain-specific challenges like the "false negative" problem in longitudinal studies. This paper introduces a metadata-enhanced (ME) approach that utilizes clinical metadata—patient IDs and scan timestamps—to refine the learning signal. Our results show that ME-pretrained models outperform massive foundation models while requiring up to 100x fewer labeled examples for diagnostic tasks.
Introduction
Developing proficient AI models for diagnosing conditions like Age-related Macular Degeneration (AMD) typically requires thousands of expert-labeled Optical Coherence Tomography (OCT) scans. Contrastive learning offers a self-supervised alternative, where models learn by identifying similarities between augmented versions of the same image ("positives") and differences between distinct images ("negatives").
Despite its success in general computer vision, standard contrastive learning faces two significant hurdles in retinal imaging:
- The Grayscale Constraint: Common data augmentations like color jittering are inapplicable to grayscale OCT scans.
- The False Negative Problem: In longitudinal datasets, multiple scans of the same eye taken at different times are anatomically similar. Standard frameworks treat these as "negatives," forcing the model to distinguish between nearly identical images, which introduces noise and degrades performance.
Methods
We propose Metadata-Enhanced (ME) variants of the SimCLR and BYOL frameworks. The core innovation lies in using clinical metadata to redefine image relationships during pretraining.
The ME approach categorizes image pairs based on three criteria:
- Positive Pairs: Two different scans of the same eye are treated as positives if they were captured within a defined temporal window ($\delta_T$, e.g., 1 year). This allows the model to learn natural anatomical variations.
- Negative Pairs: Only scans from different patients are considered negatives.
- Unknown Pairs: Scans from the same patient but different eyes, or scans separated by a large time gap, are excluded from the loss calculation to avoid ambiguous signals.
Datasets
The methodology was validated using two large-scale longitudinal datasets from the PINNACLE project:
- Southampton Eye Unit: 48,825 scans from 3,498 patients.
- Moorfields Eye Hospital: 121,602 scans from 3,844 patients.
These datasets provide a rich temporal history, with patient follow-ups spanning several years, making them ideal for testing metadata-driven learning.
Key Insights and Ideas
The primary advantage of this approach is that clinical metadata is essentially a "free lunch"—it is collected automatically during routine care. By leveraging this data, we transform unlabeled datasets into weakly supervised ones.
As illustrated above, the "False Negative Trap" occurs when standard learning treats longitudinal scans of the same patient as negatives. By correcting these labels, the model's internal representations become significantly more robust. Furthermore, our ME-ResNet-50 model matched or exceeded the performance of RETFound, a foundation model with 13x more parameters trained on 15x more data, highlighting that domain-specific training logic can be more impactful than sheer scale.
Key Results
- Superior Performance: ME-BYOL outperformed standard methods and the RETFound model in five out of six image-level diagnostic tasks.
- Label Efficiency: For AMD staging, the ME model required 100x fewer labeled images to achieve parity with the foundation model.
- Low-Data Regime King: The benefits were most pronounced when very few labels were available, making this a vital technique for rare diseases or settings where expert annotation is expensive.
- Temporal Sensitivity: A 1-year time window ($\delta_T$) was found to be optimal, providing the most effective "natural" augmentations for the model.
Conclusion and Future Work
While highly effective for image-level classification and diagnosis, the ME approach showed limited gains for pixel-level tasks like retinal layer segmentation. Future research will explore more flexible, patient-specific temporal windows to account for varying rates of disease progression. Nonetheless, metadata-enhanced contrastive learning represents a significant step toward more efficient and accurate medical AI.
Summary updated