Prompt-aware of Frame Sampling for Efficient Text-Video Retrieval

Deyu Zhang, Tingting Long, Jinrui Zhang, Ligeng Chen, Ju Ren, Yaoxue ZhangarXiv 2025 · DOI · arXiv

Abstract

Text-video retrieval is a critical capability for modern content discovery, yet its deployment on edge devices remains constrained by the high computational cost of processing dense video frames. Traditional methods rely on either uniform sampling, which is computationally expensive, or query-agnostic saliency sampling, which often overlooks user-specific semantic details. This paper presents ProCLIP, a novel framework that introduces prompt-aware frame sampling and a hierarchical pruning strategy. By dynamically selecting frames based on the user's text query and utilizing cross-modal feature distillation, ProCLIP reduces retrieval latency by over 75% while maintaining state-of-the-art accuracy across major benchmarks.

Introduction

As video content continues to dominate digital consumption, the ability to search for specific moments within vast video libraries using natural language has become essential. However, executing these searches locally on edge devices—such as smartphones and laptops—presents a significant challenge. The computational overhead of processing high-resolution video frames against complex text embeddings often leads to high latency and excessive battery drain.

Existing solutions typically fall into two categories: uniform sampling and salient-frame sampling. Uniform sampling ensures coverage but is computationally "too hot" for mobile hardware. Conversely, salient-frame sampling uses lightweight models to identify visually dominant frames; however, these are often query-agnostic. For instance, a model might prioritize a visually striking person in the foreground while ignoring a "penguin" in the background that the user is actually searching for. ProCLIP addresses this "Goldilocks" problem by making the frame selection process sensitive to the semantic intent of the user's prompt.

Methodology

Prompt-aware Frame Sampling

The core innovation of ProCLIP is its ability to treat a frame's importance as a relative property dependent on the search query. The framework employs a dual-attention mechanism to guide selection:

  • Word-aware Attention: This captures fine-grained matches, ensuring that specific entities or objects mentioned in the prompt (e.g., "seal") are prioritized.
  • Sentence-aware Attention: This captures high-level contextual relevance, focusing on the overall scene or action (e.g., "kayaking").

A Gated Fusion module adaptively combines these signals to score frames, ensuring that only the most relevant visual data is passed to the more intensive processing stages.

Two-Stage Candidate Pruning

To optimize the search across large databases, ProCLIP utilizes a hierarchical "coarse-to-fine" approach.

  1. Coarse Filtering: A lightweight MobileNet-V3 module performs a rapid scan of the video library to discard clearly irrelevant content.
  2. Fine Re-ranking: Only high-confidence candidates are passed to a heavy, CLIP-based re-ranker for final precision.

Cross-Modal Feature Distillation

To prevent the lightweight coarse filter from accidentally discarding relevant videos due to a lack of semantic understanding, the authors employ knowledge distillation. The lightweight module is trained to mimic the embedding space of the heavyweight CLIP model. This alignment bridges the "modality gap," allowing the efficient model to "think" like the more powerful transformer-based architecture.

Experimental Evaluation

Datasets and Setup

ProCLIP was evaluated on three standard public benchmarks: MSR-VTT (10,000 short videos), MSVD (2,000 clips), and ActivityNet (20,000 long-form YouTube videos). The researchers also conducted a Personalized Query Evaluation and a User Satisfaction Study to measure real-world responsiveness.

Performance and Efficiency

The results demonstrate that ProCLIP achieves a Pareto-optimal balance between speed and accuracy. Key findings include:

  • Latency Reduction: ProCLIP achieved a 75.3% reduction in latency compared to uniform sampling baselines.
  • Retrieval Accuracy: On the MSR-VTT dataset, the model reached an R@1 of 49.0, matching or exceeding the performance of significantly heavier state-of-the-art models.
  • Resource Footprint: With a memory footprint of approximately 5.38 GB, the system is viable for mid-range consumer GPUs and high-end mobile devices.

Discussion and Conclusion

The success of ProCLIP highlights that saliency in video retrieval is not a static visual property but a dynamic one defined by user intent. By making the sampler prompt-aware and distilling cross-modal knowledge into lightweight backbones, the framework enables high-performance retrieval on edge hardware.

Future work will focus on developing adaptive algorithms to automatically determine optimal pruning ratios based on query complexity and further optimizing the framework for specific mobile Neural Processing Units (NPUs). Currently, the pruning ratio remains a manually tuned hyperparameter, which the authors aim to automate in subsequent iterations.

Summary updated

Abstract

Enabling efficient text-video retrieval on edge-end devices is critical for real-world applications. Yet, existing methods face a critical challenge in balancing accuracy and computational efficiency: uniform frame sampling methods ensure content coverage but incur prohibitive computational costs, while salient-frame sampling methods reduce overhead but suffer from query-agnostic frame selection that biases retrieval results. To address this, we propose ProCLIP, a user-centric framework that achieves state-of-the-art accuracy with significantly improved efficiency. We design a prompt-aware frame sampling strategy that dynamically guides lightweight feature extractors using textual prompts to select semantically relevant frames, overcoming the limitations of existing salient-frame sampling methods which rely on static, query-agnostic selection criteria. Moreover, we adopt a two-stage candidate pruning strategy that combines rapid coarse filtering via a lightweight module with CLIP-powered fine-grained re-ranking, enhancing retrieval efficiency while preserving accuracy. Experiments across benchmarks show ProCLIP achieves 75.3% latency reduction versus baselines while maintaining competitive accuracy, i.e., R@1=49.0 in MSR-VTT dataset. Code is available at https://github.com/tiffylong/ProCLIP.
BibTeX
@misc{zhang2025prompt,
  author = {Deyu Zhang and Tingting Long and Jinrui Zhang and Ligeng Chen and Ju Ren and Yaoxue Zhang},
  title = {{Prompt-aware of Frame Sampling for Efficient Text-Video Retrieval}},
  year = {2025},
  eprint = {2507.15491},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.15491},
}
Figure