Forward Compatible Training for Representation Learning

Vivek Ramanujan, Pavan Kumar Anasosalu Vasu, Ali Farhadi, Oncel Tuzel, Hadi Pouransari

Abstract

In visual retrieval systems, updating the embedding model typically requires recomputing features for every piece of data in the database—a process known as backfilling. While Backward Compatible Training (BCT) was proposed to avoid this cost by making new models compatible with old ones, it often significantly degrades the performance of the new model. We introduce Forward Compatible Training (FCT), a paradigm where the old model is prepared for future updates by learning auxiliary "side-information." By combining this side-information with a forward transformation, FCT achieves high retrieval accuracy without constraining the new model's training. We demonstrate substantial improvements over BCT across multiple datasets, including a +18.1% gain on ImageNet-1k.

Introduction: The Backfilling Challenge

Large-scale visual retrieval systems rely on embeddings to represent images. When a superior model is developed, the standard update procedure involves "backfilling": re-encoding the entire gallery with the new model. For databases containing billions of images, the computational cost and time required for backfilling are often prohibitive.

Beyond Backward Compatibility

To address the backfilling problem, researchers previously proposed Backward Compatible Training (BCT). BCT modifies the training of a new model ($\phi_{new}$) to ensure its embeddings are directly comparable to those of an older model ($\phi_{old}$). However, this approach imposes a "performance tax." Because $\phi_{new}$ is forced to remain compatible with a less capable predecessor, it cannot fully leverage its improved architecture or training data, leading to suboptimal accuracy.

Comparison of retrieval paradigms: Backfilling, BCT, and FCT.

Forward Compatible Training (FCT)

FCT shifts the focus from the new model to the old one. The core idea is to prepare for future, unknown updates during the initial training phase.

Side-Information

During the training of the old model ($\phi_{old}$), FCT simultaneously trains an auxiliary model ($\psi$) to generate side-information. This side-information captures data features that might be irrelevant for the current task but could be essential for future objectives. The authors utilize self-supervised learning (e.g., SimCLR) to ensure these auxiliary features are task-independent and robust.

The Transformation Function

When a new model is introduced, FCT learns a transformation function $h$. This function takes the old embeddings and the stored side-information as inputs and maps them into the new embedding space. Crucially, the training of $\phi_{new}$ remains entirely independent and unconstrained, allowing it to achieve its maximum potential accuracy.

Experimental Evaluation

FCT was evaluated on several benchmarks, including ImageNet-1k, Places-365, and VGGFace2. The results consistently show that FCT outperforms BCT by a wide margin.

  • Accuracy: On ImageNet-1k, FCT achieved a +18.1% improvement in retrieval accuracy over BCT.
  • Flexibility: FCT maintains compatibility even when changing architectures (e.g., ResNet to MobileNet) or loss functions (e.g., Softmax to ArcFace).
  • Efficiency: While FCT requires additional storage for side-information, it offers a significantly better accuracy-to-cost trade-off than BCT and avoids the massive computational burden of full backfilling.
Retrieval accuracy vs. computational and storage costs.

Conclusion

Forward Compatible Training represents a significant shift in how we manage model updates in large-scale systems. By proactively learning side-information, FCT enables seamless transitions to more powerful models without the performance degradation of backward compatibility or the extreme costs of backfilling. This framework provides a scalable and flexible solution for maintaining state-of-the-art performance in evolving retrieval systems.

Summary updated

BibTeX
@inproceedings{ramanujan2021forward,
  author = {Vivek Ramanujan and Pavan Kumar Anasosalu Vasu and Ali Farhadi and Oncel Tuzel and Hadi Pouransari},
  title = {{Forward Compatible Training for Representation Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.48550/arxiv.2112.02805},
}
Figure