Revisiting Neural Retrieval on Accelerators

Jiaqi Zhai, Zhaojie Gong, Yueming Wang, Xiao Sun, Zheng Yan, Fu Li, Xing Liu

Abstract

Traditional recommendation systems rely on dot-product similarity for efficient candidate retrieval, but this approach is mathematically limited by its low-rank nature. We present a novel framework that replaces the standard dot product with a "Mixture of Logits" (MoL) model, which captures more complex user-item interactions. To maintain production-level latency, we introduce the h-indexer, a hierarchical retrieval strategy optimized for modern GPU accelerators. Our results demonstrate significant improvements in recommendation accuracy—up to 77% in hit rate on public benchmarks—while maintaining a median serving latency of 30ms.

Introduction

In modern recommendation systems, retrieval serves as the critical first stage of the funnel, responsible for filtering millions or billions of items into a few hundred relevant candidates. For years, the industry standard has been the dot product of user and item embeddings, primarily because it enables efficient Maximum Inner Product Search (MIPS). However, dot products are fundamentally "low-rank," capturing only a fraction of the complex, multifaceted interactions between users and items. While more expressive models like Multi-Layer Perceptrons (MLPs) exist, they are notoriously difficult to scale for retrieval due to prohibitive latency.

Methods

Mixture of Logits (MoL)

To bridge the gap between expressivity and efficiency, we introduce the Mixture of Logits (MoL). Instead of a single dot product, MoL models similarity as an adaptive composition of multiple elementary similarity functions. By using gating weights that depend on both the user and the item, MoL can represent significantly higher-rank interactions. To maintain stability during training, we utilize Component-level Hypersphere Embeddings, which force embeddings onto a unit sphere to measure angular distances rather than raw magnitudes.

The h-indexer

To make MoL viable at production scale, we propose a hierarchical retrieval strategy called the h-indexer. This system operates in two distinct stages:

  1. Stage 1 (Coarse Search): A highly optimized, approximate top-k search narrows the corpus from millions to approximately 100,000 candidates using a standard dot product.
  2. Stage 2 (Fine Reranking): The expressive MoL model reranks these candidates to identify the final top 100.

Accelerator Optimizations

To ensure high throughput on GPUs, we implemented several low-level optimizations. These include INT8 Quantization to boost throughput during the dot-product stage, Op Fusion to combine mathematical operations into single GPU kernels (reducing memory overhead), and FP8 Communication to alleviate data bottlenecks during distributed training.

Experimental Results

Accuracy and Performance

We evaluated the framework on public benchmarks (MovieLens, Amazon Reviews) and Meta’s internal production systems. On public datasets, MoL achieved up to a 77.3% increase in Hit Rate (HR) compared to standard dot-product baselines. On Meta’s internal production surface, the model showed a +27.6% gain in HR@50.

Despite the increased model complexity, the system maintained a median serving latency of 30ms, which is highly competitive with optimized CPU-based MIPS baselines (20ms). Furthermore, our infrastructure optimizations reduced memory usage by over 60% and improved training throughput by 37%.

Analysis of Rank Deficiency

An SVD analysis of existing models confirmed the limitations of the status quo: 256-dimensional dot-product models often explain as little as 7% of the variance in real-world datasets. MoL effectively breaks this bottleneck by allowing for higher-rank representations.

Additionally, we observed that MoL helps mitigate popularity bias (the "Matthew Effect"). By capturing more nuanced interactions, the model is better at identifying relevant "long-tail" content rather than simply defaulting to the most popular items.

Conclusion

By moving beyond the dot product and leveraging GPU-specific optimizations, we demonstrate that it is possible to deploy highly expressive retrieval models at scale. The combination of the Mixture of Logits model and the h-indexer provides a significant leap in recommendation quality without sacrificing the latency requirements of production environments. Future work will explore making the entire cascading retrieval setup end-to-end learnable and adapting these models for rapidly changing dynamic corpora.

Summary updated

BibTeX
@inproceedings{zhai2023revisiting,
  author = {Jiaqi Zhai and Zhaojie Gong and Yueming Wang and Xiao Sun and Zheng Yan and Fu Li and Xing Liu},
  title = {{Revisiting Neural Retrieval on Accelerators}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2023},
  url = {https://openreview.net/forum?id=sfn7cMuuA5},
}
Figure