HNSW arranges vector-neighbor links in several graph layers. Sparse upper layers make long jumps; denser lower layers refine the search near the query.
It avoids comparing every vector, so results are approximate. Graph degree and candidate breadth affect recall, memory, and query latency.
When to use
Use it when designing or comparing approximate nearest-neighbor indexes for large vector sets.