Average Recall 0.99 Is Not a Per-Query Promise: Recall Guarantees for Vector Search

An arXiv preprint counts the queries that fall below recall 0.99 on vector indexes tuned to a 0.99 average, and prices a per-query recall guarantee against HNSW and FAISS.

Per-query recall in vector search. Figure: share of test queries below recall 0.99 on indexes tuned to an average recall of 0.99, and queries below recall 0.99 after five update steps without retuning.

This post is for people who tune a vector index until its average recall reaches a target, such as 0.99, and then treat every search result as good enough. A new arXiv preprint, Per-Query Recall Guarantees for Approximate Nearest Neighbor Search in Dynamic Vector Databases, from Gachon University and Semyung University, measures how many individual queries still fall below that target. It then proposes PQR-Search, a search method that bounds the chance of a shortfall for every query, including after inserts and deletes.

It is the extended version of a paper submitted to ICDE 2027, so every number below is the paper’s own measurement on its own server and datasets.

Two-panel chart on a black background. Left panel, share of test queries below recall 0.99 at k = 100 for indexes tuned to an average recall of 0.99: queries like the data 5.0% to 19.2%; queries unlike the data, tuned on data vectors, 51.4% to 99.6%; the same queries, tuned on a query log, 4.5% to 18.7%. Right panel, the same share after five update steps without retuning: IVF-Flat 13.5% to 22.3%, FreshDiskANN 13.8% to 20.0%, hnswlib 11.1% to 16.7%, Quake 7.9% to 17.5%.
Figure. Indexes tuned to an average recall of 0.99, none with a per-query guarantee. Left: each bar spans IVF-Flat, HNSW32 and IVF-RaBitQ on three datasets per row, and the query-log row counts only the cases that reached the 0.99 average. Right: a single dataset (yandex), a different index set, and steps that each insert 10% of the data and delete the oldest 10%. PQR-Search is not in this chart.
Source: Section 2.1 and Figure 1 of arXiv 2611.07579. Chart by Ohrenbench.

The problem in one paragraph

Approximate nearest neighbor (ANN) indexes such as HNSW and IVF are usually tuned by raising a search parameter, efSearch or nprobe, until the average recall on calibration queries reaches a target, and the chosen value is then applied to every query (Section 1). An average can be met while some hard queries have low recall. If 90 of 100 queries return all 100 true neighbors and 10 return 90 of them, average recall is 0.99 while 10% of queries are below 0.99. The paper notes that this matters little where results are interchangeable, as in retrieval-augmented generation and recommendation. In image copy detection, and wherever vector search results feed filters, joins and aggregates inside a database, a single missed neighbor is an error (Section 1).

How often tuned indexes fall short

The paper first measures the standard FAISS implementations of IVF-Flat, HNSW32 and IVF-RaBitQ, each tuned to an average recall of 0.99 on calibration queries (Sections 2.1 and 6.1).

  • Queries like the data. On SIFT, GIST and arxiv, the queries were split in half into calibration and test sets, 20 times. The test queries met the 0.99 average, yet 5.0–19.2% of them fell below recall 0.99 at k = 100 (Section 2.1, Figure 1(a)).
  • Queries unlike the data. Text-to-image queries (yandex, laion) and real user questions (hotpotqa) were sent to indexes tuned with data vectors, as happens without a query log. At k = 100, 51.4–99.6% of queries fell below 0.99 (Section 2.1).
  • Tuned on a query log. Tuning instead on 1,000 real queries from the same distribution as the test queries brought that share to 4.5–18.7% in the cases that reached the 0.99 average. The paper attributes the jump to the mismatch between tuning queries and real queries (Section 2.1).
  • After updates. An index built on half of yandex and tuned to 0.99 went through five steps, each inserting 10% of the data in cluster order and deleting the oldest 10%, with no retuning. At k = 100 the share below 0.99 rose from 13.5% to 22.3% for IVF-Flat, from 13.8% to 20.0% for FreshDiskANN, from 11.1% to 16.7% for hnswlib, and from 7.9% to 17.5% for Quake, which takes a recall target directly (Section 2.1, Figure 1(b)).
  • Guarantees averaged over queries. CTR, a conformal method with a distribution-level guarantee, was run with its own loss target in 27 settings; it left up to 16.4% of queries below the target, which an averaged guarantee permits (Section 1, Figure 1(c)).

What a per-query guarantee means here

The paper sorts recall guarantees into five levels, from L0, tuning with no guarantee, to L4, deterministic exhaustive search (Section 2.2, Table 1). PQR-Search targets L3, a guarantee for each given query, at lower cost than L4.

For a target recall τ and a failure probability δ, the (τ, δ)-recall guarantee is Pr[Recall(q) < τ] ≤ δ for every given query (Section 1). The probability is over a random rotation inside the index, not over a set of queries, so no assumption about the data or query distribution is needed; queries and updates must not depend on that rotation (Sections 1 and 2.2). A weaker expected-recall guarantee, E[Recall(q)] ≥ τ for every query, is what the paper says meets the requirement at lower cost for retrieval-augmented generation and recommendation (Section 1).

How PQR-Search works

  • Index. Each vector’s residual from its IVF partition centroid goes through a random orthogonal transformation and is stored as a 1-bit binary code (Section 1).
  • Search. PQR-Search computes exact distances to some vectors from the partitions nearest the query and takes the k-th as a pruning radius. It then tests the remaining vectors with their codes, including vectors in partitions it did not visit, prunes those that cannot lie within the radius, and re-ranks only the survivors with exact distances. The radius shrinks each time an exact distance is computed during the test (Section 1). Because the test error follows a data-independent distribution under the rotation, the chance of missing a true neighbor can be bounded for the given data and query (Section 1). Exact distances were computed for a median of only 0.17% of all vectors (Section 3.3).
  • Why re-ranking alone does not help. Re-ranking an HNSW result with exact distances removes false neighbors but cannot reveal missed ones, because the search never examined them (Section 1).
  • Updates and filters. The dynamic index adds a delta segment for new vectors, a deletion bitmap and merges, with no graph connections to repair. If updates are independent of the rotation, the guarantee holds without retuning (Sections 1 and 7). Marking the vectors that fail a predicate in the deletion bitmap keeps the guarantee for the true neighbors among the qualifying vectors, at any selectivity (Section 1, Corollary 2).

Reported results

The experiments covered 20 datasets of up to 100M vectors and the official NeurIPS’23 streaming runbook (abstract and Section 1), on one server with an AMD Threadripper PRO 9975WX (32 cores) and 256 GB of memory (Section 6.1).

The guarantee held in every audit. An audit uses fresh rotations and test queries not used in the design (Section 6.1). Over 168 static settings, the (τ, δ)-recall guarantee failed 45 times in 4,176,000 trials, at most 0.5% of δ per configuration (Section 6.2, Table 11). On the streaming runbook (32 insertions, 10 deletions and 33 searches on msturing-10M with up to 5.3M live vectors), the failure rate stayed at most δ in all 33 search steps without retuning, while IVF-Flat with nprobe fixed at the first time point exceeded its target failure rate by up to 4.2 times (Section 6.4, Figure 12).

Database answers changed far less. On YFCC, which has tag metadata, indexes tuned to an average recall of 0.99 returned a different top-5 tag list with counts than exact search for 3.1–26.6% of queries. PQR-Search with the exact-search guarantee changed the answer of any operator in at most 4 of the 10,000 trials of each processing path, or 0.04% (Section 6.6, Table 29).

The guarantee has a price. The table gathers the paper’s speed comparisons. The conditions differ by row.

ComparisonHow the baseline was tunedReported result
HNSW32, target 0.99, the 15 settings where it reached the targetAverage recall on calibration queriesPQR-Search had 2.5× the 1-thread latency; HNSW32 had 1.3× higher batch throughput and left 3.3–29.2% of test queries below 0.99
HNSW32, target 0.99, reached in 10 of 18 settingsAt most 1% of calibration queries below 0.99PQR-Search 1.1× faster at 1 thread and 1.9× faster in batch where HNSW32 reached it
HNSW32, target 0.9At most 1% of calibration queries below 0.9HNSW32 2.7× faster at 1 thread
HNSW32, 100M vectors, queries like the dataAt most 1% of calibration queries below the targetHNSW32 4.8× (0.99) and 19× (0.9) faster at 1 thread
FAISS IndexFlatL2 exhaustive search, 52 main settingsExact, the same guaranteePQR-Search 22.9× faster one query at a time and 26.4× faster in batches of 1,000

Ratios are the paper’s summary values over each row’s settings; rows 1, 2 and 5 are stated as geometric means. Rows come from Tables 15, 17 and 19 and Section 6.3 of arXiv 2611.07579 and use different settings, so values do not compare across rows.

Behind the 2.5× figure, the per-dataset gap ran from 1.7–2.7× shorter latency for PQR-Search on GIST and laion (k = 10) to 15.5–40.4× longer on msmarco, where HNSW32’s average recall on the test queries was 0.974–0.988, below the target (Section 6.3). The paper’s own summary is that the price is largest for in-distribution queries at a low target on large data, and small or negative for out-of-distribution queries and high targets (Section 6.3).

VADER: Filtered Vector Search with Declarative Recall (arXiv 2609.38053, listed on arXiv as appearing in VLDB 2027) works on filtered vector search, where a predicate’s selectivity and its correlation with the vector space change how hard a query is. The user declares a recall target, and a filter-aware recall predictor stops the search once the predicted recall reaches it, with no hyperparameter tuning (abstract).

At selectivity 0.3 and k = 100 on Sweeping, achieved recall across the workload closely matched the target, the ratio of queries below the target (RQUT) averaged 0.27, and individual queries deviated from the target by 0.04 on average. Speedups over plain search reached 24.8× and averaged 8.8× (Section 4.2.1). Against the best-performing baseline, which is tuned for each selectivity and recall target, the paper reports up to 28% better quality and 53% faster search (Section 1).

The two papers use different datasets, filters and metrics, so their numbers do not compare. VADER aims to meet a declared target across the workload; PQR-Search bounds, for each query, the probability of falling below it. A third preprint, Recall-Bounded Staleness for Filtered Multi-Tenant ANN Graph Indexes under Concurrent Updates (arXiv 2610.15130), derives a query-averaged per-tenant recall bound for a graph index under updates (abstract).

Limits of the main study

  • The independence condition. The guarantee holds for queries and updates that do not depend on the index’s rotation, with the seed kept secret (Section 2.2). The paper analyses the risk of adaptive updates separately (Section 1).
  • Cost. HNSW32 was faster at a 0.9 target and for in-distribution queries at 100M scale, where the 1-thread latency of PQR-Search grew to 56–71 ms (Section 6.3). Under updates, total cost was higher or lower than that of FAISS depending on the ratio of queries to updates (Section 7).
  • Reading the audits. Measured failure rates were smaller than δ because search radii were larger than the true k-th distance, and the paper says this must not be used as grounds for relaxing δ (Section 6.2).
  • Platform. One CPU implementation with AVX-512. A GPU implementation and guarantee forms that exploit query logs are future work (Sections 1 and 7).

What you can apply now

  • Report the share of queries below your target, not only average recall. Average recall is dominated by easy queries (Section 6.1).
  • Tune and test on queries that look like your traffic. Without a query log, 51.4–99.6% of text-to-image and real-question queries fell below 0.99 at k = 100 (Section 2.1).
  • Measure again after updates. Five steps of 10% inserts and deletes raised the share below target for every index tested, including Quake (Section 2.1).
  • Decide whether one miss is an error in your application. The paper treats the cheaper expected-recall guarantee as enough for retrieval-augmented generation and recommendation, but not for results that feed filters, joins and aggregates (Section 1).
  • Price the guarantee on your own data. The 2.5× latency against average-tuned HNSW32 is a geometric mean that varied widely by dataset (Section 6.3). The code, the experiment and audit scripts and the result files are public under the Apache-2.0 license.

Here is a minimal sketch of the first measurement. It is not the paper’s audit code, and it counts a returned vector tied with the true k-th neighbor as a miss, which the paper counts as correct (Section 2.2).

import numpy as np

def per_query_recall(found_ids, true_ids):
    """found_ids, true_ids: integer arrays of shape (n_queries, k)."""
    k = true_ids.shape[1]
    return np.array([len(set(f) & set(t)) / k
                     for f, t in zip(found_ids, true_ids)])

def tail_report(found_ids, true_ids, target=0.99):
    r = per_query_recall(found_ids, true_ids)
    return {
        "average_recall": round(float(r.mean()), 4),
        "share_below_target": round(float((r < target).mean()), 4),
        "worst_query_recall": round(float(r.min()), 4),
    }

On the example from the top of this post, 90 queries with all 100 true neighbors and 10 queries with 90 of them, it returns an average recall of 0.99, a share below target of 0.1 and a worst-query recall of 0.9.

Papers

As of November 23, 2026, the first two were at version 2 on arXiv and the third at version 1.

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep reading

All posts