Problem
Maximum inner product search (MIPS) finds, for a query vector, the best-matching key among millions of candidate vectors. It sits under recommendation, search and retrieval-augmented generation (RAG). Exhaustive comparison gets slow as keys reach millions and dimensions reach thousands. Standard approximate methods cluster or quantize the keys and ignore what queries look like. This hurts in RAG: queries are short user questions while keys are long curated passages. Production systems usually serve a stable, well-characterized query distribution, and generic methods do not use that signal.
Example from the article: on Natural Questions (about 2.6M unique passages, 128 clusters), centroid routing needed 3.36 ms to reach 95% routing recall.
Solution in brief
Train small neural networks once, offline, on queries from the expected distribution, with ground-truth answers computed by exhaustive search. SupportNet scores every cluster by how well its best key can match the query, replacing centroid routing. KeyNet predicts the best-matching key and rewrites the query before it goes to an unchanged IVF index.
Questions this case answers
- How to speed up exact-quality maximum inner product search over a fixed set of millions of vectors when queries come from a known, stable distribution and cluster-centroid routing misses true neighbors
- How to improve the recall of an existing approximate vector index at a fixed scan budget without rebuilding or replacing the index
- How to speed up vector search over millions of keys when the query distribution is known and stable?
- How to route a query to the right cluster of an IVF index more accurately than by distance to centroids?
Tools and methods
- SupportNet — small network that scores each cluster for a query (learned router)
- KeyNet — small network that maps a query to its predicted best key (query rewriter)
- IVF index (FAISS) — existing inverted-file approximate search the networks plug into
- Natural Questions — retrieval benchmark used for evaluation
Google or a one-time email code. No password.