Introduction
Deep learning models often suffer from catastrophic forgetting when trained on a sequence of tasks: learning new information frequently causes the model to overwrite previously acquired knowledge. While traditional approaches focus on preserving old data through replay buffers or weight regularization, Co2L (Contrastive Continual Learning) investigates whether the learning objective itself can be made more resilient.
The authors argue that standard cross-entropy loss encourages models to learn "shortcuts"—features that are sufficient for the current task but brittle when new classes appear. In contrast, contrastive learning builds a more structured representation space based on fundamental similarities and differences, which proves to be naturally more stable during sequential learning.
Proposed Framework
Co2L decouples representation learning from classification. It first learns a robust feature space and then trains a simple linear classifier. The framework introduces two primary innovations to maintain this space across tasks:
- Asymmetric Supervised Contrastive Loss ($L_{asym}^{sup}$): Standard contrastive learning pulls positive pairs together and pushes negative pairs apart. In continual learning, the replay buffer contains only a few samples from past tasks. To avoid overfitting to these limited samples, Co2L uses an asymmetric approach: only samples from the current task serve as "anchors," while buffered samples are used strictly as negatives.
- Instance-wise Relation Distillation (IRD): To prevent the feature space from drifting as new tasks are learned, Co2L employs a distillation mechanism. Rather than forcing individual feature vectors to remain identical, IRD preserves the relationships between instances in a batch. If two images were similar in the previous model, they should remain similar in the current one.
Experimental Setup
The effectiveness of Co2L was evaluated on three standard benchmarks:
- Seq-CIFAR-10: Five sequential tasks of two classes each.
- Seq-Tiny-ImageNet: Ten sequential tasks of 20 classes each.
- Rotated MNIST (R-MNIST): A domain-incremental task where digits are rotated by varying angles.
Experimental Results
Co2L consistently sets new state-of-the-art benchmarks across various datasets and buffer sizes. For instance, on Seq-CIFAR-10 with a buffer of 500 samples, Co2L achieved 74.26% accuracy, significantly outperforming the previous leading method, DER++ (72.70%).
Ablation studies further highlight the importance of IRD. In scenarios without a replay buffer, IRD alone provided a 22.40% relative improvement on Seq-CIFAR-10, demonstrating its critical role in stabilizing the representation space.
Discussion and Conclusion
The success of Co2L suggests that "stickier" features—those learned through contrastive objectives—are inherently better for continual learning. By focusing on preserving the relative structure of the feature space rather than exact coordinates, Co2L maintains high performance on past tasks while adapting to new ones.
While the method currently relies on a linear evaluation phase, future work may explore extending this framework to purely self-supervised settings, further leveraging the natural strengths of contrastive learning for autonomous, lifelong learning systems.
Summary updated