High-Dimensional Vector Search: Memory Geometry of HNSW vs Quantized Inverted Indices
A deep examination of graph-based versus inverted-file vector indexing when scaling beyond 1,000,000 dense vectors. Architectural trade-offs between DRAM footprint, re-indexing pauses, and NDCG recall.
The Hidden Memory Tax of Proximity Graphs
Hierarchical Navigable Small World (HNSW) graphs are the default standard for approximate nearest neighbor search due to their sub-5ms query performance. However, every vector node maintains links across multiple layers, inflating the active RAM requirements well beyond raw floating-point data size.
Mitigation Through Representation Slicing
Modern embedding models trained with Matryoshka representation learning allow vector truncations without retraining. Slicing 1536-dimensional embeddings to 512 dimensions before constructing the index achieves substantial throughput gains with negligible impact on Top-K retrieval precision.