Introduction
Similarity search—the process of identifying the "closest" items in a massive database—is a fundamental operation in modern computing, underpinning applications from facial recognition to recommendation engines. While Graphics Processing Units (GPUs) provide immense parallel processing power, they are notoriously difficult to program for these tasks.
Existing GPU-accelerated search tools typically suffer from two primary limitations. First is a lack of genericity; most tools are optimized for specific data types (e.g., vectors) and distance metrics (e.g., Euclidean distance). Second is the top-k bottleneck; while GPUs can calculate similarity scores for millions of items rapidly, selecting the top $k$ results (the "k-selection problem") is a significant performance hurdle. Standard sorting methods are computationally expensive, and traditional priority queues often lead to "warp divergence," where parallel threads are forced to wait for one another.
The GENIE Framework
To address these challenges, the authors propose GENIE (Generic Inverted Index), a framework that redefines similarity search as a "match-count" problem. GENIE abstracts diverse data types into sets of discrete tokens, measuring similarity based on the number of tokens a query shares with a database object.
To accommodate various data formats, GENIE employs two primary transformation schemes:
- Locality Sensitive Hashing (LSH): Used for high-dimensional points, where similar items are hashed into the same "buckets" or tokens.
- Shotgun and Assembly (SA): Used for complex structures like sequences or documents, where items are decomposed into smaller "shingles" or n-grams.
The Count Priority Queue (c-PQ)
The core innovation of GENIE is the Count Priority Queue (c-PQ). Rather than performing a global sort of all candidates, c-PQ utilizes a two-level structure designed for GPU efficiency.
The c-PQ consists of:
- Bitmap Counter: A lower-level component that tracks match counts using only a few bits per object, significantly reducing memory footprint.
- Gate Mechanism: A threshold-based filter (AuditThreshold) that identifies "promising" objects. Only objects exceeding this threshold are moved to a high-speed Hash Table in the upper level.
- ZipperArray: This structure tracks the distribution of match counts in real-time, allowing the system to dynamically update the "Gate" threshold. This ensures that only potential top-$k$ candidates are processed in expensive memory.
By using bit-level counters instead of standard 32-bit integers, GENIE reduces memory overhead per query by 5x to 10x, enabling a single GPU to process batches of over 1,000 queries simultaneously.
Evaluation and Results
GENIE was evaluated across five diverse real-world datasets, including OCR (3.5M points), SIFT_LARGE (36M image features), DBLP (5M publication titles), Tweets (6.8M short documents), and Adult (0.98M census records).
The results demonstrate significant performance gains:
- Speedup: GENIE outperformed specialized GPU-LSH implementations by approximately one order of magnitude and CPU-based methods by over two orders of magnitude on sequence data.
- Throughput: On the SIFT_LARGE dataset, GENIE processed 1,024 queries in 25.9 seconds, a task that required over 5.5 hours for a standard CPU-based index.
- Accuracy: The system maintains high precision, often exceeding 95% for top-1 results, even with significant data modifications.
Conclusion
GENIE provides a mathematically grounded approach to similarity search through the $\tau$-ANN (Tolerance-Approximate Nearest Neighbor) model. By combining a generic match-count abstraction with the highly efficient c-PQ architecture, it overcomes traditional GPU bottlenecks. While currently limited to similarity measures compatible with the match-count model, GENIE represents a major step toward high-throughput, multi-purpose similarity search on parallel hardware.
Summary updated