[Paper Review] Encoding Musical Style with Transformer Autoencoders
This paper proposes the Transformer autoencoder, a sequential autoencoding model that learns a global, unsupervised representation of musical performance style by aggregating temporal encodings from a Transformer encoder. By combining this global style code with melody embeddings, the model enables controllable generation of music that matches the style of a single input performance, achieving improved log-likelihood and listener preference scores on MAESTRO and a large YouTube piano dataset compared to baselines.
We consider the problem of learning high-level controls over the global structure of generated sequences, particularly in the context of symbolic music generation with complex language models. In this work, we present the Transformer autoencoder, which aggregates encodings of the input data across time to obtain a global representation of style from a given performance. We show it is possible to combine this global representation with other temporally distributed embeddings, enabling improved control over the separate aspects of performance style and melody. Empirically, we demonstrate the effectiveness of our method on various music generation tasks on the MAESTRO dataset and a YouTube dataset with 10,000+ hours of piano performances, where we achieve improvements in terms of log-likelihood and mean listening scores as compared to baselines.
Motivation & Objective
- To address the challenge of learning high-level, global controls over generated music sequences, particularly in symbolic music generation.
- To enable controllable generation of music that matches the style of a given performance without requiring explicit annotations or labels.
- To develop a method that combines global style representations with fine-grained melody conditioning for improved generation control.
- To validate the effectiveness of the approach through quantitative metrics and qualitative listening studies on large-scale piano performance datasets.
Proposed method
- The model uses a Transformer encoder to process input MIDI sequences and extract temporal embeddings from each token in the performance.
- It aggregates these temporal embeddings across the sequence using a learnable global pooling mechanism to form a compact, global style representation.
- This global style code is then combined with a separate melody embedding, which is conditioned on a new melody input.
- The combined representation is fed into a Transformer decoder to generate new music that matches both the style and the new melody.
- The model is trained end-to-end using autoregressive language modeling objectives on symbolic music sequences.
- The approach leverages relative positional attention in both encoder and decoder to preserve long-term musical structure and periodicity.
Experimental results
Research questions
- RQ1Can a neural autoencoder learn a meaningful, global representation of musical performance style in an unsupervised manner?
- RQ2Can this learned global style representation be effectively combined with a new melody to generate coherent, stylistically consistent music?
- RQ3Does the integration of global style and local melody conditioning improve generation quality compared to baselines?
- RQ4Can the model generalize to unseen performances and adapt to new styles using only a single input example?
Key findings
- The Transformer autoencoder achieved higher log-likelihood scores than baseline models on both the MAESTRO and YouTube piano performance datasets.
- In user listening studies, the model-generated samples were rated significantly higher in perceptual similarity to the input style than baseline models.
- The model successfully harmonized new melodies in the style of a given performance, demonstrating effective separation of style and melody control.
- Interpolation experiments showed smooth, perceptually meaningful transitions between different performance styles, validating the disentangled representation.
- The method outperformed baseline models even when conditioned on only a single input performance, demonstrating strong few-shot adaptability.
- The model's ability to generate music with high perceptual similarity to input performances was validated through both note-based feature analysis and qualitative evaluation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.