Abstract
Researchers have developed a melody-conditioned language model that generates lyrics structurally aligned with musical notation. By creating a new dataset of 1,000 aligned melody-lyric pairs and using "pseudo-melody" data augmentation, the model learns to place word and sentence boundaries naturally—ensuring that lyrics don't awkwardly "straddle" musical rests.
The Challenge of Lyric Alignment
Writing lyrics is significantly more complex than writing prose because the text must adhere to the rigid constraints of a melody. A major pain point in automated lyric generation is the relationship between discourse boundaries (where a word, sentence, or paragraph ends) and musical rests. If a single word spans across a long rest, it sounds unnatural to a listener. While previous AI models could generate text, they often lacked the "musical common sense" to align syllable counts and sentence breaks with the rhythm of the music.
Methodology: Aligning Music and Text
The authors propose a Melody-conditioned Recurrent Neural Network Language Model (RNNLM). To build the necessary dataset, they employed the Needleman-Wunsch algorithm—a technique commonly used in bioinformatics for DNA sequencing—to automatically align 1,000 Japanese digital music scores with raw lyric text at the syllable level.
The model incorporates several key features to bridge the gap between music and text:
- Context Melody Vector: The model looks at a window of 10 notes/rests around the current position, encoding pitch intervals, durations, and symbol types.
- Multi-task Learning: The model simultaneously predicts the next word and its syllable count. This explicitly forces the model to learn the correspondence between word length and the available notes in the melody.
- Pseudo-Melody Augmentation: To overcome data scarcity, the authors generated synthetic melodies for over 54,000 raw lyric files. This "pseudo-melody" approach significantly boosted the model's exposure to melody-lyric correlations.
Key Insights and Results
Empirical analysis confirmed that lyric boundaries are heavily biased toward rests. Specifically, longer rests (like a whole rest) are significantly more likely to coincide with paragraph (block) boundaries than shorter rests.
In performance tests, the "Pseudo-melody" model achieved the lowest perplexity (115.7), indicating high fluency. In human evaluations, 50 workers rated the generated lyrics on a 5-point scale. The melody-conditioned models scored significantly higher in "Listenability" (naturalness of word placement) than text-only baselines. While human-written lyrics still lead (scoring ~3.3/5), the Pseudo-melody model reached a respectable ~2.7/5.
Limitations and Future Work
While the model produces grammatically fluent and musically aligned lyrics, it currently lacks high-level song structure, such as AABB rhyme schemes or repetitive chorus patterns. Additionally, while the lyrics are locally coherent, they can sometimes lack a global "narrative arc." Future work aims to incorporate "verse-bridge-chorus" structures and improve the topical consistency of the generated stories.
Summary updated