Continual semi-supervised learning through contrastive interpolation consistency

Matteo Boschini, Pietro Buzzega, Lorenzo Bonicelli, Angelo Porrello, Simone Calderara · DOI · OpenReview

TL;DR

This paper introduces Continual Semi-Supervised Learning (CSSL), a realistic scenario where a model learns from a stream of data but only a small fraction of it is labeled. The authors propose Contrastive Continual Interpolation Consistency (CCIC), a method that uses unlabeled data to build robust features, remarkably allowing a model with only 25% supervision to outperform state-of-the-art methods trained on 100% labeled data.

What Problem Does This Paper Address?

Deep learning models are notoriously bad at "Continual Learning" (CL). When trained on a sequence of tasks, they suffer from catastrophic forgetting—the tendency to completely overwrite old knowledge when learning something new.

Most CL research assumes a "perfect world" where every single image in the stream comes with a ground-truth label. In reality, human labeling is a massive bottleneck. If a robot is learning in the wild, it sees a constant stream of video, but a human can only label a tiny fraction of those frames in real-time.

The authors identify a specific trap in this low-label regime: overfitting entangles forgetting. When labels are scarce, the model overfits on the few examples it has, creating poor internal representations. When the model tries to "replay" old data to prevent forgetting, those poor representations make the replay ineffective, leading to a downward spiral in performance.

Methods

The authors propose a new framework called Contrastive Continual Interpolation Consistency (CCIC). It builds on two existing pillars and adds a novel contrastive layer:

  1. Experience Replay (ER): The model keeps a small "buffer" of past examples to revisit periodically, preventing it from forgetting old tasks.
  2. MixMatch (Consistency Regularization): For unlabeled data, the model creates multiple "augmented" versions of the same image and forces itself to produce consistent predictions for all of them. It also uses MixUp (interpolating between two images) to smooth out the decision boundaries.
  3. Contrastive Mining (The Secret Sauce):
    • Unsupervised Mining: Even if we don't know the class of an unlabeled image, we know which task it belongs to. CCIC uses a contrastive loss to push the representations of images from different tasks away from each other in feature space.
  4. Supervised Mining: For labeled data, it pulls images of the same class closer together.
  5. k-Nearest Neighbors (kNN) Inference: Instead of using a standard linear layer for classification (which is prone to forgetting), the model uses a kNN classifier at the end. This decouples feature learning from the final classification decision.

Datasets

The researchers evaluated their method on three standard computer vision benchmarks, modified for the continual learning "split" format:

  • Split SVHN: The Street View House Numbers dataset, split into five sequential binary tasks.
  • Split CIFAR-10: Five tasks, each introducing two new classes.
  • Split CIFAR-100: A much harder benchmark consisting of ten sequential tasks, each with ten classes.

Key Insights and Ideas

  • Labels are not the only source of truth: The most clever insight is that task boundaries provide a "weak" form of supervision. If Task 1 was "Cats vs. Dogs" and Task 2 is "Cars vs. Planes," we know for a fact that an unlabeled image from Task 2 cannot be a Cat or a Dog. CCIC exploits this to organize its feature space without needing explicit labels.
  • Quality over Quantity: The paper challenges the assumption that more labels always equal better performance in CL. Because of catastrophic forgetting, a model can actually perform better by using 25% of labels wisely (with consistency and contrastive losses) than by using 100% of labels with a standard algorithm that forgets quickly.
  • Decoupling is Key: By using a kNN classifier, the model avoids the "weights drift" that happens in the final layer of a neural network as new classes are added.

Key Results

The results are striking. On the Split CIFAR-10 benchmark:

  • Standard Experience Replay (ER) with 100% labels achieves about 62.2% accuracy.
  • The proposed CCIC with only 25% labels achieves 84.7% accuracy.

Even at extreme levels of label scarcity (0.8% labels), CCIC maintains high performance (e.g., 55.2% on CIFAR-10), while traditional methods like iCaRL or DER collapse to near-random or significantly lower accuracies.

Limitations and Future Work

  • Task Boundaries: CCIC relies on knowing when one task ends and another begins to perform its "Unsupervised Mining." In a truly "task-free" environment where the data distribution shifts gradually without clear boundaries, this specific contrastive loss might need adjustment.
  • Computational Overhead: Using MixMatch and multiple augmentations per image increases the training time per sample compared to simple supervised learning.
  • Memory Buffer: Like most replay-based methods, it still requires storing a portion of raw data, which might raise privacy concerns in certain applications (e.g., medical data or private surveillance).

The authors suggest that future work could explore more complex "mining" strategies to further reduce the reliance on any labels at all, moving closer to fully self-supervised continual learning.

Summary updated

BibTeX
@article{boschini2021continual,
  author = {Matteo Boschini and Pietro Buzzega and Lorenzo Bonicelli and Angelo Porrello and Simone Calderara},
  title = {{Continual semi-supervised learning through contrastive interpolation consistency}},
  journal = {Pattern Recognition Letters},
  year = {2021},
  doi = {10.1016/j.patrec.2022.08.006},
}
Figure