Manuscript Offprint

arXiv:2610.30177

FlexVDR: Learning to Allocate Matryoshka Representation Budgets for Visual Document Retrieval

Haowen Xiang, Yibo Yan, Xin Zou, Shuliang Liu, Yi Cao, Mingdong Ou, Xuming Hu

ABSTRACT

Visual document retrieval relies on rich multi-vector representations to capture fine-grained evidence in document pages, but encoding and matching these representations can be computationally expensive. Existing compression and elastic representation methods expose smaller configurations, yet making multiple budgets available does not determine which configuration a query should use. The allocation decision must estimate the retrieval value of alternative representations before incurring their full computation, while accommodating different resource preferences. We introduce FLEXVDR, a framework for query-adaptive budget allocation within a single retriever. We construct a joint family of routes over encoder depth, embedding width, and token count. Retrieval supervision and distillation train the compact routes, while a native bypass preserves the full-budget reference. A Budget Allocator predicts route-specific retrieval utility from early query features and combines these predictions with a configurable resource preference to select a route. Experiments across five backbones on ViDoRe V1, V2, and V3 public show that FLEXVDR retains much of the native retrieval quality while selecting compact routes for individual queries. A configurable resource preference allows the same retriever to adjust its computation without retraining or switching models.

1 INTRODUCTION

Visual document retrieval (VDR) retrieves pages from their rendered appearance, preserving evidence in tables, figures, and layout that can be difficult to recover through text extraction. Multi-vector retrievers such as ColPali (Faysse et al., 2025) combine a vision–language encoder with token-level late interaction to capture fine-grained query–page correspondences. With document representations prepared offline, online retrieval still requires query encoding and vector-level matching against the stored representations (Khattab & Zaharia, 2020). The resulting challenge is to reduce this computation while retaining the information needed for accurate retrieval.

Compression and elastic representation learning make smaller representations available: Matryoshka embeddings support nested widths of the final-layer representation (Kusupati et al., 2022), while depth-aware extensions make intermediate-layer representations available for retrieval (Figure 1(a,b)) (Wang et al., 2025; Xiang et al., 2026). Token pruning and pooling reduce the number of document vectors involved in matching (Yan et al., 2025; Singha Roy et al., 2026). Together, these approaches provide choices over encoder depth, embedding width, and token count.

The evidence that makes a page relevant is query-specific: queries may target information in text, tables, or figures, and late-interaction matching associates individual query terms with different page regions (Faysse et al., 2025). A deployment-fixed configuration, however, assigns the same depth, width, and token count to every query. Choosing such a configuration sets a common compromise between representation capacity and computation across the query workload. Adding more configurations broadens the available choices, but a fixed selection still leaves the incoming query without a role in deciding which representation to use. Learning useful compact representations

Figure

Figure 1: Representation choices and budget selection. (a) Embedding MRL provides nested widths at the final layer; (b) MM-Matryoshka provides depth–width choices. Both illustrated settings use one fixed configuration across queries. (c) FLEXVDR selects depth, width, and query/document token budgets per query. L, D, and T label the depth, width, and token-count axes.

and deciding when to use each one therefore remain distinct parts of the retrieval problem. This motivates our central question: how can a single retriever allocate representation budgets to individual queries while accommodating different resource preferences?

Query-adaptive allocation poses two design requirements. Dynamic early-exit models provide a precedent by using intermediate predictions and adjustable inference-time thresholds to control encoder computation (Xin et al., 2020; Liu et al., 2020). ① The allocation choice must be made before executing the remaining encoder layers, using query information available at an early stage. Running every candidate route before choosing one would already incur the computation that allocation is intended to avoid. The decision must therefore anticipate the retrieval value of query representations that have not yet been produced. ② Changing the desired computation level should not require learning a new allocation rule. A query may be processed under different resource preferences, so its representation choice should remain adjustable after training.

To address these requirements, we introduce FLEXVDR, a framework for query-adaptive budget allocation within a single retriever (Figure 1(c)). Its Budget Allocator predicts the retrieval utility of candidate routes from early query features and combines these estimates with a resource preference to select a route. The utility estimates describe what each representation is expected to offer for the current query, while the resource preference determines how strongly selection favors compact configurations. Learning the utilities independently of this preference allows the same predictions to be reused when the desired quality–computation trade-off changes. The candidate routes jointly vary encoder depth, embedding width, and query/document token count, with learned compact representations and the native full route providing the available choices. The resulting retriever can adjust its computation without retraining or switching models.

Our contributions are as follows:

① Query-adaptive budget allocation. We develop a Budget Allocator that predicts route-specific retrieval utility from early query features and uses a separately specified resource preference to select a representation budget.

② A joint representation family for allocation. We integrate selectable encoder depth, embedding width, and query/document token count into a common route family, with compact representations and the native full route as allocation choices.

③ Evaluation across backbones and benchmarks. We evaluate five backbones on ViDoRe V1, V2, and V3 public, and examine computation across resource preferences.

2 RELATED WORK

Multimodal multi-vector retrieval. Multi-vector retrieval preserves fine-grained evidence through token-level matching. ColBERT established contextualized late interaction for text retrieval (Khattab & Zaharia, 2020); ColPali transfers this approach to page images (Faysse et al., 2025). Subsequent released models expand backbone capacity and retrieval training, including Nemotron ColEmbed V2 and webAI-ColVec (Moreira et al., 2026; webAI, 2026). ViDoRe V1 (Faysse et al., 2025) evaluates this setting across visually rich domains, while ViDoRe V2 (Macé et al., 2025) introduces more demanding query construction and relevance judgments. ViDoRe V3 public (Loison et al., 2026) extends evaluation to multimodal retrieval-augmented generation with diverse query types and source-grounding annotations. These retrievers and benchmarks establish the visual retrieval setting in which we study how much representation capacity to allocate to each query.

Matryoshka representation learning. Matryoshka representation learning concentrates useful information in nested dimension prefixes (Kusupati et al., 2022). Two-dimensional training additionally uses encoder depth (Wang et al., 2025); MM-Matryoshka studies depth–dimension elasticity for multi-vector VDR (Xiang et al., 2026). Complementary compression methods reduce the storage or number of document vectors. ColBERTv2 reduces storage through residual compression, representing token vectors as centroid identifiers and quantized residuals (Santhanam et al., 2022). DocPruner reduces page embeddings using document-dependent patch importance (Yan et al., 2025). ColSNAP learns spatially pooled compression tiers that can be chosen at indexing time (Singha Roy et al., 2026). Qin et al. (2026) study query-agnostic document compression under a fixed vector budget, using attention-guided clustering to select centroids and aggregate token representations. Together, nested representations and vector compression provide ways to vary representation budgets. We build a joint depth–width–token family and learn to select its budget for each incoming query.

Budget-oriented search. Input-dependent computation controls how much encoding or search work an input requires. Dynamic early-exit methods such as DeeBERT and FastBERT use intermediate prediction confidence to decide whether encoder computation should continue, with thresholds adjustable after training (Xin et al., 2020; Liu et al., 2020). In retrieval, AdANNS uses nested representations to construct adaptive approximate-nearest-neighbor search pipelines (Rege et al., 2023). Within late interaction, Argus conditions region-level expert routing on the query and cached document features to construct query-dependent document representations (Abdallah et al., 2026). Rishi et al. (2026) formulate query-aware document-token selection for second-stage reranking as a MaxSim coverage problem under a per-page token budget. Col-Bandit reduces query-time scoring work by progressively evaluating MaxSim contributions and using confidence bounds to eliminate uncompetitive candidates (Pony et al., 2026). The allocation decision in FLEXVDR concerns the joint encoder depth, embedding width, and query/document token count. It predicts route-specific retrieval utilities from shared early query features and selects one route before the remaining query-encoding and matching computation. Learning these utilities separately from the resource preference allows the same fitted predictor to support different choices within this joint budget space.

References (29)