Proceedings

NotaGen: Advancing Musicality in Symbolic Music Generation with Large Language Model Training Paradigms

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. AI, Arts & Creativity. Pages 10207-10215.

https://doi.org/10.24963/ijcai.2025/1134

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 (henceforth referred to as the LLM training 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.

  1. [Casini and Sturm, 2022] Luca Casini and Bob Sturm. Trad- former: A transformer model of traditional music tran- scriptions. In International Joint Conference on Artificial Intelligence IJCAI 2022, Vienna, Austria, 23-29 July 2022, pages 4915-4920, 2022. IJCAI
  2. [Cideron et al., 2024] Geoffrey Cideron, Sertan Girgin, Mauro Verzetti, Damien Vincent, Matej Kastelic, Zalán Borsos, Brian McWilliams, Victor Ungureanu, Olivier Bachem, Olivier Pietquin, et al. Musicrl: Aligning mu- sic generation to human preferences. arXiv preprint arXiv:2402.04229, 2024.
  3. [Devlin et al., 2019] Jacob Devlin, Ming-Wei Chang, Ken- ton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understand- ing. In Proceedings of naacL-HLT, volume 1, page 2. Min- neapolis, Minnesota, 2019.
  4. [Donahue et al., 2019] Chris Donahue, Huanru Henry Mao, Yiting Ethan Li, Garrison W Cottrell, and Julian McAuley. Lakhnes: Improving multi-instrumental music genera- tion with cross-domain pre-training. arXiv preprint arXiv:1907.04868, 2019.
  5. [Du et al., 2021] Zhengxiao Du, Yujie Qian, Xiao Liu, Ming Ding, Jiezhong Qiu, Zhilin Yang, and Jie Tang. Glm: Gen- eral language model pretraining with autoregressive blank infilling. arXiv preprint arXiv:2103.10360, 2021.
  6. [Dubey et al., 2024] Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
  7. [Gotham and Jonas, 2022] Mark Robert Haigh Gotham and Peter Jonas. The openscore lieder corpus. In Music En- coding Conference Proceedings 2021, 19-22 July, 2021 University of Alicante (Spain): Onsite & Online, pages 131-136. Universidad de Alicante/Universitat d'Alacant, 2022.
  8. [Gotham et al., 2023] Mark Gotham, Maureen Redbond, Bruno Bower, and Peter Jonas. The "openscore string quartet" corpus. In Proceedings of the 10th International Conference on Digital Libraries for Musicology, pages 49-57, 2023.
  9. [Guo et al., 2022] Xuefei Guo, Hongguang Xu, and Ke Xu. Fine-tuning music generation with reinforcement learning based on transformer. In 2022 IEEE 16th International Conference on Anti-counterfeiting, Security, and Identifi- cation (ASID), pages 1-5. IEEE, 2022.
  10. [Hentschel et al., 2021a] Johannes Hentschel, Fabian Claude Moss, Markus Neuwirth, and Martin Rohrmeier. A semi-automated workflow paradigm for the distributed creation and curation of expert annotations. In Proceedings of the 22nd International Society for Music Information Retrieval Conference, 2021.
  11. [Hentschel et al., 2021b] Johannes Hentschel, Markus Neuwirth, and Martin Rohrmeier. The annotated mozart sonatas: Score, harmony, and cadence. Transactions of the International Society for Music Information Retrieval, 4(1):67-80, 2021.
  12. [Hentschel et al., 2023] Johannes Hentschel, Yannis Ram- mos, Fabian C Moss, Markus Neuwirth, and Martin Rohrmeier. An annotated corpus of tonal piano music from the long 19th century. Empirical Musicology Review, 18(1):84-95, 2023.
  13. [Huang et al., 2018] Cheng-Zhi Anna Huang, Ashish Vaswani, Jakob Uszkoreit, Noam Shazeer, Ian Simon, Curtis Hawthorne, Andrew M Dai, Matthew D Hoffman, Monica Dinculescu, and Douglas Eck. Music transformer. arXiv preprint arXiv:1809.04281, 2018.
  14. [Jaques et al., 2017] Natasha Jaques, Shixiang Gu, Richard E Turner, and Douglas Eck. Tuning recur- rent neural networks with reinforcement learning. 2017.
  15. [Ji et al., 2023] Shulei Ji, Xinyu Yang, Jing Luo, and Juan Li. Rl-chord: Clstm-based melody harmonization using deep reinforcement learning. IEEE Transactions on Neu- ral Networks and Learning Systems, 2023.
  16. [Jiang et al., 2020] Nan Jiang, Sheng Jin, Zhiyao Duan, and Changshui Zhang. Rl-duet: Online music accompaniment generation using deep reinforcement learning. In Proceed- ings of the AAAI conference on artificial intelligence, vol- ume 34, pages 710-718, 2020.
  17. [Lee et al., 2024] Harrison Lee, Samrat Phatale, Hassan Mansoor, Thomas Mesnard, Johan Ferret, Kellie Lu, Colton Bishop, Ethan Hall, Victor Carbune, Abhinav Ras- togi, and Sushant Prakash. RLAIF vs. RLHF: scaling re- inforcement learning from human feedback with AI feed- back. In Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net, 2024.
  18. [Lev, 2024] Aleksandr Lev. Los angeles midi dataset: Sota kilo-scale midi dataset for mir and music ai purposes. In GitHub, 2024.
  19. [Liu et al., 2022] Jiafeng Liu, Yuanliang Dong, Zehua Cheng, Xinran Zhang, Xiaobing Li, Feng Yu, and Maosong Sun. Symphony generation with permutation in- variant language model. arXiv preprint arXiv:2205.05448, 2022.
  20. [Loshchilov and Hutter, 2019] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2019.
  21. [Neuwirth et al., 2018] Markus Neuwirth, Daniel Harasim, Fabian C Moss, and Martin Rohrmeier. The annotated beethoven corpus (abc): A dataset of harmonic analyses of all beethoven string quartets. Frontiers in Digital Hu- manities, 5:379513, 2018.
  22. [Pal et al., 2024] Arka Pal, Deep Karkhanis, Samuel Doo- ley, Manley Roberts, Siddartha Naidu, and Colin White. Smaug: Fixing failure modes of preference optimisa- tion with dpo-positive. arXiv preprint arXiv:2402.13228, 2024.
  23. [Qu et al., 2024] Xingwei Qu, Yuelin Bai, Yinghao Ma, Ziya Zhou, Ka Man Lo, Jiaheng Liu, Ruibin Yuan, Lejun Min, Xueling Liu, Tianyu Zhang, et al. Mupt: A generative symbolic music pretrained transformer. arXiv preprint arXiv:2404.06393, 2024.
  24. [Radford et al., 2019] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
  25. [Rafailov et al., 2024] Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your lan- guage model is secretly a reward model. Advances in Neu- ral Information Processing Systems, 36, 2024.
  26. [Raffel et al., 2020] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the lim- its of transfer learning with a unified text-to-text trans- former. Journal of machine learning research, 21(140):1- 67, 2020.
  27. [Raffel, 2016] Colin Raffel. Learning-based methods for comparing sequences, with applications to audio-to-midi alignment and matching. Columbia University, 2016.
  28. [Retkowski et al., 2024] Jan Retkowski, Jakub Stępniak, and Mateusz Modrzejewski. Frechet music distance: A metric for generative symbolic music evaluation. arXiv preprint arXiv:2412.07948, 2024.
  29. [Sapp, 2005] Craig Stuart Sapp. Online database of scores in the humdrum file format. In ISMIR, pages 664-665, 2005.
  30. [SkyTNT, 2024] SkyTNT. Midi model: Midi event trans- former for symbolic music generation. https://github.com/ SkyTNT/midi-model, 2024. Link
  31. [Stiennon et al., 2020] Nisan Stiennon, Long Ouyang, Jef- frey Wu, Daniel Ziegler, Ryan Lowe, Chelsea Voss, Alec Radford, Dario Amodei, and Paul F Christiano. Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33:3008-3021, 2020.
  32. [Sturm et al., 2016] Bob L Sturm, Joao Felipe Santos, Oded Ben-Tal, and Iryna Korshunova. Music transcription mod- elling and composition using deep learning. arXiv preprint arXiv:1604.08723, 2016.
  33. [Suzuki, 2021] Masahiro Suzuki. Score transformer: Gen- erating musical score from note-level representation. In Proceedings of the 3rd ACM International Conference on Multimedia in Asia, pages 1-7, 2021.
  34. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Lukasz Kaiser Jones, Aidan Nat- ing, and Illia Gomez, & Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), pages 5998-6008.
  35. Curran Associates, Inc., 2017.
  36. [Wang and Xia, 2021] Ziyu Wang and Gus Xia. Musebert: Pre-training music representation for music understanding and controllable generation. In ISMIR, pages 722-729, 2021.
  37. [Wang et al., 2024] Yashan Wang, Shangda Wu, Xingjian Du, and Maosong Sun. Exploring tokenization meth- ods for multitrack sheet music generation. arXiv preprint arXiv:2410.17584, 2024.
  38. [Wu et al., 2023a] Shangda Wu, Xiaobing Li, Feng Yu, and Maosong Sun. Tunesformer: Forming irish tunes with control codes by bar patching. arXiv preprint arXiv:2301.02884, 2023.
  39. [Wu et al., 2023b] Shangda Wu, Dingyao Yu, Xu Tan, and Maosong Sun. Clamp: Contrastive language-music pre- training for cross-modal symbolic music information re- trieval. arXiv preprint arXiv:2304.11029, 2023.
  40. [Wu et al., 2023c] Xinda Wu, Zhijie Huang, Kejun Zhang, Jiaxing Yu, Xu Tan, Tieyao Zhang, Zihao Wang, and Lingyun Sun. Melodyglm: multi-task pre-training for symbolic melody generation. arXiv preprint arXiv:2309.10738, 2023.
  41. [Wu et al., 2024a] Shangda Wu, Yashan Wang, Xiaobing Li, Feng Yu, and Maosong Sun. Melodyt5: A unified score- to-score transformer for symbolic music processing. arXiv preprint arXiv:2407.02277, 2024.
  42. [Wu et al., 2024b] Shangda Wu, Yashan Wang, Ruibin Yuan, Zhancheng Guo, Xu Tan, Ge Zhang, Monan Zhou, Jing Chen, Xuefeng Mu, Yuejie Gao, et al. Clamp 2: Multimodal music information retrieval across 101 lan- guages using large language models. arXiv preprint arXiv:2410.13267, 2024.
  43. [Yan and Duan, 2024] Yujia Yan and Zhiyao Duan. Measure by measure: Measure-based automatic music composition with modern staff notation. Transactions of the Interna- tional Society for Music Information Retrieval, Nov 2024.
  44. [Zhang et al., 2022] Huan Zhang, Jingjing Tang, Syed RM Rafee, Simon Dixon, George Fazekas, and Geraint A Wig- gins. Atepp: A dataset of automatically transcribed ex- pressive piano performance. In Ismir 2022 Hybrid Con- ference, 2022.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards