Skip to main content
QUICK REVIEW

[Paper Review] FreshDiskANN: A Fast and Accurate Graph-Based ANN Index for Streaming Similarity Search

Aditi Singh, Suhas Jayaram Subramanya|arXiv (Cornell University)|May 20, 2021
Advanced Image and Video Retrieval TechniquesComputer Science46 references13 citations
TL;DR

FreshDiskANN is a novel graph-based approximate nearest neighbor (ANN) index that enables real-time updates—insertions, deletions, and searches—on billion-point datasets using a single commodity machine with SSD storage. It achieves high performance (95%+ 5-recall@5) and low latency by introducing FreshVamana, a dynamic graph update algorithm, and StreamingMerge, a two-pass merge procedure that minimizes I/O and write amplification, reducing index maintenance costs by 5–10x compared to periodic rebuilds.

ABSTRACT

Approximate nearest neighbor search (ANNS) is a fundamental building block in information retrieval with graph-based indices being the current state-of-the-art and widely used in the industry. Recent advances in graph-based indices have made it possible to index and search billion-point datasets with high recall and millisecond-level latency on a single commodity machine with an SSD. However, existing graph algorithms for ANNS support only static indices that cannot reflect real-time changes to the corpus required by many key real-world scenarios (e.g. index of sentences in documents, email, or a news index). To overcome this drawback, the current industry practice for manifesting updates into such indices is to periodically re-build these indices, which can be prohibitively expensive. In this paper, we present the first graph-based ANNS index that reflects corpus updates into the index in real-time without compromising on search performance. Using update rules for this index, we design FreshDiskANN, a system that can index over a billion points on a workstation with an SSD and limited memory, and support thousands of concurrent real-time inserts, deletes and searches per second each, while retaining $>95\%$ 5-recall@5. This represents a 5-10x reduction in the cost of maintaining freshness in indices when compared to existing methods.

Motivation & Objective

  • To address the lack of efficient, real-time support for dynamic updates in graph-based approximate nearest neighbor (ANN) search systems.
  • To enable high-throughput, low-latency inserts, deletes, and searches on billion-point datasets using commodity hardware.
  • To maintain high search accuracy (≥95% 5-recall@5) while minimizing I/O and write amplification during updates.
  • To reduce the cost of index freshness by replacing periodic rebuilds with incremental, streaming updates.
  • To design a system that supports quiescent consistency and scales efficiently to trillion-point indices via distribution.

Proposed method

  • Introduces FreshVamana, a graph-based ANN algorithm that maintains index quality during real-time insertions and deletions using localized update rules.
  • Employs a two-pass StreamingMerge procedure to incrementally merge updates into the main index with minimal I/O and write amplification.
  • Uses a persistent, SSD-resident index structure (LTI) that supports random access and efficient traversal during search and update phases.
  • Applies a candidate list size of 100 (𝐿𝑠=100) to achieve high recall with only 120 random 4KB I/Os and ~8,000 distance comparisons per search.
  • Scales search throughput nearly linearly with query threads, achieving ~6,500 queries/sec at 10ms mean latency with 64 threads.
  • Uses background merge threads (10–40) to process updates in real time, with sub-linear scaling in Patch and Insert phases due to SSD I/O bottlenecks.

Experimental results

Research questions

  • RQ1Can a graph-based ANN index support real-time insertions and deletions without compromising search accuracy or latency?
  • RQ2How can update operations be merged into a large, SSD-resident index with minimal I/O and write amplification?
  • RQ3What is the performance and cost overhead of incremental updates compared to full index rebuilds?
  • RQ4Can a single commodity machine maintain a billion-point index with thousands of concurrent updates and searches?
  • RQ5How does the system maintain quiescent consistency and high recall during continuous data evolution?

Key findings

  • FreshDiskANN achieves >95% 5-recall@5 on a billion-point dataset with sub-millisecond search latency under real-time workloads.
  • The system supports up to 6,500 queries per second with a mean latency of under 10ms and 99th percentile latency under 12ms using 64 search threads.
  • StreamingMerge processes 30 million inserts and deletes into an 800M-point index in ~16,000 seconds using 40 threads, which is only 8.5% of the time required to rebuild the index from scratch.
  • The I/O cost per update is only ~10KB, significantly lower than systems like SRS, which scan ~15% of the dataset for moderate recall.
  • Search throughput scales nearly linearly with the number of threads, and using fewer merge threads results in more predictable latencies due to reduced SSD contention.
  • The system reduces the hardware cost of maintaining index freshness by 5–10x compared to periodic rebuilds, enabling a single-machine deployment per billion points.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.