TL;DR
This paper introduces a two-stage training approach for symbolic music generation that first pre-trains a model on a vast, diverse music corpus to learn general musical principles, and then fine-tunes it on a small dataset of specific composers to master their unique styles. This "Generality to Mastery" paradigm significantly improves composer-style accuracy and musicality compared to training from scratch or using existing methods.
What Problem Does This Paper Address?
Generating music that convincingly mimics the style of a specific composer is a challenging task, primarily due to the scarcity of data for individual composers. While large datasets of general music exist, they don't provide enough examples to learn the nuanced stylistic characteristics of composers like Bach or Mozart. Existing methods struggle to balance general musicality with specific stylistic control, often leading to either generic-sounding music or music that overfits to the limited composer data, losing broader musical quality. This paper aims to bridge this gap by leveraging the vast knowledge from general music to inform and enhance the learning of specific composer styles.
Methods
The core of this work is a two-stage training pipeline for a Transformer decoder model, dubbed "GnM" (Generality and Mastery).
- Stage 1: Generality Pre-training: The model is first trained on a large, diverse corpus of pop, folk, and classical music. During this stage, the composer condition is set to a uniform "[None]" value. The objective is to learn fundamental musical patterns, structures, and dynamics without specializing in any particular style. This stage aims to build a strong foundation of general musical understanding.
- Stage 2: Mastery Fine-tuning: In this stage, the pre-trained model is fine-tuned on smaller, composer-specific datasets. A key innovation here is the introduction of lightweight "adapter modules" within each decoder layer. These adapters take the composer embedding and the layer's hidden state, process them through a small MLP, and inject a "style bias" back into the hidden state. This allows the model to learn and apply composer-specific nuances without forgetting the general musical knowledge acquired in Stage 1. The model is conditioned on the actual composer token during this phase.
The paper also extends the REMI (Robust Expressive Music Instrument) representation to include more comprehensive time signatures and tempo quantization for better structural and global condition representation.
Datasets
The paper utilizes a combination of existing datasets:
- Generality Stage (Pre-training): A large corpus comprising:
- Pop Music: Pop909, Pop1k7
- Folk Songs: Emopia
- Classical Music: PIAST, Kern Score, classical piano MIDI datasets, and a subset of PDMX.
- Note: Data from the four target composers (Bach, Mozart, Beethoven, Chopin) were excluded from this stage.
- Mastery Stage (Fine-tuning): Small, human-verified datasets for four renowned composers:
- Bach
- Mozart
- Beethoven
- Chopin
Key Insights and Ideas
- Leveraging General Knowledge for Specific Mastery: The most significant insight is that pre-training on a broad musical corpus provides a crucial foundation that dramatically enhances the ability to learn specific composer styles. This "generality" acts as a powerful prior, preventing overfitting to limited composer data and improving overall musicality.
- Adapter Modules for Efficient Style Infusion: The use of lightweight adapter modules is an effective and efficient way to inject composer-specific information during fine-tuning without requiring extensive architectural changes or retraining the entire model.
- Trade-off in Generative Choices: The "Mastery" model, after fine-tuning, exhibits a more constrained set of generative choices during inference. While this might seem like a limitation, it leads to more consistent and stylistically accurate outputs, suggesting a focused specialization.
- Pre-training Prevents Overfitting: The "Scratch" model (trained only on composer-specific data) shows signs of overfitting, leading to repetitive structures and a lack of broader musical quality, especially when compared to the "Mastery" model.
Key Results
- Objective Evaluation: The GnM model achieved the highest pitch class entropy (indicating good tonal variety) and nearly the best groove pattern similarity, demonstrating strong musical quality. It also showed a decrease in structureness indicator scores compared to the "Scratch" ablation, suggesting it captures more diverse structural variations rather than just repetitive patterns.
- Quantitative Composer Classification: A composer classifier trained on real music data showed that the GnM "Mastery" model achieved higher accuracy in classifying generated pieces by Mozart and Beethoven compared to baselines like NotaGen.
- Subjective Listening Test: Participants rated the GnM "Mastery" model highly for composer style similarity and musicality, often preferring its outputs over baselines. While the "Scratch" model sometimes achieved higher style similarity for specific composers (like Chopin), it received the lowest musicality ratings, reinforcing the importance of the generality pre-training.
- Chord Progression Analysis: The "Mastery" model demonstrated significantly higher overlap with real chord progressions and better ranking metrics (mAP, NDCG) compared to the "Scratch" model, indicating a superior capture of harmonic patterns.
Limitations and Future Work
- Dataset Scale and Variability: The limited scale and inherent variability of composer-specific datasets still pose a challenge for comprehensive generalization across different musical forms.
- Adapter Module Constraints: While effective, adapter modules might inadvertently limit long-term structural coherence due to their local stylistic bias.
- Subjective Dimensions: Current objective metrics capture stylistic aspects but don't fully quantify subjective dimensions like expressiveness or emotional nuances.
Future work suggested includes:
- Dataset expansion and exploring alternative conditioning approaches.
- Developing evaluation methodologies that incorporate professional musician judgments.
- Investigating embedding-based metrics for deeper style understanding.
- Exploring hybrid conditioning approaches.
- Answering fundamental questions about what specific elements define a composer's style.
Summary updated