HNSW: How Vector Search Skips 10 Million Comparisons
Summary
Ten million vectors sit in an index and a query arrives. Comparing against every one is exact and unusable, so vector databases run HNSW instead. This video is a live simulation of the algorithm: build a proximity graph, walk it greedily toward the query, then watch why a single flat graph makes that walk cross the entire space. HNSW stacks the graph into layers, so a thin top layer with long links covers enormous ground in a couple of hops and the best node found becomes the entry point one level down. Coarse to fine, logarithmic rather than linear. It is approximate, and widening the candidate list raises recall and latency together, which is the real operating decision. Full breakdown: mixpeek.com/guides/approximate-nearest-neighbor-algorithms
About this video
Ten million vectors sit in an index and a query arrives. Comparing against every one is exact and unusable, so vector databases run HNSW instead. This video is a live simulation of the algorithm: build a proximity graph, walk it greedily toward the query, then watch why a single flat graph makes that walk cross the entire space. HNSW stacks the graph into layers, so a thin top layer with long links covers enormous ground in a couple of hops and the best node found becomes the entry point one level down. Coarse to fine, logarithmic rather than linear. It is approximate, and widening the candidate list raises recall and latency together, which is the real operating decision. Full breakdown: mixpeek.com/guides/approximate-nearest-neighbor-algorithms