Diffusion-Inspired Truncated Sampler for Text-Video Retrieval

Jiamian Wang, Pichao Wang, Dongfang Liu, Qiang Guan, Sohail Dianat, Majid Rabbani, Raghuveer Rao, Zhiqiang TaoNeurIPS 2024

Finding the perfect video for a specific text query is a cornerstone of modern search, yet it remains a notoriously difficult task for AI. The fundamental hurdle is the modality gap: text and video are represented by vastly different data structures. Even in "joint" embedding spaces like CLIP, these two modalities often remain stubbornly separated, leading to suboptimal retrieval accuracy.

In their recent work, researchers introduce the Diffusion-Inspired Truncated Sampler (DITS). By rethinking how diffusion models can be used for ranking rather than just generation, they establish new state-of-the-art (SOTA) benchmarks for text-video retrieval.

TL;DR

DITS bridges the text-video modality gap by repurposing diffusion models for ranking instead of generation. By starting the diffusion process from text embeddings rather than random noise, and replacing standard $L_2$ loss with a contrastive loss, DITS achieves SOTA accuracy across five major benchmarks.

The Problem: Modality Gaps and Diffusion Limits

Most retrieval systems map text and video into a shared mathematical space. Ideally, a video of a "cat jumping" and the text "cat jumping" should land on the exact same coordinate. In reality, they don't. This modality gap persists even in high-end models.

While researchers have attempted to use Diffusion Models to bridge this gap, they typically run into two major walls:

  1. The Loss Mismatch: Standard diffusion uses $L_2$ (Mean Squared Error) loss, which is excellent for generating visually pleasing images but terrible for ranking. Ranking requires the model to prioritize relevant pairs while actively pushing away irrelevant ones—a discriminative task that $L_2$ doesn't naturally handle.
  2. The Noise Problem: Traditional diffusion starts from pure isotropic Gaussian noise. For retrieval, this introduces too much randomness. If you start from a random point every time, your "aligned" embedding might end up in a slightly different (and wrong) place, hurting retrieval precision.

The Solution: DITS Methodology

The authors introduce DITS, which makes two radical changes to the standard diffusion pipeline to optimize it for retrieval tasks:

1. Truncated Sampling

Instead of starting from a random cloud of noise, DITS begins the "denoising" process directly from the text embedding. The authors argue that since the text is already semantically related to the target video, it serves as a much more meaningful starting point than random noise. This "truncation" makes the process more controllable, deterministic, and significantly faster.

Comparison of different alignment strategies. DITS (d) starts from the text embedding and uses contrastive loss for guidance.

2. Contrastive Loss Guidance

DITS swaps the standard $L_2$ loss for a contrastive loss (specifically, symmetric cross-entropy). This forces the model to look at the "big picture": it learns to pull the correct video-text pairs together while simultaneously pushing the "distractor" (irrelevant) videos away.

The architecture relies on Diffusion Transformers (DiT) to model the modality gap ($\delta = v - t$) across multiple timesteps, iteratively refining the text embedding until it tightly aligns with the video.

Key Insights

  • Meaningful Initialization: The most critical insight is that for retrieval, noise is the enemy. By treating the text embedding as a meaningful intermediate latent state, DITS bypasses the instability of standard generative diffusion.
  • Ranking is not Generation: The paper proves that diffusion is a highly flexible framework. If you change the objective function from "make this look like a real image" ($L_2$) to "make this match the right label" (Contrastive), diffusion becomes a powerful tool for discriminative tasks.
  • Embedding Space "Surgery": DITS doesn't just move points around temporarily; it actually improves the underlying geometric structure of the CLIP space, making it more "discriminatively structured."

Experimental Evaluation and Results

The researchers evaluated DITS on five diverse benchmarks to ensure its robustness: MSRVTT, LSMDC, DiDeMo, VATEX, and Charades.

DITS achieved SOTA performance across the board. Some highlights include:

  • MSRVTT: Outperformed the strong X-Pool baseline by 5% in Recall@1 (R@1).
  • Charades: On this difficult dataset focused on daily indoor activities, DITS showed a remarkable boost of up to 6.7% in R@1 compared to previous methods.
  • Efficiency: Despite being a diffusion-based model, DITS is highly efficient. Because it uses a truncated process with fewer steps, its inference time is comparable to non-diffusion SOTA methods like T-MASS.
Quantitative results on MSRVTT and LSMDC showing DITS outperforming competitors.

Limitations and Future Work

While DITS is powerful, the authors note a few areas for improvement:

  • Data Requirements: Like most contrastive methods, DITS performs best when it has access to large amounts of labeled text-video pairs. Its performance in extreme zero-shot or few-shot scenarios remains an open question.
  • Robustness: The model's performance can still degrade if the input data is exceptionally noisy or if the initial CLIP embeddings are of very poor quality.
  • Future Directions: The authors suggest that this truncated diffusion approach could be expanded to other multimodal tasks, such as audio-video retrieval or complex image-text reasoning.

Summary updated

BibTeX
@inproceedings{wang2024diffusion,
  author = {Jiamian Wang and Pichao WANG and Dongfang Liu and Qiang Guan and Sohail Dianat and MAJID RABBANI and Raghuveer Rao and ZHIQIANG TAO},
  title = {{Diffusion-Inspired Truncated Sampler for Text-Video Retrieval}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=SrQua0ATRZ},
}
Figure