[Paper Review] Learning long-term music representations via hierarchical contextual constraints
This paper proposes a two-stage framework for learning disentangled, phrase-level music representations by applying hierarchical contextual constraints through contrastive pre-training and hierarchical fine-tuning. By constraining long-term representations to be close to short-term ones and enforcing reconstruction of sub-phrase representations, the method stabilizes training and achieves state-of-the-art performance in phrase-level style transfer, latent interpolation, and theme variation without increasing latent dimensionality.
Learning symbolic music representations, especially disentangled representations with probabilistic interpretations, has been shown to benefit both music understanding and generation. However, most models are only applicable to short-term music, while learning long-term music representations remains a challenging task. We have seen several studies attempting to learn hierarchical representations directly in an end-to-end manner, but these models have not been able to achieve the desired results and the training process is not stable. In this paper, we propose a novel approach to learn long-term symbolic music representations through contextual constraints. First, we use contrastive learning to pre-train a long-term representation by constraining its difference from the short-term representation (extracted by an off-the-shelf model). Then, we fine-tune the long-term representation by a hierarchical prediction model such that a good long-term representation (e.g., an 8-bar representation) can reconstruct the corresponding short-term ones (e.g., the 2-bar representations within the 8-bar range). Experiments show that our method stabilizes the training and the fine-tuning steps. In addition, the designed contextual constraints benefit both reconstruction and disentanglement, significantly outperforming the baselines.
Motivation & Objective
- To address the challenge of learning stable, disentangled long-term music representations for phrases beyond short-term segments.
- To overcome the instability and poor performance of end-to-end hierarchical models in long-range music representation learning.
- To enable high-quality, coherent music generation at the phrase level (e.g., 8-bar phrases) with controllable factors like pitch and rhythm.
- To design inductive biases that guide the model toward meaningful, interpretable representations without increasing latent dimensionality.
- To demonstrate phrase-level style transfer, latent factor interpolation, and theme variation using the learned representations.
Proposed method
- Pre-train a phrase-level representation using contrastive loss to minimize the difference between phrase-level and bar-level representations.
- Use EC²-VAE to extract disentangled bar-level representations for pitch and rhythm as supervision.
- Fine-tune the model with a hierarchical prediction head that reconstructs bar-level representations from the phrase-level code.
- Apply structured InfoNCE loss during both pre-training and fine-tuning to stabilize training and enforce contextual consistency.
- Fix the encoder during early fine-tuning and gradually fine-tune the full network to improve representation quality.
- Use SLERP for interpolation of rhythm factors and posterior sampling with noise for theme variation.
Experimental results
Research questions
- RQ1Can structured contextual constraints stabilize the training of long-term music representation models?
- RQ2Does enforcing reconstruction of short-term representations from long-term codes improve disentanglement and coherence?
- RQ3Can a phrase-level representation enable high-quality style transfer, interpolation, and theme variation without increasing latent dimensionality?
- RQ4How does the proposed method compare to end-to-end hierarchical models in terms of stability and performance?
- RQ5Can long-term representations model both global structure and local coherence better than short-term models?
Key findings
- The proposed method significantly outperforms baseline models in reconstruction and disentanglement of pitch and rhythm factors for 8-bar phrases.
- The model achieves state-of-the-art performance in phrase-level style transfer by swapping representations between pieces.
- Latent interpolation via SLERP produces coherent melodies across bars, even during transitions, indicating strong global coherence in learned representations.
- Theme variation through posterior sampling of rhythm factors generates musically plausible and smooth transitions, demonstrating control over rhythmic structure.
- Subjective evaluation shows that melodies generated by the Hierarchical-EC²-VAE are rated significantly higher than those from the 2-bar EC²-VAE in creativity, naturalness, and overall musicality (p < 0.05).
- The model reaches competitive quality compared to human-composed pieces, especially in creativity, despite using only bar-level representations as supervision.
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.