Abstract
Traditional text-video retrieval models primarily rely on discriminative frameworks that maximize the conditional probability of candidates given a query. While effective, these models often struggle with out-of-distribution (OOD) data due to their limited understanding of the underlying data distributions. This paper introduces DiffusionRet, a novel generative framework that models the joint distribution of queries and candidates using a diffusion-based approach. By treating retrieval as an iterative denoising process on a distribution vector, DiffusionRet achieves state-of-the-art performance across multiple benchmarks and exhibits significant robustness in cross-domain scenarios.
Introduction: Beyond Discriminative Retrieval
In text-video retrieval, the objective is to identify the most relevant video for a given textual description. Current state-of-the-art solutions are almost exclusively discriminative, focusing on $p(candidates|query)$. However, this approach ignores the query distribution $p(query)$, leading to poor generalization when the model encounters queries or videos significantly different from the training set.
DiffusionRet shifts this paradigm by modeling the joint distribution $p(candidates, query)$. By learning the underlying structure of how text and video relate, the model gains a more holistic "understanding" of the data, which naturally improves its ability to handle diverse and unseen inputs.
Methodology
DiffusionRet treats the retrieval task as a generative process where a clean ranking distribution is recovered from Gaussian noise through a series of denoising steps.
1. Cross-Modal Feature Encoding
The framework utilizes a CLIP-based text encoder and a ViT-based video encoder. To bridge the gap between modalities, a Text-Frame Attention Encoder aggregates frame-level features into a single video representation that is conditioned on the specific text query. This ensures that the resulting features are contextually aware of the retrieval target.
2. Query-Candidate Attention Denoising Network
The core of DiffusionRet is the denoising network, which operates on a distribution vector of length $N$ (representing $N$ candidates).
- Forward Process: Gradually introduces noise into the ground-truth ranking distribution.
- Reverse Process: The denoising network iteratively refines a noisy distribution into a clean ranking. It employs a specialized attention mechanism that integrates the current noise level with joint text-video features to guide the refinement.
3. Hybrid Optimization Strategy
To achieve peak performance, the model is trained using a hybrid loss function:
- Generation Loss (KL Divergence): Aligns the generated distribution with the actual data distribution.
- Discrimination Loss (InfoNCE): A contrastive loss that sharpens the feature representations, ensuring that relevant pairs are easily distinguishable in the latent space.
Results and Discussion
DiffusionRet was evaluated on five gold-standard benchmarks: MSRVTT, LSMDC, MSVD, ActivityNet Captions, and DiDeMo. It established new state-of-the-art (SOTA) records across all five, notably achieving a 49.0% Recall@1 (R@1) on MSRVTT.
Robustness and Generalization
The generative nature of DiffusionRet provides a distinct advantage in zero-shot and out-of-distribution (OOD) settings. When trained on MSRVTT and tested directly on DiDeMo, DiffusionRet achieved an R@1 of 33.2%, significantly outperforming the popular discriminative model CLIP4Clip (31.8%). This confirms that modeling the joint distribution leads to more transferable cross-modal representations.
Efficiency
Despite the iterative nature of diffusion models, DiffusionRet remains efficient because it operates on low-dimensional distribution vectors rather than high-dimensional pixels. The model typically reaches peak performance in 50 steps, maintaining inference times comparable to traditional single-pass models.
Conclusion
DiffusionRet demonstrates that generative modeling is a powerful alternative to traditional discriminative approaches in text-video retrieval. By capturing the joint distribution of queries and candidates, the model achieves superior accuracy and robustness. Future work may focus on pure generative training and further optimizing the denoising steps to reduce computational overhead.
Summary updated