MusER: Musical Element-Based Regularization for Generating Symbolic Music with Emotion

Shulei Ji, Xinyu Yang
12/16/2023
cs.SDcs.AIcs.MM

No official code found. Best implementation: Tayjsl97/MusER (31 stars, last commit 2025-06-04).

Abstract

Generating music with emotion is an important task in automatic music generation, in which emotion is evoked through a variety of musical elements (such as pitch and duration) that change over time and collaborate with each other. However, prior research on deep learning-based emotional music generation has rarely explored the contribution of different musical elements to emotions, let alone the deliberate manipulation of these elements to alter the emotion of music, which is not conducive to fine-grained element-level control over emotions. To address this gap, we present a novel approach employing musical element-based regularization in the latent space to disentangle distinct elements, investigate their roles in distinguishing emotions, and further manipulate elements to alter musical emotions. Specifically, we propose a novel VQ-VAE-based model named MusER. MusER incorporates a regularization loss to enforce the correspondence between the musical element sequences and the specific dimensions of latent variable sequences, providing a new solution for disentangling discrete sequences. Taking advantage of the disentangled latent vectors, a two-level decoding strategy that includes multiple decoders attending to latent vectors with different semantics is devised to better predict the elements. By visualizing latent space, we conclude that MusER yields a disentangled and interpretable latent space and gain insights into the contribution of distinct elements to the emotional dimensions (i.e., arousal and valence). Experimental results demonstrate that MusER outperforms the state-of-the-art models for generating emotional music in both objective and subjective evaluation. Besides, we rearrange music through element transfer and attempt to alter the emotion of music by transferring emotion-distinguishable elements.

View on arXivView PDF

Code Implementations(1)

Tayjsl97/MusERCommunity100%

This is the official implementation of MusER (AAAI'24).

311PythonDec 13, 20231 years ago
deep-learninglatent-space-regularizationsymbolic-music-generationvq-vae

Similar Papers

Cite this paper

@article{ji2023muser,
  title  = {MusER: Musical Element-Based Regularization for Generating Symbolic Music with Emotion},
  author = {Shulei Ji and Xinyu Yang},
  year   = {2023},
  eprint = {2312.10307},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.10307v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.10307.svg)](https://codeofpaper.com/paper/2312.10307)

Discussion