[KongchangAI]
ConceptHierarchical Navigable Small World

HNSW

HNSW (Hierarchical Navigable Small World) is an approximate nearest neighbor search algorithm for high-dimensional vector spaces, constructing its index on a multi-layer navigable small-world graph structure. The algorithm performs greedy routing searches across layers at different levels of granularity, achieving logarithmic query time complexity. It maintains high recall rates while significantly reducing search latency, and is widely used in vector databases and semantic retrieval systems.

Core Facts

Timeline (last 90 days)

Oct 28

HNSW constructs a multi-layer navigable small-world graph and, at query time, searches downward layer by layer from the coarse-grained upper layers, achieving logarithmic retrieval complexity.

Unverified50%
Oct 28

HNSW's advantage lies in high recall and low latency, but the cost is that each vector node must persist a complete high-dimensional embedding, and the graph structure itself must also store adjacency relationships.

Unverified50%
Oct 28

According to a report by MarkTechPost, LEANN achieves accuracy comparable to HNSW at 90% recall, with memory usage of 4 GB versus 188 GB.

Unverified50%
Oct 22

In practice, vector retrieval often uses approximate nearest neighbor algorithms such as HNSW and IVF to trade off between recall and speed, rather than brute-force computing all vectors.

Unverified50%
Oct 20

pgvector's default HNSW settings cause insert stalls of more than 2 seconds during batch memory writes.

Unverified50%
Oct 20

The HNSW index locks the table during batch inserts, causing write stalls of more than 5 seconds; the solution is to write in batches with INSERT ... ON CONFLICT DO NOTHING and a 50ms debounce window.

Unverified50%
Oct 20

In pgvector's HNSW index, the parameter m is the number of neighbor edges kept per node, and ef_construction is the size of the candidate queue during construction; together they determine the recall-latency trade-off at query time.

Unverified50%
Oct 20

In pgvector's HNSW index, setting m to 16 and ef_construction to 64 achieves a p99 latency of 12ms under 500 concurrent inserts.

Unverified50%
Oct 19

Approximate nearest neighbor search (ANN) uses algorithms such as HNSW or IVF, trading a small loss in recall for millisecond-level response, returning the semantically nearest candidate set rather than the factually most relevant documents.

Unverified50%
Oct 19

ANN builds special index structures (such as HNSW's hierarchical navigable small world graph, IVF's inverted clustering, and PQ's product quantization compression) to sacrifice a small amount of recall accuracy in exchange for order-of-magnitude speedups.

Unverified50%

40 more timeline events

All Facts (20)

Verified

Vector databases (such as ChromaDB, Milvus, and Pinecone) use indexing algorithms such as HNSW and IVF to achieve millisecond-level retrieval among millions or even hundreds of millions of vectors.

80%
Verified

向量数据库的核心操作是近似最近邻搜索(ANN),通过HNSW、IVF等索引算法将相似度计算加速到毫秒级响应

80%
Verified

Mainstream ANN search implementations include HNSW and IVF, which reduce retrieval time complexity from linear to logarithmic by constructing index structures.

80%
Verified

The vector database index algorithms HNSW (graph structure) and IVF (clustering structure) present different engineering trade-offs between retrieval speed and recall rate

75%
Verified

The HNSW algorithm was proposed by Yury Malkov and others in 2016, reducing search complexity from O(n) to O(log n) through a multi-layer graph structure.

75%
Verified

pgvector is an open-source extension for PostgreSQL that natively adds vector data types and similarity search capabilities to the relational database, supporting both exact nearest-neighbor and approximate nearest-neighbor (HNSW, IVFFlat index) retrieval modes.

70%
Verified

Vector databases convert text into high-dimensional vectors typically of 768 to 3072 dimensions and use ANN algorithms for retrieval, with mainstream ANN algorithms including HNSW and IVF-PQ.

70%
Verified

The HNSW algorithm achieves millisecond-level retrieval among billion-scale vectors by constructing a multi-layer graph index while maintaining a recall rate of over 95%.

65%
Verified

HNSW (Hierarchical Navigable Small World graph) is the most mainstream ANN solution in the industry, reducing query complexity to O(log N).

65%
Verified

Approximate nearest neighbor (ANN) algorithms such as HNSW and IVF achieve order-of-magnitude speed improvements by sacrificing a small amount of precision.

65%
Verified

Vector databases typically employ approximate nearest neighbor algorithms such as HNSW or IVF at their core, with retrieval latency generally below 10 milliseconds.

65%
Verified

The HNSW algorithm achieves hierarchical search by constructing a multi-layer graph structure, approximately reducing the exponential complexity of exact nearest-neighbor search to logarithmic complexity, making it the most mainstream index structure in current vector databases.

65%
Verified

Text is encoded by an Embedding model into floating-point vectors of 768 to 3072 dimensions, stored in a vector database, and similarity retrieval is completed at millisecond speed via approximate nearest neighbor algorithms (HNSW, IVF, etc.).

65%
Verified

The RAG mechanism relies on the approximate nearest neighbor (ANN) search capability of vector databases (such as Pinecone, Weaviate, and Milvus) to achieve millisecond-level retrieval.

65%
Verified

Milvus adopts a storage-compute separation architecture and supports multiple vector indexing algorithms including HNSW, IVF_FLAT, and DiskANN.

65%
Unverified

Pinecone、Milvus、Weaviate等主流向量数据库均采用HNSW作为核心索引算法

85%
Partially Verified

HNSW (Hierarchical Navigable Small World graph) is an approximate nearest neighbor search algorithm proposed by Russian scholar Yuri Malkov and others in 2016.

65%
Unverified

Vector stores locate semantically similar document chunks in high-dimensional space through approximate nearest neighbor algorithms such as HNSW (Hierarchical Navigable Small World graphs) or IVF (Inverted File Index).

60%
Unverified

Vector databases typically rely on approximate nearest neighbor algorithms (ANN) at their core, such as HNSW and IVF.

60%
Unverified

The Pinecone vector database uses the HNSW (Hierarchical Navigable Small World) graph algorithm for approximate nearest neighbor search.

60%

Source Articles