Apple researchers have introduced a pair of lightweight neural networks that dramatically accelerate the core retrieval step powering modern search, recommendation, and retrieval-augmented generation (RAG) systems.
Presented at ICML 2026, the work reframes maximum inner product search (MIPS) — the computational bottleneck in these pipelines — as a learnable support function, enabling models trained once on a fixed database to route or rewrite queries at inference time with far less compute than traditional approximate methods.
On the Natural Questions benchmark, the larger SupportNet router achieves 97% routing recall in 1.74 milliseconds, nearly twice as fast as centroid-based routing, while KeyNet cuts the latency to reach 99% recall by up to eightfold compared to raw queries on a FAISS IVF index.
The Bottleneck in Modern Retrieval
Maximum inner product search sits at the heart of any system that must match a user query — a short question or prompt — against a massive database of candidate vectors representing documents, products, or media. As databases swell to millions of entries and vector dimensions climb into the thousands, exhaustively comparing a query against every key becomes prohibitively expensive.
Production systems have long relied on approximate nearest neighbor (ANN) indexes, such as inverted file (IVF) structures, which partition keys into clusters represented by centroids. At query time, the system compares the query to centroids, routes to the nearest clusters, and searches only within them.
In plain terms: Imagine a library where books are grouped by rough topic. Instead of checking every book, you ask a librarian which section looks most promising, then search only that section. The centroid is the librarian's best guess based on the section's average topic. But this guess can miss the best book if it sits in a section whose average topic seems far from your question.
This geometric shortcut introduces errors. A cluster's centroid may sit far from an outlier key that actually matches the query well, causing the router to skip the correct cluster entirely. Moreover, standard ANN methods treat all possible queries equally, ignoring the fact that real-world traffic follows a stable, learnable distribution — a signal that goes unused.
A Mathematical Insight
The Apple team's breakthrough rests on a convex-analysis observation: the function mapping a query to its maximum inner product with any key in a set is the support function of that set. Support functions are convex, meaning they can be approximated by input convex neural networks (ICNNs), a class of architectures designed to preserve convexity. Crucially, the gradient of the support function at any query returns the best-matching key itself.
In plain terms: The "score" of the best possible match for a given query follows a smooth, bowl-shaped mathematical curve. Neural networks built to respect that shape can learn to predict the score — or even the matching key directly — without searching the database at all.
This reframing turns MIPS into a supervised regression problem. By sampling queries from the actual production distribution, computing their true best matches offline via exhaustive search, and training a network to replicate those answers, the system "amortizes" the heavy compute into a one-time training cost. At inference, a tiny forward pass replaces thousands of vector comparisons.
Two Networks, One Goal
The researchers developed two specialized architectures, each exploiting the support-function structure differently.
SupportNet
SupportNet is an ICNN trained to approximate the support function of each cluster. Given a query, it outputs a score per cluster representing the best possible match inside that cluster. The router then selects the top-scoring clusters for detailed search. Because the support function accounts for every key in the cluster — not just the centroid — SupportNet avoids the outlier-miss problem inherent in centroid routing.
On a 128-cluster Natural Questions index (2.6 million passages), a small SupportNet (5% of database size) achieves 95% routing recall at 1.74 ms/query, versus 3.36 ms for centroid routing — a 1.9× speedup. The large model (20% size) pushes routing recall to 97% at the same latency. When measured purely on routing quality — ignoring neural-network overhead — scanning just 5% of the database recovers the true partition 92.6% of the time, compared to 87.5% for the centroid baseline.
KeyNet
KeyNet takes a more direct approach: it predicts the best-matching key vector itself. A consistency loss derived from Euler's theorem for homogeneous functions keeps predictions geometrically grounded in the underlying support function, even though KeyNet does not explicitly enforce convexity.
At inference, KeyNet acts as a "query rewriter" — it transforms the original query embedding into a vector that sits much closer to the target key in the index space. The existing IVF index then searches from this transformed query, finding the result far faster.
On the same FAISS IVF index, the largest KeyNet (20% size) reaches 99% recall in 0.23 ms, versus 1.8 ms for the raw query — an 8× reduction in wall-clock latency. In quality-only terms, scanning just 0.001% of the database, KeyNet-mapped queries retrieve the true key 96.7% of the time, compared to 86% for raw queries. Reaching 99% recall requires 11× fewer key comparisons (0.009% vs 0.10% of the database).
Real-World Gains on Production Benchmarks
Qualitative examples from Natural Questions illustrate the practical impact. For the query "What is Matchbox Twenty?", the raw query's top hits include irrelevant passages about matchboxes and the number twenty, while the KeyNet-mapped query immediately surfaces the correct band biography.
Similar improvements appear for "Who wrote The Eye of the World?" and "What is a wind controller used for?" — cases where the short query embedding sits far from the relevant long-form passage in the vector space. KeyNet effectively bridges that semantic gap before the index even begins searching.
Both model families integrate cleanly with existing ANN infrastructure. SupportNet replaces the centroid router in an IVF system; KeyNet sits in front of any IVF index as a pre-processing step. Training uses the same regression pipeline: sample queries from the production distribution, compute ground-truth matches once via exhaustive search, and train the network to mimic the MIPS solution landscape for the queries that actually occur.
A Shift Toward Learned Retrieval
The work signals a broader shift in retrieval architecture. When query distributions are stable and known — the default in deployed ML systems — encoding the MIPS solution directly into network weights trades a one-time amortization cost for fast, lightweight inference tailored to the actual workload. The researchers envision hybrid deployments at massive scale: a SupportNet router over all clusters, followed by per-cluster KeyNets to accelerate the final search within each partition.
As vector databases grow and RAG becomes ubiquitous in production AI, the ability to replace hand-crafted geometric heuristics with learned, distribution-aware routers and rewriters could redefine the latency-accuracy frontier for information retrieval.
Was this clear?
library_booksSource
Apple Machine Learning Research
5 Nov 2026
- funding model
- corporate
- owner
- Apple Inc.
Was the source link correct?
topicRelated Articles

Gemini Launches BitcoinBuzz: A Composite Sentiment Indicator for Bitcoin Markets

Prediction Markets Emerge as Real-Time Forecasting Engines for Finance, Policy, and Sports

Cryptocurrency Mining in 2026: Emerging Strategies for Zero-Cost Operations
Square Expands Subscription Management Tools for Merchants with New Dashboard Controls

Canadian Robotic Exoskeleton Enables First Steps for British Boy with Rare Epilepsy
Congress MP Asserts Opposition Unity Against Delimitation Bill, Citing Constitutional Defense

Love as Resistance: Dalit-Feminist Anthology Reframes Intimacy as Political Defiance Against Caste

