datastax/jvector
JVector: the most advanced embedded vector search engine
What it solves
JVector is designed to solve the "curse of dimensionality," where exact nearest neighbor search (KNN) becomes prohibitively expensive and slow (linear scan) in high-dimensional spaces. It provides an approximate nearest neighbor (ANN) search that operates in logarithmic time, making it feasible to search through massive datasets efficiently.
How it works
JVector is a graph-based index that combines the architectural strengths of HNSW (Hierarchical Navigable Small Worlds) and DiskANN (Vamana algorithm). It uses a multi-layer graph structure:
- Upper Layers: These are kept in-memory as adjacency lists, allowing for rapid navigation without disk I/O.
- Bottom Layer: This layer is stored on-disk. To optimize performance, JVector employs a two-pass search strategy:
- First Pass: Uses lossily compressed representations of vectors (such as Product Quantization (PQ), Binary Quantization (BQ), or Fused PQ) kept in memory to narrow down candidates.
- Second Pass: Refines the search using more accurate representations read from disk (such as full-resolution float32 vectors or NVQ).
Additionally, JVector allows the index itself to be constructed using these two-pass searches, enabling the creation of of indexes that are larger than the available system memory.
Who it’s for
Developers building applications that require fast, scalable semantic search or vector databases, particularly those working within the Java ecosystem (supporting Java 11 through Java 20+).
Highlights
- Hybrid Architecture: Merges HNSW's hierarchical structure with DiskANN's Vamana algorithm.
- Memory Efficiency: Two-pass search design reduces memory usage and latency while maintaining accuracy.
- Quantization Support: Supports multiple quantization techniques including PQ, BQ, and NVQ.
- Scalable Construction: Nonblocking concurrency control allows index construction to scale linearly with CPU cores.
- Larger-than-Memory Indexes: Ability to build indexes that exceed available RAM.
Related
- Project
- Project
- Project
- Project
- Project