Abstract
We introduce NotaGen, a symbolic music generation model aiming to explore the potential of producing high-quality classical sheet music. Inspired by the success of Large Language Models (LLMs), NotaGen adopts pre-training, fine-tuning, and reinforcement learning paradigms. It is pre-trained on 1.6M pieces of music in ABC notation, and then fine-tuned on approximately 9K high-quality classical compositions conditioned on "period-composer-instrumentation" prompts. For reinforcement learning, we propose the CLaMP-DPO method, which further enhances generation quality and controllability without requiring human annotations or predefined rewards. Our experiments demonstrate the efficacy of CLaMP-DPO in symbolic music generation models with different architectures and encoding schemes. Furthermore, subjective A/B tests show that NotaGen outperforms baseline models against human compositions, greatly advancing musical aesthetics in symbolic music generation.
Introduction
Generating music that exhibits genuine "musicality" remains a significant challenge for artificial intelligence. While contemporary models excel at local note prediction, they frequently struggle with long-term structural integrity, harmonic coherence, and stylistic nuance. This difficulty stems from three primary hurdles: the scarcity of high-quality symbolic music data compared to text, the mismatch between standard next-token loss objectives and aesthetic quality, and the prohibitive cost of Reinforcement Learning from Human Feedback (RLHF) in the musical domain, where expert annotation is required.
Methodology
NotaGen addresses these challenges by adopting a three-stage training paradigm inspired by modern Large Language Models (LLMs).
- Pre-training: The model is first trained on a massive dataset of 1.6 million pieces in ABC notation. It utilizes a hierarchical architecture consisting of a patch-level decoder to capture temporal relationships between measures and a character-level decoder to predict individual notes.
- Fine-tuning: The model is refined on a high-quality dataset of 8,948 classical compositions sourced from repositories like DCML, OpenScore, and KernScores. These are conditioned on specific prompts including period, composer, and instrumentation (e.g., "Baroque-Bach-Keyboard").
- CLaMP-DPO: To overcome the RLHF bottleneck, we introduce CLaMP-DPO. This method utilizes CLaMP 2, a multimodal model trained on music-text pairs, as an automated "critic." CLaMP 2 scores generated variations based on their alignment with intended stylistic features. The top and bottom 10% of these generations are used as "chosen" and "rejected" samples for Direct Preference Optimization (DPO).
Results and Discussion
Evaluation against strong baselines like MuPT and MET reveals that NotaGen significantly advances the state-of-the-art. In subjective A/B tests involving 92 participants, NotaGen's post-RL outputs were significantly preferred over its initial fine-tuned versions. Most notably, when compared directly against human-composed ground truth, NotaGen achieved a 41.7% voting rate, a substantial improvement over MuPT (26.8%) and MET (23.8%).
Beyond preference scores, the study yielded several key insights:
- Automated Feedback is Viable: The success of CLaMP-DPO proves that a well-trained multimodal model can act as an effective proxy for musical preference.
- Perplexity vs. Musicality: Standard metrics like perplexity were found to be poor proxies for musicality; as the model's aesthetic quality improved during RL, its perplexity actually increased, suggesting that predictability is not synonymous with beauty.
- Structural Integrity: The character-level decoding approach proved superior to Byte Pair Encoding (BPE) for maintaining structural bar alignment, ensuring measures match their time signatures.
- Controllability: The model showed a marked improvement in Label Accuracy (LA), demonstrating better adherence to stylistic instructions.
Conclusion
NotaGen demonstrates that the LLM "trinity" of pre-training, fine-tuning, and reinforcement learning is highly effective for symbolic music. While challenges remain in generating complex orchestral scores and expanding to non-Western genres, this work represents a significant step toward AI-generated music that meets professional aesthetic standards.
Summary updated