TL;DR
This paper introduces a novel lyrics generation framework that achieves precise, multi-level syllable control—from individual words to entire paragraphs—while remaining aware of song structures like verses and choruses. By employing a hierarchical token system and a "Back-conditioning" strategy, the model significantly outperforms general-purpose LLMs like ChatGPT in generating rhythmically accurate and structurally coherent full-song lyrics.
What Problem Does This Paper Address?
Writing lyrics is fundamentally different from writing prose. Lyrics must adhere to a rigid musical "skeleton": they need to follow a specific song form (e.g., Verse-Chorus-Verse) and hit exact syllable counts to fit a melody's rhythm.
Current natural language models, while great at being creative, are often "rhythmically challenged." They struggle with precise syllable management because they operate on sub-word tokens rather than phonetic syllables. Furthermore, most existing lyrics generators work line-by-line, often losing the thematic and structural "big picture" required for a musically coherent full song. This paper aims to bridge that gap by providing a system that handles both the macro-structure of a song and the micro-constraints of rhythm.
Methods
The researchers built their system on a GPT-2 architecture, but with several key innovations:
- Multi-Level Granularity: The model doesn't just look at lines. It uses a hierarchical approach to control syllable counts at the word, phrase, line, and paragraph levels.
- Structured Token System: They introduced specialized tokens to guide the generation process. For example,
<GEN_P>and<END_P>wrap paragraphs, while<SYL:s>specifies the target syllable count for a section. - Semantic Embedding: To ensure the lyrics match a user's prompt, they use SentenceTransformers to extract semantic meanings from input text and feed them into the model as a conditioning vector.
- "Back" vs. "Front" Conditioning: The authors compared two ways of giving instructions to the model. "Front" models get all constraints at the very beginning. "Back" models (their preferred method) receive syllable constraints during the decoding process at each step, acting like a real-time guide that keeps the model on-beat.
- Lyrics Infilling: Beyond just generating new songs, the model can "infill" or correct specific parts of existing lyrics while maintaining strict syllable counts.
Datasets
The model was trained and evaluated using the Genius Song Lyrics dataset, which contains over 5 million songs. The researchers:
- Filtered for approximately 3.3 million English lyrics.
- Selected songs with explicit song form annotations (verse, chorus, bridge, etc.).
- Used the Detoxify library to remove toxic content.
- Calculated syllable counts for every word using the Syllables library.
- Split the data into 340K training, 18K validation, and 10K evaluation samples.
Key Insights and Ideas
- LLMs are "Tone Deaf": A preliminary experiment showed that ChatGPT 4.0 only successfully hits a requested syllable count about 57% of the time. The specialized model in this paper achieves near-perfect accuracy.
- The "Stubbornness" of Pre-training: Interestingly, models trained from scratch outperformed those initialized with pre-trained GPT-2 weights in terms of syllable accuracy. Pre-trained models have strong linguistic biases that make them resist the strict, sometimes "unnatural" phrasing required to hit exact syllable targets.
- Real-time Guidance is Key: The "Back" conditioning strategy proved superior. By providing the syllable targets at each decoding step rather than all at once at the start, the model maintains better foresight and higher semantic fidelity.
- Structural Awareness: The model successfully learned that different song parts have different "vibes." As shown in Figure 5, the model produces lyrics that are semantically and structurally more similar to other instances of the same song form (e.g., Verse 1 vs. Verse 2) than to different forms (e.g., Verse vs. Chorus).
Key Results
The researchers used metrics like Syllable Count Distance (SCD) and Syllable Error Rate (SCErr) to measure performance.
- Syllable Accuracy: The proposed "Back-S" model achieved an SCD of 0.004, vastly outperforming ChatGPT 4.0's 0.194.
- Error Rates: The full-song Syllable Error Rate for the proposed model was only 4.396%, whereas ChatGPT 3.5 struggled at 83.729%.
- Semantic Fidelity: Despite the strict rhythmic constraints, the model maintained high BERT-Score values, indicating that the generated lyrics remained contextually relevant to the input prompts.
Limitations and Future Work
While the model excels at rhythm and structure, the authors acknowledge a few missing pieces for a complete AI songwriter:
- Rhyme Schemes: The current model does not explicitly control for rhyming, which is a cornerstone of lyric writing.
- Genre Control: The system doesn't yet allow users to specify a musical genre (e.g., "write a Country verse" vs. "write a Rap verse").
- Melody Integration: While syllable counts are a proxy for melody, the model doesn't yet take actual MIDI or audio melodies as direct input.
The team plans to incorporate these additional controls in future iterations to further enhance the creative potential of the system.
Summary updated