TL;DR
This paper introduces RETTA, a novel framework for zero-shot video captioning that leverages pre-trained models and test-time adaptation. By using learnable tokens as a communication bridge between frozen vision and language models, RETTA effectively adapts to new videos without requiring ground truth data, achieving state-of-the-art performance on several benchmarks.
What Problem Does This Paper Address?
Video captioning, the task of automatically generating a textual description for a video, has seen significant progress. However, most existing methods rely on extensive supervision, requiring a large number of human-annotated captions per video, which is costly and time-consuming. Zero-shot video captioning aims to address this by generating captions for videos without any direct training examples. While combining pre-trained vision and language models has shown promise in zero-shot settings for tasks like question answering, directly applying these approaches to video captioning faces challenges. Specifically, the semantic connection between retrieved information and the video content can be weak, and crafting effective prompts for generation is difficult. This paper tackles these issues by proposing a retrieval-enhanced test-time adaptation approach that bridges these gaps.
Methods
RETTA's core innovation lies in its Retrieval-Enhanced Test-Time Adaptation (RETTA) framework. It comprises four pre-trained, frozen foundation models:
- XCLIP: A video-text retrieval model used to find relevant sentences from a text corpus based on the video content.
- CLIP: An image-text matching model for visual feature extraction and frame sampling.
- AnglE: A text alignment model to measure semantic similarity between text.
- GPT-2: A language generation model responsible for producing the captions.
The key challenge is enabling the GPT-2 model to generate captions that are highly relevant to the video content. RETTA addresses this by introducing learnable tokens that act as a communication medium between the frozen models. Unlike traditional methods that train such tokens with data, RETTA updates these tokens during test-time inference using "soft targets" derived from the inference data itself. This allows the tokens to absorb video-specific information and guide GPT-2's generation process.
RETTA employs two novel loss functions:
- Sentence-granularity retrieval loss ($L_{retrieval}^{set}$): Encourages GPT-2 to generate text that reflects the content of retrieved sentences.
- Word-granularity retrieval loss ($L_{retrieval}^{word}$): Focuses on high-frequency words in retrieved sentences to mitigate noise and improve accuracy.
Additionally, RETTA incorporates vision-language alignment loss ($L_{vision}$) and language fluency loss ($L_{language}$). The entire framework is optimized through a total loss function during a few inference iterations (e.g., 16), enabling fast adaptation without ground truth. A post-processing step involving sentence cleaning using a pre-trained model like CommonGen further refines the generated captions.
Datasets
The paper evaluates RETTA on three widely-used video captioning datasets:
- MSR-VTT: A large-scale dataset with 10,000 video clips.
- MSVD: A dataset collected from YouTube, consisting of 1,970 video clips.
- VATEX: A large-scale, multilingual dataset with 34,991 videos.
The experiments utilize the standard splits for training, validation, and testing.
Key Insights and Ideas
- Learnable tokens as inference-time adapters: The core idea of using learnable tokens that are updated during inference, rather than trained beforehand, is crucial for fast adaptation in zero-shot settings. This bypasses the need for large annotated datasets.
- Soft targets for unsupervised adaptation: Utilizing soft targets derived from the inference data itself allows the model to learn from the video content without requiring explicit ground truth labels, making the adaptation process unsupervised.
- Bridging vision and language with retrieval: RETTA effectively bridges the gap between visual understanding (from XCLIP and CLIP) and textual generation (by GPT-2) through a retrieval mechanism and the learnable tokens.
- Multi-granularity loss functions: The combination of sentence-level and word-level retrieval losses helps to balance capturing the overall context with focusing on important details, leading to more accurate captions.
- Test-time adaptation is sufficient: The paper demonstrates that a few iterations of test-time adaptation are enough to achieve significant performance gains, highlighting the efficiency of the proposed approach.
Key Results
RETTA achieves state-of-the-art performance in zero-shot video captioning across the evaluated datasets.
- MSVD: Achieved a CIDEr score of 49.8, an improvement of 32.4% over the previous best.
- MSR-VTT: Showed a CIDEr score improvement of approximately 30.6%.
- VATEX: Achieved a CIDEr score of 23.8, a 27.3% improvement.
While RETTA slightly underperforms on traditional metrics like BLEU@4, METEOR, and ROUGE-L compared to methods trained with extensive supervision, its strong performance on CIDEr (which specifically measures vision-text relevance) validates its effectiveness in capturing video content. Qualitative results show that RETTA generates more specific and accurate captions compared to other zero-shot methods.
Limitations and Future Work
- Corpus Dependency: The current framework relies on a content-rich corpus for retrieval. This dependency might lead to less accurate descriptions if the corpus is not sufficiently rich or diverse.
- Future Work:
- Constructing a larger-scale and more diverse corpus to improve descriptive capabilities.
- Extending the method to cross-domain video captioning tasks to enhance generalization ability in broader cross-modal understanding scenarios.
- The authors plan to make their code publicly available.
Summary updated