Introduction
In the era of Large Language Models (LLMs), Approximate Nearest Neighbor Search (ANNS) has become the critical backbone for Retrieval-Augmented Generation (RAG). To provide LLMs with long-term memory, documents are converted into high-dimensional vectors, and the system must efficiently search through these vectors to find relevant context. However, as datasets scale to billions of vectors, developers face a persistent "trilemma" of performance, cost, and accuracy. In-memory systems are fast but prohibitively expensive; SSD-based systems are cost-effective but slow; and traditional GPU-accelerated systems struggle with the limited onboard memory (HBM) relative to billion-scale indices, leading to severe PCIe bottlenecks.
The FusionANNS Architecture
FusionANNS addresses these challenges by introducing a "CPU + GPU" cooperative architecture designed to minimize data movement and leverage the strengths of each hardware component. Unlike naive GPU integrations that can actually decrease performance by up to 65% due to communication overhead, FusionANNS orchestrates a multi-tiered approach.
As shown in the architecture overview, the system maintains a lightweight navigation graph in CPU RAM, highly compressed Product Quantized (PQ) vectors in GPU memory, and the original high-precision vectors on the SSD. The CPU handles the complex branching logic of graph traversal, the GPU performs massively parallel distance calculations on compressed data, and the SSD is accessed only for final high-precision re-ranking.
Core Innovations
1. Multi-tiered Indexing
By keeping only compressed vector representations on the GPU, FusionANNS avoids the need to transfer massive raw vector data over the PCIe bus. Only small Vector IDs are passed between the CPU and GPU, significantly reducing latency.
2. Heuristic Re-ranking and Adaptive Stopping
Search accuracy often follows a law of diminishing returns. FusionANNS processes SSD-based re-ranking in mini-batches and employs a feedback loop. If the "top-k" results stabilize and stop changing significantly, the system stops early, slashing SSD I/O without sacrificing precision.
3. Redundant-aware I/O Deduplication
To overcome slow SSD access, the system reorganizes the physical layout of vectors to improve spatial locality. It merges multiple I/O requests into single reads and utilizes a DRAM buffer to ensure that the same data block is not read multiple times for different parts of a single query.
Performance Evaluation
FusionANNS was evaluated against industry-standard benchmarks including SIFT1B, SPACEV1B, and DEEP1B. The system was compared to state-of-the-art solutions like Microsoft’s SPANN (SSD-based) and RUMMY (GPU-accelerated in-memory).
As illustrated in the performance metrics, the combination of Hierarchical Indexing (HI), Product Quantization (PQ), and GPU acceleration provides a balanced profile. Key results include:
- Throughput: FusionANNS achieved 9.4x–13.1x higher Queries Per Second (QPS) than SPANN and outperformed RUMMY by 2x–4.9x.
- Cost Efficiency: The system delivered 5.7x–8.8x better value (QPS per dollar) than SPANN, making billion-scale search viable on entry-level hardware.
- Scalability: Performance scales linearly with additional CPU threads, avoiding the plateaus common in previous architectures.
Conclusion
FusionANNS demonstrates that the key to billion-scale vector search is not just raw hardware power, but the intelligent orchestration of heterogeneous resources. By treating the PCIe bottleneck as a primary design constraint and implementing adaptive I/O strategies, FusionANNS provides a high-performance, cost-efficient path for modern RAG applications.
Summary updated