Skip to main content
QUICK REVIEW

[Paper Review] Polyphonic Music Composition with LSTM Neural Networks and Reinforcement Learning

Harish Kumar, Balaraman Ravindran|arXiv (Cornell University)|Feb 5, 2019
Music and Audio ProcessingComputer Science21 references6 citations
TL;DR

This paper proposes Amadeus, a music composition system that uses a novel multi-stream representation to decompose polyphonic music into monophonic streams, enabling efficient LSTM-based sequence modeling. It applies reinforcement learning to select optimal combinations of pre-trained musical 'plans'—not weights—resulting in coherent, harmonically rich, and rhythmically consistent compositions with significant qualitative improvements over random plan selection.

ABSTRACT

In the domain of algorithmic music composition, machine learning-driven systems eliminate the need for carefully hand-crafting rules for composition. In particular, the capability of recurrent neural networks to learn complex temporal patterns lends itself well to the musical domain. Promising results have been observed across a number of recent attempts at music composition using deep RNNs. These approaches generally aim at first training neural networks to reproduce subsequences drawn from existing songs. Subsequently, they are used to compose music either at the audio sample-level or at the note-level. We designed a representation that divides polyphonic music into a small number of monophonic streams. This representation greatly reduces the complexity of the problem and eliminates an exponential number of probably poor compositions. On top of our LSTM neural network that learnt musical sequences in this representation, we built an RL agent that learnt to find combinations of songs whose joint dominance produced pleasant compositions. We present Amadeus, an algorithmic music composition system that composes music that consists of intricate melodies, basic chords, and even occasional contrapuntal sequences.

Motivation & Objective

  • To address the complexity of polyphonic music generation by decomposing it into manageable monophonic streams.
  • To reduce the search space of possible compositions by leveraging a structured plan space, avoiding exponentially many poor-quality outputs.
  • To improve music composition quality by using reinforcement learning to select high-level configurations (plans) rather than modifying network weights directly.
  • To enable the generation of musically coherent compositions with harmony, counterpoint, rhythm, and tonal consistency.
  • To demonstrate that reinforcement learning can effectively guide the selection of musical plans to produce compositions that are perceptually pleasant and structurally diverse.

Proposed method

  • The system represents polyphonic music as a small number of monophonic streams, reducing sparsity and simplifying the learning problem.
  • An LSTM neural network is trained on these monophonic sequences to learn temporal patterns in pitch and duration.
  • A reinforcement learning agent selects combinations of pre-trained 'plans'—representing musical motifs or phrases—based on a reward function evaluating musical quality.
  • The Q-learning algorithm with function approximation is used to train the policy network, with hyperparameters tuned via grid search.
  • The reward function evaluates attributes such as pitch entropy, rest distribution, repeated note-sets, and cross-correlation peaks to guide the agent toward pleasant compositions.
  • The plan space is explored intelligently, allowing the system to generate diverse yet coherent musical pieces by combining dominant musical influences.

Experimental results

Research questions

  • RQ1Can a multi-stream representation of polyphonic music significantly reduce the complexity of sequence modeling while preserving musical structure?
  • RQ2Can reinforcement learning be effectively applied to select high-level musical plans rather than modifying model weights to improve composition quality?
  • RQ3Does the use of a structured plan space lead to more coherent and musically pleasant compositions compared to random plan selection?
  • RQ4To what extent can an LSTM-based system, guided by RL, generate compositions with harmony, counterpoint, and rhythmic consistency?
  • RQ5Can the system produce compositions that are perceptually indistinguishable from human-composed music in key musical attributes?

Key findings

  • Reinforcement learning significantly improved the rate of good compositions: 24% of compositions were rated good (reward >5.0) with RL, compared to 12% without RL.
  • The system reduced the incidence of repeated identical note-sets by 67% (0.06 vs. 0.20), indicating better melodic variety.
  • The average pitch entropy increased from 0.71 to 0.82 with RL, indicating more diverse and musically interesting pitch distributions.
  • The count of very short or long duration notes decreased by 37.5% (0.05 vs. 0.08), suggesting better rhythmic consistency.
  • The number of aggregated rests and rest counts were reduced by 43% and 36% respectively, indicating more natural phrasing.
  • The cross-correlation peak, a measure of rhythmic coherence, improved from 0.20 to 0.13, indicating better rhythmic structure and predictability.

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.