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

Xinda Wu, Zhijie Huang, Kejun Zhang, Jiaxing Yu, Xu Tan +3 more
9/19/2023
13 citations
cs.SDcs.AIcs.CL

No official code found. Best implementation: frothywater/melody-pretrain (0 stars, Jupyter Notebook, last commit 2025-02-25).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

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

01Jupyter Notebook, PythonNov 22, 20221 years ago

Similar Papers

Cite this paper

@article{wu2023melodyglm,
  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},
  year   = {2023},
  eprint = {2309.10738},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.10738v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.10738.svg)](https://codeofpaper.com/paper/2309.10738)

Discussion