[Paper Review] A Hierarchical Recurrent Neural Network for Symbolic Melody Generation
This paper proposes a hierarchical recurrent neural network (HRNN) for symbolic melody generation, using three stacked Long Short-Term Memory (LSTM) networks—bar, beat, and note layers—that generate music in a coarse-to-fine manner. The model outperforms single-layer LSTMs and state-of-the-art models like MusicVAE and MidiNet in human evaluations, with 72.6% of comparisons favoring HRNN-3L over MusicVAE and 77.9% favoring it over MidiNet.
In recent years, neural networks have been used to generate symbolic melodies. However, the long-term structure in the melody has posed great difficulty for designing a good model. In this paper, we present a hierarchical recurrent neural network for melody generation, which consists of three Long-Short-Term-Memory (LSTM) subnetworks working in a coarse-to-fine manner along time. Specifically, the three subnetworks generate bar profiles, beat profiles and notes in turn, and the output of the high-level subnetworks are fed into the low-level subnetworks, serving as guidance for generating the finer time-scale melody components in low-level subnetworks. Two human behavior experiments demonstrate the advantage of this structure over the single-layer LSTM which attempts to learn all hidden structures in melodies. Compared with the state-of-the-art models MidiNet and MusicVAE, the hierarchical recurrent neural network produces better melodies evaluated by humans.
Motivation & Objective
- To address the challenge of modeling long-term structural dependencies in symbolic melody generation.
- To improve melody generation quality by explicitly modeling rhythmic structure at multiple time scales (bars, beats, notes).
- To reduce the difficulty of learning long-term note-level dependencies by conditioning on higher-level rhythmic profiles.
- To evaluate whether hierarchical modeling leads to more musically coherent and human-preferred melodies compared to single-layer RNNs and state-of-the-art models.
- To investigate the impact of hierarchical design on generating melodies with realistic long-term structure.
Proposed method
- The model uses a three-level hierarchical LSTM architecture: bar-level, beat-level, and note-level subnetworks.
- The bar-level LSTM generates bar profiles, which guide the beat-level LSTM to produce beat profiles.
- The note-level LSTM generates individual notes conditioned on both bar and beat profiles, ensuring structural coherence.
- Each higher-level network provides contextual conditioning to the next lower-level network, enabling coarse-to-fine generation.
- The model is trained end-to-end on symbolic music data, with quantized time steps per bar (16 steps) and 4/4 time signature.
- Human evaluation via 2AFC (two-alternative forced choice) tests compares generated melodies against baselines.
Experimental results
Research questions
- RQ1Can a hierarchical RNN architecture better model long-term musical structure than a single-layer RNN?
- RQ2Does conditioning note-level generation on higher-level rhythmic profiles (bar and beat) improve melody quality and coherence?
- RQ3How does the proposed HRNN compare to state-of-the-art models like MusicVAE and MidiNet in human preference studies?
- RQ4To what extent can the HRNN generate melodies that are indistinguishable from human-composed pieces in a Music Turing Test?
- RQ5How do limitations in data (e.g., time signature, rhythm encoding) affect model performance and generalization?
Key findings
- HRNN-3L achieved a 72.6% preference rate over MusicVAE trained on the same dataset (p = 1.41×10⁻²¹), indicating statistically significant human preference.
- HRNN-3L achieved a 63.5% preference rate over pretrained MusicVAE (p = 5.82×10⁻⁹), showing consistent superiority in human evaluation.
- HRNN-3L achieved a 77.9% preference rate over MidiNet in a 2AFC comparison (p = 1.85×10⁻²¹), demonstrating strong performance against a leading architecture.
- The model generated melodies with more coherent rhythm and structure, as evidenced by human evaluations and reduced chaotic note patterns observed in MusicVAE outputs.
- In a Music Turing Test, only 33.69% of HRNN-generated melodies were mistaken for human-composed, indicating room for improvement despite strong performance.
- The study found that dataset quality significantly affects model performance, as only 74.95% of human-composed pieces were correctly classified as human-made, limiting model generalization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.