arXiv(opens in a new tab)cs.IRAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.23862

AdaWidth: Query-Adaptive Embedding Width for Dense Retrieval

Shubing Yang, Dongfang Zhao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

High-dimensional embeddings are central to dense retrieval, but not all of these dimensions need to be evaluated at retrieval time. Existing methods reduce dimensions in two ways: truncating the same leading dimensions for every query, or masking a different subset for each query while still storing and accessing the full embedding. Yet queries within a single task differ widely in the number of dimensions they need for their rankings to stabilize.

We introduce AdaWidth, which adapts the number of evaluated dimensions to each query within a shared prefix representation. An orthogonal prefix adapter applies a single learned rotation to queries and documents alike, concentrating discriminative signal in leading coordinates while leaving every full width inner product unchanged. A lightweight router then reads order statistics off the ranking a query has already produced, and evaluates more dimensions only for the queries whose top results would change. We further derive a prefix sufficiency analysis showing that the required number of dimensions is set by the competing documents at the retrieval cutoff: it grows logarithmically with corpus size, decreases logarithmically with retrieval depth, and remains heavy-tailed across queries. Across six retrieval tasks and five frozen encoders, AdaWidth matches the NDCG@10 of state-of-the-art dimensionality reduction using 55% to 84% fewer dimensions per query.

1 Introduction

High-dimensional embeddings are central to dense retrieval. They are the retrieval representation in web and product search [19, 26, 37], open-domain question answering [22], recommendation [4], and retrieval-augmented generation [17, 25]. In these systems, large corpora are searched in real time [18, 21, 31, 54], and at that scale embedding width stops being a modelling detail and becomes a running cost. Not all of those dimensions, however, need to be evaluated at retrieval time [12, 20, 23, 35, 39, 43, 46, 49, 58].

Existing work reduces dimensions in two ways. The first builds a representation that stays usable when truncated, so that a prefix of the embedding can be scored on its own [24, 27, 55–57, 59, 60]. The number of dimensions is then a property of the representation, fixed for the workload or for a target compression level, and every query is served at the same one. The second line estimates, for an individual query, which coordinates carry signal, and keeps those with the highest scores [8, 9, 13, 14, 52]. These methods do adapt to the query, but the coordinates they retain differ from query to query and are scattered across the vector: the index must hold every

Dongfang Zhao

dzhao@cs.washington.edu

University of Washington

Tacoma, Washington, USA

Figure

Figure 1: Distribution of stable prefix widths across four retrieval tasks and three encoders. Each bar groups queries by the smallest prefix width at which their ranking stabilizes; no stable hit indicates no stabilization within the widest prefix evaluated.

document at full width, and scoring gathers those coordinates out of a full width record.

However, queries differ substantially in the number of dimensions needed for their rankings to stabilize. Figure 1 illustrates this variation across retrieval tasks and encoders, including encoders trained with Matryoshka objectives [24, 38, 44]. Some queries reach stable rankings with short prefixes, whereas others require much wider representations. A single width must therefore accommodate the most demanding queries, causing queries that stabilize earlier to be scored over unnecessary coordinates.

We introduce AdaWidth, a retrieval method that adapts the evaluated prefix width to each query within a shared representation. AdaWidth keeps the encoder frozen and adds two components between the encoder and the index: an orthogonal prefix adapter that makes leading coordinates more informative, and a lightweight router that determines how many of those coordinates to evaluate for each query. First, the adapter applies the same learned rotation to queries and documents, implemented as a product of Householder reflections [33]. This rotation concentrates discriminative information in leading coordinates without changing similarities at the original width, enabling retrieval with short contiguous prefixes. Second, the router extracts features based on order statistics from the ranking produced at a fixed initial width and evaluates wider prefixes only for queries whose top results appear unstable. The adapter therefore makes short prefixes more effective, and the

The source code is available at https://github.com/suey3141/AdaWidth.git.

Yang et al.

router converts this prefix structure into computational savings for individual queries.

We further derive a prefix sufficiency analysis of how many dimensions a query requires. A relevant document falls out of the top-k at a given width exactly when k non-relevant documents overtake it there. The required number of dimensions is therefore determined by an order statistic of the competition at the retrieval cutoff, not by the reconstruction accuracy of any individual similarity. This criterion differs from the reconstruction and distance preservation objectives underlying classical reduction [7]. Under an exponential decay of the per-competitor overtaking probability, the required number grows logarithmically with corpus size, decreases logarithmically with retrieval depth, and remains heavy-tailed across queries, which is the pattern Figure 1 exhibits. The analysis also bounds what any orthogonal adapter can contribute: since such a map fixes every full width inner product, it can only move discriminative signal between the evaluated prefix and the discarded tail, never create it. Training the adapter is therefore energy compaction of a fixed quantity, and its effect enters the analysis as a higher rate at which discriminative information accumulates in the prefix.

We evaluate on four text retrieval tasks from BEIR [45], including FiQA [30], ArguAna [47], Quora [45], and MS MARCO [36], and two knowledge VQA retrieval tasks, OK-VQA [32] and A-OKVQA [42]. We use five frozen encoders with 137M to 7B parameters and embedding dimensions from 768 to 4096 [38, 44, 51, 53]. We compare against prefix truncation, Matryoshka Adaptor [56], SMEC [57] and Learning-to-Select [52], each retrained on every encoder and dataset. The predicted scaling form holds on all six tasks with the predicted signs on corpus size and retrieval depth. On cost against quality, AdaWidth is ahead of all three baselines at nearly every shared operating point, and matches their NDCG@10 using 55% to 84% fewer dimensions per query.

This paper makes the following contributions:

  • We propose AdaWidth, a retrieval method that adapts the evaluated prefix width to each query within a shared representation. An orthogonal prefix adapter concentrates discriminative signal in leading coordinates. A lightweight router uses features based on order statistics from the initial ranking to evaluate wider prefixes only for queries whose top results appear unstable. (Section 3)

  • We derive a prefix sufficiency analysis that characterizes the width a query requires as an order statistic of the competition at the retrieval cutoff, and predicts that it grows logarithmically with corpus size and decreases logarithmically with retrieval depth. (Section 4)

  • We evaluate AdaWidth on six retrieval tasks with five frozen text and vision language encoders, showing that AdaWidth matches the NDCG@10 of state-of-the-art dimensionality reduction using 55%-84% fewer dimensions per query. (Section 5)

References (14)