Abstract
This paper studies the minimal dimension required to embed subset memberships ($m$ elements and ${m\choose k}$ subsets of at most $k$ elements) into vector spaces, denoted as Minimal Embeddable Dimension (MED). The tight bounds of MED are derived theoretically and supported empirically for various notions of "distances" or "similarities," including the $\ell_2$ metric, inner product, and cosine similarity. In addition, we conduct numerical simulation in a more achievable setting, where the ${m\choose k}$ subset embeddings are chosen as the centroid of the embeddings of the contained elements. Our simulation easily realizes a logarithmic dependency between the MED and the number of elements to embed. These findings imply that embedding-based retrieval limitations stem primarily from learnability challenges, not geometric constraints, guiding future algorithm design.
Introduction: The Geometric Bottleneck Myth
Embedding-based retrieval (EBR) is the cornerstone of modern search and recommendation systems. By representing items and queries as vectors, we can efficiently find the "best" items using nearest neighbor search. However, a persistent concern has been the "geometric bottleneck": how many dimensions ($d$) are actually needed to ensure perfect retrieval of the top-$k$ items as the database size ($m$) grows?
Previous empirical studies suggested that $d$ must grow polynomially with $m$ (e.g., $d \propto m^{1/3}$). This paper challenges this pessimistic view, proving that for a universe of $m$ elements, a vector space of dimension $2k$ is theoretically sufficient to retrieve any subset of size $k$, regardless of $m$. The authors distinguish between approximability (existence of a valid configuration) and learnability (the ability of optimizers to find it).
Theoretical Framework and Methods
The authors define the Minimal Embeddable Dimension (MED) as the smallest $d$ where $m$ elements can be "shattered" such that every possible subset of size $k$ is uniquely retrievable. They analyze two primary settings:
- Standard Setting (MED): Item and query vectors are unconstrained. Using tools from combinatorial geometry, specifically Cyclic Polytopes, the authors prove existence bounds.
- Centroid Setting (MED-C): A more realistic constraint where a query vector for a subset must be the centroid (average) of its constituent item vectors.
The study employs VC-dimension for lower bounds and the probabilistic method to establish upper bounds for the centroid setting. These theoretical results are complemented by PyTorch simulations using a hinge loss and Adam optimizer to empirically determine the dimensions required for zero retrieval error on synthetic data.
Key Results: Tight Bounds for Retrieval
The research establishes tight bounds for MED across common scoring functions, including inner product, Euclidean distance, and cosine similarity.
Crucially, in the standard setting, the required dimension is between $k-1$ and $2k$, making it independent of the total number of items $m$. In the more restrictive centroid setting, the dimension grows only logarithmically with $m$ ($O(k^2 \log m)$), which is significantly more efficient than previously assumed polynomial scales.
Empirical Insights: Learnability vs. Geometry
The gap between theoretical possibility and practical performance points to learnability as the true bottleneck. While geometry allows for $2k$ dimensions, current optimizers like SGD struggle to find these configurations in the "free" standard setting. Interestingly, the more constrained centroid setting often proves easier for optimizers to navigate.
As shown in the simulations, the "ours" method (centroid-based) demonstrates that the critical dimension scales linearly with $\log m$, confirming the theoretical logarithmic upper bound. The authors also note that while $2k$ dimensions are mathematically sufficient, practical implementation is limited by numerical precision; as $m$ increases, the required precision to distinguish vectors in a cyclic polytope grows exponentially.
Conclusion and Future Directions
This work reframes the challenges of embedding-based retrieval from a geometric problem to one of optimization and precision. Future research could explore:
- Low-bit Quantization: Investigating how these bounds hold under FP8 or Int4 constraints.
- Non-Euclidean Spaces: Extending the analysis to hyperbolic or Wasserstein spaces.
- Query Distributions: Accounting for the fact that real-world queries often follow power-law distributions rather than being uniform across all possible subsets.
By showing that $2k$ dimensions are "enough," this paper encourages a shift in focus toward developing better learning algorithms and more precise numerical representations for high-stakes retrieval tasks.
Summary updated