Leveraging Pre-Trained Autoencoders for Interpretable Prototype Learning of Music Audio

Pablo Alonso-Jiménez, Leonardo Pepino, Roser Batlle-Roca, Pablo Zinemanas, Dmitry Bogdanov, Xavier Serra, Martín Rocamora

Abstract

Deep learning models for Music Information Retrieval (MIR) often function as "black boxes," making their high-level classifications difficult to interpret. This paper presents PECMAE (Prototype EnCodecMAE), a model that utilizes representative "prototypes" in a latent space to explain genre and instrument predictions. By decoupling a pre-trained self-supervised backbone from a diffusion-based decoder, PECMAE allows for the sonification of these prototypes, providing audible explanations for its internal logic without compromising classification accuracy.

Introduction

While deep learning has significantly advanced MIR tasks, the lack of transparency remains a hurdle, particularly for subjective tasks like genre recognition. Previous attempts at interpretable models, such as the Audio Prototype Network (APNet), faced challenges in scalability and reconstruction bias. APNet required training from scratch and often produced biased prototype sonifications by merely copying information from the nearest training samples. PECMAE addresses these issues by leveraging large-scale pre-trained models and a generative diffusion process to create faithful, audible representations of the model's learned concepts.

Methodology

The PECMAE architecture consists of three primary modules designed to balance high-quality audio representation with interpretability:

  1. Self-Supervised Backbone: The model uses EnCodecMAE, a powerful pre-trained encoder, to extract rich features from four-second audio segments.
  2. Generative Autoencoder: A Transformer-based encoder compresses the audio into a latent vector ($z$). A Latent Diffusion Model (LDM) serves as the decoder, enabling the system to synthesize audio from any point in the latent space.
  3. Prototypical Network: This layer learns $M$ prototypes per class. Classification is performed by measuring the similarity between the input's latent representation and these prototypes.
The PECMAE architecture combines a generative autoencoder for audio reconstruction with a prototypical network for interpretable classification.

By decoupling the autoencoder training from the classification task, the researchers can utilize frozen, high-quality audio engines while focusing training on the interpretability layers.

Experimental Setup

The model was evaluated on three benchmarks:

  • Medley-Solos-DB: Focused on instrument recognition (8 classes).
  • GTZAN: A standard music genre recognition dataset (10 classes).
  • XAI-Genre: A large-scale in-house dataset containing 155 hours of audio across 24 genre classes, designed specifically to test interpretability and scaling.

Results and Discussion

PECMAE demonstrates superior performance compared to the APNet baseline across all tested datasets. Notably, on the complex XAI-Genre dataset, PECMAE achieved an accuracy of 53.6%, outperforming APNet's 48.0%.

Performance results showing PECMAE's competitive accuracy across GTZAN, Medley-Solos-DB, and XAI-Genre datasets.

A key finding was the effectiveness of the diffusion decoder. The synthesized prototype sounds—often described as "sonic textures" or timbral clouds—were highly identifiable. When these sonified prototypes were fed back into a separate classifier, they were correctly identified with over 99% accuracy, confirming that the model captures the essential characteristics of each class. The results also showed that increasing the number of prototypes per class generally improves accuracy, with PECMAE-40 reaching the highest scores on Medley and XAI-Genre.

Conclusion

PECMAE successfully bridges the gap between high-performance music AI and interpretability. By using a diffusion-based decoder to "hear" the model's internal prototypes, researchers can gain insights into the timbral features driving classification. Future work will focus on capturing longer-term temporal structures and increasing the diversity of learned prototypes to better represent the nuances within musical genres.

Summary updated

BibTeX
@inproceedings{alonsojimenez2024leveraging,
  author = {Pablo Alonso-Jiménez and Leonardo Pepino and Roser Batlle-Roca and Pablo Zinemanas and Dmitry Bogdanov and Xavier Serra and Martín Rocamora},
  title = {{Leveraging Pre-Trained Autoencoders for Interpretable Prototype Learning of Music Audio}},
  booktitle = {Workshops @ ICASSP},
  year = {2024},
  doi = {10.1109/icasspw62465.2024.10669909},
}
Figure