Abstract
Contrastive Language-Action Pre-training (CLAP) bridges the gap between general video classification and the specific requirements of temporal localization. By introducing a "post-pre-training" phase that utilizes untrimmed videos and a novel masked contrastive loss, CLAP enables video encoders to better distinguish between actions and background context. This approach sets new state-of-the-art benchmarks for localizing actions and grounding language in video sequences.
Introduction
Most contemporary video AI models are pre-trained on "trimmed" clips—short snippets where a specific action, such as "diving," occupies the entire duration. While effective for classification, this creates a significant domain gap for real-world tasks like Temporal Action Localization (TAL), where the objective is to identify the precise start and end points of an action within a long, "untrimmed" video.
Standard pre-trained encoders often fail in these scenarios because they do not learn to distinguish background context from the action itself, are frequently frozen during fine-tuning, and rely on fixed category labels rather than the semantic richness of natural language.
Methodology
CLAP introduces a two-stage pipeline. Following initial pre-training on trimmed clips, the model undergoes a "post-pre-training" phase using untrimmed videos. Unlike traditional methods that use fixed feature extractors, CLAP trains the video encoder end-to-end.
Masked Contrastive Loss
The core innovation of CLAP is the Masked Contrastive Loss. In standard contrastive learning frameworks like CLIP, every video segment is aligned with a corresponding text description. However, background segments in untrimmed videos are semantically diverse and difficult to describe accurately. CLAP’s loss function masks out the positive contrastive terms for background clips. This allows background segments to serve as "hard negatives" for foreground actions, helping the model define sharper temporal boundaries without wasting capacity on modeling background noise.
Prompt Engineering
To enhance semantic flexibility, CLAP utilizes prompt engineering. Instead of simple labels, the model is trained with prompts such as "foreground of [action]" and "background of [action]," explicitly teaching the relationship between an activity and its surrounding context.
Experimental Setup
The study evaluates CLAP across several major benchmarks:
- Kinetics-400: Used for initial trimmed action classification pre-training.
- ActivityNet-1.3: The primary dataset for the CLAP post-pre-training phase and for evaluating TAL and Few-Shot TAL.
- Charades-STA & TACoS: Used to evaluate Video Language Grounding (VLG), which involves finding video segments that match free-form natural language queries.
Key Results and Insights
CLAP demonstrates superior performance across three distinct downstream tasks:
- Temporal Action Localization (TAL): On ActivityNet-1.3, CLAP improved the average mean Average Precision (mAP) by 0.52% over the previous state-of-the-art (TSP).
- Few-Shot TAL: The model showed a massive improvement of 1.55% in average mAP compared to TSP when provided with only five examples of an action, highlighting strong generalization capabilities.
- Video Language Grounding (VLG): On the Charades-STA dataset, CLAP improved the mean Intersection over Union (mIoU) by 2.4% over existing methods.
Qualitative analysis indicates that CLAP is significantly better at identifying precise temporal boundaries. While previous models often included extra frames of context (e.g., a bench near a campfire), CLAP correctly identifies these as background rather than part of the action itself.
Conclusion and Future Work
CLAP proves that how a model is trained is often more critical than the sheer volume of data. By treating the background as a negative foil rather than a separate class, CLAP achieves state-of-the-art results with significantly fewer videos than massive-scale models like VideoCLIP.
Future research may explore encoding more complex temporal relationships (e.g., sequential actions) and addressing the performance drop observed when moving between highly disparate datasets, such as general activity videos and specialized domain-specific content.
Summary updated