Abstract: Music is inherently made up of complex structures, and representing them as graphs helps to capture multiple levels of relationships. While music generation has been explored using various deep generation techniques, research on graph-related music generation is sparse. Earlier graph-based music generation worked only on generating melodies, and recent works to generate polyphonic music do not account for longer-term structure. In this paper, we explore a multi-graph approach to represent both the rhythmic patterns and phrase structure of Chinese pop music. Consequently, we propose a two-step approach that aims to generate polyphonic music with coherent rhythm and long-term structure. We train two Variational Auto-Encoder networks - one on a MIDI dataset to generate 4-bar phrases, and another on song structure labels to generate full song structure. Our work shows that the models are able to learn most of the structural nuances in the training dataset, including chord and pitch frequency distributions, and phrase attributes.
Introduction
Generating music that sounds good for a few seconds is relatively easy for modern AI, but creating a full song with a coherent "story arc"—an intro, verses, a chorus, and a bridge—remains a significant challenge. Most current models either focus on short-term rhythmic patterns or high-level structure, rarely both.
In their paper "Hierarchical Symbolic Pop Music Generation with Graph Neural Networks," researchers from Queen Mary University of London introduce GraphMuGen. This two-stage framework uses Graph Neural Networks (GNNs) to bridge the gap between granular note-level detail and high-level musical form, specifically targeting the complexities of polyphonic pop music.
Methodology
GraphMuGen is a hierarchical framework that generates full-length polyphonic pop music by combining two specialized Variational Auto-Encoders (VAEs). One model masters the "local" 4-bar phrase, while the other handles the "global" song structure, ensuring the generated music is both rhythmically coherent and structurally sound. The core of GraphMuGen is its hierarchical two-stage approach, illustrated in Figure 1.
- Phrase Generation Model: A VAE trained to encode and decode 4-bar polyphonic phrases. It uses a Graph Convolutional Network (GCN) to handle the "content" (pitch and duration) and a CNN to handle the "structure" (when notes are active).
- Song Structure Generation Model: A second VAE that operates at the "phrase level." Instead of notes, its nodes represent entire 4-bar phrases (e.g., Intro, Verse A, Chorus B). It learns the typical progression of a pop song.
Novel Graph Representations
The authors represent music as a multi-layered graph at two levels:
- Bar Level: Nodes represent chords at specific time steps. Edges connect consecutive nodes, nodes within the same track, and nodes that start at the same time across different tracks.
- Phrase Level: Nodes represent 4-bar phrases. Edges define the sequence and the relationship between melodic and non-melodic sections.
The VAE architecture (shown in Figure 2) is designed to disentangle content from structure, allowing the model to learn the "vibe" of a phrase separately from its rhythmic skeleton.
Datasets and Evaluation
The models were trained and evaluated using the POP909 dataset, which contains 909 Chinese pop songs in MIDI format. Each song includes three tracks: Melody, Bridge, and Piano accompaniment. Crucially, POP909 includes human-labeled structural tags (intro, bridge, outro, etc.), which were essential for training the high-level structure model.
Key Results
The researchers evaluated the model by comparing 100 generated songs against the ground truth from the POP909 dataset.
- Reconstruction Accuracy: The structure model was highly effective, reconstructing phrase types with 88.7% accuracy and melody activations with 91.2% accuracy.
- Distribution Matching: The generated phrases closely mirrored the chord and pitch frequency distributions of real human compositions. For example, Chords I and V were the most common in both the dataset and the model's output.
- Phrase Distribution: The model successfully learned the typical length and variety of phrases in a pop song, with a mean phrase length (6.45 bars) very close to the human baseline (6.52 bars).
Discussion and Limitations
While GraphMuGen is a step forward, the authors note a few areas for improvement. A notable issue is the "Empty Bar" problem: the model tends to generate more empty bars than human composers do (9.85% vs 1.01% for the melody track). Furthermore, training on only 909 songs limits the model's "vocabulary," suggesting a need for data augmentation with larger sets like LakhMIDI.
Finally, while the overall structure is coherent, the harmonic relationship between different generated phrases could be tighter. Future versions might include "global" constraints to ensure the key and chord progressions flow even more smoothly across the entire song. By treating music as a hierarchy of relationships rather than just a string of data, GraphMuGen moves us closer to AI that doesn't just play notes, but actually "composes" songs.
Summary updated