Recurrent Binary Embedding for GPU-Enabled Exhaustive Retrieval from Billion-Scale Semantic Vectors

Ying Shan, Jian Jiao, Jie Zhu, J. C. Mao · DOI

Abstract

Modern information retrieval systems face the challenge of searching through billions of items in milliseconds. While Approximate Nearest Neighbor (ANN) search is common, it often introduces false negatives and complex indexing overhead. This paper presents Recurrent Binary Embedding (RBE), a method that compresses semantic vectors into compact binary codes using a residual decomposition approach. When paired with a custom GPU-optimized retrieval system (rbeGIR), RBE enables real-time exhaustive search across a billion-scale database, recovering over 80% of the accuracy lost by traditional binary hashing while maintaining a small memory footprint.

Introduction

In large-scale applications like web search and online advertising, systems must retrieve the most relevant items from massive pools. Traditional full-precision (32-bit float) vectors for a billion items require hundreds of gigabytes of RAM, exceeding the capacity of high-speed GPU memory. While binary hashing reduces memory usage, it typically suffers from a significant "accuracy gap."

The authors propose that exhaustive (brute-force) search is feasible at scale if vectors are represented as bits and processed using hardware-accelerated bit-wise operations. RBE bridges the accuracy gap by iteratively refining binary representations through residual learning.

Recurrent Binary Embedding (RBE)

The core innovation of RBE is its Recurrent Residual Decomposition. Unlike standard hashing that produces a single bit-string, RBE represents a vector as a base binary vector followed by a series of binary residual vectors.

The Recurrent Binary Embedding (RBE) architecture illustrating the iterative residual decomposition for query and keyword features.

The process is "recurrent" because the model learns to correct the error (residual) of the previous step. Each successive residual vector is scaled by weights (powers of $1/2$), exponentially increasing the representational capacity of the embedding. To handle the non-differentiable nature of the sign function during training, the authors employ a "straight-through estimator" for gradient propagation.

The rbeGIR Retrieval System

To deploy RBE at scale, the authors developed rbeGIR, a custom GPU-based retrieval engine. The system exploits the efficiency of bit-wise XOR and population count (popcount) operations to calculate similarities.

The rbeGIR system workflow, demonstrating how queries and keywords are processed and matched across GPU partitions.

Key system optimizations include:

  • Asymmetric Design: The system uses more bits for queries (processed on-the-fly) and fewer bits for stored keywords, balancing retrieval latency with memory constraints.
  • Hardware-Algorithm Co-design: Data storage is optimized for "warp-based" memory loading, allowing 32 GPU threads to load data in a single clock cycle, maximizing throughput.

Experimental Evaluation

The model was evaluated using a production-scale dataset from Bing Ads, comprising 1.2 billion unique keywords and search logs spanning two years.

Key Results

  • Accuracy: RBE (using 3 bits for queries and 2 for keywords) achieved an AUC of 0.8005, nearly matching the full-precision float model's 0.8044 and significantly outperforming standard binary models (0.7719).
  • Efficiency: Storing 1.2 billion keywords required only 14.9 GB of memory, a 16x reduction from the 238 GB needed for floats.
  • Latency: The system performs exhaustive retrieval across 1.2 billion candidates in just 31.17 milliseconds.
  • Real-world Impact: Human evaluations showed an 18.5% increase in "good" pairs retrieved compared to the existing production baseline.

Conclusion

RBE demonstrates that exhaustive search is a viable alternative to complex ANN indices for billion-scale retrieval. By combining residual-based binary embeddings with GPU-accelerated kernels, the system achieves near-float accuracy with massive memory savings. Future work may extend RBE to Transformer-based architectures like BERT to further enhance semantic representation.

Summary updated

BibTeX
@inproceedings{shan2018recurrent,
  author = {Ying Shan and Jian Jiao and Jie Zhu and J. C. Mao},
  title = {{Recurrent Binary Embedding for GPU-Enabled Exhaustive Retrieval from Billion-Scale Semantic Vectors}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2018},
  doi = {10.1145/3219819.3220018},
}
Figure