Amortizing Maximum Inner Product Search with Learned Support Functions
Summary
Amortized Maximum Inner Product Search (MIPS) is a novel regression-based approach that trains neural networks to directly predict MIPS solutions, aiming to amortize the cost of repeatedly solving MIPS for queries from a known distribution over a fixed key database. This method leverages the insight that the MIPS value function is the support function of the set of keys, a well-studied convex function whose gradient yields the optimal key. Two complementary models are proposed: SupportNet, an input-convex neural network that regresses the support function and can serve as a cluster router, and KeyNet, a vector-valued network that directly regresses the optimal key, usable as a drop-in replacement for queries in indexing pipelines. Experiments on the BEIR benchmark demonstrate that these learned SupportNets and KeyNets significantly improve IVF match rates for document embeddings, considering compute effort measured in FLOPs, number of probes, or wall-clock time. The code is available on GitHub.
Key takeaway
For Machine Learning Engineers optimizing large-scale retrieval systems, consider integrating amortized MIPS techniques like SupportNet or KeyNet. If your application repeatedly queries a fixed database with a known distribution, these models can significantly improve IVF match rates. They also reduce compute effort, measured in FLOPs, probes, or wall-clock time. Explore the provided GitHub code to enhance your MIPS performance.
Key insights
Amortized MIPS uses neural networks to predict optimal keys or support functions, significantly improving search efficiency by leveraging the MIPS value function's convexity.
Principles
- MIPS value function is a support function.
- Support function gradient yields optimal key.
- Amortization reduces repeated MIPS costs.
Method
Train input-convex neural networks (SupportNet) to regress the support function or vector-valued networks (KeyNet) to directly regress the optimal key, amortizing MIPS computation for known query distributions.
In practice
- Use SupportNet as a cluster router.
- Deploy KeyNet as a query replacement.
- Improve IVF match rates for embeddings.
Topics
- Maximum Inner Product Search
- Amortized MIPS
- SupportNet
- KeyNet
- Document Embeddings
- Retrieval Systems
Code references
Best for: NLP Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Apple Machine Learning Research.