NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Whole-Song Hierarchical Generation of Symbolic Music Using Cascaded Diffusion Models

Ziyu Wang, Lejun Min, Gus Xia

Generating a catchy four-bar melody is one thing; composing a coherent, four-minute pop song with a clear verse-chorus structure, evolving textures, and satisfying cadences is quite another. In their ICLR 2024 paper, Ziyu Wang and colleagues present a novel approach to this "whole-song" challenge by leveraging the inherent hierarchy of musical composition.

TL;DR

This paper introduces the first attempt to model full-piece symbolic music (up to 256 measures) using a four-level computational hierarchy and cascaded diffusion models. By breaking music down from global form to local accompaniment, the model generates well-structured songs that outperform existing baselines in both objective structural metrics and subjective human evaluation.

What Problem Does This Paper Address?

Deep learning has made massive strides in short-term music generation, but "whole-song" generation remains an open challenge. As a piece grows in length, the number of possible note combinations grows exponentially, making it difficult for standard models to maintain a global "thread."

Most current models struggle with long-term dependencies, often resulting in music that wanders aimlessly or lacks recognizable structures like repeating choruses or distinct phrase boundaries. The authors argue that the solution lies in compositional hierarchy—the way human composers think about music, moving from a high-level plan (the "form") down to the specific notes of an accompaniment.

Methods

The researchers propose a hierarchical music language consisting of four levels, each represented as an image-like piano-roll (see Figure 3 for definitions):

  1. Form: The "blueprint," including key changes and phrase types (e.g., Intro, Verse, Chorus).
  2. Reduced Lead Sheet: A simplified version of the melody and chords, focusing on phrase development and cadences.
  3. Lead Sheet: The complete lead melody and finalized chord progression.
  4. Accompaniment: The full piano accompaniment, detailing rhythmic textures.

To model this, they use Cascaded Diffusion Models. Instead of one giant model, they train four separate 2D-UNet diffusion models, one for each level. The generation process is top-down: the "Form" is generated first, which then acts as a "background condition" for the "Reduced Lead Sheet," and so on.

Figure 1: The diagram of cascaded diffusion models for hierarchical symbolic music generation.

Beyond the top-down hierarchy, the model uses two other conditioning mechanisms:

  • Autoregressive Control: To ensure temporal coherence, the model looks at previously generated segments to inform the current one.
  • External Control: Users can feed in pre-trained latent codes (like a specific rhythmic pattern or chord progression) to guide the generation at any level.

Datasets

The model was trained and evaluated on the POP909 dataset, which contains 909 MIDI files of pop songs. These files include rich annotations for lead melodies, secondary melodies, piano accompaniments, keys, and chords. The authors pre-processed these into their four-level hierarchy, transposing them into all 12 keys to augment the data.

Key Insights and Ideas

  • Hierarchy as Inductive Bias: By explicitly defining a musical hierarchy, the authors provide a structural inductive bias that makes the training process more efficient and decomposable. The model doesn't have to learn "everything at once."
  • Image-Based Diffusion for Music: Treating symbolic music as multi-channel images allows the model to leverage the strengths of 2D-UNets, which are excellent at capturing spatial (in this case, pitch-time) relationships.
  • Interpretable Controllability: Because the hierarchy is based on musical concepts (like "Reduced Lead Sheet"), the model is naturally controllable. A user can specify a "Verse-Chorus-Verse" form and let the model fill in the rest, or provide a specific accompaniment texture while keeping the melody the same.

Key Results

The authors evaluated their model using a new metric called Inter-Phrase Latent Similarity (ILS), which measures how well a model maintains similarity between phrases of the same type (e.g., two verses) while keeping different phrase types distinct.

Table 2: Objective evaluation of music structure via the proposed inter-phrase latent similarity.

As shown in Table 2, the cascaded diffusion approach significantly outperformed baselines like Polyffusion and Transformer-XL in preserving long-term structure, particularly in chords and accompaniment.

Qualitatively, the model generates music with clear phrase boundaries and logical intensity shifts. Figure 2 in the paper showcases a 40-measure generation where the model successfully creates variations of motifs across different sections, leading to a musical climax before the outro.

Figure 2: An example of whole-song generation of 40 measures under a given Form (A♭major key and "i4A4A4B8b4A4B8o4" phrases). The three staves (from top to bottom) show the generated Reduced Lead Sheet, Lead Sheet, and Accompaniment. Here, rectangles with colored background are used to indicate the appearance of the same motifs in verse and chorus sections. Dashed border rectangles with colored background indicate a variation of motifs. We use red dotted rectangles to show where the generated score show a strong implication of phrase boundary or cadence. The generated chord progressions in Reduced Lead Sheet and Lead Sheet are identical, shown by the chord symbols.

Limitations and Future Work

While a major step forward, the model has its limits:

  • Scope: It currently supports a maximum of 256 measures, which is fine for pop but short for classical music.
  • Meter: It doesn't support meter changes within a song and struggles with 3/4 time signatures due to data scarcity.
  • Harmonic Resolution: The authors noted that generated endings sometimes fail to resolve perfectly on the tonic harmony, likely due to quantization issues in the training data's outro sections.

Future directions include extending this hierarchical approach to multi-track symbolic music and even direct audio generation.

Summary updated

BibTeX
@inproceedings{wang2024whole,
  author = {Ziyu Wang and Lejun Min and Gus Xia},
  title = {{Whole-Song Hierarchical Generation of Symbolic Music Using Cascaded Diffusion Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=sn7CYWyavh},
}
Figure