Boundary-aware Backward-Compatible Representation via Adversarial Learning in Image Retrieval

Tan Pan, Furong Xu, Xudong Yang, Sifeng He, Chen Jiang, Qingpei Guo, Feng Qian, Xiaobo Zhang, Yuan Cheng, Lei Yang, Wei Chu · DOI

Abstract

AdvBCT introduces a novel framework for upgrading image retrieval models without the need for "backfilling"—the costly process of re-indexing an entire database. By combining adversarial learning with a flexible "elastic boundary" constraint, the method ensures new models remain compatible with old data while simultaneously improving search accuracy. This approach addresses the fundamental compatibility-discrimination trade-off inherent in model upgrades.

Introduction: The Backfilling Bottleneck

In large-scale image retrieval systems, such as those used in e-commerce or facial recognition, upgrading to a superior model is a significant logistical challenge. Traditionally, deploying a new model requires "backfilling" (or "cold-refresh"): re-extracting features for every image in the gallery database, which may contain billions of entries. This process is time-consuming, expensive, and necessitates maintaining redundant systems during the transition.

The process of a compatible upgrade, illustrating how a new model can interact with an old gallery database without immediate backfilling.

Backward-Compatible Training (BCT) addresses this by ensuring that embeddings from a new model are directly comparable to those from the legacy model. However, existing BCT methods often struggle with a "compatibility-discrimination" trade-off: overly strict compatibility constraints can hinder the new model's ability to learn more discriminative features, while loose constraints lead to poor retrieval performance when querying against the old database.

The AdvBCT Framework

The proposed AdvBCT framework tackles the compatibility-discrimination trade-off through three innovative modules designed to align feature distributions while preserving local discriminability.

1. Adversarial Compatible Module

Inspired by domain adaptation techniques, this module employs a discriminator to distinguish between embeddings generated by the old and new models. Through adversarial training using a Gradient Reversal Layer (GRL), the new model is encouraged to produce a feature distribution that mimics the global distribution of the old model. This effectively bridges the "domain gap" between different model architectures or training datasets without requiring explicit point-to-point matching for every instance.

2. Boundary-aware Compatible Module

Rather than relying on rigid point-to-point alignment, which can be highly sensitive to outliers and noise, AdvBCT adopts a Point-to-Set (p2s) approach. The framework calculates cluster centers (prototypes) for the old model's classes. During training, the new embeddings are constrained to remain within a specific radius of these legacy prototypes. This ensures that the new model's features are mapped into regions of the embedding space that are compatible with the old model's classification boundaries.

3. Elastic Boundary Constraint

A core innovation of AdvBCT is the "elastic" boundary. Fixed boundaries in BCT are often too restrictive for "hard" examples or outliers, which can negatively impact the model's overall discriminative power. AdvBCT implements a boundary that can be dynamically adjusted during training via a learnable parameter. This elasticity allows the model to enforce strict compatibility where the data is well-behaved while providing the flexibility needed to learn more refined features in complex regions of the feature space.

Experimental Evaluation

The authors evaluated AdvBCT on industry-standard benchmarks, including Google Landmark v2 (GLDv2) for large-scale training, and Revisited Oxford (ROxford) and Revisited Paris (RParis) for retrieval testing. The experiments covered three critical real-world upgrade scenarios:

  • Extended-data: Increasing the volume of training data within existing classes.
  • Extended-class: Introducing entirely new categories to the system.
  • Enlarged-backbone: Upgrading the model architecture, such as moving from a ResNet18 to a ResNet50 backbone.

Key Results and Insights

AdvBCT consistently outperformed state-of-the-art methods like LCE and UniBCT across all scenarios. To measure performance, the authors utilized the $P_{\beta-score}$, a harmonic mean of compatibility (cross-model retrieval) and discrimination (self-model retrieval). In the "Extended-class" scenario, AdvBCT improved the $P_{1-score}$ by over 1% compared to previous best methods.

t-SNE visualization of old (triangles) and new (circles) embeddings, demonstrating the alignment and class separation achieved through AdvBCT.

On the RParis dataset, AdvBCT achieved a cross-test mAP (new query vs. old gallery) of 78.55%, significantly higher than the baseline BCT's 77.37%. Qualitative analysis via t-SNE (see Figure above) demonstrates that AdvBCT successfully aligns the new embeddings with the old ones while maintaining clear separation between different classes.

A key insight from the study is that aligning the entire distribution via adversarial learning is more robust than instance-level matching. Furthermore, the results suggest that compatibility constraints can act as a beneficial regularizer; in some cases, the AdvBCT model outperformed a model trained from scratch, suggesting that the "knowledge" preserved from the old model helps guide the learning of the new one.

Conclusion

AdvBCT offers a practical and robust solution for industrial image retrieval systems, enabling seamless model upgrades without the immediate need for exhaustive backfilling. By balancing global distribution alignment with local elastic boundaries, it maintains high compatibility with legacy data while pushing the state-of-the-art in retrieval performance. Future work will explore even more efficient ways to leverage old embeddings, potentially eliminating the need for the old model's parameters entirely.

Summary updated

BibTeX
@inproceedings{pan2023boundary,
  author = {Tan Pan and Furong Xu and Xudong Yang and Sifeng He and Chen Jiang and Qingpei Guo and Feng Qian and Xiaobo Zhang and Yuan Cheng and Lei Yang and Wei Chu},
  title = {{Boundary-aware Backward-Compatible Representation via Adversarial Learning in Image Retrieval}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  doi = {10.1109/cvpr52729.2023.01459},
}
Figure