Expand description
Quantized graph index for approximate nearest-neighbour search on angular data, and (the
Graph and VGraph only, see Metric) on Euclidean data.
Vectors are normalized and rotated (random sign flips and fast Walsh-Hadamard transforms), and a Vamana-style graph with alpha pruning and a fixed out-degree is built on exact inner products, inserting in deterministic batches. Each vertex owns one contiguous block holding its rotated vector, its neighbours’ ids, and for every edge a 1-bit RaBitQ code of the edge residual (neighbour minus vertex) with per-edge correction factors.
Search keeps a pool of ef candidates ordered by estimated distance. Expanding a vertex
scores it exactly (this is the re-rank) and estimates all of its neighbours in one batch from
the edge codes against a 4-bit query code. The result is the top-k of the exactly scored
vertices. max_exact caps the number of expansions (0 = no cap).
Estimator (RaBitQ, Gao & Long 2024, applied per edge as in SymphonyQG, Gou et al. 2025):
with w = u - v and s = sign(w), <q, u> ~= <q, v> + <v, w> + M (<s, q> - <s, v>) where
M = |w|^2 / |w|_1. <q, v> is exact at expansion time; <s, q> comes from the bit planes.
VGraph is the compact alternative on the same Graph: one 8-bit code per vertex instead
of one 1-bit code per edge (see vertex.rs).
Modules§
- filter
- Label-filtered exact-metric nearest-neighbour search over 8-bit vectors (Euclidean).
Structs§
- Build
Params - Consolidation
Policy - Advisory thresholds; callers schedule consolidation outside their commit latency.
- Graph
- A built proximity graph, before any encoding: over normalized vectors (angular) or the vectors as given (Euclidean). Holds a full-precision copy of the data, so it is a build-time object; the indexes keep only their encodings.
- Huge
Page Status - What the huge-page advice of this process achieved.
- QGraph
- Search
Knobs - Runtime knobs of the search loop, each off by default so that the results are those of the
plain search.
VGraph::searcherreads them once per process from the environment (SearchKnobs::from_env);VGraph::searcher_withtakes them explicitly. - Search
Params - Searcher
- Per-thread search state for one index.
- UpdatableV
Graph - A mapped base plus a mutable graph delta, with atomic durable batches.
insert,delete, andreplacepublish immediately;commitmakes the batch durable. Only one process may open a directory, while any number of threads may search it. - VGraph
- VGraph
Memory Breakdown - Logical payload bytes counted by
VGraph::index_bytes, including row padding. Excludes allocation capacity, slab rounding, object/allocator metadata, rotations and query scratch. These are not resident, unique, proportional, or peak memory measures. - VSearch
Params - Search parameters of a
VGraph. - VSearcher
- Per-thread search state for one
VGraph.
Enums§
- Consolidation
- What a consolidation did.
- Consolidation
Mode - How
UpdatableVGraph::consolidate_withpublishes the next generation. - Metric
- Distance a graph is built and searched for.
- Residency
- Where the arrays of an index opened with
VGraph::openlive. - Update
Error - Failures at the update and persistence boundary.
- VMetric
- Scoring contract of the serving codes, independent of graph construction geometry.
Constants§
- DEFAULT_
DEGREE - Default out-degree of every vertex; one batch of edge codes per expansion.
Functions§
- huge_
page_ status - The huge-page advice given so far and the huge pages the process holds.