Back to Feed
Benchmarks & Evals / Computer Vision

Learning Hierarchical Representations for Symbolic Music

Original: MIDI-RAE-JEPA: Hierarchical Representation Learning and Generation for Symbolic Music

Listen to the summary

Uses a voice available on your device

Audio options
On this page 4 sections
Related concepts 5 concepts

Key Takeaways

  • Uses a Swin Transformer V2 encoder to process binary piano rolls hierarchically.
  • Achieves a 0.995 F1 score on music reconstruction tasks.
  • Outperforms baselines like Haar scattering and DINOv2 on the EMOPIA emotion classification task.
  • Employs a novel soft factorization loss to ensure pitch and time relationships remain orthogonal in latent space.

Summary & Methodology Analysis

The MIDI-RAE-JEPA architecture addresses the inability of traditional models to handle the hierarchical, multiscale nature of music. The system encodes binary piano rolls as 128x128 images, which are then processed by a Swin Transformer V2, a vision model that partitions inputs into hierarchical stages to capture features at multiple scales. To avoid common distortions caused by standard image-based transformations, the model uses an equivariance loss to internalize pitch and time-shift relationships, alongside a masked embedding predictor that learns context across the hierarchical layers. Representation collapse is mitigated by the use of SIGReg to enforce an isotropic Gaussian prior on the embeddings, and a soft factorization loss is applied to keep pitch and time dimensions geometrically orthogonal in latent space. The pipeline concludes with a separate decoder trained on frozen embeddings for reconstruction and a flow matching model for generation. The performance is validated through an F1 score of 0.995 for reconstruction and superior 4-class accuracy of 0.488 on the EMOPIA emotion classification dataset compared to Haar scattering and DINOv2. A primary limitation is that most representational capacity is concentrated at the fine hierarchical levels, leaving coarser levels unable to capture high-level musical abstractions. Additionally, increasing the maximum time shift during training negatively impacts reconstruction accuracy if the factorization loss is omitted.

Interactive System Flowchart

Click diagram to expand and zoom

Cross-Examination & FAQs

A deeper dive clarifying mechanics, constraints, and baseline evaluations.

Q1. What is the primary goal of this research?

The goal is to improve how AI models understand the hierarchical and multiscale nature of symbolic music.

Q2. Does this model generate music?

Yes, the paper includes a flow matching generative model conditioned on encoder embeddings for music generation.

Q3. How does this model perform compared to existing methods?

It outperforms baselines like Haar scattering and DINOv2 on the EMOPIA emotion classification task.

Q4. What architecture does the encoder use?

The encoder uses a Swin Transformer V2 to process the piano roll images hierarchically.

Q5. What is the purpose of the soft factorization loss?

It is used to encourage pitch and time directions to be geometrically orthogonal in the latent space.

Q6. How does the model prevent representation collapse?

It uses SIGReg to enforce an isotropic Gaussian prior on the latent representations.

Q7. What are the limitations regarding hierarchical levels?

Most representational capacity resides at the fine hierarchical levels, while coarse levels fail to capture clear musical abstractions.

Q8. Are there specific training risks when adjusting time-shift parameters?

Yes, extending the maximum time shift during training can degrade reconstruction accuracy if the factorization loss is not applied.

Q9. What is the reconstruction performance of the model?

The decoder achieves a reconstruction F1 score of 0.995 on a held-out test set.