Efficient k-NN Search with Cross-Encoders using Adaptive Multi-Round CUR Decomposition

Nishant Yadav, Nicholas Monath, Manzil Zaheer, Andrew McCallum

TL;DR

Cross-encoders are the gold standard for text similarity but are traditionally too slow for large-scale search. ADACUR makes them efficient by using an adaptive, multi-round matrix decomposition strategy that iteratively refines score approximations. This approach slashes recall error by up to 70% compared to previous methods without increasing computational costs.

The Challenge: Speed vs. Accuracy

In many Natural Language Processing tasks—like entity linking or passage retrieval—the goal is to find the "$k$" most similar items to a query from a massive database. This involves a classic trade-off:

  1. Bi-encoders (Dual-encoders): These represent queries and items as independent vectors. They are incredibly fast (using simple dot products) but often miss subtle semantic nuances.
  2. Cross-encoders: These jointly process the query and item together (e.g., through a BERT model). They are much more accurate but prohibitively slow because a heavy transformer model must run for every single query-item pair.

The standard industry fix is "retrieve-and-rerank": using a fast Bi-encoder to grab the top 100 candidates, then using a Cross-encoder to pick the best one. However, if the Bi-encoder misses the correct item in the first step, the Cross-encoder never sees it. ADACUR performs efficient $k$-NN search using only the Cross-encoder, bypassing the Bi-encoder bottleneck entirely.

Methods: Adaptive CUR Decomposition

ADACUR builds on CUR Matrix Decomposition, a mathematical technique that approximates a massive matrix of query-item scores by calculating only a small subset of "anchor" rows and columns.

The paper's key innovation is making this process adaptive and multi-round:

  • Initial Round: A small set of random items are selected as "anchors" and scored against the query using the Cross-encoder to create a rough approximation of all scores.
  • Iterative Refinement: Instead of sticking with random anchors, ADACUR identifies its current top-scoring items and uses them as anchors for the next round.
  • Precision where it matters: By iteratively adding items likely to be near the query into the anchor set, the approximation becomes extremely accurate at the top of the leaderboard.
Comparison of uniform vs. biased sampling in score approximation. Biased sampling (ADACUR) aligns approximations much more closely with exact scores for high-ranking items.

Crucially, ADACUR stays efficient by re-purposing the items it was already going to score as anchors, meaning refinement happens almost for free within a fixed computational budget.

Evaluation and Datasets

The authors evaluated ADACUR across major benchmarks to ensure scalability and robustness:

  • ZESHEL (Zero-Shot Entity Linking): Tested on specialized domains like YuGiOh and StarTrek to evaluate performance on unseen topics.
  • BEIR (Information Retrieval): Used SciDocs and HotpotQA to test general retrieval and multi-hop reasoning.
  • Scale: Datasets ranged from 10,000 items to over 5 million items (HotpotQA), proving the method scales to real-world production sizes.

Key Results

ADACUR demonstrates that iterative refinement significantly boosts retrieval accuracy for the same computational "price."

  • Massive Error Reduction: ADACUR reduced recall error by up to 70% in the $k=1$ setting compared to the previous state-of-the-art (ANNCUR).
  • Beating Distillation: It consistently outperformed Bi-encoders, even those specifically distilled to mimic Cross-encoders.
  • Compute Neutrality: The method achieves these gains while using the same number of Cross-encoder calls as competitors.
Top-k-Recall performance across different inference costs and number of rounds. Increasing rounds significantly improves recall within the same budget.

Insights and Future Work

ADACUR addresses the "Top-k Bias" of previous methods. While random anchors provide a good average approximation, they are often inaccurate for the highest-scoring items. By "honing in" on the target, ADACUR's multi-round approach ensures that even if the first approximation is poor, it finds better anchors to correct itself.

While highly effective, future work includes addressing the indexing overhead (which is higher than standard Bi-encoders) and further optimizing the $O(N)$ matrix multiplication step for "web-scale" databases containing billions of items.

Summary updated

BibTeX
@inproceedings{yadav2023efficient,
  author = {Nishant Yadav and Nicholas Monath and Manzil Zaheer and Andrew McCallum},
  title = {{Efficient k-NN Search with Cross-Encoders using Adaptive Multi-Round CUR Decomposition}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.544},
}
Figure