Federated Retrieval Across Heterogeneous VectorDBs: HVMap Under Review
HVMap replaces corpus-wide re-embedding with learned bidirectional mappings and a fuzzy contrastive loss, making scores comparable across heterogeneous vectorDBs, at the price of dependence on structural similarity between the two spaces.
On this page
A team running 2 vector databases built with different embedding models faces one query, but the similarity scores the two systems return are not on the same scale. The usual advice is either to re-embed everything into one space, or to merge the two result lists and sort by score. Both sound reasonable; one costs a full corpus migration, the other quietly corrupts the ranking. The decision in front of that team is whether a lightweight compatibility layer can sit between the two databases instead. A paper on federated vector retrieval across heterogeneous vectorDBs [1] argues that it can, and reports the trade-off in numbers.
Two VectorDBs, Two Models: Where Heterogeneous Federated Retrieval Breaks
Production vector databases rarely live alone. A common pattern is a legacy index built with an older BERT-style encoder while new documents arrive encoded by a stronger model, with no maintenance window large enough to re-embed the old corpus. Another pattern is a single assistant that must search genomics, pharmaceutical and scientific-literature databases, each embedded by a model tuned for its own domain. The paper calls this federated retrieval across heterogeneous vectorDBs: one query, several independently built databases, different embedding models [1].
The difficulty is not connectivity. It is that three objectives pull against each other: retrieval accuracy, construction cost and query throughput. Accuracy pushes toward a single unified space; cost pushes toward leaving the corpus untouched; throughput pushes toward doing less work per query. The paper's premise is that a viable middle ground exists and had not been occupied.
Why Scores Are Not Comparable: Four Conventional Fixes and Their Costs
Vectors from two encoders are both arrays of floats, but they sit in different coordinate systems. The paper's framing is that cross-space scores are uncalibrated: merging two ranked lists and sorting by raw similarity produces unstable global rankings. In the worst case the dimensions differ, similarity cannot be computed at all, and the query fails outright. When dimensions happen to match, relevant documents from the second database are still scored low and never enter the top-K.
| Approach | Mechanism | Cost |
|---|---|---|
| MIG (migration) | Re-embeds one database with the other model, rebuilds a unified index | Corpus-wide re-embedding plus index reconstruction; migration and downtime |
| AGG (aggregation) | Alternates candidates from the two lists, then truncates to K | Assumes relevance is roughly balanced across sources; degrades under skew |
| RRF | Scores each candidate from its rank in each source list, with smoothing constant c | Does not align spaces; one query embedding per database |
| CombMNZ | Sums normalized local scores, multiplied by the number of lists containing the candidate | Same per-database query encoding overhead |
The last three are fusion routes: no data moves, but the spaces are never aligned either, and every one of them needs one query encoding per database. That is a direct throughput cost once the number of databases grows.
How HVMap Works: Bidirectional Mappings Instead of Corpus Migration
HVMap keeps native vectors and indexes in place and learns bidirectional mappings between the two embedding spaces, so scoring becomes calibrated across databases with a global ranking on top. The training objective is a fuzzy contrastive loss. Standard contrastive learning insists that this vector must match that one; across different models and domains there is real semantic drift, so hard pairing turns noise into supervision. The fuzzy variant allows one-to-many and many-to-many soft correspondence, so the mapping learns neighbourhoods rather than exact point pairs.
For more than two databases the paper adopts a hub topology with bounded depth plus batched execution, rather than learning a mapping for every pair. Pairwise mappings grow quickly with the number of databases; that is my own reading of the motivation, not a number the paper reports. HVMap is described as system-agnostic: the vector database implementation itself does not change.
The New Benchmark and Three Settings: What 3.59x, 2.01x and 0.3% Mean
Evaluation covers open-domain, cross-domain and scale-out settings; Figure 1 reports the accuracy-cost-throughput trade-off at the 1B scale. Because existing benchmarks do not cover heterogeneous cross-domain federation, the authors build one: financial, biomedical and scientific-literature domains, with LLM-generated queries, a human-validated relevant corpus set, and an independent LLM-based evaluation.
| Metric | Reported result | How to read it |
|---|---|---|
| nDCG@10 | up to 3.59x | A ceiling for the best configuration, not an average gain |
| Query throughput (QPS) | up to 2.01x | Also a ceiling, in the paper's own wording |
| Construction time | as low as 0.3% of baselines | A floor, i.e. the best case rather than a typical one |
| Scale | 1B vectors | The setting behind Figure 1 |
The ablations cover the fuzzy contrastive loss, SCORE 2 weighting, embedding-space structural similarity against mapping quality, mapping capacity and training data, retrieval sensitivity, and robustness to skewed relevance. Those are the results that decide when the method holds.
Five Questions to Ask Before You Buy
- Ask for absolute metrics, not only multipliers: measured nDCG@10, which embedding-model pair, which baselines.
- Ask for construction time in hours, plus how much training data and mapping capacity were used; the paper ablates both.
- Ask for QPS measurement conditions: concurrency, hardware, and whether the query is encoded once per database.
- Ask for the human-validated sample behind the cross-domain benchmark, and spot-check ten judgments yourself.
- Ask for a reproduction path: the paper states that code and data are public, so can it reproduce similar curves on your own pair of databases?
When This Approach Fails
First, mapping quality depends on structural similarity between the two embedding spaces. The ablation on embedding-space similarity versus mapping quality shows the mapping is more reliable when the spaces are structurally close; two spaces that share almost no structure are out of scope. Test that before negotiating multipliers.
Second, the mapping needs training data and sufficient capacity, both ablated in the paper. Little data and small capacity mean a weak mapping. That is a precondition of the route, not a tuning detail.
Third, 3.59x and 2.01x are upper-bound wording and 0.3% is lower-bound wording, all from the paper itself. Writing any of them into a contract as an SLA shifts the risk to the buyer.
Fourth, the pipeline learns mappings offline and then serves queries. If your corpus is rewritten in bulk every hour, the paper does not say how often the mapping must be retrained. Fifth, the cross-domain benchmark is author-constructed, so external validity still needs independent replication [1]. The approach does not apply when regulation or audit requires everything to collapse into a single model and a single index.
