Emotion Classification in Song Lyrics: Comparing Logistic Regression, DistilBERT, and Ensemble Models with TF-IDF and Word2Vec Features
Alvin Alvitodinova, Flavia Louis, Hidayaturrahman Hidayaturrahman · 2025
Classifying emotions from song lyrics can be an interesting discussion in natural language processing (NLP) due to the subjectivity of language and the ambiguity of emotional expression. This study leverages the advantages of four different modeling approaches for classifying song lyrics into three emotion categories: Sadness, Tenderness, and Tension. The evaluated models include TF-IDF based Logistic Regression, Word2Vec based Logistic Regression, a stacked model combining TF-IDF based BiLSTM and XGBoost, and a transformer-based DistilBERT model. Experiments were conducted on a labeled dataset and achieving results of DistilBERT model outperformed other approaches, achieving an accuracy of 69.83% and a macro F1-score of 68%. Furthermore, the TF-IDF based Logistic Regression baseline achieved a macro F1-score of 59%, while Word2Vec based Logistic Regression and the stacked model yielded 55% and 52%, respectively. The findings demonstrate that contextual language models significantly improve emotion classification performance over traditional and shallow learning models, particularly when handling nuanced emotional language in music lyrics. However, class imbalance remains a limiting factor for minority labels such as Tension, suggesting the need for data augmentation or class-balancing strategies in future work.