NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning and Evaluating Musical Features with Deep Autoencoders

Mason Bretan, Sageev Oore, Douglas Eck, Larry P. HeckarXiv 2017

Abstract

In this work we describe and evaluate methods to learn musical embeddings. Each embedding is a vector that represents four contiguous beats of music and is derived from a symbolic representation. We consider autoencoding-based methods including denoising autoencoders, and context reconstruction, and evaluate the resulting embeddings on a forward prediction and a classification task.

Introduction

Music is inherently high-dimensional and structurally complex. Traditional Music Information Retrieval (MIR) has often relied on discrete labels such as genre, era, or composer. However, these labels are frequently subjective and do not scale effectively as new music is created. This research proposes a shift toward continuous musical embeddings, analogous to Word2Vec in natural language processing. The goal is to represent musical snippets—specifically four-beat units—as 100-dimensional vectors in a latent space. The primary challenge is identifying training objectives that produce meaningful features suitable for downstream tasks like generative prediction or stylistic analysis.

Methodology

The core of the approach involves various Deep Autoencoder architectures. An autoencoder compresses input into a bottleneck layer (the embedding) and subsequently attempts to reconstruct the original input.

Encoder Architecture

The architecture utilizes convolutional layers to capture local patterns, such as chords and short motifs, followed by fully connected layers to produce the final 100-dimensional embedding vector. The input is a 60x96 matrix representing 4 contiguous beats at a resolution of 24 ticks-per-beat.

The convolutional encoder architecture transforms a 60x96 piano roll input into a 100-dimensional embedding through successive layers of convolution and dimensionality reduction.

Training Objectives

To ensure robust embeddings, several training strategies were evaluated:

  1. Denoising Autoencoders (DAE): The model reconstructs original music from corrupted inputs (e.g., missing notes or beats).
  2. Context Prediction: The network predicts the next musical unit ($U_{i+1}$) or surrounding units ($U_{i-1} + U_{i+1}$) based on a central unit ($U_i$).
  3. Composer Classification: A supervised task where the network identifies the composer of a snippet.
  4. Multi-task Learning (Regularized Training): A hybrid approach where the network simultaneously reconstructs context and predicts the composer.
The multi-task architecture uses a shared encoder to produce an embedding that serves both a decoder for context reconstruction and a classifier for composer identification.

Key Results and Insights

The evaluation focused on two primary tasks: Forward Prediction (using an LSTM to predict the next embedding) and Composer Classification. The study used a dataset of approximately 3.9 million unique four-beat units from 25 composers.

  • Task-Specificity: Embeddings are highly task-dependent. Models optimized for prediction (Context Reconstruction) excel at sequence modeling but perform poorly at composer identification. Conversely, models trained solely for classification ignore the structural details necessary for generation.
  • Contextual Importance: The "Context Reconstruction" objective, predicting the surrounding 8 beats, yielded the most effective embeddings for sequence modeling, suggesting that musical meaning is deeply tied to local temporal relationships.
  • Hybrid Performance: The regularized multi-task model successfully balanced these competing goals. It achieved a Median Rank of 30 in prediction (compared to 15 for the specialized model) and a Macro-F1 of 0.66 in classification (compared to 0.76 for the specialized model), outperforming pure reconstruction models in analysis tasks without sacrificing significant predictive power.

Conclusion

This work demonstrates that deep autoencoders can effectively learn continuous musical features. While embeddings are often specialized for specific tasks, multi-task learning offers a viable path toward more general-purpose musical representations. Future research will explore incorporating note duration and dynamics, as well as expanding the dataset beyond solo piano music to include complex orchestration.

Summary updated

BibTeX
@misc{bretan2017learning,
  author = {Mason Bretan and Sageev Oore and Douglas Eck and Larry P. Heck},
  title = {{Learning and Evaluating Musical Features with Deep Autoencoders}},
  year = {2017},
  eprint = {1706.04486},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.04486},
}
Figure