Allocate Before You Embed: Adaptive Visual Input Allocation for Video Embeddings

Song Jin, Zhongtao Jiang, Chenglei Shen, Huanxuan Liao, Haozhe Chi, Zhiwei Wang, Kun Xu, Yong LiuarXiv 2026

TL;DR

AllocEmbed introduces an "allocate-then-embed" framework that dynamically distributes a fixed video token budget across a denser sequence of frames, preserving high resolution only where it matters most for retrieval. Paired with a novel reinforcement learning strategy called Retrieval-Driven Policy Optimization (RDPO), it trains a lightweight allocator entirely using end-to-end retrieval feedback. This plug-and-play approach significantly boosts video retrieval accuracy—especially on long videos—without modifying the underlying frozen embedding backbone or increasing inference costs.

What Problem Does This Paper Address?

Large-scale video retrieval relies on embedding models to compress complex video data into fixed-dimensional vectors. However, processing massive video corpora is computationally expensive. To keep costs manageable, standard pipelines typically sample a small, fixed number of frames (e.g., 8 frames) at their native resolution.

This creates a harsh trade-off: sampling too few frames limits temporal coverage (potentially missing brief or sparse events), while uniformly downscaling more frames to fit the budget causes spatial detail loss (blurring out fine-grained visual evidence). Existing systems treat all frames and videos as equally important, wasting budget on static backgrounds or blank transitions while starving information-rich frames. The authors tackle this by asking: How can we intelligently allocate a fixed visual-input budget across a denser frame sequence to maximize retrieval performance?

Figure 1: Fixed-frame inputs limit temporal coverage. Adding full-resolution frames increases inference cost, whereas uniform downscaling loses spatial detail. Al- locEmbed preserves broad temporal coverage and key spatial detail under the same visual-input budget. H/L denote high/low resolution.

Methods

The authors propose AllocEmbed, an allocate-then-embed framework consisting of two main components:

  1. The Allocator Framework: Instead of sparse sampling, AllocEmbed samples a dense sequence of frames. A lightweight allocator (built on a small, frozen vision-language model, SmolVLM2-256M) takes low-cost frame previews and the text query to predict a continuous resolution scale factor for each frame. A scale-aware operator then resizes each frame dynamically, creating a mixed-resolution sequence. Crucially, this happens before the video hits the heavy embedding backbone, meaning the backbone remains completely frozen and unmodified.
  2. Retrieval-Driven Policy Optimization (RDPO): Since there are no frame-level labels showing the "optimal" resolution, the authors use reinforcement learning (based on Group-Relative Policy Optimization, or GRPO) to train the allocator directly from end-to-end retrieval outcomes. RDPO samples multiple allocation strategies for a single video and scores them using a rank-validated similarity gap (which rewards strategies that successfully rank the correct target first and maximize its distance from negatives) combined with a confidence-guided efficiency incentive (which pushes the model to reduce frame sizes only when it is already highly confident in a correct retrieval).
AllocEmbed Framework and RDPO Pipeline

Datasets

  • MMEB-V2: A massive multimodal embedding benchmark consisting of 10 video tasks divided into Video Question Answering (V-QA) and Video Retrieval (V-RET). Tasks include MSR-VTT, MSVD, DiDeMo, YouCook2, VATEX, Video-MME, NExTQA, EgoSchema, MVBench, and ActivityNet-QA.
  • LongRet: A new benchmark introduced by the authors specifically designed to evaluate long-video retrieval where visual evidence is sparse and unevenly distributed. It contains 11,355 queries across 2,842 complete source videos from the LoVR and Vript datasets, evaluated across four subsets (LoVR-Clip, LoVR-Video, Vript-Clip, and Vript-Video).

Key Insights and Ideas

  • Complementary Roles of Time and Space: The authors find that increasing temporal coverage (more frames) yields massive retrieval gains, but only if key spatial details are preserved. Uniformly downscaling all frames quickly hits a point of diminishing returns due to detail loss.
  • Plug-and-Play Generalization: Because the allocator operates entirely upstream of the embedding backbone, an allocator trained on one specific model (e.g., VLM2Vec-V2-2B) transfers zero-shot to entirely different embedding architectures and sizes (up to 8B parameters) without any retraining.
  • Smart Content Prioritization: Qualitative case studies show the allocator naturally learns to assign high resolutions to text-rich frames, sharp action shots, or key objects (like a red carpet or specific iconography), while dropping blank transitions or motion-blurred frames to the minimum allowed resolution.

Key Results

  • Performance Boost: On the MMEB-V2 benchmark, AllocEmbed improves Hit@1 by 1.34 to 1.69 points over the standard 8-frame baseline across various backbones.
  • Long Video Excellence: On the challenging new LongRet benchmark, the gains jump dramatically to 5.69 to 9.09 Hit@1 points, capturing most of the accuracy of a high-cost "full resolution" model at a fraction of the cost.
  • Zero Cost Overhead: These accuracy improvements are achieved while maintaining or even slightly reducing the total visual token budget (realized costs are around 0.94x to 0.99x of the baseline).
  • Backbone Speedup: By reducing the resolution of uninformative frames, AllocEmbed cuts down the number of visual tokens processed by the heavy embedding backbone, leading to a 1.941× speedup in backbone forward-pass latency.
Figure 2: Effect of increasing the sampled frame count on mean Hit@1 across ten MMEB-V2 V-QA and V-RET tasks. Full Resolution keeps the original per-frame resolution as the frame count increases, whereas Uniform Allocation and AllocEmbed use the same visual-input budget as the 8-frame input. Blue endpoint labels show the Full Resolution gains relative to the 8-frame baseline. Each panel uses a model-specific vertical range.

Limitations and Future Work

  • CPU Preprocessing Bottleneck: While AllocEmbed drastically reduces heavy GPU backbone latency, the current implementation performs frame resizing and preprocessing sequentially on the CPU. The authors note that full systems-level optimization (parallelism and pipelining) is required to realize the full end-to-end speedup in production.
  • Frozen Backbone Constraint: The allocator is trained while keeping the embedding backbone completely frozen. While this ensures excellent compatibility and low training costs, exploring joint fine-tuning of both the allocator and the backbone could potentially unlock even higher retrieval performance.

Summary updated

BibTeX
@misc{jin2026allocate,
  author = {Song Jin and Zhongtao Jiang and Chenglei Shen and Huanxuan Liao and Haozhe Chi and Zhiwei Wang and Kun Xu and Yong Liu},
  title = {{Allocate Before You Embed: Adaptive Visual Input Allocation for Video Embeddings}},
  year = {2026},
  eprint = {2609.01778},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.01778},
}
Figure