Codified audio language modeling learns useful representations for music information retrieval

Rodrigo Castellon, Chris Donahue, Percy Liang

Introduction

Traditional Music Information Retrieval (MIR) systems typically rely on a supervised pre-training paradigm: models are trained on large labeled datasets—identifying genres, instruments, or moods—and then adapted to specialized downstream tasks. However, human-provided labels are inherently "lossy." A tag like "rock" or "happy" fails to capture the granular harmonic structures, rhythmic nuances, and melodic progressions present in raw audio. Consequently, these models often exhibit significant "blind spots," particularly in objective musical tasks like key detection where explicit tags are rarely available.

This paper explores a different path: Codified Audio Language Modeling (CALM). By treating raw audio as a language and training a generative model to predict its sequence, the authors demonstrate that a model can learn a far richer representation of music than one trained on human labels alone.

Methodology: From Generation to Analysis

The authors utilize the Jukebox framework, a 5-billion parameter Transformer, to bridge the gap between generative and discriminative AI. The process follows three distinct stages:

  1. Codification: A Vector-Quantized Variational Auto-Encoder (VQ-VAE) compresses continuous audio into discrete "codes," creating a musical alphabet.
  2. Generative Pre-training: The Transformer is trained on 1.2 million songs to predict the next code in a sequence, effectively building a "world model" of musical structure.
  3. Probing: To evaluate the learned representations, the model is frozen. Shallow "probes" (simple linear models) are trained on the internal activations to perform MIR tasks.
Comparison of conventional MIR pre-training versus the CALM generative approach and subsequent probing.

The Importance of Layer Selection

A critical finding in this research is that not all layers are created equal for analysis. In many computer vision tasks, the final layer provides the best features for transfer learning. In contrast, for CALM, the middle layers (specifically around layer 36 of 72) proved most effective for MIR tasks. The final layers of Jukebox become increasingly specialized for the specific task of audio reconstruction, losing some of the abstract musical information useful for classification and detection.

Validation performance across different MIR tasks as a function of the model layer used for probing.

Key Results and Insights

The CALM approach yielded substantial improvements over traditional baselines across several benchmarks, including MagnaTagATune (tagging), GTZAN (genre), Giantsteps (key detection), and Emomusic (emotion recognition):

  • 30% Performance Boost: On average, Jukebox representations outperformed the best tagging-based models by 30%.
  • Solving Blind Spots: While tagging-based models struggled with Key Detection (scoring ~13%), Jukebox achieved 66.7%. Because the model must understand harmony to generate coherent music, it naturally learns features that tagging models miss.
  • Competitive with SOTA: Despite using only shallow probes on a frozen model, the system remained competitive with state-of-the-art models specifically engineered and trained from scratch for these tasks.

Conclusion and Future Directions

This research proves that modeling audio signals directly is superior to modeling human labels for MIR. While the computational cost of pre-training a 5B parameter model is high, the resulting representations are incredibly versatile. Future work may involve moving from causal (auto-regressive) models to bidirectional architectures like BERT, which could capture even more context by looking at the "future" and "past" of an audio clip simultaneously. Additionally, fine-tuning the entire model rather than just probing it is expected to push performance boundaries even further.

Summary updated

BibTeX
@inproceedings{castellon2021codified,
  author = {Rodrigo Castellon and Chris Donahue and Percy Liang},
  title = {{Codified audio language modeling learns useful representations for music information retrieval}},
  booktitle = {ISMIR},
  year = {2021},
}
Figure