Index Comparison

Compare different vector index algorithms side-by-side

GRAPH

HNSW

Hierarchical Navigable Small World - A graph-based index with multiple layers for efficient approximate nearest neighbor search.

Pros
  • + Tunable recall
  • + Graph-based candidate search
  • + No training required
  • + Supports incremental updates
Cons
  • - Higher memory usage
  • - Build work grows with search breadth
  • - Compression depends on implementation
  • - Memory grows with graph connectivity
CLUSTER

IVF

Inverted File Index - Partitions vectors into clusters using k-means, then searches only relevant clusters.

Pros
  • + Good scalability
  • + Stores vectors plus list assignments
  • + Can combine with PQ
  • + Probe count controls work
Cons
  • - Requires training
  • - Fixed cluster count
  • - Unprobed lists can contain neighbors
  • - Needs parameter tuning

Feature Comparison

These scenes show separate synthetic fixtures, not a performance comparison. Open either explorer to measure recall and replay the actual search. PQ and LSH are reference concepts without an interactive implementation here.

FeatureHNSWIVFPQLSH
Recall @10Dataset-dependentDataset-dependentDataset-dependentDataset-dependent
Query workVisited graph candidatesVectors in probed listsCompressed distance codesHash bucket candidates
MemoryVectors + graph linksVectors + list IDsCodes + codebooksHash tables / signatures
Build workIncremental graph searchCentroid trainingCodebook trainingHashing
Update supportImplementation-dependentImplementation-dependentImplementation-dependentImplementation-dependent
Best ForNavigating a neighbor graphControlling the number of lists scannedMemory constrainedHash-based candidate selection

Quantization can be combined with graph and IVF indexes. See the Faiss index reference for concrete implementations.