Skip to main content
QUICK REVIEW

[Paper Review] Learning to Generate Music With Sentiment

Lucas N. Ferreira, Jim Whitehead|arXiv (Cornell University)|Mar 9, 2021
Music and Audio ProcessingComputer Science16 references15 citations
TL;DR

This paper proposes a disentangled deep generative model using a modified LSTM (mLSTM) combined with logistic regression to control music generation by sentiment. By identifying and optimizing sentiment-specific neurons in the mLSTM, the model generates music with intended emotional tone—achieving 84% accuracy for positive and 67% for negative pieces, with human evaluators confirming intended sentiment, though negative pieces showed ambiguity.

ABSTRACT

Deep Learning models have shown very promising results in automatically composing polyphonic music pieces. However, it is very hard to control such models in order to guide the compositions towards a desired goal. We are interested in controlling a model to automatically generate music with a given sentiment. This paper presents a generative Deep Learning model that can be directed to compose music with a given sentiment. Besides music generation, the same model can be used for sentiment analysis of symbolic music. We evaluate the accuracy of the model in classifying sentiment of symbolic music using a new dataset of video game soundtracks. Results show that our model is able to obtain good prediction accuracy. A user study shows that human subjects agreed that the generated music has the intended sentiment, however negative pieces can be ambiguous.

Motivation & Objective

  • To develop a generative deep learning model that can produce symbolic music with a specified sentiment (positive or negative).
  • To identify and leverage sentiment-specific neurons within an mLSTM to enable controllable music generation.
  • To evaluate the model's performance as both a sentiment classifier and a music generator using a newly created dataset of video game soundtracks.
  • To explore the feasibility of disentangling sentiment from music generation in symbolic music, a largely unexplored domain.
  • To enable applications in affective music composition for video games, films, and therapeutic contexts.

Proposed method

  • A generative mLSTM is trained on 728 unlabeled MIDI pieces from video game soundtracks to learn musical representations.
  • A logistic regression model is trained to classify sentiment using hidden states from the mLSTM, identifying neurons responsible for sentiment signals.
  • A genetic algorithm optimizes the weights of 161 specific mLSTM neurons to generate music with desired sentiment (positive or negative).
  • The fitness function for the genetic algorithm measures mean squared error between predicted sentiment and desired sentiment (0 or 1) across 30 generated pieces.
  • Human annotators on Amazon MTurk label generated pieces using a valence-arousal model, with valence mapped to sentiment (positive/negative).
  • The model is evaluated both as a sentiment classifier (on a held-out dataset) and as a generator (via user study on generated pieces).

Experimental results

Research questions

  • RQ1Can a generative deep learning model be effectively controlled to produce symbolic music with a specific sentiment?
  • RQ2Can sentiment-specific neurons be identified and manipulated in an mLSTM to guide music generation?
  • RQ3How does the performance of the disentangled generative model compare to a fully supervised LSTM in sentiment classification of symbolic music?
  • RQ4To what extent do human listeners perceive the intended sentiment in generated music, especially for negative pieces?
  • RQ5Can the model be extended to generate music with multi-class emotions or continuous valence-arousal values?

Key findings

  • The proposed model achieved 84% accuracy in generating music with the intended positive sentiment, as confirmed by human annotators.
  • The model achieved 67% accuracy in generating music with the intended negative sentiment, though negative pieces were perceived as ambiguous by listeners.
  • The generative mLSTM with logistic regression outperformed a fully supervised LSTM by approximately 30% in sentiment classification accuracy.
  • Human annotators agreed that the generated positive pieces conveyed the intended sentiment, while negative pieces showed mixed valence across measures, indicating partial success.
  • The genetic algorithm successfully optimized neuron weights to guide sentiment control, though the lower fitness for negative generation suggests imbalance in training data.
  • The study presents the first labeled dataset of symbolic music annotated for sentiment, enabling future research in affective music generation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.