Abstract
In traditional audio captioning methods, a model is usually trained in a fully supervised manner using a human-annotated dataset containing audio-text pairs and then evaluated on the test set from the same dataset. Such methods have two limitations. First, these methods are often data-hungry and require time-consuming and expensive human annotations to obtain audio-text pairs. Second, these models often suffer from performance degradation in cross-domain scenarios, i.e., when the input audio comes from a different domain than the training set, and this issue has received little attention. To address these issues, we propose a new zero-shot method for audio captioning. Our method is built on the contrastive language-audio pre-training (CLAP) model. During training, the model reconstructs the ground-truth caption using the CLAP text encoder. In the inference stage, the model generates text descriptions from the CLAP audio embeddings of given audio inputs. To enhance the ability of the model in transitioning from text-to-text generation to audio-to-text generation, we propose to use the mixed-augmentations-based soft prompt to learn more robust latent representations, leveraging instance replacement and embedding augmentation. Additionally, we introduce the retrieval-based acoustic-aware hard prompt to improve the cross-domain performance of the model by employing the domain-agnostic label information of sound events. Extensive experiments on AudioCaps and Clotho benchmarks show the effectiveness of our proposed method, which outperforms other zero-shot audio captioning approaches for in-domain scenarios and outperforms the compared methods for cross-domain scenarios, underscoring the generalization ability of our method.
Introduction
Traditional audio captioning models—systems that generate natural language descriptions for audio clips—are typically "data-hungry." They require massive datasets of audio clips paired with human-written descriptions, which are expensive and time-consuming to produce. Furthermore, these models often suffer from "domain shift," where a model trained on one dataset (e.g., studio-quality clips) fails when encountering real-world audio from a different source.
To address these challenges, this paper proposes a framework for Zero-Shot Audio Captioning (ZS-AC). The goal is to train a model using only text data and then transfer that knowledge to describe audio. The primary technical hurdle is the modality gap: even in well-aligned latent spaces like Contrastive Language-Audio Pre-training (CLAP), text embeddings and audio embeddings do not overlap perfectly. A model trained to reconstruct text from text embeddings often struggles when presented with an audio embedding during inference.
Methodology
The proposed system is built on top of a frozen CLAP encoder and a GPT-2 (or Mistral) decoder. The transition from the contrastive pre-training stage to the zero-shot inference stage is illustrated in Figure 1.
The core innovation lies in two prompting strategies used during the text-only training phase to bridge the modality gap:
1. Mixed-Augmentation Soft Prompts
To make the model robust to the distributional variance of audio embeddings, the authors perturb the text embeddings in two ways:
- Instance Replacement: Semantically similar but distinct captions are retrieved from a corpus to replace the original input, forcing the model to learn broader semantic representations.
- Embedding Augmentation: Gaussian noise is injected into the embeddings, simulating the "fuzziness" the model will encounter when switched to audio inputs.
2. Retrieval-Based Acoustic-Aware Hard Prompts
The model retrieves the top-M most relevant acoustic labels (e.g., "dog barking," "siren") from a fixed vocabulary based on AudioSet. These labels are formatted into a natural language string: "There are {labels} in the audio." This provides a discrete, domain-agnostic "anchor" that guides the decoder, improving performance across different datasets.
Experimental Results
The model was evaluated on the AudioCaps and Clotho benchmarks, using AudioSet for label vocabulary and WavCaps for pre-training the foundation CLAP model.
- State-of-the-Art Zero-Shot Performance: On the AudioCaps benchmark, the proposed method achieved a CIDEr score of 64.4, significantly higher than previous zero-shot leaders like WSAC (56.4).
- Cross-Domain Superiority: In "Source to Target" tests, the model often outperformed fully supervised models. This suggests that zero-shot models with robust prompting generalize better than supervised models that overfit to a specific dataset's quirks.
- Efficiency: The model achieves roughly 86% to 96% of the performance of state-of-the-art supervised models without ever seeing a single paired audio-text example.
- Scaling via LLMs: By swapping the decoder for a more powerful LLM like Mistral-7B, the authors demonstrated the ability to achieve multilingual captioning without needing multilingual audio-text pairs.
Conclusion and Future Work
This work demonstrates that treating audio as a "noisy version of text" at the embedding level allows a text-only model to generalize to audio. While the system's performance is bounded by the quality of the underlying CLAP model and retrieval accuracy, it offers a scalable solution for audio-language tasks. Future directions include extending this logic to Audio Question Answering (AQA) and more complex, multi-styled captioning.
Summary updated