$BT^2$: Backward-compatible Training with Basis Transformation

Yifei Zhou, Zilu Li, Abhinav Shrivastava, Hengshuang Zhao, Antonio Torralba, Taipeng Tian, Ser-Nam Lim

TL;DR

$BT^2$ (Backward-compatible Training with Basis Transformation) allows you to upgrade image retrieval models without re-encoding your entire database—a process known as "backfilling." By using learnable orthonormal transformations to add a small number of extra dimensions, $BT^2$ successfully reconciles the traditional trade-off between maintaining compatibility with old models and achieving the full performance potential of new ones.

What Problem Does This Paper Address?

In modern visual retrieval systems (like Google Lens or Pinterest search), images are converted into mathematical vectors called embeddings. When researchers develop a better model, practitioners face a massive headache: the new embeddings aren't compatible with the old ones. To upgrade, you typically have to re-process every single image in your "gallery"—which might contain billions of samples. This costly, time-consuming process is called backfilling.

Previous attempts at Backward Compatible Training (BCT) tried to train new models to "look like" old ones using special loss functions. However, this creates a performance ceiling; the new model is so busy trying to be compatible with the old, inferior model that it can't reach its own full potential. Naively adding extra dimensions to the embeddings to store "new" information also fails to solve the problem effectively.

Methods

The authors introduce Basis Transformation ($BT^2$), a method that strategically uses extra dimensions to store information that is incompatible between the old and new models.

The core innovation is the Basis Transformation (BT) layer. A BT is a learnable orthonormal transformation (parameterized as the exponential of a skew-symmetric matrix). Because orthonormal transformations preserve the dot product (and thus the cosine similarity used in retrieval), they ensure that no information is lost during the transformation.

Illustration of the $BT^2$ architecture. The backbone produces a representation that is split and transformed to match both the new model's potential and the old model's existing embeddings.

As shown in Figure 1, the architecture works by:

  1. Training a backbone to mimic an independent "new" model.
  2. Using BT layers to "force" incompatible information into a set of additional dimensions.
  3. Ensuring one branch of the output remains compatible with the old model's representation ($\phi_{old}$), while the full expanded representation ($\phi_{new}$) captures the improved performance of the new model.

Datasets

The authors evaluated $BT^2$ across several rigorous benchmarks:

  • CIFAR-100: Used for initial proof-of-concept, splitting the dataset into 50 classes for the "old" model and all 100 for the "new."
  • ImageNet-1k: A large-scale test where the old model is trained on 500 classes and the new model on all 1,000.
  • Modality Fusion: A challenging setup using CLIP text encoders as the "old" model and ViT-B16 image encoders as the "new" model.
  • Historical Evolution: A series of updates mimicking a decade of AI progress: AlexNet $\rightarrow$ VGGNet13 $\rightarrow$ ResNet50 $\rightarrow$ ViT.

Key Insights and Ideas

  • The Inherent Trade-off: The authors formalize (in Lemma 1) that forcing a new model to be backward compatible will significantly limit its potential if the embedding space isn't expanded.
  • Information Preservation via Orthonormality: By restricting transformations to be orthonormal, the model can move information around (change the basis) without destroying the underlying features. This allows the model to "hide" new, incompatible features in extra dimensions when talking to the old model, but use them when talking to itself.
  • Dimension Efficiency: You don't need a massive number of extra dimensions. Adding just 8 to 32 dimensions is often enough to bridge the gap between a ResNet and a Transformer.

Key Results

$BT^2$ consistently outperformed standard BCT and other state-of-the-art methods like "Contrast" (Regression-alleviating Compatibility Regularization).

  • CNN to Transformer: In the jump from ResNet50 to ViT on ImageNet, $BT^2$ improved backward compatibility accuracy by 12.5% over standard BCT while maintaining higher self-compatibility (see Table 4).
  • Modality Change: When bridging the gap between text-to-image (CLIP) and image-to-image retrieval, $BT^2$ was the only method that maintained rigorous backward compatibility without crashing image-to-image performance (see Table 5).
  • Sequential Updates: In the "Historical Evolution" test (Table 6), $BT^2$ successfully maintained compatibility across four generations of architectures, whereas standard BCT's performance degraded significantly by the third update.
Table 1 showing $BT^2$ outperforming baselines on CIFAR-100 data changes.

Limitations and Future Work

The primary limitation is representation growth. Because $BT^2$ relies on adding dimensions, the embedding size increases with every model update. While the authors show that this growth can be very small (e.g., +32 dimensions), it is not infinitely sustainable. Eventually, a system administrator would still need to perform a full backfill to "reset" the dimension count. The authors view $BT^2$ as a way to "buy time," allowing systems to stay updated for years before a full re-encoding becomes mandatory.

Summary updated

BibTeX
@inproceedings{zhou2022bt,
  author = {Yifei Zhou and Zilu Li and Abhinav Shrivastava and Hengshuang Zhao and Antonio Torralba and Taipeng Tian and Ser-Nam Lim},
  title = {{$BT^2$: Backward-compatible Training with Basis Transformation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2022},
}
Figure