CDPAM: Contrastive learning for perceptual audio similarity

Pranay Manocha, Zeyu Jin, Richard Zhang, Adam Finkelstein

Abstract

CDPAM (Contrastive Deep Perceptual Audio Metric) is a novel differentiable metric designed to align audio similarity measurements with human perception. By integrating self-supervised contrastive learning with multi-dimensional representation disentanglement—separating content from acoustic characteristics—CDPAM achieves superior generalization compared to previous learned metrics. When employed as a training loss, CDPAM significantly improves the subjective quality of speech synthesis and enhancement systems.

Introduction

In deep learning for audio, objective functions must accurately reflect perceptual distance. Traditional mathematical distances, such as Mean Squared Error (MSE), and handcrafted signal processing metrics, like PESQ, frequently fail to capture nuances of human hearing. For instance, a minor temporal shift can lead to a high MSE despite being perceptually negligible. While learned metrics like DPAM have made strides, they are limited by a heavy reliance on human-annotated data and poor generalization to out-of-distribution audio. CDPAM addresses these limitations through a robust three-stage training framework.

Methodology

The CDPAM architecture is trained in three distinct phases to ensure both data efficiency and perceptual accuracy.

  1. Contrastive Pre-training: The model first undergoes self-supervised learning on 100,000 unlabeled audio clips using a SimCLR-style framework. It learns to map augmented versions of the same clip to similar embeddings while pushing different clips apart.
  2. Multi-dimensional Disentanglement: A critical innovation in CDPAM is the separation of the encoder's internal representation into Content (speaker identity and linguistics) and Acoustic (environment, noise, and distortions) embeddings. This disentanglement allows the metric to focus on acoustic quality independently of the spoken content.
  3. Triplet Learning: Finally, the model is fine-tuned using human judgments. Beyond simple "same/different" pairs (Just-Noticeable Difference), the authors utilize "triplet" data where humans rank which of two clips (A or B) is closer to a reference (C). This enables the model to learn relative quality rankings across a wide range of distortions.
The three-stage training pipeline of CDPAM: (a) contrastive pre-training, (b) JND learning, and (c) triplet rank loss.

The resulting model is fully differentiable, allowing it to be integrated directly into the loss functions of other neural networks.

Experimental Results

CDPAM was evaluated against nine diverse datasets, including voice conversion (VoCo), vocoding (HiFi-GAN), and speech enhancement (Noizeus).

  • Correlation with Human Judgment: CDPAM consistently outperformed traditional metrics (PESQ, ViSQOL) and the previous state-of-the-art (DPAM) in Spearman correlation with human Mean Opinion Scores (MOS).
  • Speech Synthesis: In MelGAN vocoder training, models using CDPAM loss were preferred by humans in 92% of cross-speaker synthesis tests.
  • Speech Denoising: Integrating CDPAM into the DEMUCS speech denoiser loss function led to a significant improvement in subjective quality, raising the MOS from 3.73 to 4.07.
Subjective MOS scores for the DEMUCS denoiser, showing significant quality gains when fine-tuned with CDPAM.

Discussion and Limitations

The success of CDPAM highlights the importance of self-supervised "warm-up" and representation disentanglement in building perceptual metrics. By separating "what" is said from "how" it sounds, the model becomes robust to unseen speakers and complex acoustic environments.

However, current limitations include a primary focus on speech data; future work is needed to validate the metric's performance on music and environmental sounds. Additionally, while the differentiable nature of CDPAM is a major advantage, its use as a loss function introduces higher computational overhead compared to simpler metrics.

Conclusion

CDPAM represents a significant advancement in perceptual audio metrics, offering a robust, differentiable tool for training and evaluating audio generation models. Its ability to generalize across speakers and distortion types makes it a versatile asset for the audio research community.

Summary updated

BibTeX
@inproceedings{manocha2021cdpam,
  author = {Pranay Manocha and Zeyu Jin and Richard Zhang and Adam Finkelstein},
  title = {{CDPAM: Contrastive learning for perceptual audio similarity}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  doi = {10.1109/icassp39728.2021.9413711},
}
Figure