# SongMASS: Automatic Song Writing with Pre-training and Alignment Constraint

Source: [SongMASS: Automatic Song Writing with Pre-training and Alignment Constraint](<https://www.sota2.com/research/paper/68fa68dc1e209131cea1ebfa>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-25T22:47:52.778Z

Authors: Zhonghao Sheng, Kaitao Song, Xu Tan, Yi Ren, Wei Ye, Shikun Zhang, Tao Qin

Published: 2020-12-09T16:56:59.000Z

## Abstract

Automatic song writing aims to compose a song (lyric and/or melody) by machine, which is an interesting topic in both academia and industry. In automatic song writing, lyric-to-melody generation and melody-to-lyric generation are two important tasks, both of which usually suffer from the following challenges: 1) the paired lyric and melody data are limited, which affects the generation quality of the two tasks, considering a lot of paired training data are needed due to the weak correlation between lyric and melody; 2) Strict alignments are required between lyric and melody, which relies on specific alignment modeling. In this paper, we propose SongMASS to address the above challenges, which leverages masked sequence to sequence (MASS) pre-training and attention based alignment modeling for lyric-to-melody and melody-to-lyric generation. Specifically, 1) we extend the original sentence-level MASS pre-training to song level to better capture long contextual information in music, and use a separate encoder and decoder for each modality (lyric or melody); 2) we leverage sentence-level attention mask and token-level attention constraint during training to enhance the alignment between lyric and melody. During inference, we use a dynamic programming strategy to obtain the alignment between each word/syllable in lyric and note in melody. We pre-train SongMASS on unpaired lyric and melody datasets, and both objective and subjective evaluations demonstrate that SongMASS generates lyric and melody with significantly better quality than the baseline method without pre-training or alignment constraint.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Lyric-to-Melody generation on GTSinger English (test)](<https://www.sota2.com/research/sota/lyric-to-melody-generation-on-gtsinger-english-test.md>): Lyric-to-Melody generation; GTSinger English (test); Pitch Deviation (PD): 30.11.

- [Melody Generation Dataset (test)](<https://www.sota2.com/research/sota/melody-generation-dataset-test.md>): Melody Generation; Melody Generation Dataset (test); KA (%): 58.9.

- [Lyric-to-Melody generation on GTSinger (test)](<https://www.sota2.com/research/sota/lyric-to-melody-generation-on-gtsinger-test.md>): Lyric-to-Melody generation; GTSinger (test); MOS: 3.18.

- [Lyric Generation on Lyric Generation Dataset (test)](<https://www.sota2.com/research/sota/lyric-generation-on-lyric-generation-dataset-test.md>): Lyric Generation; Lyric Generation (test); Sent BLEU: 0.045.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2012.05168>)

[PDF](<https://arxiv.org/pdf/2012.05168.pdf>)
