Introduction
While Large Language Models (LLMs) excel at creative text generation, they often struggle with "singability"—the technical alignment between lyrics and melody. A poetic line may be difficult to sing if its word stresses conflict with musical beats or if syllable lengths do not match note durations. This paper introduces XAI-Lyricist, a framework presented at IJCAI-24 that addresses these challenges by leveraging musical prosody. By modeling the structural match between strong/weak beats and stressed/unstressed syllables, XAI-Lyricist generates lyrics that naturally fit a given tune and provides visual explanations to assist composers and singers.
Methodology
The XAI-Lyricist framework utilizes an encoder-decoder Transformer architecture enhanced with multi-target learning. The process begins with the extraction of Prosody Templates from a melody, capturing note strength (beats) and length (duration).
The model predicts four sequences simultaneously at each timestep: the lyric word, syllable count, syllable strength (stress patterns), and syllable length (vowel duration). To ensure linguistic accuracy, a post-processing step validates generated words against an International Phonetic Alphabet (IPA) database. Finally, an explainable interface renders a piano-roll view where notes and lyrics are annotated to show the intended mapping.
Key Insights
The core innovation lies in treating prosody as a shared language between MIDI data and text. The authors found that adding a prosody layer acts as a regularizer, improving not only the rhythmic fit but also the grammatical quality of the generated text. Furthermore, the "Explainable AI" (XAI) component provides a visual map that helps users identify and correct "unsingable" spots, bridging the gap between AI output and human performance.
Experimental Results
The researchers evaluated XAI-Lyricist against a "Vanilla" baseline and a "Prosody-only" model. Computational metrics showed that XAI-Lyricist achieved a significantly lower Perplexity (4.76 vs. 37.50) and superior performance in Prosody-BLEU.
In a human-subjects study with 14 trained singers, lyrics generated by XAI-Lyricist received a singability rating of 4.66/5, compared to 1.68/5 for the Vanilla model. As shown in the performance metrics, the inclusion of explainable prosody significantly improved efficiency; 85.71% of test sentences were sung correctly on the first attempt, a stark contrast to the 27.06% success rate of the baseline.
Conclusion and Future Work
XAI-Lyricist demonstrates that singability is a measurable alignment of physical attributes. While currently optimized for English and 4/4 time signatures, future work aims to adapt the framework for tonal languages and more complex rhythmic structures. The study also highlights the need for customizable interfaces to cater to different user backgrounds, such as professional songwriters who may prefer traditional notation over piano-roll views.
Summary updated