# Lyrics-Based Music Genre Classification Using a Hierarchical Attention Network

arXiv: https://arxiv.org/abs/1707.04678 · HTML: https://mlsanity.com/paper/1707.04678/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 15 Jul 2017.

## Built on by (most cited first, 7 of 7)

- [LyricWhiz: Robust Multilingual Zero-shot Lyrics Transcription by Whispering to ChatGPT](https://mlsanity.com/paper/2306.17103/) (2023)
- [Unsupervised Melody-to-Lyric Generation](https://mlsanity.com/paper/2305.19228/) (2023)
- [Lyric document embeddings for music tagging](https://mlsanity.com/paper/2112.11436/) (2021)
- [Agent-Driven Large Language Models for Mandarin Lyric Generation](https://mlsanity.com/paper/2410.01450/) (2024)
- [A General Framework for Learning Prosodic-Enhanced Representation of Rap Lyrics](https://mlsanity.com/paper/2103.12615/) (2021)
- [Linguistic Complexity and Socio-cultural Patterns in Hip-Hop Lyrics](https://mlsanity.com/paper/2505.00035/) (2025)
- [A Comparative Study of LLM Prompting and Fine-Tuning for Cross-genre Authorship Attribution on Chinese Lyrics](https://mlsanity.com/paper/2511.21930/) (2025)

## Abstract (arXiv)

Music genre classification, especially using lyrics alone, remains a challenging topic in Music Information Retrieval. In this study we apply recurrent neural network models to classify a large dataset of intact song lyrics. As lyrics exhibit a hierarchical layer structure - in which words combine to form lines, lines form segments, and segments form a complete song - we adapt a hierarchical attention network (HAN) to exploit these layers and in addition learn the importance of the words, lines, and segments. We test the model over a 117-genre dataset and a reduced 20-genre dataset. Experimental results show that the HAN outperforms both non-neural models and simpler neural models, whilst also classifying over a higher number of genres than previous research. Through the learning process we can also visualise which words or lines in a song the model believes are important to classifying the genre. As a result the HAN provides insights, from a computational perspective, into lyrical structure and language features that differentiate musical genres.
