Abstract
Learning generic joint representations for video and text by a supervised method requires a prohibitively substantial amount of manually annotated video datasets. As a practical alternative, a large-scale but uncurated and narrated video dataset, HowTo100M, has recently been introduced. But it is still challenging to learn joint embeddings of video and text in a self-supervised manner, due to its ambiguity and non-sequential alignment. In this paper, we propose a novel multi-modal self-supervised framework Video-Text Temporally Weak Alignment-based Contrastive Learning (VT-TWINS) to capture significant information from noisy and weakly correlated data using a variant of Dynamic Time Warping (DTW). We observe that the standard DTW inherently cannot handle weakly correlated data and only considers the globally optimal alignment path. To address these problems, we develop a differentiable DTW which also reflects local information with weak temporal alignment. Moreover, our proposed model applies a contrastive learning scheme to learn feature representations on weakly correlated data. Our extensive experiments demonstrate that VT-TWINS attains significant improvements in multi-modal representation learning and outperforms various challenging downstream tasks.
Introduction
The "holy grail" of video AI is learning from the vast amount of uncurated content available on the internet. Datasets like HowTo100M provide millions of video-caption pairs, but they are notoriously "weakly correlated." In a typical instructional video, a narrator might describe a step before performing it, discuss irrelevant context, or skip steps entirely.
Existing methods often struggle with this noise. Standard alignment algorithms like Dynamic Time Warping (DTW) are too rigid, attempting to force every word to match a specific video frame in a strict sequence. Conversely, simpler contrastive learning methods (such as MIL-NCE) often ignore temporal order altogether. The challenge lies in finding a middle ground: an alignment strategy that respects temporal structure while remaining flexible enough to handle the inherent noise of real-world narrations.
Methodology: VT-TWINS
We introduce VT-TWINS (Video-Text Temporally Weak Alignment-based Contrastive Learning), a framework designed to bridge the gap between rigid alignment and temporal-agnostic learning. The core of the system is a novel algorithm: Locally Smoothed Soft-DTW with Weak Alignment (S2DTW).
Locally Smoothed Soft-DTW
Standard DTW is non-differentiable, making it difficult to integrate into end-to-end neural network training. We utilize a "soft" version of DTW and introduce local neighborhood smoothing. This allows the model to consider not just the single best alignment path, but also nearby "locally optimal" paths. This smoothing acts as a natural regularizer, preventing feature collapse and making the model more robust to temporal ambiguity.
Weak Alignment via Dummy Elements
To address irrelevant clips or captions, we insert "dummy elements" ($ϕ$) into the sequences. If the distance between a specific video clip and a caption is too high, the algorithm can choose to align them with a dummy element instead of each other. This effectively provides a "trash can" for noise, allowing the model to focus on high-confidence correlations.
Temporal Data Augmentation and Contrastive Learning
Since some videos are non-sequential, we employ specific shuffling augmentations to teach the model invariance to small temporal shifts. We then use the S2DTW score as the distance metric within an InfoNCE loss function, pushing matching video-text pairs together in the embedding space while pulling mismatched pairs apart.
Experimental Results
VT-TWINS was trained on the HowTo100M dataset (1.22M narrated videos) and evaluated across several downstream tasks, setting a new state-of-the-art for self-supervised models in this category.
Action Recognition
On the HMDB51 dataset, VT-TWINS achieved 57.9% accuracy. This represents a nearly 4% improvement over the popular MIL-NCE baseline using the same S3D backbone, demonstrating the superior quality of the learned representations.
Zero-Shot Retrieval
In text-to-video retrieval tasks on YouCook2, VT-TWINS achieved a Recall@1 of 9.7%. Notably, this outperformed several models that were specifically fine-tuned on YouCook2, despite VT-TWINS operating in a zero-shot capacity.
Action Step Localization
On the CrossTask dataset, which requires identifying exactly when specific steps occur, VT-TWINS reached an average recall (CTR) of 40.7%. This significantly exceeds the performance of MIL-NCE (35.5%) and specialized models like DWSA (35.5%).
Discussion and Conclusion
The success of VT-TWINS suggests that flexibility is paramount when dealing with uncurated data. By allowing the model to "skip" irrelevant pairs via dummy tokens and making the entire alignment process differentiable, the video and text encoders learn to produce more distinct and meaningful features.
While the model assumes an underlying sequential flow—which may be challenged by highly non-sequential content like montages—it provides a robust framework for handling the messy reality of internet video. Future work may extend this "weak alignment" logic to other multi-modal time-series data, such as audio-visual or sensor-based streams.
Summary updated