Skip to main content
QUICK 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 Techniques参考文献 46被引用 13
一句话总结

FreshDiskANN 是一种新型基于图的近似最近邻(ANN)索引,可在配备 SSD 存储的单台通用机器上,对十亿数量级数据集实现实时更新——包括插入、删除和搜索。它通过引入 FreshVamana 动态图更新算法和 StreamingMerge 两阶段合并过程,实现高性能(5-召回率≥95%)与低延迟,显著降低 I/O 和写入放大,使索引维护成本相比周期性重建降低 5–10 倍。

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.

研究动机与目标

  • 解决基于图的近似最近邻(ANN)搜索系统中缺乏高效实时动态更新支持的问题。
  • 在通用硬件上实现对十亿数量级数据集的高吞吐量、低延迟插入、删除和搜索。
  • 在更新过程中最小化 I/O 和写入放大,同时保持高搜索准确率(≥95% 5-召回率@5)。
  • 通过增量流式更新替代周期性重建,降低索引新鲜度的维护成本。
  • 设计一种支持静默一致性并能通过分布式扩展支持十万亿数量级索引的系统。

提出的方法

  • 提出 FreshVamana,一种基于图的 ANN 算法,通过局部化更新规则在实时插入和删除过程中保持索引质量。
  • 采用两阶段 StreamingMerge 过程,以最小 I/O 和写入放大增量地将更新合并到主索引中。
  • 使用持久化、驻留在 SSD 上的索引结构(LTI),支持搜索和更新阶段的随机访问与高效遍历。
  • 应用候选列表大小为 100(𝐿𝑠=100),仅需 120 次随机 4KB I/O 和每次搜索约 8,000 次距离比较,即可实现高召回率。
  • 搜索吞吐量几乎随查询线程数线性增长,在 64 个线程下达到约 6,500 次查询/秒,平均延迟为 10ms。
  • 使用后台合并线程(10–40 个)实时处理更新,由于 SSD I/O 瓶颈,Patch 和 Insert 阶段呈现次线性扩展。

实验结果

研究问题

  • RQ1基于图的 ANN 索引能否在不损害搜索准确率或延迟的前提下,支持实时插入和删除?
  • RQ2如何将更新操作高效合并到大型 SSD 驻留索引中,同时最小化 I/O 和写入放大?
  • RQ3与完整索引重建相比,增量更新的性能和成本开销如何?
  • RQ4单台通用机器能否在支持数以千计并发更新和搜索的同时,维持一个十亿数量级的索引?
  • RQ5在持续数据演化的背景下,系统如何保持静默一致性与高召回率?

主要发现

  • FreshDiskANN 在十亿数量级数据集上实现 >95% 5-召回率@5,且在实时工作负载下搜索延迟低于亚毫秒。
  • 系统在使用 64 个搜索线程时,支持高达 6,500 次查询/秒,平均延迟低于 10ms,第 99 百分位延迟低于 12ms。
  • StreamingMerge 使用 40 个线程在约 16,000 秒内处理了 3000 万个插入和删除操作,将 8 亿数量级索引合并,耗时仅为从头重建索引所需时间的 8.5%。
  • 每次更新的 I/O 成本仅约 10KB,远低于 SRS 等系统,后者为实现中等召回率需扫描约 15% 的数据集。
  • 搜索吞吐量几乎随线程数线性增长,使用更少的合并线程可降低 SSD 竞争,从而获得更可预测的延迟。
  • 与周期性重建相比,系统将维持索引新鲜度的硬件成本降低了 5–10 倍,使每十亿数据点仅需单台机器部署。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。