Skip to main content
QUICK REVIEW

[Paper Review] Learning with Fantasy: Semantic-Aware Virtual Contrastive Constraint for Few-Shot Class-Incremental Learning

Zeyin Song, Yifan Zhao|arXiv (Cornell University)|Apr 2, 2023
Domain Adaptation and Few-Shot LearningComputer Science6 citations
TL;DR

This paper proposes Semantic-Aware Virtual Contrastive (SAVC), a novel method for few-shot class-incremental learning that enhances base-class separation and novel-class generalization by introducing semantic-aware virtual classes during base session training. By applying supervised contrastive learning in a fantasy space generated via pre-defined transformations, SAVC achieves state-of-the-art performance across three major FSCIL benchmarks, outperforming CE and SCL baselines by up to 11.57% in accuracy gains.

ABSTRACT

Few-shot class-incremental learning (FSCIL) aims at learning to classify new classes continually from limited samples without forgetting the old classes. The mainstream framework tackling FSCIL is first to adopt the cross-entropy (CE) loss for training at the base session, then freeze the feature extractor to adapt to new classes. However, in this work, we find that the CE loss is not ideal for the base session training as it suffers poor class separation in terms of representations, which further degrades generalization to novel classes. One tempting method to mitigate this problem is to apply an additional naive supervised contrastive learning (SCL) in the base session. Unfortunately, we find that although SCL can create a slightly better representation separation among different base classes, it still struggles to separate base classes and new classes. Inspired by the observations made, we propose Semantic-Aware Virtual Contrastive model (SAVC), a novel method that facilitates separation between new classes and base classes by introducing virtual classes to SCL. These virtual classes, which are generated via pre-defined transformations, not only act as placeholders for unseen classes in the representation space, but also provide diverse semantic information. By learning to recognize and contrast in the fantasy space fostered by virtual classes, our SAVC significantly boosts base class separation and novel class generalization, achieving new state-of-the-art performance on the three widely-used FSCIL benchmark datasets. Code is available at: https://github.com/zysong0113/SAVC.

Motivation & Objective

  • To address the poor generalization of existing few-shot class-incremental learning (FSCIL) methods due to inadequate base-class separation in representation space.
  • To investigate whether introducing virtual classes with semantic transformations can improve class discrimination and generalization in FSCIL.
  • To develop a method that enhances both intra-class compactness and inter-class separation without requiring access to future class data during base training.
  • To achieve state-of-the-art performance on standard FSCIL benchmarks by leveraging a fantasy space for contrastive learning.

Proposed method

  • Introduce virtual classes generated through pre-defined transformations (e.g., color jitter, rotation, CutMix) to expand the representation space during base session training.
  • Construct a semantic-aware fantasy space where virtual classes act as placeholders for unseen classes, enriching semantic diversity in the embedding space.
  • Apply a hybrid supervised contrastive loss combining global and local contrastive terms, with learnable coefficients α and β to balance the two components.
  • Train the backbone using a combination of cross-entropy and the proposed semantic-aware virtual contrastive loss to improve class separation.
  • Freeze the feature extractor after base training and fine-tune only the head or top layers in incremental sessions to preserve old knowledge.
  • Use t-SNE and confusion matrix visualizations to analyze representation quality and decision boundary stability.

Experimental results

Research questions

  • RQ1Can virtual classes generated via semantic transformations improve base-class separation and novel-class generalization in FSCIL?
  • RQ2Does the inclusion of a fantasy space in contrastive learning reduce overlap between old and new class embeddings compared to standard CE and SCL?
  • RQ3How do different types of transformations affect the performance of the virtual contrastive framework?
  • RQ4What is the optimal configuration of trainable layers and hyper-parameters (α, β) in the incremental fine-tuning phase?
  • RQ5To what extent does the proposed method outperform existing SOTA baselines on standard FSCIL benchmarks?

Key findings

  • SAVC achieves a 11.57% accuracy gain over the baseline CE method when fine-tuning in incremental sessions on mini-ImageNet.
  • The method improves base-class separation and reduces overlap between old and new classes, as confirmed by t-SNE visualizations on CIFAR100.
  • Using local contrastive loss (MC) yields a 10.26% performance gain, indicating that attending to local feature patterns enhances generalization.
  • The optimal hyper-parameter setting is α=0.2 and β=0.8, with the model showing robustness to hyper-parameter variations.
  • On all three benchmarks—CIFAR100, CUB200, and mini-ImageNet—SAVC achieves new state-of-the-art performance, with gains of up to 8.98% over SCL.
  • Confusion matrix analysis confirms that SAVC maintains strong performance on both base and novel classes, avoiding confusion between old and new categories.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.