Skip to content
Open access

Metric Algebra: Embedding-Independence in Vector Databases

Sep 2026 · Proceedings of the ACM on Management of Data · 0 citations · 17 references

Abstract

Vector databases are increasingly central to retrieval applications, yet deployments remain embedding-siloed: different databases store vectors produced by different embedding models and ANN pipelines, making cross-database search ill-defined or forcing expensive re-embedding and index rebuilds. We propose metric algebra, a logical foundation for embedding-independence. It models each dataset as a metric relation, i.e., identifiers equipped with a semantic distance, and provides operators for similarity search, and, critically, a semantics-preserving Union operator for cross-embedding search. We implement metric algebra in MetricDB, which treats existing vector databases as physical vector realizations that implement metric relations, and executes Union via witness maps learned from overlap anchors. Building on this logical-physical bridge, MetricDB plans hard vs. soft execution for queries over Union under imperfect witnesses and avoids rebuilds via transformation-equivariant index compilation and merging. Experiments on benchmark workloads across heterogeneous embedding models (e.g., Mistral, GTE-Qwen2, NV-Embed-V2, OpenAI-Ada-002) demonstrate robust cross-embedding retrieval and efficient interoperability.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.