Déjà Vu: Efficient Video-Language Query Engine with Learning-based Inter-Frame Computation Reuse

Jinwoo Hwang, Daeun Kim, Sangyeop Lee, Yoonsung Kim, Guseul Heo, Hojoon Kim, Yunseok Jeong, Tadiwos Meaza, Eunhyeok Park, Jeongseob Ahn, Jongse Park · DOI

Abstract

Video-Language Models (VideoLMs) enable sophisticated natural language queries over video content but are hindered by the massive computational overhead of processing every frame through Vision Transformers (ViTs). This paper presents Déjà Vu, an algorithm-system co-designed query engine that leverages temporal redundancy to accelerate inference. By integrating a learning-based ReuseViT architecture with a Déjà Vu Compaction system, the engine achieves significant throughput gains—up to 2.64×—while maintaining a strict 2% error bound.

1. Introduction

The demand for semantic video search—finding specific events using natural language—has led to the proliferation of Video-Language Models (VideoLMs). These models typically utilize Vision Transformers (ViTs) to generate embeddings for video frames. However, the high cost of transformer inference makes large-scale video analytics prohibitively expensive.

Two primary challenges hinder efficiency in this domain:

  1. Temporal Redundancy: Consecutive frames in a video often contain nearly identical information, leading to redundant computations when processed independently.
  2. The Sparsity Trap: While sparse computation techniques can reduce theoretical operations (FLOPs) by skipping similar patches, they often result in irregular memory access patterns. GPUs are optimized for dense, regular math; consequently, reducing FLOPs through sparsity often fails to translate into actual "wall-clock" speedups.

2. The Déjà Vu Framework

Déjà Vu addresses these challenges through a dual approach: a smart algorithmic reuse strategy and a hardware-aligned system implementation.

2.1 ReuseViT: Learning-Based Computation Reuse

Instead of relying on rigid, manual heuristics, Déjà Vu introduces ReuseViT, which utilizes two lightweight neural modules to manage computation:

  • Decision Layer: A small Multi-Layer Perceptron (MLP) determines whether a specific image patch can reuse the computation from a previous frame. It considers frame similarity, token importance, and video codec metadata to make informed skipping decisions.
  • Restoration Layer: To prevent error accumulation over time, this layer "calibrates" reused values. By spending a marginal amount of computation (approximately 4%), it corrects minor discrepancies between frames, allowing for high reuse rates (over 80%) without significant accuracy degradation.
  • Bidirectional Referencing: Inspired by video compression standards (I, P, and B-frames), the model utilizes both past and future frames as references to optimize the quality of reused embeddings.

2.2 System-Level Compaction

To translate theoretical math savings into real-world performance, the Déjà Vu Compaction system optimizes GPU utilization:

  • Layer-wise Scheduling: By processing batches of frames one layer at a time, the system minimizes memory footprint and allows for immediate cache clearing after a layer is completed.
  • Sparse Computation Compaction: The system identifies tokens requiring new computation and "gathers" them into dense matrices. After performing dense GPU operations, the results are "scattered" back to their original positions. This ensures the GPU operates at peak utilization by avoiding the overhead of irregular data structures.

3. Experimental Evaluation

The authors evaluated Déjà Vu across three diverse video-language tasks using standard benchmarks:

  • Video Retrieval: MSR-VTT dataset (10,000 clips).
  • Video Question Answering (QA): How2QA dataset (44,007 QA pairs).
  • Video Question Grounding: NExT-GQA dataset (videos averaging 45 seconds).

3.1 Key Results

The framework demonstrated substantial performance improvements over existing state-of-the-art methods:

  • Throughput Gains: Achieved speedups of 1.81× for Video Retrieval, 2.64× for Video QA, and 2.54× for Video Grounding.
  • Accuracy Preservation: All performance gains were achieved within a 2% error bound relative to the original unoptimized models, proving the effectiveness of the Restoration Layer.
  • Memory Efficiency: The compaction technique enabled the system to handle 3× larger batch sizes on the same hardware (NVIDIA RTX 3090) by optimizing memory reuse.

4. Discussion and Future Work

The success of Déjà Vu highlights a critical insight: reducing FLOPs is only effective if the remaining operations are structured for hardware efficiency. The "Restoration Layer" is a game-changer, proving that a small investment in calibration can unlock massive savings in redundant computation.

However, limitations remain. As video resolution increases, the Self-Attention layer—which is not the primary focus of the current FFN-centric optimization—may become a new bottleneck. Future research could explore extending these reuse principles to attention mechanisms and investigating online adaptation, where the model fine-tunes its reuse policy in real-time for novel video domains.

5. Conclusion

Déjà Vu represents a significant step forward in making Video-Language Models practical for large-scale deployment. By intelligently "remembering the past" and compacting computations for the GPU, it bridges the gap between theoretical algorithmic efficiency and actual system throughput.

Summary updated

BibTeX
@article{hwang2025deja,
  author = {Jinwoo Hwang and Daeun Kim and Sangyeop Lee and Yoonsung Kim and Guseul Heo and Hojoon Kim and Yunseok Jeong and Tadiwos Meaza and Eunhyeok Park and Jeongseob Ahn and Jongse Park},
  title = {{Déjà Vu: Efficient Video-Language Query Engine with Learning-based Inter-Frame Computation Reuse}},
  journal = {Proc. VLDB Endow.},
  year = {2025},
  doi = {10.14778/3748191.3748195},
}
Figure