Introduction
Audio-Language Models (ALMs) like CLAP have revolutionized zero-shot audio classification by enabling models to identify sounds using natural language descriptions. However, standard approaches often rely on "vanilla" prompts such as "Sound of a <label>." This simplicity introduces semantic ambiguity (e.g., "rock" as a stone vs. a music genre) and lacks environmental context, limiting performance on out-of-distribution data. While fine-tuning can address these issues, it is computationally expensive and risks "catastrophic forgetting" of the model's general knowledge.
The TSPE Framework
Task-Specific Prompt Ensemble (TSPE) is a training-free method designed to enhance ALM performance by replacing generic prompts with context-rich, task-specific ensembles. The pipeline leverages Large Language Models (LLMs) to generate nuanced descriptions that capture sound attributes and sources.
The TSPE workflow involves four key stages:
- Task Categorization: Labels are grouped into domains like Musical Instruments, Acoustic Scenes, or Non-Verbal Vocalizations.
- Attribute Discovery: GPT-4 identifies relevant sound attributes (e.g., "mellow," "echoing") and sources (e.g., "concert hall," "forest").
- Prompt Generation: The LLM creates templates such as "A <attribute> sound of a <label> coming from a <source>."
- Manual Filtering & Ensembling: After human verification to remove illogical prompts (e.g., "a gentle explosion"), the top 20 prompts per task are averaged in the embedding space to create a robust, semantically rich textual representation.
Experimental Setup and Results
TSPE was evaluated across 12 diverse datasets covering musical instruments (e.g., NSynth), acoustic scenes (e.g., ESC-50), music genres (GTZAN), impact sounds (SESA), and non-verbal vocalizations (VocalSound). The method was tested using two state-of-the-art backbones: MS-CLAP’22 and MS-CLAP’23.
The inclusion of task-specific context significantly improved zero-shot accuracy. TSPE achieved absolute gains ranging from 1.23% to 16.36% over vanilla prompting.
On average, TSPE improved MS-CLAP’23 by 2.06% and MS-CLAP’22 by 1.89%. Ablation studies on the VocalSound dataset revealed that ensembling 20 prompts provides the optimal balance between semantic richness and noise reduction; exceeding this number led to a performance plateau or slight decline due to increased semantic noise.
Discussion and Future Work
TSPE demonstrates that ALMs possess latent knowledge that can be unlocked through better "hard prompting" without additional training. By providing environmental and textural context, the model more effectively matches audio features to linguistic concepts.
Current limitations include the need for manual filtering to correct LLM hallucinations. Future research will focus on automating this quality control and extending TSPE representations to other audio tasks, such as sound event localization and audio generation.
Summary updated