Abstract
Video-Language Pre-training (VLP) has traditionally relied on global contrastive learning, which aligns entire video clips with single captions. However, this coarse-grained approach often neglects the intricate temporal structure of videos, leading to suboptimal performance on tasks requiring precise temporal grounding. We present TemPVL, a framework that introduces a novel Text-Video Localization (TVL) pre-text task. By synthetically merging multiple short video clips and text queries into longer sequences, TemPVL creates a supervised environment for learning temporal boundaries without the need for manual annotations. Our results demonstrate that TemPVL achieves state-of-the-art performance across various temporal perceiving tasks, including moment retrieval and action localization, while maintaining strong performance on general retrieval and captioning.
Introduction
The current landscape of Video-Language Pre-training is dominated by models that excel at matching global semantics. While effective for general video-text retrieval, these models often struggle with "temporal perceiving"—the ability to identify exactly when a specific action occurs within a longer video stream. For instance, in a video of a birthday party, a global caption might describe "a person cutting a cake," but the video also contains frames of singing, dancing, and conversation. Standard global alignment fails to distinguish the relevant frames from the irrelevant background, treating the entire clip as a single entity.
To bridge this gap, existing methods have explored Masked Language Modeling (MLM) or fine-grained token-level matching. However, these do not explicitly address the problem of temporal boundary detection. TemPVL addresses this by framing temporal understanding as a localization problem, leveraging synthetic data generation to provide the necessary supervision.
Methodology
Text-Video Localization (TVL) Task
The core of TemPVL is the TVL task, which consists of two complementary sub-tasks: Moment Retrieval and Text Localization.
- Moment Retrieval with Language: In this setup, the model receives a long video sequence formed by merging frame features from several different videos within a training batch. Given a specific sentence query (e.g., "a person runs up the stairs"), the model must predict the start and end boundaries within the merged sequence that correspond to that query. Since the source of each frame is known, the ground truth boundaries are automatically available.
- Text Localization with Video: Conversely, the model is presented with a single video clip and a sequence of merged text tokens from multiple sentences. The task is to identify which subset of the text tokens accurately describes the provided video clip.
Merging and Sampling Strategies
To ensure the model learns robust and discriminative features, TemPVL employs several merging strategies:
- Segment Shuffling: Randomly reordering video segments within the merged sequence to prevent the model from relying on simple temporal order.
- Hard Sampling: Instead of random merging, the framework selects the most visually similar videos in a batch to merge. This "hard" task forces the Multi-Modal (MM) Encoder to learn highly specific features to differentiate between similar actions (e.g., "walking" vs. "running").
Model Architecture
TemPVL utilizes a dual-encoder architecture. Visual features are extracted using a VideoSwin backbone, while text features are processed via BERT. These unimodal features are then concatenated and fed into a Multi-Modal (MM) Encoder. Interestingly, the authors found that initializing the MM Encoder from the last few layers (e.g., top 3 or 6) of a pre-trained BERT model provided the best balance between cross-modal interaction and generalization, preventing overfitting on the fusion task.
Experiments and Results
The model was pre-trained on a combination of WebVid-2.5M and CC3M (treating images as single-frame videos). Evaluation was conducted across a wide range of benchmarks.
Temporal Perceiving Tasks
TemPVL showed its greatest strengths in tasks requiring fine-grained temporal understanding. On the Charades-STA moment retrieval dataset, it achieved a 45.4% [email protected], a 4.2-point improvement over the previous state-of-the-art, LocVTP. Similarly, on THUMOS14, it demonstrated superior action localization capabilities.
Qualitative Impact
The impact of the TVL task is clearly visible when analyzing similarity scores over time. Without TVL, models often produce noisy or flat similarity curves. With TVL, the similarity scores peak sharply at the correct temporal boundaries, as shown in the figure below.
General Retrieval and Captioning
Beyond temporal tasks, TemPVL also improved performance in zero-shot retrieval. On the DiDeMo dataset, it saw a 3.3% increase in Recall@1. In video captioning on MSR-VTT, it achieved a CIDEr score of 61.9, suggesting that better temporal grounding leads to more accurate and descriptive language generation.
Conclusion
TemPVL introduces a simple yet powerful paradigm for video-language pre-training. By using synthetic merging to create a supervised localization task, it bypasses the need for expensive manual temporal annotations while significantly enhancing the model's ability to perceive temporal boundaries. While the model currently misses some extremely fine-grained details in complex scenes, the success of the TVL task opens new avenues for large-scale temporal reasoning in multi-modal AI. Future research could explore more sophisticated, learnable merging strategies to further push the boundaries of temporal understanding.
Summary updated