Continual Learning for Visual Search with Backward Consistent Feature Embedding

Timmy S. T. Wan, Jun-Cheng Chen, Tzer-Yi Wu, Chu-Song Chen

Introduction

In large-scale visual search systems, image retrieval models convert images into high-dimensional embeddings. Improving these models with new data typically requires "re-extraction"—re-computing embeddings for the entire existing database using the updated model. This process is computationally prohibitive for billion-scale galleries. This paper introduces CVS (Continual-learner for Visual Search), a framework designed to learn from incremental data while maintaining "backward consistency," allowing new models to remain compatible with previously computed embeddings.

The CVS Framework

The core of CVS is the enforcement of backward consistency through a multi-faceted objective function. Unlike standard continual learning which focuses on classification, CVS optimizes for retrieval by ensuring the feature space remains stable across sessions.

The CVS framework architecture, illustrating the three loss functions used to maintain backward consistency between sessions.

The framework utilizes three primary loss functions:

  1. Intra-session Discrimination Loss ($L^c$): Establishes basic retrieval capability by teaching the model to distinguish between classes within the current training batch.
  2. Neighbor-session Model Coherence Loss ($L^m$): A local constraint that uses a triplet strategy to force the current model ($f_{j+1}$) to mimic the feature mapping of its immediate predecessor ($f_j$).
  3. Inter-session Data Coherence Loss ($L^d$): A global constraint that utilizes a small replay buffer of historical embeddings. These act as "anchors" to prevent the evolving feature space from drifting significantly over multiple sessions.

Experimental Setup

CVS was evaluated on five diverse datasets: CIFAR100, Tiny ImageNet, Stanford Dog, iNat-M, and Product-M. To better reflect real-world conditions, the authors introduced the General Incremental Setup. Unlike the traditional "disjoint" setup where classes never repeat, the General setup allows for sessions to contain both novel classes and new instances of previously seen classes.

Key Results and Discussion

CVS consistently outperforms state-of-the-art continual learning methods (e.g., LWF, EWC) and retrieval-specific baselines (e.g., BCT).

Performance comparison (Recall@1) of CVS against baseline methods across Disjoint, Blurry, and General setups.

On the Tiny ImageNet benchmark, CVS achieved an Average Recall (AR@1) of 38.78%, significantly higher than simple fine-tuning. In industrial applications, such as the Product-M dataset, CVS reached 75.47% AR@1, demonstrating its robustness in high-stakes, fine-grained retrieval tasks.

The success of CVS stems from treating embeddings as fixed anchors. By replaying embeddings rather than just raw images, the model effectively regularizes the feature space. However, a performance gap remains between incremental learning and "Joint Training" (training on all data simultaneously), suggesting that the constraints of backward compatibility eventually limit the model's peak capacity. Future research may explore more flexible consistency mechanisms to mitigate this stagnation.

Summary updated

BibTeX
@inproceedings{wan2022continual,
  author = {Timmy S. T. Wan and Jun-Cheng Chen and Tzer-Yi Wu and Chu-Song Chen},
  title = {{Continual Learning for Visual Search with Backward Consistent Feature Embedding}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure