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

Learning Multidimensional Disentangled Representations of Instrumental Sounds for Musical Similarity Assessment

Yuka Hashizume, Li Li, Atsushi Miyashita, Tomoki Toda · DOI

Abstract

To achieve a flexible recommendation and retrieval system, it is desirable to calculate music similarity by focusing on multiple partial elements of musical pieces and allowing the users to select the element they want to focus on. A previous study proposed using multiple individual networks for calculating music similarity based on each instrumental sound, but it is impractical to use each signal as a query in search systems. Using separated instrumental sounds alternatively resulted in less accuracy due to artifacts. In this paper, we propose a method to compute similarities focusing on each instrumental sound with a single network that takes mixed sounds as input instead of individual instrumental sounds. Specifically, we design a single similarity embedding space with disentangled dimensions for each instrument, extracted by Conditional Similarity Networks, which is trained by the triplet loss using masks. Experimental results have shown that (1) the proposed method can obtain more accurate feature representation than using individual networks using separated sounds as input, (2) each sub-embedding space can hold the characteristics of the corresponding instrument, and (3) the selection of similar musical pieces focusing on each instrumental sound by the proposed method can obtain human consent, especially in drums and guitar.

Introduction

In Music Information Retrieval (MIR), similarity is traditionally calculated globally, comparing entire songs. However, user preferences are often granular, focusing on specific elements like a drum pattern or a bassline. Previous approaches to instrument-specific similarity required either impractical individual networks for each instrument or source separation techniques. Source separation often introduces digital artifacts that degrade the accuracy of subsequent similarity assessments. This paper addresses these challenges by proposing a single network architecture capable of extracting instrument-specific similarity features directly from a full audio mix.

Methodology

The proposed approach leverages Conditional Similarity Networks (CSNs) to create a disentangled embedding space. A 640-dimensional embedding space is partitioned into five 128-dimensional subspaces, each corresponding to a specific instrument category: drums, bass, piano, guitar, and "others."

Conditional Similarity Network (CSN) architecture using masked triplet loss to disentangle instrument-specific embeddings.

Masked Triplet Loss

During training, the network employs a binary mask to isolate dimensions belonging to the instrument under evaluation. This masking mechanism forces the network to encode instrument-specific features into their designated subspaces. This allows a single model to act as five specialized models simultaneously.

Pseudo-Mixed Sounds and Auxiliary Loss

To overcome the lack of labeled similarity data, the authors utilized "pseudo-mixed" tracks—synthetic mixes where specific stems (e.g., drums) are swapped between songs. This provides a mathematical ground truth for similarity. Furthermore, an auxiliary loss function, guided by pre-trained networks exposed to clean instrumental tracks, assists the main network in identifying relevant features within the complex mix.

Experimental Setup

The Slakh dataset, comprising high-quality MIDI-synthesized tracks and their constituent stems, was used for evaluation. The training set included 1,200 tracks used to generate 20,000 triplets for metric learning. Audio was processed as mel-spectrograms in 3-second and 10-second segments.

Results and Discussion

The model was evaluated using k-Nearest Neighbor (kNN) classification to identify song segments based on instrument subspaces.

t-SNE visualization of the learned embedding space, showing clear clustering of similar instrumental characteristics.

Quantitative Performance

For 10-second segments, the proposed method achieved high accuracy for drums (89.69%) and guitar (86.26%), significantly outperforming methods relying on source-separated tracks. This suggests that the "noise" of a full mix is less detrimental to similarity assessment than the artifacts introduced by AI unmixing.

Listening tests revealed strong human agreement with the model's rankings for drums (76.7%) and guitar (82.5%). Visual analysis via t-SNE confirms that the model successfully learned to cluster similar instrumental sounds within their respective subspaces, as shown in the distinct groupings of the visualization.

Conclusion

While highly effective for drums and guitar, the model faces challenges with bass and piano due to frequency overlaps in the mix. Future work will aim to improve disentanglement for these instruments and extend the framework to include vocal similarity, a critical component for comprehensive music recommendation systems.

Summary updated

BibTeX
@misc{hashizume2024learning,
  author = {Yuka Hashizume and Li Li and Atsushi Miyashita and Tomoki Toda},
  title = {{Learning Multidimensional Disentangled Representations of Instrumental Sounds for Musical Similarity Assessment}},
  year = {2024},
  eprint = {2404.06682},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.06682},
}
Figure