Английская Википедия:Hierarchical Navigable Small World graphs

Материал из Онлайн справочника
Перейти к навигацииПерейти к поиску

Шаблон:Multiple issues Шаблон:Short description Шаблон:Network Science

The Hierarchical Navigable Small World (HNSW) graph is an approximate nearest neighbor search technique used in many vector databases.[1][2] Nearest neighbor search without an index involves computing the distance from the query to each point in the database, which for large datasets is computationally prohibitive. For high-dimensional data, tree-based exact vector search techniques such as the k-d tree and R-tree do not perform well enough because of the curse of dimensionality. To remedy this, approximate k-nearest neighbor searches have been proposed, such as locality-sensitive hashing (LSH) and product quantization (PQ) that trade performance for accuracy.[2] The HNSW graph offers an approximate k-nearest neighbor search which scales logarithmically even in high-dimensional data.

It is an extension of the earlier work on navigable small world graphs presented at the Similarity Search and Applications (SISAP) conference in 2012 with an additional hierarchical navigation to find entry points to the main graph faster.[3] HNSW-based libraries are among the best performers in the approximate nearest neighbors benchmark.[4][5][6]

Use in Vector Databases

HNSW is a key method for approximate nearest neighbor search in high-dimensional vector databases, for example in the context of embeddings from neural networks in large language models. Databases that use HNSW as search index include:

  • Apache Lucene Vector Search
  • Chroma
  • FAISS
  • Qdrant
  • Vespa
  • Vearch Gamma
  • Weaviate

Several of these use the hnswlib library[7] provided by the original authors.

References

Шаблон:Reflist