Introduction
Audio-Text Retrieval (ATR) is a fundamental task in cross-modal information retrieval, enabling users to search for audio clips using natural language queries. Traditionally, ATR systems have relied on discriminative models that maximize the conditional probability $p(\text{candidates}|\text{query})$. While effective, these models often fail to capture the underlying data distribution $p(\text{query})$, leading to poor generalization when encountering out-of-distribution (OOD) data.
This paper, presented at Interspeech 2024, introduces DiffATR, a novel framework that treats ATR as a generative process using diffusion models. By modeling the joint probability $p(\text{candidates}, \text{query})$, DiffATR captures intrinsic semantic characteristics more effectively than purely discriminative approaches, resulting in superior performance and robustness.
The DiffATR Framework
DiffATR conceptualizes retrieval as an iterative denoising process. Instead of a single-pass similarity calculation, the framework starts with a noise distribution and refines it over $K$ steps to identify the correct match. The authors found that $K=50$ steps provides an optimal balance between retrieval accuracy and computational efficiency, as the probability space for retrieval is less complex than high-dimensional image generation.
Attention-based Denoising Module
The core of DiffATR is the Attention-based Denoising Module. During each step $k$, the model employs a cross-attention mechanism to compare the query (e.g., text) against the candidate pool (e.g., audio clips). A key innovation is the integration of the distribution from the previous step ($x_k$) into the attention weights, allowing the model to progressively focus on the most relevant candidates.
Hybrid Optimization and Training
The model utilizes a hybrid optimization strategy, combining a Generative Loss ($\mathcal{L}_G$) based on KL divergence to ensure accurate reconstruction from noise, and a Discriminative Loss ($\mathcal{L}_D$) using contrastive learning (NT-Xent) to align latent features. Training occurs in two phases: first, feature encoders (BERT for text, ResNet/CNN for audio) are trained via contrastive learning; second, these encoders are frozen while the diffusion-based generator is trained.
Experimental Results
The authors evaluated DiffATR on two major benchmarks: AudioCaps (~50,000 clips) and Clotho v2 (~5,000 clips). The framework demonstrated consistent improvements over discriminative baselines across different audio backbones.
As shown in the results for AudioCaps, using a ResNet38 backbone, DiffATR improved Recall@1 (R@1) for text-to-audio retrieval from 33.9% to 35.6%. Similar gains were observed on the Clotho dataset, where the model consistently outperformed standard ResNet38 and CNN14 baselines.
Generalization and Robustness
A significant highlight of the study is DiffATR's performance in zero-shot Out-of-Domain (OOD) scenarios. When trained on Clotho and tested on AudioCaps without fine-tuning, DiffATR achieved a massive relative improvement, boosting R@1 from 12.4% to 16.6%. This suggests that modeling the joint distribution allows the model to better handle stylistic differences between datasets compared to purely discriminative methods.
Conclusion and Future Work
DiffATR represents a paradigm shift in Audio-Text Retrieval by leveraging the power of generative diffusion models. While the iterative nature of diffusion introduces higher computational costs during inference compared to single-pass models, the gains in accuracy and cross-dataset generalization are substantial. Future research may focus on optimizing inference speed and exploring end-to-end training of the encoders alongside the diffusion module.
Summary updated