Abstract
Continual learning in visual retrieval tasks faces the challenge of catastrophic forgetting, where updating a model on new data degrades its ability to represent previously learned features. This paper proposes Contrastive Supervised Distillation (CSD), a training procedure that leverages label information within a contrastive distillation framework. By treating the previous model's features as anchors, CSD preserves discriminative feature space geometry without requiring old data. Experiments on CIFAR-100, CUB-200, and Stanford Dogs demonstrate that CSD effectively balances plasticity and stability, outperforming existing distillation methods in sequential visual search tasks.
Introduction
Deep learning models are highly effective at visual retrieval when trained on static datasets. However, real-world applications often involve streaming data where models must be updated sequentially. A major hurdle in this setting is catastrophic forgetting: as a model learns a new task (Task B), its weights shift such that it "forgets" how to effectively represent features from a previous task (Task A).
While extensively studied in classification, this paper focuses on continual representation learning for visual search. The goal is to map images into a high-dimensional space where semantic similarity corresponds to spatial proximity. Feature forgetting in retrieval is distinct from classification and necessitates specialized techniques that maintain a discriminative feature space over time.
Methodology
The authors introduce a teacher-student framework to mitigate forgetting. The "teacher" is the frozen model from the preceding training step, while the "student" is the model being updated with new data.
The training objective minimizes a total loss composed of two primary components:
- Plasticity Loss: Employs standard Cross-Entropy and Triplet Loss to ensure the student effectively learns new incoming data.
- Stability Loss: Combines standard Knowledge Distillation (KD) with the proposed Contrastive Supervised Distillation (CSD).
CSD operates directly on the feature space rather than output logits. It utilizes the teacher’s feature vectors as fixed anchors. For a specific class, student features are pulled toward teacher features of the same class (positives) and pushed away from teacher features of different classes (negatives). This ensures the preserved "memory" remains class-discriminative.
Experimental Setup
CSD was evaluated on three widely used benchmarks:
- CIFAR-100: 60,000 images across 100 classes, split into 2, 5, or 10 sequential tasks.
- CUB-200: A fine-grained dataset containing 200 bird species.
- Stanford Dogs: A fine-grained dataset featuring 120 dog breeds.
Fine-grained datasets are particularly relevant for visual search, as they require the model to distinguish between very similar categories (e.g., different species of sparrows).
Results and Discussion
CSD consistently outperformed state-of-the-art methods like Learning without Forgetting (LwF) and MMD-based alignment. On CIFAR-100 (2-task split), CSD achieved an average Recall@1 of 63.4%, compared to 61.7% for LwF and 50.8% for simple fine-tuning.
Key insights from the evaluation include:
- Label-Aware Distillation: Unlike standard KD, CSD uses labels to structure the distillation process, ensuring that the preserved feature geometry remains discriminative.
- Stability Over Time: As shown in the CIFAR-100 results, CSD maintains stable performance on initial tasks even as numerous subsequent tasks are added, whereas other methods tend to degrade rapidly.
- Fine-grained Success: On the CUB-200 dataset, CSD nearly matched the performance of "Joint Training" (the theoretical upper bound), achieving 78.5% average Recall@1 vs. Joint Training's 78.7%.
Conclusion
Contrastive Supervised Distillation provides a robust mechanism for continual representation learning by distilling class-discriminative features. While highly effective on fine-grained data, a performance gap remains on coarser datasets like CIFAR-100 due to higher inter-class diversity. Future work may explore CSD in self-supervised settings to remove the dependency on ground-truth labels for new data and optimize the computational overhead associated with contrastive losses.
Summary updated