A General Framework for Learning Prosodic-Enhanced Representation of Rap Lyrics

Hongru Liang, Haozheng Wang, Qian Li, Jun Wang, Guandong Xu, Jiawei Chen, Jin-Mao Wei, Zhenglu Yang

TL;DR

This paper introduces HAVAE, a novel framework for learning representations of rap lyrics that effectively combines semantic and prosodic information. By introducing a new rhyme embedding method (rhyme2vec) and a hierarchical attention VAE, HAVAE achieves state-of-the-art performance on rap lyric prediction, generation, and genre classification tasks.

What Problem Does This Paper Address?

Analyzing rap lyrics is crucial for various music-related applications, but existing methods often fall short. A key challenge is the unstructured nature of rap lyrics, which makes it difficult to capture their full essence. Specifically, many approaches neglect or inadequately represent prosodic information (like rhyme and rhythm) and fail to effectively integrate it with semantic content. This leads to suboptimal performance in tasks like predicting the next line, generating new lyrics, or classifying rap genres.

Methods

The core of the proposed solution is the Hierarchical Attention Variational Autoencoder (HAVAE) framework. It comprises two main modules:

  • Feature Extraction Module:
    • Prosodic Section (rhyme2vec): This novel method captures prosodic features by analyzing phonetic transcriptions. It handles both monorhyme (consecutive lines) and alternate rhyme (skipping lines) using separate models and an attention layer to weigh their importance.
  • Semantic Section (doc2vec): Standard doc2vec is used to encode the raw lyrics into semantic vectors, treating consecutive lines as paragraphs and songs as documents.
  • Feature Aggregation Module:
    • This module uses a Variational Autoencoder (VAE) to fuse the prosodic and semantic vectors.
  • A hierarchical attention mechanism is employed to balance the importance of prosodic and semantic features before they are fed into the VAE.
  • The VAE learns a latent representation that is expected to be representative of the rap lyrics, incorporating both prosodic and semantic information.
  • A label information loss is also incorporated to further guide the learning process.

Datasets

The paper utilizes a custom corpus of rap lyrics sourced from the internet. This corpus consists of 65,730 songs from 3,154 rappers. For specific experiments, subsets of this corpus were created, such as 16,697 verses for the NextLine prediction task and 10,167 songs for rap genre classification.

Key Insights and Ideas

  • Prosody is Crucial for Rap: The research strongly suggests that effectively capturing and integrating prosodic elements (rhyme, rhythm) is as important as semantic content for understanding and generating rap lyrics.
  • Rhyme2vec's Novelty: The proposed rhyme2vec method offers a more sophisticated way to represent rhyme schemes than previous statistical approaches, leading to better prosodic representations.
  • Attention for Fusion: The hierarchical attention mechanism proves effective in dynamically weighting the contributions of semantic and prosodic features, allowing the model to learn their relative importance.
  • VAE for Unified Representation: The VAE architecture is well-suited for learning a compact, unified representation that effectively combines diverse features, going beyond simple concatenation.
  • Label Information Enhances VAE: Incorporating label information (e.g., genre labels) into the VAE loss function significantly improves the quality of the learned representations.

Key Results

The HAVAE framework consistently outperformed state-of-the-art baseline methods across three key tasks:

  • NextLine Prediction: HAVAE achieved a mean rank of 1.2, significantly outperforming other methods. Its MRR was 0.982, a substantial improvement over baselines like DopeLearning (0.168-0.243).
  • DopeLyrics Generation: Generated verses by HAVAE showed higher rhyme densities (2.278) compared to DopeLearning (1.436), indicating more coherent and rhyming lyrics.
  • Rap Genre Classification: HAVAE achieved the best Jaccard similarity score (0.405) and F1 score (0.450) at optimal thresholds, demonstrating its ability to capture genre-specific characteristics from lyrics.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while HAVAE shows superior performance, the "translation lexicon" limitation in some previous works (like Wu et al. [36]) is implicitly addressed by the general nature of the VAE and attention mechanisms.
  • The evaluation of generated lyrics in DopeLyrics generation is primarily based on rhyme density, as fluency and explicit motif evaluation are noted as complex and costly.
  • Future Work:
    • The authors plan to explore a wider range of information embedded in rap lyrics beyond prosody and semantics.
  • They aim to design other effective techniques for extracting representative vectors.
  • The framework will be evaluated on common tasks like music recommendation systems and other types of prosodic text, such as poetry.

Summary updated

BibTeX
@inproceedings{liang2019general,
  author = {Hongru Liang and Haozheng Wang and Qian Li and Jun Wang and Guandong Xu and Jiawei Chen and Jin-Mao Wei and Zhenglu Yang},
  title = {{A General Framework for Learning Prosodic-Enhanced Representation of Rap Lyrics}},
  booktitle = {World Wide Web},
  year = {2019},
  url = {https://openreview.net/forum?id=eDvEe1GUYk},
}
Figure