TL;DR
SongRewriter is a novel AI system designed to rewrite Chinese song lyrics while ensuring they remain perfectly "singable" by maintaining the original rhythm. By using a multi-level masking strategy and a unique vowel-modeling approach, it allows users to control both specific keywords and complex rhyme schemes—including internal rhymes—outperforming existing models in both content quality and rhyming precision.
What Problem Does This Paper Address?
Generating lyrics is one thing; generating singable lyrics is another. For a song to be singable, the lyrics must align with the melody's rhythm. Traditionally, this requires complex melody-to-lyric alignment models, which are difficult to train because parallel datasets (melody + lyrics) are scarce.
Furthermore, most existing systems are "all or nothing"—they generate a whole song from scratch. They lack the flexibility to edit just a specific line or phrase (partial rewriting) while maintaining the context of the rest of the song. Finally, while most models focus on "end rhymes" (the last word of a line), they ignore "internal rhymes" (rhyming words within a line), which are crucial for high-quality songwriting.
Methods
SongRewriter uses a Transformer-based encoder-decoder architecture. To solve the singability problem without needing melody data, the authors rely on a clever observation: in Chinese, each character is exactly one syllable. By forcing the model to generate the same number of characters as the original lyrics, the new lyrics naturally fit the original melody's rhythm.
Key technical innovations include:
- Multi-Level Randomized Masking: During training, the model learns to fill in blanks at three levels: token-level (words), sentence-level, and song-level. This allows it to handle any rewriting task, from fixing a single word to generating a full song.
- Keyword Prompting: Users can provide specific keywords that the model must incorporate into the generated text.
- Rhyme Control via Vowel Modeling: The system treats vowels as a separate input stream. By providing a "vowel template," users can dictate exactly where rhyming sounds should occur.
- Reverse Language Modeling: To improve end-rhymes, the model generates sentences from right-to-left. This ensures the rhyming word is generated first, allowing the rest of the sentence to be built around it.
Datasets
The model was trained using a three-stage pipeline:
- Pre-training: Used 15 million documents from Baidu Encyclopedia to learn general Chinese language patterns.
- Intermediate Fine-tuning: Used 330,000 Chinese proses to bridge the gap between formal encyclopedia text and creative writing.
- Domain Fine-tuning: Used a custom dataset of 154,000 Chinese lyrics crawled from the web.
Key Insights and Ideas
- The Syllable Shortcut: Bypassing melody-text alignment by simply matching character counts is a highly effective "hack" for monosyllabic languages like Chinese.
- Rhyming is Easier Backwards: In standard left-to-right generation, the model often "forgets" to rhyme by the time it reaches the end of a line. By reversing the order (as seen in Figure 2), the rhyme becomes the starting constraint rather than an afterthought.
- Vowels as Constraints: By introducing a specific vowel-prediction loss ($L_v^t$), the authors turned rhyming from a hit-or-miss statistical probability into a controllable parameter.
Key Results
SongRewriter was compared against strong baselines like GPT2 and SongNet.
- Controllability: In keyword-conditioned tasks, SongRewriter achieved a Keyword Recall of 0.952, significantly higher than the ILM-Keyword baseline (0.851).
- Rhyme Quality: The model achieved a Global Rhyme score of 0.812, outperforming SongNet (0.766) and GPT2 (0.723).
- Human Evaluation: In blind tests by experts with musical backgrounds, SongRewriter scored 3.93/5.0 for rhyme quality, compared to 3.11 for SongNet.
Limitations and Future Work
The primary limitation is language-specific: the "one character = one syllable" rule is unique to languages like Chinese. For multisyllabic languages like English, the system would require a more complex syllable-level subword tokenizer.
Additionally, the authors note the ethical and legal complexities of song rewriting, emphasizing that their system is intended as a user-assist tool and that the copyrights of original lyrics must be respected. Future work may involve extending these techniques to other languages and exploring more complex musical structures beyond simple rhythm matching.
Summary updated