alphaFeedback

WorksComputer Science

GINGER: Spicing Up Graph-Based Vector Search

AI contributions
Not recorded for this paper
View details
Ancillary data
2 code links
View

Abstract

We present Ginger, a state-of-the-art open-source C++ library for graph-based approximate nearest neighbor search (ANNS). We developed Ginger at Google to push the speed and memory efficiency of graph search on large and high-dimensional embedding datasets. Ginger surpasses existing ANNS libraries with regards to query throughput and indexing time while matching the memory footprint of the most space-efficient competitors. Ginger builds upon recent advances in proximity graph construction (PiPNN) and vector quantization (TurboQuant). We introduce Nested TurboQuant (NTQ), a two-level quantizer which supports low precision graph navigation and high precision reranking in a single code. This representation achieves near floating point precision with 2.6×2.6\times less memory. We also compress the size of our proximity graphs by up to 2.5×2.5\times without impacting query throughput. We combine graph reordering with a new lossless compression codec called AdaptiveGap, which builds upon StreamVByte. At 95%95\% recall, Ginger speeds up query throughput by an average of 1.8×1.8\times over each dataset's fastest competitor and by at least 2.3×2.3\times over any single library. This lead grows to 2.9×2.9\times over compact libraries on high-dimensional embeddings.

Query throughput and memory footprint charts

Figure 1. Query throughput relative to Hnswlib at 95% 10@10 recall (top left, higher is better) and memory footprint (graph and compressed vectors) relative to raw vectors (top right, lower is better) as the geometric mean across 14 datasets, alongside index construction time on MS-MARCO (bottom, lower is better). SymphonyQG and ScaNN fail on some datasets, which are excluded in their aggregate.

Introduction

The rapid progress in deep learning has placed Approximate Nearest Neighbor Search (ANNS) at the center of information retrieval and data analysis [31, 49, 50, 62, 72, 88, 93]. Today’s workloads are marked by a sharp increase in both the number of indexed entities and the dimensionality of the embeddings used to represent them.

Proximity graphs have been shown to perform well in very high dimensions, and are thus the dominant technique for ANNS indexing whenever high recall is paramount. A proximity graph represents each entity as a vertex and connects it to nearby and further directionally diverse neighbors. Queries route through the graph via greedy beam search, which iteratively expands the closest unexplored vertices until converging to the query neighborhood. Prominent proximity-graph algorithms include HNSW [57], Vamana (DiskANN) [41], NSG [26], and PiPNN [73, 74]. Compared to cluster-based inverted-file (IVF) indexes such as Faiss [22] and ScaNN [37, 81], proximity graphs achieve high recall with many fewer distance evaluations on modern embeddings.

Still, graph indexes face three bottlenecks in practice: (1) memory bandwidth at search time, (2) memory footprint to host the index, and (3) indexing time. Our prior work PiPNN [73, 74] effectively resolved the issue of index construction, building high-quality

billion-scale indexes in 10s of minutes instead of hours. This paper addresses the other two bottlenecks: search throughput and memory footprint. Moreover, we introduce the first production-grade implementation of PiPNN.

To this end we present and open-source GINGER1, an in-memory C++ library for graph-based ANNS. It was developed internally at Google to solve a variety of large-scale retrieval problems with a primary focus on efficiency. We developed GINGER from the ground up as a standalone C++ library with portable SIMD kernels written in Highway [87]. GINGER also serves as the official open-source implementation of PiPNN II [73], thus combining SOTA query speed, memory efficiency and indexing time in one package.

Many industrial-grade vector search libraries exist, including Faiss [22], ScaNN [37, 81], DiskANN [41], SVS [1], and Hnswlib [58]. Given this high bar, it might be expected that there exists little room for improvement over these widely adopted and well-optimized systems. Surprisingly, we find that a combination of algorithmic improvements in vector quantization as well as careful performance engineering yields significant speedups over the prior state of the art. Across all 14 benchmarks in our evaluation, Ginger is on average 1.8× faster than the fastest competitor at 95% recall (up to 2.7×). The gap is largest on high-dimensional datasets (d≥768d \ge768), where Ginger is 2.0× faster on average. Our results come from both designing every step of our beam search implementation around reducing memory traffic as well as reducing the index footprint by way of lossless graph compression. We make the following contributions.

  • Nested TurboQuant (Section 3). We introduce Nested TurboQuant (NTQ), an extension of TurboQuant in which a single code per vector serves both graph navigation and reranking. The beam search operates on the leading 4 bits per coordinate, which form a valid TurboQuant code [85, 92]. The remaining kk bits refine each 4-bit interval with a nested Lloyd–Max codebook, using the full code to rerank the search results. With 12 bits per coordinate, NTQ nearly matches the accuracy of 32-bit floats while using 2.6× less memory.

  • Fast graph search (Sections 3 and 4). We contribute an extremely fast SIMD kernel for one-to-many scoring of the 4-bit codes. On high-dimensional embeddings, we offer two ways to further speed up the search. We either project vectors to a lower dimension with PCA, or apply a tuning-free prefilter called TurboSlice [17] to discard unpromising candidates early.

  • Graph compression (Section 5). On low-dimensional datasets, the graph adjacency lists of prior libraries consume as much memory as the quantized vectors themselves. We introduce AdaptiveGap, a lossless codec that packs small gaps into fewer than eight bits while retaining the single-shuffle SIMD decoding of StreamVByte. On the same vertex ordering, AdaptiveGap uses on average 5.4% less graph memory (up to 7.6%) than StreamVByte. We combine this codec with graph partitioning to assign nearby IDs to neighboring vertices. Together, these techniques shrink the graph by an average of 2.1× (up to 2.5×) relative to an uncompressed CSR layout without slowing down queries.

  • Extensive evaluation (Section 6). We compare Ginger with seven state-of-the-art graph and IVF libraries on 14 public benchmarks with up to one billion vectors and 4096 dimensions. Ginger achieves the highest query throughput at 90% and 95% recall on 13 of the 14 benchmarks. At 95% recall, Ginger outperforms the fastest competitor by 2.0× on average (up to 2.7×) on high-dimensional data and by 1.45× (up to 2.1×) on low-dimensional data. At 90% recall, the corresponding speedups are 1.8× (up to 2.3×) and 1.55× (up to 2.0×). The complete Ginger index for the billion-point Deep dataset occupies approximately 288 GB of memory with 12-bit NTQ (Figure 5).

Memory footprint in bytes per vector broken down by index component

Figure 5. Memory footprint in bytes per vector broken down by index component. The dashed vertical indicates the uncompressed vector size. Percentages show the memory overhead or savings relative to the raw vectors. On high-dimensional datasets, we report Ginger with 8-bit (4 + 4) and 12-bit (4 + 8) NTQ reranking.

Ginger’s modular design and portable SIMD kernels make it easy to integrate state-of-the-art ANNS into new search and data management systems. Our results demonstrate that we can simultaneously deliver state-of-the-art memory footprint, search performance, and indexing time through a mix of algorithmic improvements and performance engineering.

Preliminaries

Let X⊆Rd\mathcal{X} \subseteq\mathbb{R}^{d} be a collection of nn vectors and let dist⁡(⋅,⋅)\operatorname{dist}(\cdot,\cdot) be a dissimilarity on Rd\mathbb{R}^{d}, such as Euclidean distance or negative inner product.

Definition 2.1 (k-nearest-neighbor search). Given a query q∈Rdq \in\mathbb{R}^{d}, the kk-nearest-neighbors of qq in X\mathcal{X} is a set K⊆X\mathcal{K} \subseteq\mathcal{X} with ∣K∣=k|\mathcal{K}| = k such that dist⁡(q,p)≤dist⁡(q,p′)\operatorname{dist}(q,p) \le\operatorname{dist}(q,p') for all p∈Kp \in\mathcal{K} and p′∈X∖Kp' \in\mathcal{X} \setminus\mathcal{K}.

Approximate Nearest Neighbors (ANNS). Given a query qq, an approximate nearest neighbors (ANNS) index returns a set K′\mathcal{K}' that approximates K\mathcal{K}. The quality is measured by the recall, ∣K∩K′∣/k|\mathcal{K} \cap\mathcal{K}'|/k, averaged over a query set. We write k@k′k@k' recall when ∣K′∣=k′≥k|\mathcal{K}'| = k' \ge k, and use 10@10 recall unless stated otherwise. An index is judged by its throughput (queries per second, QPS) at a given recall, by its memory footprint, and by the time taken to construct it.

ANNS Indexes

Proximity Graphs and Search. A graph-based ANNS index organizes vectors into a proximity graph, with a vertex for each vector and directed edges connecting vectors. Neighbors are selected heuristically during graph construction based on closeness and directional diversity. Queries explore the graph using beam search (Algorithm 1). Starting from an entry vertex ss, the search maintains a beam BB of at most LL candidates and a set VV of expanded vertices. It repeatedly expands the closest vertex in B∖VB \setminus V, adds its neighbors to the beam, and retains the LL closest candidates, stopping when every vertex in the beam has been expanded. Implementations of graph search differ widely in their candidate and visited-set data structures, stopping rules, filtering, batching, and prefetching. They may also navigate using quantized vectors and rerank a larger candidate set using full-precision vectors or more accurate codes. These choices affect memory traffic, query throughput, and recall.

Algorithm 1: BeamSearch

Input: G = (X, E) a proximity graph over X, s ∈ X an entry point, q a query point, and L ∈ N a beam width
Output: B ⊆ X containing the L closest points to q encountered during the search

1  B ← {s};
2  V ← ∅;
3  while B \ V ≠ ∅ do
4      p ← arg min_{u∈B\V} dist(u,q);
5      B ← B ∪ Neighbors(p);
6      V ← V ∪ {p};
7      if |B| > L then
8          B ← the L points in B with smallest distance to q;
9  return B;

Graph Construction. The Vamana [41] index constructs a proximity graph iteratively via beam-search traversals on the partial index and an α\alpha-Relative Neighborhood Graph (α\alpha-RNG) pruning heuristic (RobustPrune). This rule enforces directional diversity and injects long-range edges, achieving shorter search paths than hierarchical structures like HNSW [57]. Many other proximity-graph construction algorithms have been proposed [21, 24, 25, 26, 38, 40, 56, 63, 86, 90, 91, 94]. In practice, Vamana and HNSW are the most widely used. However, search-driven graph construction suffers from a fundamental “search bottleneck” [74] requiring millions of random-access memory lookups and thus incurring long build times.

PiPNN (Pick-in-Partitions Nearest Neighbors) [74] speeds up index construction by replacing searches during construction with a partitioning-based build paradigm. Instead of global beam searches, PiPNN recursively decomposes the dataset into overlapping clusters via randomized ball carving and generates candidate edges using cache-friendly many-to-many top-kk kernels. This achieves an order-of-magnitude faster index construction across CPUs and accelerators while maintaining equivalent graph quality. In Ginger, we offer both PiPNN and Vamana index builds to give users flexibility and choice.

Inverted Indexes. Inverted-file (IVF) indexes partition vectors into clusters and store each cluster in an inverted list. A query probes a subset of the clusters and scores the vectors in their lists, often using quantized representations followed by higher-precision reranking.

Quantization. Quantization replaces floating-point vectors with compact codes representing regions of the vector space, reducing both index memory and the bytes fetched during distance evaluation [1, 42]. The codes must support fast scoring while preserving enough accuracy to identify the nearest neighbors. Scalar quantization encodes each coordinate independently using bb bits to select one of 2b2^b representative values. Product quantization partitions a vector into subvectors and encodes each with an index into a learned codebook; distances are estimated by combining per-subvector table lookups [32, 42]. Rotation-based scalar quantizers first apply a shared random orthogonal transformation, then encode the transformed coordinates. Examples include DRIVE/EDEN [8, 84, 85], RaBitQ [27, 28, 30], and TurboQuant [92]. The representation and scoring kernel must also suit the search access pattern. Graph traversal scores scattered candidates, whereas IVF search scans lists of vectors. Quantization has a rich literature, and we refer readers to the excellent surveys [36, 60] for background on its foundations and applications to nearest-neighbor search. § 3 presents our nested quantizer and SIMD scoring kernels for graph navigation and reranking.

Prior Libraries

We focus on a representative selection of widely used libraries and high-performance ANNS methods. Our selection emphasizes methods that are widely adopted and/or very high performance while covering graph-based and inverted-file search.

DiskANN. DiskANN [41, 46] is Microsoft’s widely used library for in-memory and SSD-backed search using the Vamana proximity graph. Its SSD-backed design enables billion-scale search on a single machine by keeping compressed vectors in memory and fetching graph neighborhoods and full-precision vectors from disk.

ParlayANN. ParlayANN [59, 66] is a highly optimized parallel graph-based ANNS library built on the ParlayLib [12] runtime. It provides deterministic implementations of proximity-graph algorithms, including Vamana, designed to avoid synchronization bottlenecks and scale to large datasets on shared-memory machines.

SVS. Intel’s Scalable Vector Search (SVS) [1] combines Vamana-based search with highly optimized SIMD kernels and compressed vector representations. Its LVQ codec uses per-vector scaling and scalar quantization to reduce memory traffic, while LeanVec [83] combines dimensionality reduction with quantization.

Hnswlib. Hnswlib [58] provides a lightweight, header-only C++ implementation of HNSW [57] with Python bindings and support for custom distance functions. It supports incremental index construction, vector updates and deletions, and multithreaded search, with configurable graph connectivity and search effort.

SymphonyQG. SymphonyQG [27, 35] combines RaBitQ quantization [30] with FastScan [4], storing codes on graph edges to score neighbors sequentially. Its layout aligns vertex degrees with 32-edge FastScan batches, trading increased memory usage from replicated codes for fewer random accesses during graph search.

Faiss. Faiss [22, 43] is Meta’s similarity search library, offering flat, IVF, and graph indexes with scalar and product quantization. Its widely-used CPU implementations support large-scale search, with index and compression choices that provide different tradeoffs between memory usage, query throughput, and recall.

ScaNN. ScaNN [37, 81] is an existing IVF-based similarity search library developed at Google, combining partitioning with anisotropic vector quantization and optimized scoring kernels for maximum inner-product search. Its two-stage pipeline scores candidates using low-bit representations before reranking a smaller set, reducing the cost of evaluating large candidate pools.

Nested TurboQuant (NTQ)

All production-grade ANNS libraries use quantization. Because distance evaluation performs only a small constant number of arithmetic operations per loaded byte, ANNS is limited by memory bandwidth. Compressing coordinates to low-precision codes reduces both memory traffic and the memory footprint of the index.

Graph beam search imposes a specific access pattern on the quantizer: each expansion fetches an arbitrary subset of non-contiguous points in X\mathcal{X} and scores each point by scanning across its coordinates. Unfortunately, standard PQ [32, 42], as used in IVF indexes, is ill-suited for this task because loading each of the MM subspace lookup tables is expensive relative to scoring a single point. Uniform scalar quantization methods avoid per-subspace codebooks and support fast coordinate-wise scans, but suffer higher quantization error. Recently, rotation-based quantizers [28, 30, 84, 85, 92] have become popular. They keep the fast coordinate-wise scans of uniform scalar quantizers and need no per-subspace tables, while achieving much lower quantization error. A random rotation makes every coordinate approximately Gaussian, so a single scalar codebook serves all coordinates. EDEN [85] and TurboQuant [92] place this codebook non-uniformly at the Lloyd–Max points of the Gaussian [52, 61], which minimizes the mean-squared error per coordinate.

Graph search needs two precisions with conflicting goals. Beam search scores thousands of random candidates per query and needs a compact code that is cheap to load from memory and score. Reranking scores only the final beam, but needs the accuracy of floats to achieve very high recall. A standard recipe is therefore to navigate with aggressive quantization and then rerank the converged beam with floats or higher-precision codes. Storing a second code for reranking, or maintaining the float vectors, wastes significant memory. A single nested code avoids this waste, but only if nesting does not degrade the quality of the codes. We developed Nested TurboQuant (NTQ) to achieve this.

Overview of Our Approach. NTQ builds on TurboQuant [92] and EDEN [8, 85]. It takes the 4-bit Lloyd–Max codebook and splits each of its intervals into 2k2^k finer sub-intervals, which yields a (4+k)(4+k)-bit code. The 4-bit prefix of every code is therefore a complete TurboQuant code for navigation. The full code nearly matches float accuracy for reranking. Search cost stays fixed, while the kk additional bits per coordinate trade memory for reranking accuracy. We mostly focus on 10- and 12-bit codes (k=6k=6 and 8). Nesting is nearly free, because the rotation makes every coordinate approximately Gaussian, and Gaussian sources are successively refinable [23]. Both levels of NTQ are therefore close to optimal for the rotated coordinates. We make both levels fast to score by evaluating their codebooks in registers rather than memory.

The following subsections describe NTQ in detail for interested readers. Section 3.1 sets up the TurboQuant encoding that NTQ builds on and points out where we deviate from it. Section 3.2 introduces the nested refinement, which is the core of NTQ. Sections 3.3 and 3.4 describe fast scoring kernels for 4-bit navigation and (4+k)(4+k)-bit reranking. All quantization and scoring kernels are implemented in portable SIMD using Highway [87]. For concreteness, we refer to AVX-512 instructions in the text.

Rotation and Codebook

To encode a non-zero vector x∈Rdx \in\mathbb{R}^d, NTQ normalizes and rotates it to y=d Rx^y=\sqrt{d}\,R\hat{x} with x^=x/∥x∥2\hat{x}=x/\lVert x\rVert_2. It then quantizes each coordinate yiy_i with a scalar codebook and stores a per-vector scale factor that corrects for the norm and for the shrinkage caused by quantization.

Non-Power-of-Two Rotation. Applying a dense orthogonal matrix RR costs O(d2)O(d^2) operations per vector, which is too expensive. Therefore, we use a randomized Walsh–Hadamard transform [2, 3], which takes O(dlog⁡d)O(d\log d) operations. However, this transform is limited to dimensions that are a power of two. Zero-padding dd to the next power of two as in EDEN [85] can nearly double the memory footprint and scoring work.

Instead, we factor d=r⋅2ℓd=r\cdot2^\ell with rr odd and ℓ≥0\ell\geq0 maximal. Let S=diag⁡(σ1,…,σd)S=\operatorname{diag}(\sigma_1,\ldots,\sigma_d) with independent uniform random signs σi∈{±1}\sigma_i\in\{\pm1\}. We split SxSx into rr contiguous blocks of 2ℓ2^\ell coordinates and stack these blocks as the rows of a matrix X∈Rr×2ℓX\in\mathbb{R}^{r\times2^\ell}. We then define RxRx as the concatenation of the rows of QXH2ℓQXH_{2^\ell}. Here H2ℓ∈{±2−ℓ/2}2ℓ×2ℓH_{2^\ell}\in\{\pm2^{-\ell/2}\}^{2^\ell\times2^\ell} is the normalized (orthonormal) Walsh–Hadamard matrix, so right-multiplication applies the Walsh–Hadamard transform to each block. The matrix QQ is an r×rr\times r Haar-random orthogonal matrix, so left-multiplication mixes corresponding coordinates across rr blocks. Since SS, H2ℓH_{2^\ell}, and QQ are orthogonal, RR is an orthogonal matrix. Evaluating RxRx takes O(d(ℓ+r))O(d(\ell+r)) operations, which is O(dlog⁡d)O(d\log d) for small constant rr (e.g., r=3r=3 for common dimensions d∈{96,768,1536,3072}d\in\{96,768,1536,3072\}). For these dimensions, zero-padding to the next power of two would add 33% more codes and distance scoring work.

Gaussian Lloyd–Max Codebook. Following TurboQuant [92], we quantize each rotated coordinate using a symmetric bb-bit Gaussian Lloyd–Max codebook [52, 61]. The codebook packs R≥0\mathbb{R}_{\geq0} using 2b−12^{b-1} positive centroids 0<c0<⋯<c2b−1−10<c_0<\cdots<c_{2^{b-1}-1} separated by mid-point thresholds t1,…,t2b−1−1t_1,\ldots,t_{2^{b-1}-1}. Each coordinate yiy_i stores its sign sgn⁡(yi)∈{±1}\operatorname{sgn}(y_i)\in\{\pm1\} and the index ui∈{0,…,2b−1−1}u_i\in\{0,\ldots,2^{b-1}-1\} of the centroid nearest to ∣yi∣\lvert y_i\rvert, giving reconstruction y~i=sgn⁡(yi)cui\tilde{y}_i=\operatorname{sgn}(y_i)c_{u_i}. NTQ uses this codebook with b=4b=4 for navigation, and Section 3.2 refines its intervals for reranking.

Nested intervals and tail fit

Figure 2. (a) Nested (4+k)(4+k)-bit intervals under the rotated coordinate density ϕ(z)\phi(z), where each positive 4-bit interval [tu,tu+1)[t_u,t_{u+1}) splits into 2k2^k sub-intervals without crossing t1,…,t7t_1,\ldots,t_7. (b) On the unbounded tail interval u=7u=7, a single cubic poorly fits the (4+8)(4+8)-bit centroids c7,vc_{7,v}, whereas M8=16M_8=16 cubic segments track c7,vc_{7,v} closely across all 256 sub-indices.

Norm and Shrinkage Rescaling. Inner products with quantized vectors are biased unless they are corrected. Under the standard normal density ϕ(z)=(2π)−1/2e−z2/2\phi(z)=(2\pi)^{-1/2}e^{-z^2/2}, the bb-bit codebook incurs a per-coordinate mean-squared error

Db=E[(yi−y~i)2]=2∑u=02b−1−1∫tutu+1(z−cu)2ϕ(z) dzD_b=\mathbb{E}[(y_i-\tilde{y}_i)^2]=2\sum_{u=0}^{2^{b-1}-1}\int_{t_u}^{t_{u+1}}(z-c_u)^2\phi(z)\,\mathrm{d}z

with t0=0t_0=0 and t2b−1=∞t_{2^{b-1}}=\infty. Because each centroid cuc_u is the conditional mean of its interval, E[(yi−y~i)y~i]=0\mathbb{E}[(y_i-\tilde{y}_i)\tilde{y}_i]=0, which gives E[yiy~i]=E[y~i2]=1−Db\mathbb{E}[y_i\tilde{y}_i]=\mathbb{E}[\tilde{y}_i^2]=1-D_b. Normalizing y~\tilde{y} using the groundtruth shifts inner products with RxRx by E[⟨Rx,y~⟩]/E[∥y~∥22]=1−Db\mathbb{E}[\langle Rx,\tilde{y}\rangle]/\sqrt{\mathbb{E}[\lVert\tilde{y}\rVert_2^2]}=\sqrt{1-D_b}. Rotation-based quantizers correct this bias in different ways. EDEN [85] divides by ⟨Rx,y~⟩\langle Rx,\tilde{y}\rangle. TurboQuant [92] uses (b−1)(b-1)-bit Lloyd–Max quantization and reserves 1 bit per coordinate for a quantized Johnson–Lindenstrauss (QJL) sign sketch of the quantization residual. We store the per-vector scale factor sb(x)=∥x∥2/(1−Db∥y~∥2)s_b(x)=\lVert x\rVert_2/(\sqrt{1-D_b}\lVert\tilde{y}\rVert_2), so that sb(x)y~s_b(x)\tilde{y} estimates RxRx without shrinkage bias. This costs a single float per vector and leaves all bb bits to the codebook. By orthogonality of RR, we then estimate ⟨q,x⟩=⟨Rq,Rx⟩\langle q,x\rangle=\langle Rq,Rx\rangle as sb(q)sb(x)⟨q~,y~⟩s_b(q)s_b(x)\langle\tilde{q},\tilde{y}\rangle for a quantized query or sb(x)⟨Rq,y~⟩s_b(x)\langle Rq,\tilde{y}\rangle for an unquantized query.

Nested Refinement

For reranking, NTQ adds kk refinement bits per coordinate to the 4-bit code. A standard way to add such bits is two-stage residual quantization, which encodes the residual yi−y~iy_i-\tilde{y}_i of the 4-bit reconstruction with a second codebook shared across all 4-bit intervals [22, 42]. However, because the conditional distribution of a rotated coordinate varies significantly between the 4-bit intervals, a shared residual codebook is suboptimal. In our experiments, residual quantization achieves lower recall than the nested codebook described next (see § 6.3).

We instead split each positive 4-bit interval [tu,tu+1)[t_u,t_{u+1}) into 2k2^k contiguous sub-intervals with centroids cu,vc_{u,v} for v∈{0,…,2k−1}v\in\{0,\ldots,2^k-1\} (Figure 2a). Here u∈{0,…,7}u\in\{0,\ldots,7\}, t0=0t_0=0, and t8=∞t_8=\infty. The centroids cu,0,…,cu,2k−1c_{u,0},\ldots,c_{u,2^k-1} form a 2k2^k-entry Lloyd–Max codebook for the standard normal density restricted to [tu,tu+1)[t_u,t_{u+1}). Each 4-bit interval therefore gets its own refinement codebook, adapted to the shape of ϕ(z)\phi(z) on that interval. Encoding first finds the 4-bit interval uiu_i of ∣yi∣|y_i| as in Section 3.1 and then the nearest centroid cui,vic_{u_i,v_i} within that interval. Since the sub-intervals never cross the 4-bit thresholds, each coordinate’s (4+k)(4+k)-bit code splits into its 4-bit code uiu_i and a kk-bit refinement code viv_i. The (4+k)(4+k)-bit reconstruction is y~i(4+k)=sgn⁡(yi)cui,vi\tilde{y}_i^{(4+k)}=\operatorname{sgn}(y_i)c_{u_i,v_i}. Its scale factor s4+k(x)s_{4+k}(x) follows Section 3.1, with the mean-squared error D4+kD_{4+k} summed over all 8⋅2k8\cdot2^k positive sub-intervals.

Why Nesting Is Nearly Free. Forcing the (4+k)(4+k)-bit code to refine the 4-bit intervals could cost accuracy, because an unconstrained (4+k)(4+k)-bit Lloyd–Max codebook would place all of its thresholds freely. This constraint costs almost nothing, because Gaussian sources are successively refinable under mean-squared error [23].

Storage Layout. The 4-bit codes, packed two per byte, and their per-vector scale factor form the navigation array read by beam search. The refinement codes and s4+k(x)s_{4+k}(x) form a separate array read only for reranking, so beam search loads no extra bytes.

Vectorized 4-Bit Scoring for Beam Search

Each coordinate of a data vector is stored as a 4-bit code for beam search, so the codebook has only 16 entries. To score candidates with fast 8-bit integer dot-product instructions, we round these 16 centroids to int8 values and quantize the query coordinates to int8 as well. Each codebook entry then occupies a single byte, so the entire codebook forms a 16-entry lookup table. We load this table into a vector register. Scoring a candidate looks up each of its 4-bit codes in this register and accumulates the products with the query coordinates.

Codes and Table Entries. For each database vector xx, coordinate i∈{0,…,d−1}i\in\{0,\ldots,d-1\} packs its sign and 3-bit index ui∈{0,…,7}u_i\in\{0,\ldots,7\} into a 4-bit nibble ni∈{0,…,15}n_i\in\{0,\ldots,15\}, which serves directly as the table index. The table holds the 16 signed centroids ±c0,…,±c7\pm c_0,\ldots,\pm c_7 quantized to int8 as ±round⁡(127cu/c7)\pm\operatorname{round}(127c_u/c_7), so looking up nin_i yields yˉi∈[−127,127]\bar{y}_i\in[-127,127]. For a query qq, we quantize the rotated coordinates to int8 as qˉi=round⁡(127(Rq)i/∥Rq∥∞)∈[−127,127]\bar{q}_i=\operatorname{round}(127(Rq)_i/\lVert Rq\rVert_\infty)\in[-127,127]. The scale factors sˉ4(x)=∥x∥2/(1−D4∥yˉ∥2)\bar{s}_4(x)=\lVert x\rVert_2/(\sqrt{1-D_4}\lVert\bar{y}\rVert_2) and sˉ(q)=∥q∥2/∥qˉ∥2\bar{s}(q)=\lVert q\rVert_2/\lVert\bar{q}\rVert_2 absorb the int8 scales, so sˉ(q)sˉ4(x)⟨yˉ,qˉ⟩\bar{s}(q)\bar{s}_4(x)\langle\bar{y},\bar{q}\rangle estimates ⟨q,x⟩\langle q,x\rangle.

Shifted Table Entries. We accumulate the products with the x86 8-bit integer dot-product instruction v p d p b u s d [39], which multiplies unsigned by signed bytes and accumulates into 32-bit integers. The table therefore stores the shifted unsigned entries yˉi+128∈{1,…,255}\bar{y}_i+128\in\{1,\ldots,255\}, while the query bytes qˉi\bar{q}_i remain signed. The shift adds a query-dependent, candidate-independent bias:

∑i=0d−1(yˉi+128)qˉi=⟨yˉ,qˉ⟩+128∑i=0d−1qˉi.(1)\sum_{i=0}^{d-1}(\bar{y}_i+128)\bar{q}_i=\langle\bar{y},\bar{q}\rangle+128\sum_{i=0}^{d-1}\bar{q}_i. \tag*{(1)}

We precompute this bias per query and subtract it from each candidate’s accumulated dot product before multiplying by sˉ(q)sˉ4(x)\bar{s}(q)\bar{s}_4(x).

Table Lookups. The byte shuffle instruction pshufb performs the lookups. It replaces each index byte in {0,…,15}\{0,\ldots,15\} by the table entry at that position. With a copy of the table in each 128-bit lane, one AVX-512 shuffle performs 64 lookups. For each candidate vector, coordinate pairs (n2j,n2j+1)(n_{2j},n_{2j+1}) are packed into the low and high nibbles of byte j∈{0,…,⌊d/2⌋−1}j\in\{0,\ldots,\lfloor d/2\rfloor-1\}. Rather than unpacking nibbles into coordinate order via cross-lane shuffles, we split qˉ\bar{q} into contiguous even coordinates (qˉ0,qˉ2,…)(\bar{q}_0,\bar{q}_2,\ldots) and odd coordinates (qˉ1,qˉ3,…)(\bar{q}_1,\bar{q}_3,\ldots). Each SIMD step loads one vector register of packed code bytes. A bitwise mask (0x0F) extracts the even indices, and a 4-bit right shift followed by the same mask extracts the odd indices. Two shuffles, each performing 64 table lookups, map both index streams to yˉi+128\bar{y}_i+128, and two vpdpbusd instructions accumulate their dot products with the even and odd query coordinates. Since each step takes only a few SIMD instructions, scoring is dominated by fetching neighbors from dispersed memory addresses. We therefore issue software prefetches several candidates ahead during neighbor-list expansion to hide DRAM latency.

Fast (4+k)-Bit Reranking

Reranking fetches the refinement codes of the top candidates. It scores each candidate against the unquantized rotated query RqRq as s4+k(x)⟨Rq,y~(4+k)⟩s_{4+k}(x)\langle Rq,\tilde{y}^{(4+k)}\rangle. Unlike the int8 table of Section 3.3, reranking computes in float precision. Refinement codebooks for small kk fit in registers, but the 10- and 12-bit codebooks have 512 or 2048 positive centroids and need memory gathers, which take roughly 80% of reranking time at d=4096d=4096.

Piecewise-Cubic Codebook Approximation. We therefore replace the table with a piecewise-cubic polynomial that computes each centroid c^u,v\hat{c}_{u,v} in registers from its integer index. The coefficients of each piece are fit offline by least squares to the codebook centroids.

On each of the seven bounded intervals (u≤6u\leq6), ϕ(z)\phi(z) is smooth and bounded away from zero. A single cubic per interval therefore fits all 2k2^k sub-centroids with small error. On the unbounded tail [t7,∞)[t_7,\infty), ϕ(z)\phi(z) decays rapidly and the sub-intervals grow progressively wider, so a single cubic cannot fit all tail centroids (Figure 2b). We split the 2k2^k tail sub-intervals into MkM_k equal segments of Bk=2k/MkB_k=2^k/M_k sub-intervals each. MkM_k must be a power of two so that BkB_k is one as well, which lets each SIMD lane find its segment with a shift and a mask. We choose M6=8M_6=8 and M8=16M_8=16, the largest such values for which the coefficients of all 7+Mk7+M_k segments fit in one 16-lane float register per polynomial degree for k=6k=6, and in two for k=8k=8.

In-Register SIMD Evaluation. A coordinate with codes (u,v)(u,v) belongs to segment s=us=u with local index τ=v\tau=v if u<7u<7. In the tail, it belongs to segment s=7+⌊v/Bk⌋s=7+\lfloor v/B_k\rfloor with τ=v mod Bk\tau=v\bmod B_k. We evaluate 16 coordinates in parallel, and each SIMD lane computes (s,τ)(s,\tau) with a shift and a mask. Each lane then selects its segment’s coefficients (as,0,…,as,3)(a_{s,0},\ldots,a_{s,3}) with an in-register permutation (vpermp s for k=6k=6, or two-register vpermi2ps for k=8k=8). Finally, it evaluates the cubic in Horner form with three fused multiply-adds:

c^u,v=as,0+τ(as,1+τ(as,2+τas,3)).(2)\hat{c}_{u,v}=a_{s,0}+\tau(a_{s,1}+\tau(a_{s,2}+\tau a_{s,3})). \tag*{(2)}

Replacing memory gathers with in-register permutations and fused multiply-adds roughly halves 10- and 12-bit reranking latency, with no loss in recall.

Search Optimizations

Although the basic beam search (Algorithm 1) is simple, ANN systems vary significantly in the details of how the search is implemented. In Ginger, we build on our fast 4-bit scoring kernel (Section 3.3) with search optimizations that reduce memory traffic and the overhead of maintaining the candidate beam.

Search on Projected Coordinates

On high-dimensional datasets, fetching and scoring even quantized candidate vectors consumes substantial memory bandwidth. In Ginger, we reduce this cost by projecting database vectors and queries into a lower-dimensional space using Principal Component Analysis (PCA) [44]. We encode the projected vectors with 4-bit navigation codes and score them using the kernel from Section 3.3. Each candidate evaluation therefore reads and scores fewer coordinates, reducing memory traffic beyond quantization alone.

The database vectors can be projected offline, whereas each incoming query must be multiplied by the projection matrix PP before navigation begins. This matrix multiplication is itself memory-bound and competes with graph traversal for memory bandwidth when queries run in parallel across threads. To alleviate this bottleneck, we also quantize the rows of PP to 4 bits, reducing the data fetched during query projection. Our results show that this does not impair recall (Figure 8).

QPS for 32-bit float and 4-bit TQ projection matrices on Wiki-Cohere, DBpedia-1536, and Wiki-Qwen

Figure 8. Quantizing the PCA matrix improves QPS on very high dimensions.

Candidate Prefiltering

During beam search, most scanned neighbors v∈N(p)v \in N(p) are not useful and will never enter the beam BB. On high-dimensional datasets, we can use a cheaper filter distance dfilt(q,v)d_{\mathrm{filt}}(q,v) to prune unpromising candidates early and thus avoid computing the 4-bit navigation distance dnav(q,v)d_{\mathrm{nav}}(q,v). Only the neighbors with dfilt(q,v)d_{\mathrm{filt}}(q,v) below a cutoff threshold are scored with dnavd_{\mathrm{nav}}.

This general idea has been used in several recent systems [15, 29, 45, 53, 54, 82]. For example, ADSampling [29] uses Johnson–Lindenstrauss projections for Euclidean distance, and FINGER [15] uses angle approximation. However, prior methods rely on a specific relationship between the two distance measures so that a candidate’s filter score can be compared against the navigation distance dnav(q,bL)d_{\mathrm{nav}}(q,b_L) of the furthest point bL∈Bb_L \in B [89].

Our Approach. We instead allow pairing arbitrary filter and navigation measures, such as Hamming distance and inner product. All we require is that each measure independently approximates the distance ordering relative to qq, which makes this framework flexible. This decoupling works because beam admission depends only on relative distance ordering around qq rather than calibrated distance values. Any coarse sketch whose ranking correlates with dnav(q,⋅)d_{\mathrm{nav}}(q,\cdot) can separate the few promising neighbors from the many that lie far behind the beam boundary. At the same time, dfiltd_{\mathrm{filt}} has higher variance than dnavd_{\mathrm{nav}} and cannot replace it for graph navigation, even in early hops. Navigating directly with dfiltd_{\mathrm{filt}} commits the greedy traversal to its ranking errors and can steer the beam away from the query neighborhood. Using dfiltd_{\mathrm{filt}} solely as a conservative gate backed by dnavd_{\mathrm{nav}} preserves the 4-bit search trajectory while skipping full distance evaluations on clearly unpromising neighbors. Because the two measures may not be comparable, we derive the filter cutoff from the beam using dfiltd_{\mathrm{filt}} itself. Thresholding against dfilt(q,bL)d_{\mathrm{filt}}(q,b_L) alone would be brittle, because a noisy filter can assign bLb_L a small distance by chance and prune candidates that beat bLb_L under dnavd_{\mathrm{nav}}. While the beam is filling up (∣B∣<L|B| < L), prefiltering is disabled. Once the beam is full (at step t0t_0), we compute the mean filter distance μt\mu_t over the ww furthest points at the tail of B=(b1,…,bL)B = (b_1, \ldots, b_L) to smooth out single-point noise. We then set the cutoff τt\tau_t to the running average of μs\mu_s over all steps since t0t_0:

μt=1w∑j=L−w+1Ldfilt(q,bj),τt=1t−t0+1∑s=t0tμs.(3)\mu_t = \frac{1}{w}\sum_{j=L-w+1}^{L}d_{\mathrm{filt}}(q,b_j), \qquad\tau_t = \frac{1}{t-t_0+1}\sum_{s=t_0}^{t}\mu_s. \tag*{(3)}

If bLb_L did not change on step tt, we reuse μt=μt−1\mu_t = \mu_{t-1}. As the beam improves, μt\mu_t decreases, so τt\tau_t tightens over time while staying slightly looser than μt\mu_t. We instantiate this scheme with two filters:

TurboSlice. Because the random rotation in Section 3.1 spreads a vector’s energy evenly across all rotated coordinates, any prefix of dts<dd_{\mathrm{ts}} < d rotated 4-bit coordinates acts as a low-dimensional sketch, which provides an unbiased estimator of the dot product [17]. This sketch sits at the front of the 4-bit navigation code and requires no extra vector storage. For typical prefix lengths dts∈{128,256}d_{\mathrm{ts}} \in\{128,256\}, the filter reads only one or two cache lines and skips loading the rest of the vector for rejected neighbors. We score the prefix with the 4-bit kernel of Section 3.3 over the first dtsd_{\mathrm{ts}} coordinates and rescale by a precomputed prefix norm factor sˉ4(dts)(x)=∥x∥2/(1−D4∥yˉ1:dts∥2)\bar{s}_4^{(d_{\mathrm{ts}})}(x)=\lVert x\rVert_2/(\sqrt{1-D_4}\lVert\bar{y}_{1:d_{\mathrm{ts}}}\rVert_2).

1-Bit Sparse Johnson–Lindenstrauss (JL). ParlayANN [59] already offers a filter based on JL, whose details have not been published so far, however. This filter maps each vector x∈Rdx \in\mathbb{R}^d to a djld_{\mathrm{jl}}-bit sign sketch h(x)∈{0,1}djlh(x) \in\{0,1\}^{d_{\mathrm{jl}}} with bits hi(x)=1[⟨ai,x⟩>0]h_i(x)=1[\langle a_i,x\rangle> 0] (we usually use djl=1024d_{\mathrm{jl}} = 1024). We pack the sketches into 64-bit words and compare them by Hamming distance ∥h(q)⊕h(v)∥1\lVert h(q) \oplus h(v)\rVert_1. Because our cutoff (3) only compares filter scores against other filter scores, we can use the Hamming distances directly without reconstructing angles or norms. To make projecting the query fast, it suffices to use a sparse random projection matrix A∈{−1,0,+1}djl×dA \in\{-1,0,+1\}^{d_{\mathrm{jl}}\times d} with only a few non-zero entries per row.

While our experiments show that PCA is generally more effective than the prefilters and they do not stack well (both reduce memory traffic in a similar way), we note that the prefilters are quite useful in scenarios where we cannot work with PCA. One example is network-constrained deployments, where we do not want to send multiple sets of vectors per query over the wire. Here, taking a TurboSlice prefix does not incur additional traffic. Another example is extremely high-dimensional vectors, where the projection matrix is so large that it slows down projection.

Beam Management

A naive beam search maintains two priority queues for the closest unexplored vertices and the furthest points in BB. However, priority-queue operations take O(log⁡L)O(\log L) time and have poor cache locality. Following ParlayANN [59] and SVS [1], instead keep BB in a single array of size at most LL sorted by distance. Each entry stores a flag indicating whether it has been explored, and we track the index of the first unexplored entry. Picking the next vertex to expand then takes O(1)O(1) time. Because BB is sorted, the furthest element bLb_L sits at the end of the array and provides the distance cutoff for entering the beam. Inserting new points into the sorted array one at a time would take O(L)O(L) time per point. Instead, when expanding a vertex p∈Bp \in B, we keep only the unvisited neighbors that beat bLb_L, sort the survivors, and merge them into BB in a single linear pass.

Later in the search, most neighbors have already been visited or fail to beat bLb_L, so merging after every expansion scans the whole beam just to insert one or two points. Once the initial phase of the search is over, we therefore batch across consecutive expansions. We collect unvisited neighbors from several unexplored beam vertices, score them together, and merge the survivors into BB in a single pass. Batching also exposes a longer stream of candidates, which helps amortize startup latency (due to prefetching) in the TurboQuant scoring kernel.

Graph Compression

In Ginger, we also reduce the memory occupied by the proximity graph itself, which can exceed the footprint of the quantized vectors on low-dimensional datasets. For example, a 96-dimensional vector occupies 144 bytes at 12 bits per coordinate, whereas a flat adjacency list with 64 four-byte slots and a degree counter occupies 260 bytes. We therefore compress the graph losslessly while keeping decoding fast enough to avoid slowing search.

Our approach first relabels vertices so that neighbors receive nearby IDs (Section 5.1), then stores each sorted neighbor list as gaps between consecutive IDs. We encode these gaps with a codec that packs small values into fewer than eight bits and decodes four at a time using a few SIMD instructions (Section 5.2).

Gap encoding. Let v1<v2<⋯<vdeg⁡(u)v_1 < v_2 < \cdots< v_{\operatorname{deg}(u)} be the sorted neighbor IDs of a vertex uu. Gap encoding stores the first ID g1=v1g_1 = v_1, followed by the differences gi=vi−vi−1g_i = v_i - v_{i-1} for 2≤i≤deg⁡(u)2 \le i \le\operatorname{deg}(u). A gap gig_i needs about log⁡2(gi+1)\log_2(g_i + 1) bits, so small gaps mean a small graph. A prefix sum over the gaps recovers the IDs.

Graph Reordering

To reduce gaps between consecutive neighbor IDs, we place well-connected groups of vertices into contiguous ID ranges, an approach well studied for web and social graphs [5, 11, 13, 14, 16, 51, 70, 75, 77] and inverted indexes [9, 10, 19, 20, 76, 78]. In Ginger, recursive graph partitioning (RGP) uses a parallel multilevel partitioner [33, 34] to recursively split the graph into balanced blocks with few crossing edges. We number the small leaf blocks in recursion order, assign consecutive IDs within each block, and permute the vectors accordingly.

Balanced graph partitioning only works on undirected graphs, hence we symmetrize the graph by adding the reverse of every edge. Reciprocal connections then carry twice the weight, reflecting the potential for long gaps in both adjacency lists when their endpoints are separated. RGP yields smaller gaps than recursive graph bisection [19] on all six datasets and is faster to compute on all but the smallest (Section 6.3).

AdaptiveGap: Sub-Byte Gap Coding with SIMD Decoding

Beam search decodes a neighbor list at every expansion, so graph compression must keep decoding cheap enough to preserve query throughput. In codecs such as PrefixVarint [18], each gap takes one

to five bytes and begins with a unary length prefix, so locating the next gap requires reading the current gap’s length.

StreamVByte. We build on StreamVByte [48], which removes this dependency by storing lengths separately from gaps. It encodes groups of four gaps using a control byte with four 2-bit length selectors and a separate payload holding the gap values back to back. Each selector specifies a gap length of one to four bytes. To decode a group, StreamVByte loads 16 payload bytes into a SIMD register and uses one byte shuffle (pshufb) to distribute the values among four 32-bit lanes. A precomputed shuffle mask for each of the 256 control bytes specifies which payload bytes to copy into each lane, and a SIMD prefix sum recovers the neighbor IDs. However, rounding each gap to whole bytes wastes space; for example, a 9-bit gap requires two bytes.

AdaptiveGap. AdaptiveGap retains StreamVByte’s single-shuffle decoding while adding adaptive bit widths and optional separate storage of the first neighbor ID. Each neighbor list selects one of 16 modes, each specifying four bit widths that the 2-bit selectors choose among. Mode 0 uses the widths {8,16,24,32}\{8, 16, 24, 32\}, which corresponds to StreamVByte, while the other modes use sub-byte widths, such as {4,12,20,28}\{4, 12, 20, 28\}. For example, StreamVByte stores the gaps 33, 99, 10001000, and 55 in 1+2+2+1=51 + 2 + 2 + 1 = 5 bytes. In the mode {4,12,20,28}\{4, 12, 20, 28\}, they occupy 4+4+12+4=244 + 4 + 12 + 4 = 24 bits, or 3 bytes, with the same single control byte.

AdaptiveGap packs gaps without padding within each byte-aligned group, so adjacent gaps can share a byte. In Figure 3, for example, the gap 9 starts at bit 4 of byte 0. A single shuffle gathers the bytes covering each gap into a 32-bit lane, and a right shift and mask isolate its value. For this to work, all bytes that contain a gap must fit into its lane. A gap of width ww that starts at bit offset oo of a byte spans o+wo + w bits, so every gap must satisfy o+w≤32o + w \le32. In mode 0, all gaps are byte-aligned, so the offset is always 0. In the other modes, all widths are even, so the offset is at most 6, and widths up to 26 bits are safe. If all widths of a mode are multiples of 4, the offset is 0 or 4, and widths up to 28 bits are safe. Unlike in StreamVByte, the shuffle mask depends on both the mode and the control byte, so we precompute a mask, along with the per-lane shifts and bit masks, for each of the 16 × 256 combinations.

Figure 3. Encoding and SIMD decoding of an AdaptiveGap list in mode {4,12,20,28}\{4, 12, 20, 28\}. With 5000 stored as the anchor, the control byte selects widths 4,4,12,44, 4, 12, 4 (2-bit selectors 0,0,1,00, 0, 1, 0 packed from the least significant bit) for gaps 3,9,1000,53, 9, 1000, 5, which occupy three payload bytes. One byte shuffle followed by per-lane shifts and masks recovers the gaps, and a prefix sum reconstructs the neighbor IDs.

The first entry g1=v1g_1 = v_1 is an absolute ID and can require 30 bits at n=109n = 10^9, potentially forcing the entire list onto mode 0. AdaptiveGap avoids this by optionally storing the first ID separately as a varint, called the anchor. The encoder picks the mode, with or without the anchor, that minimizes the encoded size, and a 1-byte tag at the start of the list records its choice. As in a CSR layout, an offset array locates each encoded list, and each list stores its degree.

Summary. Together, reordering and AdaptiveGap shrink the graph by 2.1× on average (up to 2.5×) relative to a CSR layout without slowing down queries (§ 6.3). Compared with StreamVByte on the same ordering, AdaptiveGap stores an average of 0.9 fewer bits per edge (up to 1.2 bits). This reduction saves a further 5.4% of graph memory (up to 7.6%).

Experimental Evaluation

We compare Ginger with seven widely used ANNS libraries across 14 large-scale datasets ranging up to a billion points and up to four-thousand dimensions. We assess query throughput, memory footprint, and indexing time for each method. Subsequently, we run ablation studies to isolate where our performance gains come from and how key design choices affect performance, including standalone evaluations of NTQ and AdaptiveGap (§ 6.3).

Experimental Setup

Machine. We use a Google Cloud c4-highmem-288 instance, a dual-socket server with two 72-core Intel Xeon 6985P-C processors (Granite Rapids) and 2.3 TB of RAM across 6 NUMA nodes.

Datasets. We evaluate Ginger on 14 public ANNS datasets covering Euclidean and maximum inner-product search (MIPS), summarized in Table 1. Six low-dimensional datasets (d≤200d \le200) comprise GloVe and five billion-vector benchmarks spanning image, web-search, and cross-modal retrieval. Eight high-dimensional datasets (768≤d≤4096768 \le d \le4096) contain up to 101 million vectors and cover text, encyclopedia, scientific, multimodal, and LLM embeddings. Input coordinates are 8-bit integers for MS-SPACEV and BigANN, and 32-bit floats for the remaining twelve datasets.

Datasetddnnnqn_qTypeMetric
Low dimensional
GloVe [67]1001.2M10kfloatMIPS
Deep [7]961B10kfloatL2
MS-Turing [80]1001B100kfloatL2
MS-SPACEV [80]1001B29kint8L2
BigANN [42]1281B10kuint8L2
Text2Image [80]2001B100kfloatMIPS
High dimensional
Wiki-Cohere [71]76835M5kfloatMIPS
Wiki-All [65]76888M10kfloatMIPS
MS-MARCO [79]768101.07M9376floatMIPS
DBpedia-1536 [68]1536999k1kfloatL2
OpenAI-arXiv [64]15362.32M20kfloatL2
DataComp-DR [6]153612.78M1kfloatL2
DBpedia-3072 [69]3072999k1kfloatL2
Wiki-Qwen [55]4096500k100kfloatL2

Table 1. Overview of datasets used in our evaluation, where dd is the dimensionality of the vectors, nn is the number of vectors, and nqn_q is the number of queries.

Existing Libraries. We compare Ginger against the seven libraries introduced in Section 2.2: the Vamana implementations in ParlayANN [59, 66], SVS [1], and DiskANN [41, 46]; HNSW [57] from Hnswlib [58]; the IVF implementations in ScaNN [37, 81] and Faiss [22]; and SymphonyQG [35] from the RaBitQ-Library [27]. Together, these libraries form a comprehensive comparison set spanning both widely adopted industrial systems and highly optimized research implementations. We select SymphonyQG to represent methods that store auxiliary data on graph edges because of its reported query performance and scalable, multithreaded C++ implementation [27, 35].

Environment. All C++ implementations are compiled with Clang v19.1.7. DiskANN is built with Rust v1.97.0. We use full compile-time (-O3) and link-time optimizations (-lto), and native architecture tuning (-march=native). To avoid allocator contention and ensure a fair comparison, we link all implementations against jemalloc v5.3.0. This change is either neutral or positive on QPS for all methods. To ensure accurate query timings, we perform one warm-up run (discarded) followed by 5 timed runs of the query set for each parameter configuration and report the average throughput. To prevent cache interference across runs, we flush the CPU cache between runs.

Query Setup. We evaluate query throughput without batching: individual queries are processed in parallel across threads. To obtain the Pareto-optimal frontier of throughput at each recall level, we sweep the search beam width LsearchL_{\mathrm{search}} with select values in the range [10,2000][10, 2000] for graph-based indexes. For IVF-based indexes, we sweep the number of probed leaf clusters nproben_{\mathrm{probe}} over select values in [1,1000][1, 1000] and the number of candidates to rerank nrerank∈{2k,4k,8k,16k,32k,64k}n_{\mathrm{rerank}} \in\{2k, 4k, 8k, 16k, 32k, 64k\}. For multi-level SCANN, we additionally sweep the number of top-level clusters to probe on two-level trees, and three of the three-level trees we evaluate selected pairs of middle- and top-level probe counts to cover various routing profiles that vary the search cost at each level, which we model by the amount of data loaded. See Appendix § 9 for more details.

Table 5 in Appendix § 9 summarizes the vector representations used by each library. On the 8-bit integer datasets (MS-SPACEV and BigANN), all graph libraries operate directly on the native int8/uint8 coordinates without quantization. On high-dimensional float datasets (d≥768d \ge768), libraries combine dimensionality reduction (PCA, OPQ, or JL prefiltering) or 1–2-bit spherical codes with higher-precision reranking. On low-dimensional float datasets (d≤200d \le200), dimensionality reduction degrades accuracy so we omit it.

Index Parameters. All graph-based indexes are constructed with maximum out-degree R=64R = 64 and construction beam width L=128L = 128 (corresponds to M=32M = 32, ϵfc=128\epsilon_{\mathrm{fc}} = 128 for HNSWLIB). P\textsc{n}N uses the standard parameters from the original paper: leaf size L=1024L = 1024 and tree fanout (10, 3). On GloVe, we use R=100R = 100, L=250L = 250 for Vamana, and M=50M = 50, ϵfc=250\epsilon_{\mathrm{fc}} = 250 for HNSWLIB. For DiskANN methods we use the standard two build passes, except for DiskANN which only supports single-pass. We instead double the insertion beam-width to match the build effort and improve index quality. For SCANN, we use anisotropic vector quantization (AVQ = 2.5) and spilling with orthogonality-amplified residuals (SOAR = 1.5, with λ=1.0\lambda= 1.0 on GloVe and Wiki-Cohere, and λ=2.0\lambda= 2.0 on DataComp-DR and DBpedia). We set the noise shaping threshold to NST = 0.2 for unit-norm datasets (NST = 0.1 on OpenAI-arXiv, DataComp-DR, and DBpedia), and scale it proportionally to the average vector norm on non-unit-norm datasets (NST = 24.0 on MS-SPACEV, 100.0 on BigANN, 2.75 on Wiki-Cohere, and 2.0 on MS-MARCO). Refer to Table 6 for the dataset-specific parameters such as RobustPrune α\alpha values, partition sizes, and IVF quantizer configurations. All methods use multi-threading for the builds.

DatasetαPiPNN\alpha_{\mathrm{PiPNN}}αVamana\alpha_{\mathrm{Vamana}}GingerSVSScaNNC1C_1C2C_2C3C_3RerankOPQIVFPQRefine
GloVe0.870.95–––2,000––float–IVF1024PQ50x4fsrRFlat
Deep1.151.10–––2,398,08217,916134bf16OPQ48_96IVF1048576_HNSW32PQ48x4fsrRefine(SQbf16)
MS-Turing1.081.10–––2,500,00018,420136bf16OPQ50_100IVF1048576_HNSW32PQ50x4fsrRefine(Pad128,SQbf16)
MS-SPACEV1.131.10–––2,500,00018,420136int8OPQ50_100IVF1048576_HNSW32PQ50x4fsrRefine(Pad128,SQ8_direct_signed)
BigANN1.151.10–––3,205,12921,739147bf16OPQ64_128IVF1048576_HNSW32PQ64x4fsrRefine(SQ8_direct)
Text2Image†0.951.00–––5,000,000–––OPQ100_200IVF1048576_HNSW32PQ100x4fsrRefine(SQbf16)
Wiki-Cohere0.980.9824825619235,000350–bf16OPQ96_192IVF65536_HNSW32PQ96x4fsRefine(SQbf16)
Wiki-All0.930.9524825619287,5561,369–bf16OPQ96_192IVF131072_HNSW32PQ96x4fsRefine(SQbf16)
MS-MARCO0.960.98248256256101,0711,580–bf16OPQ128_256IVF16384_HNSW32PQ128x4fsRefine(SQbf16)
DBpedia-15361.051.003682562562,048––int8OPQ96_192IVF2048PQ96x4fsRefine(SQ8)
OpenAI-arXiv1.101.0536825644610,000300–int8OPQ128_256IVF4096PQ128x4fsRefine(SQ8)
DataComp-DR1.151.1562464051212,805201–bf16OPQ256_512IVF98304_HNSW32PQ256x4fsRefine(SQbf16)
DBpedia-30721.051.004962563842,048––int8OPQ96_192IVF2048PQ96x4fsRefine(SQ8)
Wiki-Qwen0.951.008807683841,024––bf16OPQ192_384IVF2048PQ192x4fsRefine(SQbf16)

Table 6. Dataset-specific index and quantization parameters: robust pruning thresholds αPiPNN\alpha_{\mathrm{PiPNN}} and αVamana\alpha_{\mathrm{Vamana}}, reduced PCA dimensionality, ScaNN leaf, intermediate, and top-level cluster counts (C1C_1, C2C_2, C3C_3) and reranking formats, and Faiss factory stages (OPQ, IVF, PQ, and Refine). †ScaNN ran out of memory during index construction on Text2Image.

To support reproducibility, we will release our experimental setup, including the benchmark harness, build scripts, and dataset configurations alongside.

Comparison with other Libraries

We evaluate the libraries along three dimensions: query throughput, memory footprint, and indexing time. These three properties jointly comprise the bedrock of index performance. We use geometric means for comparing across datasets. In general: Ginger produces smaller indexes which support higher query throughput with less indexing time as compared with all other libraries.

Query Throughput. Figure 4 shows throughput (queries per second) with respect to recall. Ginger leads on 13 of 14 datasets across the [90%, 100%] recall range and in area under the QPS-recall curve (AUC). At 95% recall, its mean speedup over the fastest competitor on each dataset is 1.8× overall and 2.0× on high-dimensional datasets, with the largest dataset-specific gain of 2.7× on Wiki-Cohere. The strongest competitors on high-dimensional datasets are SymphonyQG and SVS. The only exception is BigANN, whose byte coordinates we do not encode with TurboQuant; there, SVS is 4% faster at both 90% and 95% recall. Because different competitors are second-best on different datasets, the advantage over any individual library across completed datasets is larger. In AUC, Ginger achieves a geometric mean gain of 2.35× over ParlayANN, 2.38× over SVS, 2.42× over SymphonyQG, and 2.79× over DiskANN.

Throughput in queries per second versus recall across datasets and libraries

Figure 4. Throughput in queries per second (QPS) vs. recall 10@10. Ginger uses 4+8-bit NTQ and graph compression. Missing curves are largely due to out-of-memory failures (see Table 2). SVS on MS-Turing leaves the graph disconnected from the entry point. SymphonyQG on Wiki-Cohere reaches at most ≈ 0.5% recall.

The IVF indexes Faiss and ScaNN trail the graph methods across all datasets, with Ginger achieving a geometric mean AUC gain of 10.3× over ScaNN and 11.7× over Faiss.

Memory Footprint. The memory comparison exposes two different sources of savings: graph compression on low-dimensional datasets and vector quantization on high-dimensional datasets. In Figure 5, we compare the memory footprints. We split each index into five parts. Graph is the adjacency structure, which only Ginger compresses. Raw Vectors are the uncompressed vectors, for indexes that keep them. Quantized Vectors (Navigation) are the codes scored during graph traversal or IVF scanning, including JL sketches and, for IVF indexes, the inverted lists and the coarse quantizer. Quantized Vectors (Reranking) are the higher-precision codes used to rerank candidates instead of raw vectors. Other covers ID remapping tables and locks.

On the four low-dimensional datasets in Figure 5, Ginger has the smallest index of all graph-based methods. It is on average 1.54× (up to 1.65×) smaller than SVS, the most compact competitor. Most of this saving comes from graph compression. The graph of Ginger takes on average 111 bytes per vector, compared with 260 bytes for the flat adjacency arrays of SVS and ParlayANN. Only the IVF indexes Faiss and ScaNN are competitive with regards to memory footprint on low-dimensional datasets.

On high-dimensional datasets the embeddings themselves dominate the memory footprint. Ginger needs on average 43% of the raw vector size across all eight high-dimensional datasets due to NTQ with 12 bits. ParlayANN, DiskANN, and Hnswlib keep the raw float vectors and are 2.7× larger. SymphonyQG is 7.4× larger because of its per-edge codes. SVS, Faiss, and ScaNN are smaller on some datasets, by up to 1.6× (Faiss on OpenAI-arXiv), mainly because they rerank with 8-bit instead of 12-bit codes. SVS uses 19.8% less memory in the geometric mean across all eight high-dimensional datasets. However, SVS is 2.9× slower in the geometric mean at 95% recall. It also reaches lower peak recall than 12-bit Ginger on every dataset. With 8-bit NTQ, Ginger uses less memory than SVS on all datasets, still achieves 2.6× higher mean QPS at 95% recall and higher peak recall on seven of the eight datasets.

Indexing Time. These memory savings require additional pre- and post-processing, so we compare complete index construction times, including graph reordering, compression, quantization, and PCA. Table 2 breaks down Ginger (PiPNN) builds into graph construction, graph compression, and quantization plus PCA. Fast graph construction comes from PiPNN [73, 74]; quantization is fast and grouped with PCA to save space.

DatasetQuantization & PCAGraph CompressionGraph ConstructionTotalGinger (Vamana) (No Compression)SVS*ParlayANNDiskANNSymphonyQGHnswlibScaNN†Faiss
Low dimensional
GloVe<1s3s1s4s7s1m 11s13s8s14s12s7s2s
Deep42s16m 3s17m 44s34m 30s1h 8m9h 31m2h 13m2h 25mOOM3h 34m38h 23m57m 51s
MS-Turing48s20m 9s18m 31s39m 28s49m 0s18h 53m1h 46m1h 51mOOM2h 58m41h 55m1h 6m
MS-SPACEV–13m 21s17m 55s31m 16s1h 37m16h 4m2h 4m1h 44mOOM3h 11m41h 52m1h 7m
BigANN–16m 12s18m 18s34m 30s1h 40m5h 40m2h 47m2h 20mOOM3h 14m31h 17m1h 9m
Text2Image1m 30s15m 52s20m 24s37m 47s1h 2m13h 54m4h 30m1h 41mOOMOOMOOM1h 28m
High dimensional
Wiki-Cohere17s28s49s1m 34s5m 9s19m 56s8m 16s9m 20s7m 33s18m 37s7m 33s3m 52s
Wiki-All43s1m 13s2m 0s3m 56s10m 45s40m 25s13m 38s20m 41s40m 52s39m 59s10m 0s9m 7s
MS-MARCO50s2m 5s2m 34s5m 29s18m 53s1h 10m30m 14s33m 28s47m 17s1h 3m13m 35s9m 47s
DBpedia-15362s2s2s6s9s31s8s24s24s36s19s46s
OpenAI-arXiv4s3s4s11s22s1m 8s23s1m 0s50s…
DataComp-DR15s10s27s52s2m 19s5m 47s10m 53s6m 32s9m 57s8m 49s4m 20s4m 13s
DBpedia-307211s2s5s18s33s1m 8s11s48s48s1m 6s51s50s
Wiki-Qwen22s1s5s29s35s1m 10s5s30s36s39s1m 16s1m 34s

Table 2. Index construction times. *Times for SVS include patches to speed up build but still produce the same graph. †Times for ScaNN include patches to significantly speed up build times with k-means on quantized vectors.

With PiPNN, Ginger builds fastest on 11 of 14 datasets, achieving a mean speedup of 1.4× over the fastest competitor (up to 4.9× on DataComp-DR). Note that these times include graph reordering and compression for Ginger, but not the other methods, trading some of the advantage of PiPNN for lower memory footprint. On the five billion-scale datasets, complete builds take an average of 35 minutes (up to 39 minutes), including 18 to 20 minutes for graph construction and 13 to 20 minutes for reordering and compression. Faiss, the fastest competitor, takes on average 69 minutes (up to 88 minutes), giving Ginger a 2.0× mean speedup (up to 2.3×). The remaining libraries require 1.8 to 42 hours or run out of memory. On the three large high-dimensional datasets (35M to 101M vectors), Ginger builds 2.0× faster in the geometric mean (up to 2.3×) than the fastest competitor.

On smaller datasets, all methods finish within two minutes. ParlayANN builds up to 5.7× faster than Ginger on the very small datasets DBpedia-3072 and Wiki-Qwen, where PCA dominates our build time, while Faiss is 2.1× faster on GloVe. If we look only at PiPNN graph construction time, it is fastest.

The Ginger (Vamana) column reports our Vamana implementation without graph compression for reference. Even with Vamana, Ginger builds faster than all external Vamana libraries on the 11 datasets with n>1n > 1M.

To be able to include them in the experiments, we patched SVS and ScaNN to accelerate index construction. For SVS, we eliminate lock contention when adding backward edges to the Vamana graph by scaling the number of backedge buffers and clearing them in parallel, giving greater than 2× speedup without changing the resulting graph. For ScaNN, we parallelize several sequential loops and accelerate k-means by running on quantized 8-bit vectors (SF8), which has been shown to not compromise k-means quality [47].

Ablation Studies

We now analyze the contributions of Ginger’s main components through ablation studies. We first examine search optimizations, then evaluate NTQ accuracy independently of graph traversal, and finally study how reordering and encoding affect graph size and query speed.

Search Optimizations. Figure 6 breaks down where Ginger’s speedups come from. At 90% recall, navigating on 4-bit TurboQuant codes instead of float vectors is the largest step, speeding up search by 5.7× in the geometric mean (up to 7.2×). Searching on PCA-projected coordinates speeds up search by another 1.8× in the geometric mean (up to 2.4× on DBpedia-3072, which has the largest reduction in dimension). The prefilters help to a lesser extent at 90% recall. TurboSearch speeds up search by 1.26× in the geometric mean (up to 1.5×). JL speeds up search by 1.12× in the geometric mean (up to 1.4× on DBpedia-3072), but incurs a 15% slowdown on Wiki-All. TurboSlice beats JL on six of the seven datasets. On Wiki-Qwen, TurboSlice is 1.27× faster than PCA at 97% recall, and the two are on par at 99% recall. We attribute this to the fact that the projection is expensive on Wiki-Qwen. PCA and the prefilters both cut memory traffic per candidate, so their gains do not stack.

Ablation comparing Ginger search variants

Figure 6. Ablation comparing Ginger search variants. TurboSlice uses dts=256d_{\mathrm{ts}} = 256, JL uses djl=1024d_{\mathrm{jl}} = 1024.

Next, we investigate how much time each phase of the search procedure takes. Figure 7 shows how the runtime balance shifts as dimensionality increases from 768 (Wiki-Cohere) to 1,536 (DBpedia-1536) and 4,096 (Wiki-Qwen). Beam search dominates on the first two datasets, while projection accounts for roughly half the runtime on Wiki-Qwen at 95% recall. This reflects the growing cost of multiplying each query by a projection matrix whose size increases with both the input and projected dimensions. On larger dimensionalities, we can significantly speed up projection without sacrificing recall by quantizing the matrix entries. Figure 8 shows little benefit from quantizing Wiki-Cohere’s projection matrix, whose float representation occupies only 0.73 MiB and can fit in L2 cache. The larger float matrices for DBpedia-1536 and Wiki-Qwen occupy 2.16 MiB and 13.75 MiB, respectively. Quantization reduces their code storage to 0.27 MiB and 1.72 MiB, consistent with improved cache residency and the substantial throughput gains on these datasets. The benefit narrows near full recall as the fixed query-projection cost is amortized over more expensive search and reranking.

Share of query time spent in each search phase for Wiki-Cohere, DBpedia-1536, and Wiki-Qwen

Figure 7. Share of query time spent in each search phase. On higher-dimensional datasets, projection accounts for a growing share of query time due to the larger projection matrix.

Quantization Ablations. In Figure 9 we plot the recall of NTQ at different bitwidths, showing that 12 bits achieves near float accuracy. We measure the accuracy of the quantizer separate from the quality of an approximate search index by evaluating recall over a brute-force scoring of the dataset. We use subsets of 5 million datapoints per dataset so as to make this computationally tractable. Moreover, these results show that a simpler residual scheme, which quantizes r=y−y~r = y - \tilde{y} with a second TurboQuant, plain uniform scalar quantization, and bf16 are all insufficient. We also compare with a reimplementation of Intel’s proprietary LVQ codec [1]. Like NTQ, two-level LVQ (LVQ-4×k) pairs a 4-bit navigation code with kk additional bits per coordinate for reranking. For LVQ-4×8, the recall of our reimplementation agrees with Intel’s SVS binaries to four decimal places. LVQ centers each vector by the global dataset mean and quantizes it uniformly to 4 bits with per-vector minimum and maximum bounds. For reranking, the residual of the centered vector with respect to its 4-bit code is requantized with uniform scalar quantization. At 4 bits, LVQ is less accurate than NTQ on the three high-dimensional datasets, while both approach float accuracy at 12 bits. The use of the global mean is crucial for LVQ’s recall which makes the codec less flexible in dynamic settings. Adding centering to NTQ can optionally boost recall on some datasets, such as DBPedia-3072.

Exhaustive search 10@10 recall on four datasets across bitwidths

Figure 9. Exhaustive search 10@10 recall on four datasets (subsetted to 5M datapoints) across bitwidths. Showing bf16 as a horizontal dashed line.

Extended RaBitQ [28] is another method that splits its codes, into a 1-bit sign and a kk-bit magnitude. Its only coarse level is thus the 1-bit sign code. Truncating the magnitude bits does not yield a well-tuned coarse code either, because all bits share one uniform grid whose per-vector scale is fit to the full code.

Graph Compression and Reordering

Lastly, we evaluate the impact of graph reordering on compression and query speed. Table 3 compares RGP (Section 5.1) against the original vertex order (Unreordered), and two baselines from the literature: bottom-up agglomerative clustering on normalized edge weights (RGC [11]), and top-down Recursive Graph Bisection (RGB [19]). RGP achieves the smallest gaps on all six datasets and reduces the bits per edge under AdaptiveGap by 31.5% in the geometric mean (up to 46.7%) over the original order. On the larger graphs (35M to 100M vertices), RGP is also 4.2× faster in the geometric mean (up to 26.3×) than RGC and 4.8× faster in the geometric mean (up to 6.6×) than RGB.

The graph-memory measurements in Table 4 include the CSR row-offset array, whereas Table 3 reports encoded neighbor-list storage alone. Table 4 compares query throughput at 95% recall and graph memory for three compression codecs on RGP-reordered graphs (AdaptiveGap, StreamVByte [48], and PrefixVarint [18]) against uncompressed CSR (CSRGraph) and fixed-degree arrays (FlatGraph). AdaptiveGap shrinks the graph by 2.1× in the geometric mean (up to 2.5×) over CSRGraph and by 3.4× in the geometric mean (up to 5.1×) over FlatGraph, compared with 2.0× and 3.2× in the geometric mean for StreamVByte. AdaptiveGap comes within 1.4% of CSRGraph and 2.8% of FlatGraph in the geometric mean while using 2.1× and 3.4× less graph memory. Non-vectorized decoding makes PrefixVarint 5.9% slower in the geometric mean (up to 11.3%) than AdaptiveGap. AdaptiveGap matches the throughput of StreamVByte while saving 0.9 bits per edge in the geometric mean (up to 1.2 bits), or 5.4% of graph memory (up to 7.6%).

MetricReordering MethodOpenAI-arXiv (2.3M)Wiki-Cohere (35M)Wiki-All (88M)Text2Image (100M)Deep (100M)MS-Turing (100M)
LogGap / AdaptiveGap (bits/edge)Unreordered14.53 / 19.3416.88 / 22.0516.78 / 22.4319.95 / 24.5520.14 / 24.8520.22 / 24.93
RGC10.10 / 15.6612.84 / 18.3813.89 / 19.699.71 / 15.2215.04 / 20.5515.19 / 20.63
RGB [19]8.80 / 14.1711.08 / 16.5412.01 / 17.828.65 / 13.9911.99 / 17.5113.18 / 18.79
RGP (Ours)8.57 / 13.9710.59 / 16.0211.02 / 16.867.81 / 13.0811.74 / 17.2712.03 / 17.63
Reorder Time (s)RGC2.4s83.2s1573.4s248.3s210.7s189.5s
RGB [19]3.5s103.8s213.1s521.5s458.6s474.4s
RGP (Ours)3.2s20.0s59.8s79.6s91.4s113.3s

Table 3. Graph reordering quality and runtime. We report LogGap = 1∣E∣∑log⁡2(gi+1)\frac{1}{|E|}\sum\log_2(g_i + 1) and actual encoded bits per edge under AdaptiveGap for the neighbor lists only, excluding the CSR row-offset array. Cells are shaded per dataset from green (best) to red (worst).

Graph Format & ReorderingOpenAI-arXiv (2.3M)Wiki-Cohere (35M)Wiki-All (88M)Text2Image (100M)Deep (100M)MS-Turing (100M)
AdaptiveGap + Reordered (CSR)519.5k / 14.5b721.4k / 16.5b1149.9k / 17.6b118.5k / 13.4b775.9k / 17.7b501.9k / 18.1b
StreamVByte + Reordered (CSR)527.9k / 15.7b723.3k / 17.4b1160.6k / 18.6b117.9k / 14.3b782.2k / 18.5b511.2k / 18.7b
PrefixVarint + Reordered (CSR)499.6k / 14.7b693.9k / 17.0b1098.1k / 18.0b111.8k / 13.6b688.4k / 18.1b471.8k / 18.6b
Uncompressed + Reordered (FlatGraph)523.9k / 65.2b740.9k / 53.9b1195.5k / 89.3b119.6k / 39.2b807.4k / 48.1b527.0k / 49.6b
Uncompressed (FlatGraph)526.9k / 65.2b747.0k / 53.9b1203.2k / 89.3b119.2k / 39.2b745.5k / 48.1b525.6k / 49.6b
Uncompressed + Reordered (CSRGraph)520.9k / 34.0b726.2k / 33.7b1180.0k / 34.7b119.7k / 33.2b752.1k / 33.5b515.1k / 33.5b
Uncompressed (CSRGraph)523.3k / 34.0b731.9k / 33.7b1176.7k / 34.7b120.1k / 33.2b777.3k / 33.5b515.0k / 33.5b

Table 4. QPS at ≥0.95\ge0.95 recall / graph memory (bits per edge, including CSR offsets). Cells are shaded per dataset column by QPS from green (highest) to red (lowest). Note that bits per edge is higher than in Table 3 due to including CSR offsets.

Discussion & Conclusion

Ginger shows that graph-based vector search still has plenty of room to grow. It breaks new ground in query throughput, memory footprint, and indexing time for ANNS. The key is designing every step of the search around reducing memory traffic. Nested TurboQuant lets a single code serve both fast 4-bit navigation and reranking with near-float accuracy. Graph compression shrinks the graph without slowing down queries. PiPNN completes the picture with fast index construction.

Looking Ahead. While this paper focuses on single-vector dense embeddings, retrieval applications at Google increasingly go beyond this setting. We therefore designed Ginger to be flexible for more general retrieval settings. Graph construction and beam search operate only through a user-provided similarity function, abstracting away the specific data representation. This makes it easy to search under novel similarity functions like Chamfer on multi-vectors and black-box similarity functions such as learned relevance scorers. Neural scorer inference is more expensive than computing a dot product, increasing the appeal of the few distance evaluations that graph search needs. We are thrilled to share Ginger with the research community and look forward to seeing what others build with it.

Acknowledgments

We thank Richard Wen, Kishen Gowda, Majid Daliri, Rasto Lenhardt, Jirka Isa, Jan Wassenberg, Peter Sanders, John Owens and Daniel Seemaier for helpful discussions.

Parameter Configuration

For each library, we tune index structure, quantization method, and reranking formats for the highest throughput across the recall range. Every configuration we report is built and evaluated on the full dataset. We sweep query search parameters to extract the Pareto frontier of throughput versus recall. Table 5 summarizes the formats we use for each library, and Table 6 lists the selected parameters for all 14 datasets. Below, we first summarize the settings for graph indexes. For the IVF indexes (ScaNN and Faiss), point clustering, routing structure on top of the clusters, quantization, and reranking interact closely, making them hard to tune, so we describe their tuning in detail below.

Graph Indexes. All graph indexes use maximum degree R=64R = 64 and construction beam width L=128L = 128, except on GloVe, where they use R=100R = 100 and L=250L = 250. We tune the pruning threshold α\alpha per dataset, with αPiPNN\alpha_{\mathrm{PiPNN}} for PiPNN graphs and a single αVamana\alpha_{\mathrm{Vamana}} shared by all Vamana-based indexes. Table 5 lists the quantization methods and formats of each graph index. SymphonyQG runs out of memory during index construction on the billion-scale datasets, so we evaluate it only on GloVe and the eight high-dimensional datasets.

On high-dimensional datasets (d≥768d \ge768), we initialize the PCA target dimension for Ginger to the smallest dimension that retains roughly 90% of dataset variance, rounded so that the 4-bit NTQ vector and its bundled metadata fill whole cache lines. Starting from there, we reduce the dimension in increments of whole cache lines to find the optimal throughput–recall trade-off against unprojected vectors. For SVS, we use LeanVec4x8 and follow the same tuning procedure, aligning dimensions directly to whole cache lines as it does not embed metadata into the codes. Table 6 lists the chosen dimensions.

ScaNN. ScaNN partitions the dataset with a kk-means tree. We evaluate up to three levels, with C1C_1 clusters on the bottom, C2C_2 in the middle and C3C_3 on the top. Within a leaf cluster, vectors are stored as anisotropic product-quantization codes [37] with 16 centers per two-dimensional subspace (AH2-LUT16). The best candidates retrieved from the leaves are rescored against higher-precision vectors. In high dimensions, we configure ScaNN to route and quantize in a PCA subspace while reranking against full-dimensional vectors.

We also enable SOAR [81], an optimization that stores each vector in a second leaf, chosen so that the two assignments err in different directions, which delivers recall improvements. We use the default settings for SOAR (λ=1.5\lambda= 1.5), except on GloVe and Wiki-Cohere (λ=1.0\lambda= 1.0), and on DataComp-DRP and DBPEDIA (λ=2.0\lambda= 2.0). For anisotropic vector quantization, we also use the default weight AVQ = 2.5. Because the default noise-shaping threshold NST = 0.2 assumes unit-norm vectors, we scale it proportionally to the average vector norm on non-unit-norm datasets (24.0 on MS-SPACEV, 100.0 on BIGANN, 2.75 on WIKI-COHERE, and 2.0 on MS-MARCO). We also tune it to NST = 0.1 on the unit-norm datasets OPENAI-ARXIV, DATACOMP-DR, and DBPEDIA.

Because ScaNN builds its hierarchy bottom-up, we first size the leaf clusters C1C_1 through target memory budgets of 2-bit AH codes: roughly 10 KB per leaf on billion-scale datasets, 20 to 64 KB in high-dimensional PCA space, and ≈n\approx\sqrt{n} on small flat indexes. We train this leaf kk-means once and build the upper routing levels on the fixed leaf centroids without retraining. To balance centroid routing overhead against leaf scanning, we scale the routing depth with dataset size. Small datasets use flat routing, as scanning all leaf centroids directly is fast. Medium datasets use a two-level tree with C2≈C1C_2 \approx\sqrt{C_1} top-level clusters for a balanced branching factor. Billion-scale datasets use a three-level tree with a uniform geometric branching factor B≈C11/3B \approx C_1^{1/3}. Over these fixed leaf partitions, we evaluate different upper-level routing layouts to select the best configuration without reclustering the dataset.

For reranking, we choose the most compact format that preserves accuracy: int8 suffices on DBPEDIA-1536, OPENAI-ARXIV, and DBPEDIA-3072, and is lossless on MS-SPACEV. We rerank with bf16 on BIGANN (where signed int8 caps recall at 88.5%), on the d=768d = 768 inner-product datasets (where int8 caps recall at 96%), and on the billion-scale float datasets to halve bandwidth with minimal accuracy loss.

At query time, we sweep the number of probed leaves, the number of upper-level clusters visited, and the number of reranked candidates to pick the Pareto-optimal configurations. To choose the upper-level clusters visited, we sweep over them directly on two-level trees. On three-level trees, an independent grid over both upper levels is intractable. Instead, because query latency is dominated by memory bandwidth, we set the upper-level probes as a function of the leaf probes so that each routing level scans a fixed ratio of the leaf bytes. We evaluate nine routing profiles across three categories: uniform allocations (spending 0.5×, 1×, or 2× of leaf bytes at both upper levels), mid-heavy allocations (0.5×–1× at the root and 1×–2× in the middle), and low-routing allocations (0.05×–0.1× at the root and 0.25×–0.5× in the middle).

Faiss. Faiss composes an inverted file (IVF) index from modular pipeline stages [22], listed in Table 6 in factory notation. The dataset is partitioned into nn clusters using kk-means. Within each cluster, vectors are split into mm subspaces and stored as 4-bit product-quantization codes in a cache-aligned fast-scan layout [4] (PQmmx4fs). To route queries across large numbers of clusters efficiently, Faiss builds an HNSW graph over the nn centroids (IVFn_HNSW32).

To balance routing cost against cluster scanning, we sweep the cluster count nn around recommended baselines: {1,024, 2,048, 4,096} on small datasets, {16,384, 32,768, 65,536, 98,304, 131,072, 196,608, 262,144} on medium datasets, and {524,288, 1,048,576, 2,097,152} on billion-scale datasets. Small datasets use flat routing, as scanning all cluster centroids directly is fast. Larger datasets route through an HNSW32 graph over the centroids. To keep kk-means training tractable for tens of thousands to millions of centroids, we use top-down two-level clustering on datasets with ≥10\ge10M vectors.

An optional OPQ rotation [32] balances the variance across PQ subspaces and can also project vectors to fewer dimensions. We evaluate OPQ across different target dimensions, but omit it on GloVe where rotation does not improve accuracy. In low dimensions, we evaluate two- and four-dimensional OPQ subspaces, where two dimensions per subspace with centroid residuals (PQmmx4fsr) performs best. In high dimensions, we sweep OPQ target dimensions in {128, 192, 256, 384, 512}, and store uncentered vectors because centroid subtraction degrades throughput–recall performance.

The best candidates retrieved from the clusters are rescored against higher-precision vectors. We choose the most compact format that preserves accuracy: 8-bit scalar quantization (SQ8) suffices on DBpedia-1536, OpenAI-arXiv, and DBpedia-3072, and is lossless on the two integer datasets. We rerank with bfloat16 (SQbf16) on the d=768d = 768 inner-product datasets and the billion-scale float datasets. On GloVe, we rerank against exact floats (RFlat).

LibraryHigh-Dim TransformNavigation / SearchReranking
GingerPCA4-bit NTQ(4+8)-bit NTQ
SVSPCA (LeanVec)4-bit LVQLVQ4x8 / 8-bit LVQ§
ParlayANNJL filterSQ8float
DiskANN–4-bit / 1-bit spherical‡float
Hnswlib–float–
SymphonyQG–RaBitQfloat
ScaNNPCA2-bit PQfloat / bf16 / int8
FaissProjective OPQ2-bit PQfloat / bf16 / int8

Table 5. Vector representations across libraries. On the integer datasets (MS-SPACEV and BigANN), the graph indexes operate directly on native int8/uint8 vectors. ‡DiskANN always builds its graph with 4-bit spherical codes. It navigates with 4-bit codes in low dimensions and with 1-bit codes in high dimensions, except for 2-bit codes on DataComp-DR. §SVS reranks with LVQ4x8 in low dimensions and with 8-bit LVQ in high dimensions.

At query time, we sweep the number of probed clusters and the number of reranked candidates to pick the Pareto-optimal configurations. When using an HNSW coarse quantizer, we additionally sweep the graph search depth (efSearch) to balance centroid routing latency against cluster retrieval recall.

Library Versions

LibraryVersionGit Commit
Faiss [22]v1.15.020f14b
Hnswlib [58]v0.9.0d9b360
ParlayANN [59, 66]–a48c6a
SVS [1]v0.4.075e30f
DiskANN [46]v0.59.0c84530
ScaNN [37, 81]v1.4.3807d4a
SymphonyQG [27, 35]v0.3.41182cb

Table 7. Evaluated libraries, versions, and Git commit hashes.

References

  1. [1]Cecilia Aggarwalre, Ishwar Singh Bhati, Mark Hildebrand, Mariano Tepper, and Theodore L. Willke. 2023. Similarity Search in the Blink of an Eye with Compressed Indices. Proceedings of the VLDB Endowment 16, 11 (2023), 3433–3446. https://doi.org/10.14778/3611479.3611537
  2. [2]Nir Ailon and Bernard Chazelle. 2009. The Fast Johnson–Lindenstrauss Transform and Approximate Nearest Neighbors. SIAM J. Comput. 39, 1 (2009), 302–322.
  3. [3]Alexandr Andoni, Piotr Indyk, Thijs Laarhoven, Ilya P. Razenshteyn, and Ludwig Schmidt. 2015. Practical and Optimal LSH for Angular Distance. In Advances in Neural Information Processing Systems (NeurIPS). 1225–1233.arxiv.org/abs/1509.02897
  4. [4]Fabien André, Anne-Marie Kermarrec, and Nicolas Le Scouarnec. 2016. Cache locality is not enough: High-performance nearest neighbor search with product quantization fast scan. In 42nd International Conference on Very Large Data Bases, Vol. 9. 12.
  5. [5]Alberto Apostolico and Guido Drovandi. 2009. Graph Compression by BFS. Algorithms 2, 3 (2009), 1031–1044.
  6. [6]Apple. 2024. DataCompBench-12M-bf16. https://huggingface.co/datasets/apple/DataCompDR-12M-bf16.
  7. [7]Artem Babenko and Victor Lempitsky. 2016. Efficient indexing of billion-scale datasets of deep descriptors. In Proceedings of the IEEE conference on computer vision and pattern recognition. 2055–2063.
  8. [8]Ran Ben-Basat, Yaniv Ben-Itzhak, Gal Mendelson, Michael Mitzenmacher, Amit Portnoy, and Shay Vargaftik. 2026. A Note on TurboQuant and the Earlier DRIVE/EDEN Line of Work. arXiv preprint arXiv:2604.18555 (2026).
  9. [9]Roi Blanco and Álvaro Barreiro. 2005. Document Identifier Reassignment through Dimensionality Reduction. In Proceedings of the 27th European Conference on IR Research (ECIR). 375–387.DOI
  10. [10]Daniel K. Blanford, Guy E. Blelloch, and Ian A. Kash. 2003. Compact Representation of Separable Graphs. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 679–688.
  11. [11]Daniel K. Blanford, Guy E. Blelloch, and Ian A. Kash. 2003. Compact Representation of Separable Graphs. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 679–688.
  12. [12]Guy E Blelloch, Daniel Anderson, and Laxman Dhulipala. 2020. ParlayLib: A toolkit for parallel algorithms on shared-memory multicore machines. In Proceedings of the 32nd ACM Symposium on Parallelism in Algorithms and Architectures. 507–509. https://doi.org/10.1145/3350755.3400254
  13. [13]Paolo Boldi, Marco Rosa, Massimo Santini, and Sebastiano Vigna. 2011. Layered Label Propagation: A Multiresolution Coordinate-Free Ordering for Compressing Social Networks. In Proceedings of the 20th International Conference on World Wide Web (WWW). 587–596.
  14. [14]Paolo Boldi and Sebastiano Vigna. 2004. The WebGraph Framework I: Compression Techniques. In Proceedings of the 13th International Conference on World Wide Web (WWW). 595–602.
  15. [15]Patrick H. Chen, Wei-Cheng Chang, Jyun-Yu Jiang, Hsiang-Fu Yu, Inderjit S. Dhillon, and Cho-Jui Hsieh. 2023. FINGER: Fast inference for graph-based approximate nearest neighbor search. In Proceedings of the ACM Web Conference (WWW). 3225–3235. https://doi.org/10.1145/3543507.3583318
  16. [16]Flavio Chierichetti, Ravi Kumar, Silvio Lattanzi, Michael Mitzenmacher, Alessandro Panconesi, and Prabhakar Raghavan. 2009. On Compressing Social Networks. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD). ACM, 219–228.DOI
  17. [17]Majid Daliri, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łacki, and Rajesh Jayaram. 2026. TurboSlice: Reusing Quantized Prefixes for Fast Vector Scoring. (2026). Under submission.
  18. [18]Jeffrey Dean. 2009. Challenges in building large-scale information retrieval systems: invited talk. In Proceedings of the Second ACM International Conference on Web Search and Data Mining (WSDM). ACM, 1–1.DOI
  19. [19]Laxman Dhulipala, Igor Kabiljo, Brian Karrer, Giuseppe Ottaviani, Sergey Pupyrev, and Alon Shalita. 2016. Compressing Graphs and Indexes with Recursive Graph Bisection. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD). ACM, 1535–1544.DOI
  20. [20]Shuai Ding, Josh Attenberg, and Torsten Suel. 2010. Scalable Techniques for Document Identifier Assignment in Inverted Indexes. In Proceedings of the 19th International Conference on World Wide Web (WWW). 311–320.DOI
  21. [21]Wei Dong, Moses Charikar, and Kai Li. 2011. Efficient k-nearest neighbor graph construction for generic similarity measures. In Proceedings of the 20th International Conference on World Wide Web (WWW). 577–586. https://doi.org/10.1145/1963405.1963487
  22. [22]Matthijs Douze, Alexandre Guzzha, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. 2024. The Faiss library. (2024). arXiv:2401.08281 [cs.LG]arxiv.org/abs/2401.08281
  23. [23]William H. R Equitz and Thomas M. Cover. 1991. Successive Refinement of Information. IEEE Transactions on Information Theory 37, 2 (1991), 269–275.DOI
  24. [24]Cong Fu and Deng Cai. 2016. EFANNA: An extremely fast approximate nearest neighbor search algorithm based on kNN graph. arXiv preprint arXiv:1609.07228 (2016).arxiv.org/abs/1609.07228
  25. [25]Cong Fu, Changxu Wang, and Deng Cai. 2021. High dimensional similarity search with satellite system graph: Efficiency, scalability, and unindexed query compatibility. IEEE Transactions on Pattern Analysis and Machine Intelligence 44, 8 (2021), 4139–4150.DOI
  26. [26]Cong Fu, Chao Xiang, Changxu Wang, and Deng Cai. 2019. Fast Approximate Nearest Neighbor Search With The Navigating Spreading-out Graph. Proceedings of the VLDB Endowment 12, 5 (2019), 461–474. https://doi.org/10.14778/3303753.3303754
  27. [27]Jianyang Gao, Yutong Gou, Yuexuan Xu, Jifan Shi, Zhonghao Yang, and Cheng Long. 2025. The RaBitQ Library. In the 1st Workshop on Vector Databases (VecDB), co-located with ICML 2025. https://openreview.net/forum?id=OeZHHOsFir
  28. [28]Jianyang Gao, Yutong Gou, Yuexuan Xu, Yongyi Yang, Cheng Long, and Raymond Chi-Wing Wong. 2025. Practical and Asymptotically Optimal Quantization of High-Dimensional Vectors in Euclidean Space for Approximate Nearest Neighbor Search. In Proceedings of the ACM on Management of Data (SIGMOD).arxiv.org/abs/2409.09913
  29. [29]Jianyang Gao and Cheng Long. 2023. High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison Operations. ACM Transactions on Database Systems (TODS) 48, 3 (2023), 1–43. https://doi.org/10.1145/3589282
  30. [30]Jianyang Gao and Cheng Long. 2024. RaBitQ: Quantizing high-dimensional vectors with a theoretical error bound for approximate nearest neighbor search. Proceedings of the ACM on Management of Data 2, 3 (2024), 1–27.arxiv.org/abs/2405.12497
  31. [31]Yunfan Gao, Yun Xiong, Xinyu Gao, Kangxiang Jia, Jinliu Pan, Yuxi Bi, Yixin Dai, Jiawei Sun, Haofen Wang, and Haofen Wang. 2023. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997 (2023).arxiv.org/abs/2312.10997
  32. [32]Thiesse Ge, Kaiming He, Qifa Ke, and Jian Sun. 2013. Optimized product quantization. IEEE transactions on pattern analysis and machine intelligence 36, 4 (2013), 744–755.DOI
  33. [33]Lars Gottesbüren, Laxman Dhulipala, Rajesh Jayaram, and Jakub Łacki. 2025. Unleashing Graph Partitioning for Large-Scale Nearest Neighbor Search. Proc. VLDB Endow. 18, 6 (2025), 1649–1662.arxiv.org/abs/2403.01797
  34. [34]Lars Gottesbüren, Tobias Heuer, Peter Sanders, Christian Schulz, and Daniel Seemaier. 2021. Deep Multilevel Graph Partitioning. In 29th Annual European Symposium on Algorithms (ESA) (Leibniz International Proceedings in Informatics (LIPIcs)), Vol. 204. 48:1–48:17.
  35. [35]Yutong Gou, Jianyang Gao, Yuexuan Xu, and Cheng Long. 2025. SymphonyQG: Towards Symphonious Integration of Quantization and Graph for Approximate Nearest Neighbor Search. In Proceedings of the ACM on Management of Data (SIGMOD).
  36. [36]Robert M. Gray and David L. Neuhoff. 1998. Quantization. IEEE Transactions on Information Theory 44, 6 (1998), 2325–2383. https://doi.org/10.1109/18.720541
  37. [37]Ruiqi Guo, Philip Sun, Erik Lindgren, Quan Geng, David Simcha, Felix Chern, and Sanjiv Kumar. 2020. Accelerating Large-Scale Inference with Anisotropic Vector Quantization. In International Conference on Machine Learning. https://arxiv.org/abs/1908.10396
  38. [38]Ben Harwood and Tom Drummond. 2016. FANNG: Fast approximate nearest neighbour graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 5713–5722.DOI
  39. [39]Intel Corporation. 2024. Intel Architecture Instruction Set Extensions and Future Features Programming Reference. https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html. AVX-512 Vector Neural Network Instructions (VNNI).
  40. [40]Masajiro Iwasaki and Daisuke Miyazaki. 2018. Optimization of indexing based on k-nearest neighbor graph for proximity search in high-dimensional data. arXiv preprint arXiv:1810.07355 (2018).
  41. [41]Hussainyaharam Subramanya, Fnu Devvrit, Harsha Vardhan Simhadri, Ravishankar Krishnawamy, and Rohan Kadekodi. 2019. Diskann: Fast accurate billion-point nearest neighbor search on a single node. Advances in neural information processing systems 32 (2019).
  42. [42]Hervé Jégou, Matthijs Douze, and Cordelia Schmid. 2011. Product quantization for nearest neighbor search. IEEE transactions on pattern analysis and machine intelligence 33, 1 (2011), 117–128.DOI
  43. [43]Jeff Johnson, Matthijs Douze, and Hervé Jégou. 2019. Billion-scale similarity search with GPUs. IEEE Transactions on Big Data 7, 3 (2019), 535–547.arxiv.org/abs/1702.08734
  44. [44]Ian T. Jolliffe and Jorge Cadima. 2016. Principal component analysis: a review and recent developments. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 374, 2065 (2016), 20150202. https://doi.org/10.1098/rsta.2015.0202
  45. [45]Sungjun Jung, Yongsang Park, Haeun Lee, Young H. Oh, and Jae W. Lee. 2025. Angular Distance-Guided Neighbor Selection for Graph-Based Approximate Nearest Neighbor Search. In Proceedings of the ACM on Web Conference 2025 (Sydney NSW, Australia) (WWW ’25). Association for Computing Machinery, New York, NY, USA, 4014–4023. https://doi.org/10.1145/3696410.3714870
  46. [46]Ravishankar Krishnaswamy, Magdalen Dobson Manohar, and Harsha Vardhan Simhadri. 2024. The DiskANN library: Graph-Based Indices for Fast, Fresh and Filtered Vector Search. IEEE Data Eng. Bull. (2024).
  47. [47]Leonardo Kuffó, Sven Hepkema, and Peter Boncz. 2026. A Super Fast K-means for Indexing Vector Embeddings. CoRR abs/2603.20009 (2026). https://doi.org/10.48550/ARXIV.2603.20009 arXiv:2603.20009
  48. [48]Daniel Lemire, Nathan Kurz, and Christoph Rupp. 2018. Stream VByte: Faster byte-oriented integer compression. Inform. Process. Lett. 130 (2018), 1–6.
  49. [49]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, et al. 2020. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems 33 (2020), 9459–9474.arxiv.org/abs/2005.11401
  50. [50]Yuliang Li, JinFeng Li, Yoshihiko Suhara, AnHai Doan, and Wang-Chiew Tan. 2020. Deep entity matching with pre-trained language models. Proc. VLDB Endow. 14, 1 (2020), 50–60.DOI
  51. [51]Yong Peng Lim, U. Kang, and Christos Faloutsos. 2014. SlashBurn: Graph Compression and Mining Beyond Caveman Communities. IEEE Transactions on Knowledge and Data Engineering 26, 12 (2014), 3077–3089.
  52. [52]Stuart P. Lloyd. 1982. Least Squares Quantization in PCM. IEEE Transactions on Information Theory 28, 2 (1982), 129–137.DOI
  53. [53]Keijing Lu, Chuan Xiao, and Yoshiharu Ishikawa. 2024. Probabilistic Routing for Graph-Based Approximate Nearest Neighbor Search. In Proceedings of the 41st International Conference on Machine Learning (ICML) (Proceedings of Machine Learning Research), Vol. 235. PMLR, 33282–33309. https://proceedings.mlr.press/v235/lu24l.htmlarxiv.org/abs/2402.11354
  54. [54]Keijing Lu, Chuan Xiao, and Yoshiharu Ishikawa. 2026. Probabilistic Kernel Function for Fast Angle Testing. In Proceedings of the International Conference on Learning Representations (ICLR). https://openreview.net/forum?id=nCsF3BSn2narxiv.org/abs/2505.20274
  55. [55]Maknee. 2024. wikipedia_qwen_8b. https://huggingface.co/datasets/maknee/wikipedia_qwen_8b.
  56. [56]Yury Malkov, Alexander Ponomarenko, Andrey Logvinov, and Vladimir Krylov. 2014. Approximate nearest neighbor algorithm based on navigable small world graphs. Information Systems 45 (2014), 61–68.
  57. [57]Yu A Malkov and Dmitry A Yashunin. 2018. Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE transactions on pattern analysis and machine intelligence 42, 4 (2018), 824–836.DOI
  58. [58]Yu A Malkov and Dmitry A Yashunin. 2018. hnswlib. https://github.com/nmslib/hnswlib.
  59. [59]Magdalena Dobson Manohar, Zheqi Shen, Guy Blelloch, Laxman Dhulipala, Yan Gu, Harsha Vardhan Simhadri, and Yihan Sun. 2024. Parlayann: Scalable and deterministic parallel graph-based approximate nearest neighbor search algorithms. In Proceedings of the 29th ACM SIGPLAN Annual Symposium on Principlesarxiv.org/abs/2305.04359
  60. [60]Yusuke Matsui, Yusuke Uchida, Hervé Jégou, and Shin’ichi Satoh. 2018. A Survey of Product Quantization. ITE Transactions on Media Technology and Applications 6, 1 (2018), 2–10. https://doi.org/10.3169/mta.6.2
  61. [61]Joel Max. 1960. Quantizing for Minimum Distortion. IRE Transactions on Information Theory 6, 1 (1960), 7–12.DOI
  62. [62]Bhaskar Mitra, Nick Craswell, et al. 2018. An introduction to neural information retrieval. Foundations and Trends® in Information Retrieval 13, 1 (2018), 1–126.DOI
  63. [63]Javier Vargas Munoz, Marcos A Gonçalves, Zanoni Dias, and Ricardo da S Torres. 2019. Hierarchical clustering-based graphs for large scale approximate nearest neighbor search. Pattern Recognition 96 (2019), 106970.DOI
  64. [64]Arvind Neelakantan, Tao Xu, Raul Puri, Alec Radford, Jesse Michael Han, Jerry Tworek, Qiming Yuan, Nikolas Tezak, Jong Wook Kim, Chris Hallacy, et al. 2022. Text and code embeddings by contrastive pre-training. arXiv preprint arXiv:2201.10005 (2022).arxiv.org/abs/2201.10005
  65. [65]NVIDIA RAPIDS. 2024. wiki-all: a vector-search benchmark dataset. https://data.rapids.ai/raft/datasets/.
  66. [66]ParlayANN contributors. 2024. ParlayANN: A library of algorithms for approximate nearest neighbor search. https://github.com/cmuparlay/ParlayANN.
  67. [67]Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP). 1532–1543.DOI
  68. [68]Qdrant. 2024. dbpedia-entities-openai3-text-embedding-3-large-1536-1M. https://huggingface.co/datasets/Qdrant/dbpedia-entities-openai3-text-embedding-3-large-1536-1M.
  69. [69]Qdrant. 2024. dbpedia-entities-openai3-text-embedding-3-large-3072-1M. https://huggingface.co/datasets/Qdrant/dbpedia-entities-openai3-text-embedding-3-large-3072-1M.
  70. [70]Keith H. Randall, Raymie Stata, Rajiv G. Wickremesinghe, and Janet L. Wiener. 2002. The Link Database: Fast Access to Graphs of the Web. In Proceedings of the Data Compression Conference (DCC). 122–131.
  71. [71]Nils Reimers. 2022. Cohere/wikipedia-22-12-en-embeddings. https://huggingface.co/datasets/Cohere/wikipedia-22-12-en-embeddings.
  72. [72]Deepjyoti Roy and Mala Dutta. 2022. A systematic review and research perspective on recommender systems. Journal of Big Data 9, 1 (2022), 59.DOI
  73. [73]Tobias Rubel, Richard Wen, Guy Blelloch, Laxman Dhulipala, Lars Gottesbüren, Jakub Łacki, and Vahab Mirrokni. 2026. Turbocharging PiNPN for Proximity and k-NN Graph Building. In Proceedings of the 2nd Workshop on Vector Databases (VecDB), co-located with VLDB 2026. https://openreview.net/forum?id=8GzSQMrLAarxiv.org/abs/2611.05690
  74. [74]Tobias Rubel, Richard Wen, Laxman Dhulipala, Lars Gottesbüren, Rajesh Jayaram, and Jakub Łacki. 2026. PiNPN: Ultra-Scalable Graph-Based Nearest Neighbor Indexing. arXiv preprint arXiv:2602.21247 (2026).arxiv.org/abs/2602.21247
  75. [75]Ilya Safro and Boris Temkin. 2011. Multiscale Approach for the Network Compression-Friendly Ordering. Journal of Discrete Algorithms 9, 2 (2011), 190–202.
  76. [76]Wan-Yun Shieh, Tien-Fu Chen, Jean Jyh-Jiun Shann, and Chung-Ping Chung. 2003. Inverted File Compression through Document Identifier Reassignment. Information Processing & Management 39, 1 (2003), 117–131.DOI
  77. [77]Julian Shun, Laxman Dhulipala, and Guy E. Blelloch. 2015. Smaller and Faster: Parallel Processing of Compressed Graphs with Ligra+. In Proceedings of the Data Compression Conference (DCC). 403–412.DOI
  78. [78]Fabrizio Silvestri. 2007. Sorting Out the Document Identifier Assignment Problem. In Proceedings of the 29th European Conference on IR Research (ECIR). 101–112.
  79. [79]Harsha Vardhan Simhadri, Martin Aumüller, Amir Ingber, Matthijs Douze, George Williams, Magdalen Dobson Manohar, Dmitry Baranchuk, Edo Liberty, Frank Liu, Ben Landrum, et al. 2024. Results of the Big ANN: NeurIPS’23 competition. arXiv preprint arXiv:2409.17424 (2024).arxiv.org/abs/2409.17424
  80. [80]Harsha Vardhan Simhadri, George Williams, Martin Aumüller, Matthijs Douze, Artem Babenko, Dmitry Baranchuk, Qi Chen, Lucas Hosseini, Ravishankar Krishnaswamy, Gopal Srinivasa, et al. 2022. Results of the NeurIPS’21 challenge on billion-scale approximate nearest neighbor search. In NeurIPS 2021 Competitions and Demonstrations Track. PMLR, 177–189.arxiv.org/abs/2205.03763
  81. [81]Philip Sun, David Simcha, Dave Dopson, Ruiqi Guo, and Sanjiv Kumar. 2023. SOAR: Improved Indexing for Approximate Nearest Neighbor Search. In Neural Information Processing Systems. https://arxiv.org/abs/2404.00774
  82. [82]ZeAi Sun and JinXiu Liu. 2024. FastGANN: Marrying Quantization with Pruning for GPU ANNS. In The 2nd Workshop on Vector Databases (VecDB 2026), held in conjunction with VLDB 2026. https://openreview.net/forum?id=FiMBPmf5JxL
  83. [83]Mariano Tepper, Ishwar Singh Bhati, Cecilia Aguerrebere, Mark Hildebrand, and Ted Willke. 2024. Vector-level Searching vectors faster by making them fit. Transactions on Machine Learning Research (2024). https://openreview.net/forum?id=wczqprOrIc
  84. [84]Shay Vargaftik, Ran Ben-Basat, Amit Portnoy, Gal Mendelson, Yaniv Ben-Itzhak, and Michael Mitzenmacher. 2021. DRIVE: One-bit distributed mean estimation. In Advances in Neural Information Processing Systems (NeurIPS).arxiv.org/abs/2105.08339
  85. [85]Shay Vargaftik, Ran Ben-Basat, Amit Portnoy, Gal Mendelson, Yaniv Ben-Itzhak, and Michael Mitzenmacher. 2022. EDEN: Communication-efficient and robust distributed mean estimation for federated learning. In International Conference on Machine Learning (ICML).
  86. [86]Sairaj Vorgunti and M. Tamer Özsu. 2025. MIRAGE-ANNS: Mixed Approach Graph-based Indexing for Approximate Nearest Neighbor Search. Proc. ACM Manag. Data 3, 3, Article 188 (June 2025), 27 pages. https://doi.org/10.1145/3725325
  87. [87]Jan Wassenberg and Google. 2024. Highway: Portable and Performance-Portable, Length-Agnostic SIMD. https://github.com/google/highway.
  88. [88]Lee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang, Jialin Liu, Paul N. Bennett, Junaid Ahmed, and Arnold Overwijk. 2021. Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval. In International Conference on Learning Representations, ICLR.
  89. [89]Mingyu Yang, Wentao Li, Jiabao Jin, Xiaoyao Zhong, Xiangyu Wang, Zhitao Shen, Wei Jia, and Wei Wang. 2025. Effective and General Distance Computation for Approximate Nearest Neighbor Search. In IEEE International Conference on Data Engineering (ICDE), 1098–1110. https://doi.org/10.1109/icde65448.2025.00087
  90. [90]Shuo Yang, Jiadong Xie, Yingfan Liu, Jeffrey Xu Yu, Xiyue Gao, Qianru Wang, Yangguo Peng, and Jiangtao Cui. 2024. Revisiting the index construction of proximity graph-based approximate nearest neighbor search. arXiv preprint arXiv:2410.01231 (2024).arxiv.org/abs/2410.01231
  91. [91]Shangdi Yu, Joshua Engels, Yihao Huang, and Julian Shun. 2025. Pecann: Parallel efficient clustering with graph-based approximate nearest neighbor search. In 2025 Proceedings of the Conference on Applied and Computational Discrete Algorithms (ACDA). SIAM, 1–17.
  92. [92]Amir Zandieh, Majid Daliri, Majid Hadian, and Vahab Mirrokni. 2025. Turboquant: Online vector quantization with near-optimal distortion rate. arXiv preprint arXiv:2504.19874 (2025).arxiv.org/abs/2504.19874
  93. [93]Alexandros Zeakis, George Papadakis, Dimitrios Skoutas, and Manolis Koubarakis. 2023. Pre-Trained Embeddings for Entity Resolution: An Experimental Analysis. Proc. VLDB Endow. 16, 9 (2023), 2225–2238.DOI
  94. [94]Xi Zhao, Yao Tian, Kai Huang, Bolong Zheng, and Xiaofang Zhou. 2023. Towards efficient index construction and approximate nearest neighbor search in high-dimensional spaces. Proceedings of the VLDB Endowment 16, 8 (2023), 1979–1991.DOI

Paper details

vlnc:W_24yjzasy
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 5

downloads · 1

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Not recorded for this paper · View statement →

Looking for related papers…
Contents