Drift-Adapter: A Practical Approach to Near Zero-Downtime Embedding Model Upgrades in Vector Databases

Harshil VejendlaEMNLP 2025

TL;DR

Upgrading embedding models in production vector databases is a costly and disruptive process. This paper introduces Drift-Adapter, a lightweight, learnable layer that maps new query embeddings to an old model's space, enabling near-zero downtime upgrades with minimal performance loss and significantly reduced computational cost.

What Problem Does This Paper Address?

Modern AI systems heavily rely on vector databases to store and retrieve information using embeddings generated by deep learning models. As these models are continuously improved, upgrading to a new version in a production environment presents a significant challenge. The traditional approach requires re-encoding the entire corpus of data and rebuilding the Approximate Nearest Neighbor (ANN) index, a process that is computationally intensive, time-consuming, and often leads to service downtime or degraded performance. This paper tackles the problem of how to upgrade these embedding models with minimal operational disruption and cost.

Methods

The core innovation is Drift-Adapter, a lightweight transformation layer that learns to map embeddings from a new model ($f_{new}$) into the embedding space of a legacy model ($f_{old}$). This allows new queries, encoded by $f_{new}$, to be searched against the existing ANN index built on $f_{old}$ embeddings without needing to re-encode the entire database.

The authors explore three parameterizations for the adapter:

  • Orthogonal Procrustes (OP): A simple rotation to align embedding spaces.
  • Low-Rank Affine (LA): A linear transformation with a learned bias.
  • Residual MLP: A compact feed-forward network that adds a non-linear correction.

These adapters are trained on a small sample of paired old/new embeddings. Additionally, a Diagonal Scaling Matrix (DSM) is proposed as an optional component to refine adapter outputs by matching embedding variances.

Datasets

The paper evaluates Drift-Adapter on:

  • Text Datasets: AG-News, DBpedia-14, and Emotion datasets from the MTEB benchmark. For these, 1 million items were sampled from training sets to form the database.
  • Image Dataset: 1 million images randomly sampled from the LAION-400M dataset.

The model drift was simulated by upgrading from all-MiniLM-L6-v2 to all-mpnet-base-v2 for text, and from CLIP ViT-B/32 to CLIP ViT-L/14 for images. A more drastic drift scenario was simulated using GloVe embeddings as the old model and all-mpnet-base-v2 as the new model on AG-News.

Key Insights and Ideas

  • Bridging the Gap: The core idea of mapping between embedding spaces, inspired by cross-lingual and cross-domain alignment, is effectively repurposed for the practical problem of model versioning in vector databases.
  • Lightweight is Sufficient: Surprisingly, even simple linear transformations like Orthogonal Procrustes can recover a significant portion of retrieval performance, highlighting that much of the "drift" is often a smooth transformation.
  • MLP for Nuance: The Residual MLP adapter, while more complex, consistently achieves the highest performance, suggesting that a degree of non-linearity is beneficial for capturing subtle drift patterns, especially between similar transformer architectures.
  • Small Data, Big Impact: Drift-Adapter's effectiveness with a small number of paired samples (as low as 5,000 out of 1 million items) is a critical practical advantage, drastically reducing the cost and complexity of training.
  • Diagnostic Tool: The performance of the adapter (e.g., the ARR achieved) can serve as a quantitative signal for engineers to assess the severity of model drift and inform decisions about whether a full re-index is immediately necessary.

Key Results

  • High Recall Recovery: Drift-Adapter recovers 95-99% of the retrieval recall (Recall@10, MRR) compared to a full re-embedding strategy.
  • Minimal Latency: The added query latency is less than 10 µs, which is negligible in the context of typical ANN search latencies.
  • Drastic Cost Reduction: Drift-Adapter reduces recompute costs by over 100x compared to full re-indexing. Training an adapter takes minutes, while full re-embedding can take days or weeks.
  • Robustness: The adapters show robustness to varying degrees of model drift, training data size, and design choices.
  • Comparison to Baselines: Drift-Adapter significantly outperforms the "Misaligned (No Adaptation)" baseline and offers a compelling trade-off compared to "Full Re-index" and "Dual Index Serving" strategies in terms of downtime and resource efficiency.

Limitations and Future Work

  • Drift Magnitude and Type: Drift-Adapter is most effective for "smooth" drift between similar model architectures. Performance degrades with drastic changes in architecture or domain, where representational spaces become highly disparate.
  • Paired Data Dependency: The supervised training requires paired embeddings. Scenarios where the old model is unavailable or privacy concerns prevent pairing are challenging. Future work could explore transfer learning or unsupervised alignment.
  • Global vs. Local Drift: The current implementation learns a single global transformation. For datasets with heterogeneous drift across subsets, multi-adapter or mixture-of-experts systems are suggested.
  • Deferred Re-computation: Drift-Adapter defers, rather than eliminates, the need for full re-embedding if optimal performance with the new model is eventually required.
  • Scalability Validation: While projected to scale to billion-item systems, extensive real-world validation on highly distributed, large-scale deployments is beyond the scope of this study.
  • Cumulative Error: The impact of chained adaptations on error accumulation was not studied.
  • Downstream Task Impact: Evaluation focused on intrinsic retrieval metrics; the impact on final application performance needs further investigation.

Summary updated

BibTeX
@inproceedings{vejendla2025drift,
  author = {Harshil Vejendla},
  title = {{Drift-Adapter: A Practical Approach to Near Zero-Downtime Embedding Model Upgrades in Vector Databases}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure