English

MelodyGLM: Multi-task Pre-training for Symbolic Melody Generation

Sound 2023-09-21 v2 Artificial Intelligence Computation and Language Information Retrieval Multimedia Audio and Speech Processing

Abstract

Pre-trained language models have achieved impressive results in various music understanding and generation tasks. However, existing pre-training methods for symbolic melody generation struggle to capture multi-scale, multi-dimensional structural information in note sequences, due to the domain knowledge discrepancy between text and music. Moreover, the lack of available large-scale symbolic melody datasets limits the pre-training improvement. In this paper, we propose MelodyGLM, a multi-task pre-training framework for generating melodies with long-term structure. We design the melodic n-gram and long span sampling strategies to create local and global blank infilling tasks for modeling the local and global structures in melodies. Specifically, we incorporate pitch n-grams, rhythm n-grams, and their combined n-grams into the melodic n-gram blank infilling tasks for modeling the multi-dimensional structures in melodies. To this end, we have constructed a large-scale symbolic melody dataset, MelodyNet, containing more than 0.4 million melody pieces. MelodyNet is utilized for large-scale pre-training and domain-specific n-gram lexicon construction. Both subjective and objective evaluations demonstrate that MelodyGLM surpasses the standard and previous pre-training methods. In particular, subjective evaluations show that, on the melody continuation task, MelodyGLM gains average improvements of 0.82, 0.87, 0.78, and 0.94 in consistency, rhythmicity, structure, and overall quality, respectively. Notably, MelodyGLM nearly matches the quality of human-composed melodies on the melody inpainting task.

Keywords

Cite

@article{arxiv.2309.10738,
  title  = {MelodyGLM: Multi-task Pre-training for Symbolic Melody Generation},
  author = {Xinda Wu and Zhijie Huang and Kejun Zhang and Jiaxing Yu and Xu Tan and Tieyao Zhang and Zihao Wang and Lingyun Sun},
  journal= {arXiv preprint arXiv:2309.10738},
  year   = {2023}
}
R2 v1 2026-06-28T12:26:18.882Z