Song Meaning Classification Using NLP
The goal of our project is to receive a user input consisting of the name of a song, return the general meaning of that song, and return a song that is similar to the input song in content. We were motivated to work on this project because we love finding music that we can relate to based on their lyrical meaning. Given a song, we wanted to find an easy way to categorize which playlists to include the song in that best fits with a given lyrical meaning (love, break up, party, etc). Then, from a song with a specific meaning, we wanted to find other songs that have a similar lyrical meaning. Hence, we can expand from one song, and find a cluster of other songs that all lyrically connect to each other in its meaning.
This is a classification problem, as we will be analyzing the lyrics of the song and then classifying them into one of our predefined categories.
Our two biggest challenges are related to the implementation of our models. One of the ideas we had was to first summarize the song lyrics to use the summary to classify the songs (instead of using the entire lyric). We thought of doing these because the lyrics of the songs can be long, so we wanted to be able to shorten them through summarization.
We implemented summarization using the Transformer architecture with multi-headed attention, encoder, and decoder. The first challenge came in the amount of time it has taken to train. Running it on a Macbook Pro was very slow, so we set up Google Cloud Platform to use Google Compute Engine, but it did not prove to run much faster when running on NVIDIA Tesla K80. We were automatically approved for 1 GPU but were not able to run it on a better GPU and on more GPUs, so we requested to have 4 GPUs but still have not heard back about approval. We then tried training over Google Colab, which proved to be faster, but the amount of time it took to train caused the free version of Colab to time out, so it did not finish training over 20 epochs. Because of this, we just trained locally on a personal computer over the course of three days and saved the model weights. When running the model that has been trained over 20 epochs, however, its generated summaries are not accurate. Because of the inaccuracies in summary, we have decided to go directly into the classification portion as this is the bulk of our project, using the entire lyrics.
The second challenge we are facing are the actual results of the models: when classifying the songs into labels, our Convolutional Neural Network has an accuracy of 0.5, and this is tested using only two labels on a different dataset (not the song lyrics dataset we currently have as it is too small). It seems that the network is returning label 0 every time. Using TF-IDF when trying to recommend a song based on its words, we are recommending a song with the same label only ~30% of the time.
It seems like the two models we implemented are not a good fit for our particular dataset, but we are still trying to look for ways to improve or understand the results better. For the recommendation portion, for instance, it can be that songs with different labels indeed have more similar words than a song with the same label.
We need to get more data (we currently have only 831 data points, which is not enough to train a convolutional neural network). We were able to get around 5000~ data points for songs with their artist and labels, but it’s been hard to match these 5000~ songs to their associated lyrics.
Improve the results of tf-idf or look for other ways to use this algorithm in the project, if possible
Improve accuracy for Convolutional Network classification
Perhaps looking into other ml/dl models that perform better in our dataset
Leave feedback in the comments!
Log in or sign up for Devpost to join the conversation.
Log in or sign up for Devpost to join the conversation.