Amortizing Maximum Inner Product Search with Learned Support Functions

· Source: Apple Machine Learning Research · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics · Depth: Expert, quick

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

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

Topics

Code references

Best for: NLP Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Apple Machine Learning Research.