CPM: Class-Conditional Prompting Machine for Audio-Visual Segmentation

Yuanhong Chen, Chong Wang, Yuyuan Liu, Hu Wang, Gustavo Carneiro

Abstract

Audio-visual segmentation (AVS) is a challenging task that requires pixel-level identification of sounding objects in video sequences. While transformer-based architectures have improved performance by modeling long-range dependencies, they often struggle with unstable bipartite matching and weak cross-modal feature alignment. We introduce the Class-conditional Prompting Machine (CPM), a novel framework that addresses these issues by replacing generic, class-agnostic queries with class-conditional prompts sampled from a learned Gaussian Mixture Model (GMM). By integrating specialized audio and visual prompting modules alongside dense contrastive learning, CPM stabilizes the training process and significantly improves segmentation accuracy. Our method achieves state-of-the-art results on AVSBench-Objects, AVSBench-Semantics, and the VPO dataset.

What Problem Does This Paper Address?

The primary goal of AVS is to accurately segment objects that are actively producing sound. Despite the success of transformer-based models, two major hurdles persist:

  1. Unstable Bipartite Matching: Standard transformers utilize "class-agnostic" queries—generic placeholders that attempt to learn to identify any sounding object. During training, these queries are matched to ground-truth objects using the Hungarian algorithm. In AVS, where audio signals are frequently noisy or contain overlapping sources, this matching process becomes highly unstable, leading to inconsistent label assignments across training epochs and slow convergence.
  2. Low Cross-Modal Efficacy: Establishing a precise correspondence between visual feature maps and specific audio snippets is difficult, particularly when learned audio queries lack clear semantic grounding.
Comparison of traditional per-pixel classification, standard transformer-based methods, and the proposed CPM framework.

The authors argue that relying on generic queries forces the model into a "guessing game," whereas providing semantic guidance through class-specific priors can stabilize the learning process.

Methods

The Class-conditional Prompting Machine (CPM) shifts the paradigm from class-agnostic queries to class-conditional prompts. The architecture is designed to learn and leverage the latent distributions of different object classes.

Detailed architecture of the CPM framework, illustrating the Class-conditional Distribution Modelling (CCDM) and prompting workflows.

Key Components:

  • Class Conditional Distribution Modelling (CCDM): This module uses a Gaussian Mixture Model (GMM) to represent the joint-modal distribution of mask embeddings. By modeling these distributions, the framework maintains a "generative memory" of specific classes (e.g., the distinct feature signatures of a "cello" versus a "violin").
  • Audio Conditional Prompting (ACP): To enhance audio feature extraction, CPM employs a "mix-and-separate" strategy. It takes a clean audio signal, introduces noise, and then uses class-conditional prompts to reconstruct the original spectrogram, forcing the model to learn robust audio representations.
  • Visual Conditional Prompting (VCP): This module uses class-specific prompts to directly probe visual feature maps. Since the prompt is already associated with a specific class, it allows for a fixed ground-truth assignment during this phase, bypassing the instability of bipartite matching.
  • Prompting-based Contrastive Learning (PCL): A dense contrastive loss is applied to align audio and visual features of the same class in the latent space while pushing apart features from different classes.

By alternating between standard class-agnostic workflows and the new class-conditional prompting workflow, CPM develops more robust and semantically grounded representations.

Key Insights and Results

The authors introduce the Stability Score (STS), an entropy-based metric to quantify the consistency of label assignments to queries. CPM demonstrates significantly higher stability compared to previous methods like AVSegFormer, reducing assignment "jitter" and accelerating convergence.

Performance Benchmarks:

CPM was evaluated on three major benchmarks, achieving state-of-the-art (SOTA) performance:

  • AVSBench-Objects (Single-Source): Reached 87.64% mIoU, a 1.87% improvement over the previous best.
  • AVSBench-Semantics: Achieved 57.25% mIoU, representing a substantial 6.5% jump over the previous SOTA.
  • Visual Post-production (VPO): Showed consistent gains in multi-source scenarios, highlighting robustness to high-resolution, complex data.

Qualitative analysis reveals that CPM is particularly effective at "disentangling" overlapping sound sources—such as a singer and a guitar—where earlier models often failed to distinguish between the two.

Limitations and Future Work

While CPM significantly improves AVS performance, the authors note that the current handling of stereo audio is relatively basic. The model encodes positional and semantic information jointly, without fully exploiting spatial cues like panning. Future research will focus on integrating spatial reasoning to leverage the physical location of sound sources, further refining segmentation in crowded or complex environments.

Summary updated

BibTeX
@inproceedings{chen2024cpm,
  author = {Yuanhong Chen and Chong Wang and Yuyuan Liu and Hu Wang and Gustavo Carneiro},
  title = {{CPM: Class-Conditional Prompting Machine for Audio-Visual Segmentation}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72684-2\_25},
}
Figure