Learning with Fantasy: Semantic-Aware Virtual Contrastive Constraint for Few-Shot Class-Incremental Learning

Zeyin Song, Yifan Zhao, Yujun Shi, Peixi Peng, Liuliang Yuan +1 more
2/14/2026

No official code found. Best implementation: zysong0113/SAVC (75 stars, MIT, last commit 2024-02-24).

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 naïve 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.

View on arXivView PDF

Code Implementations(1)

zysong0113/SAVCCommunity100%
MIT

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

758PythonMar 12, 20232 years agoMIT

Similar Papers

Cite this paper

@article{song2026learning,
  title  = {Learning with Fantasy: Semantic-Aware Virtual Contrastive Constraint for Few-Shot Class-Incremental Learning},
  author = {Zeyin Song and Yifan Zhao and Yujun Shi and Peixi Peng and Liuliang Yuan and Yonghong Tian},
  year   = {2026},
  eprint = {2304.00426},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2304.00426},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.00426.svg)](https://codeofpaper.com/paper/2304.00426)

Discussion