Home Knowledge Base HNSW (Hierarchical Navigable Small World)

HNSW (Hierarchical Navigable Small World) is an approximate nearest neighbor algorithm optimized for high-dimensional vector search — providing sub-millisecond query times on millions of vectors through a multi-layer graph structure, making it the foundation of modern vector databases.

What Is HNSW?

Why HNSW Matters

How It Works

1. Build Phase: Insert vectors into multi-layer graph. 2. Layers: Top layers have few nodes (long jumps), bottom layers dense (fine search). 3. Search: Start at top layer, greedily descend to find nearest neighbors. 4. Result: Fast approximate nearest neighbors with tunable accuracy.

Key Parameters

HNSW is the backbone of semantic search — enabling real-time similarity search at scale.

hnswvector searchapproximate nearest neighbor

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.