arXiv:2412.01940cs.LGcs.DB2024-12被引 8

去掉层次结构后,HNSW性能不变且更省内存。

Down with the Hierarchy: The 'H' in HNSW Stands for "Hubs"

  • 用扁平的导航小世界图替代层级结构,效果相当。
  • 在高维数据上延迟和召回率与原算法几乎一致。
  • 发现枢纽节点构成的‘高速路’承担了层次功能。

随着神经表示学习的突破,向量嵌入的近似最近邻(ANN)搜索已成为关键计算任务。层次可导航小世界(HNSW)算法推动了基于图的索引成为高效可扩展的主流方案。传统上,HNSW通过分层图快速定位相似点邻域。但层次结构是否必要?我们开展大规模基准测试,覆盖比以往更多数据集。结果表明,扁平的导航小世界图在高维数据上保持了与HNSW相同的性能,延迟和召回率基本一致,同时内存开销更低。进一步分析发现,图中存在由频繁遍历的枢纽节点构成的‘高速公路’,其功能等同于层级结构。我们提出并验证了‘枢纽高速路假说’,揭示其形成机制,为未来图式ANN搜索优化提供新方向。

原文摘要 · Abstract (English)

Driven by recent breakthrough advances in neural representation learning, approximate near-neighbor (ANN) search over vector embeddings has emerged as a critical computational workload. With the introduction of the seminal Hierarchical Navigable Small World (HNSW) algorithm, graph-based indexes have established themselves as the overwhelmingly dominant paradigm for efficient and scalable ANN search. As the name suggests, HNSW searches a layered hierarchical graph to quickly identify neighborhoods of similar points to a given query vector. But is this hierarchy even necessary? A rigorous experimental analysis to answer this question would provide valuable insights into the nature of algorithm design for ANN search and motivate directions for future work in this increasingly crucial domain. We conduct an extensive benchmarking study covering more large-scale datasets than prior investigations of this question. We ultimately find that a flat navigable small world graph graph retains all of the benefits of HNSW on high-dimensional datasets, with latency and recall performance essentially \emph{identical} to the original algorithm but with less memory overhead. Furthermore, we go a step further and study \emph{why} the hierarchy of HNSW provides no benefit in high dimensions, hypothesizing that navigable small world graphs contain a well-connected, frequently traversed ``highway" of hub nodes that maintain the same purported function as the hierarchical layers. We present compelling empirical evidence that the \emph{Hub Highway Hypothesis} holds for real datasets and investigate the mechanisms by which the highway forms. The implications of this hypothesis may also provide future research directions in developing enhancements to graph-based ANN search.

ANN搜索图索引高维数据性能优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。