[Paper Review] Leveraging Hierarchical Structures for Few-Shot Musical Instrument Recognition
This paper proposes a hierarchical few-shot learning method for musical instrument recognition by extending prototypical networks with a hierarchical loss and prototype aggregation across a predefined instrument hierarchy (e.g., Hornbostel-Sachs). The approach improves classification accuracy and reduces mistake severity on unseen instruments—especially rare ones like the zhongruan—by leveraging shared ancestry in the hierarchy, outperforming non-hierarchical baselines without architectural changes.
Deep learning work on musical instrument recognition has generally focused on instrument classes for which we have abundant data. In this work, we exploit hierarchical relationships between instruments in a few-shot learning setup to enable classification of a wider set of musical instruments, given a few examples at inference. We apply a hierarchical loss function to the training of prototypical networks, combined with a method to aggregate prototypes hierarchically, mirroring the structure of a predefined musical instrument hierarchy. These extensions require no changes to the network architecture and new levels can be easily added or removed. Compared to a non-hierarchical few-shot baseline, our method leads to a significant increase in classification accuracy and significant decrease mistake severity on instrument classes unseen in training.
Motivation & Objective
- To enable few-shot musical instrument recognition for instrument classes not seen during training, addressing data scarcity in diverse musical instrument categories.
- To improve classification performance and reduce mistake severity on unseen instruments by leveraging hierarchical relationships in instrument taxonomy.
- To develop a method that integrates hierarchical structure into prototypical networks without modifying the network architecture, enabling flexible addition or removal of hierarchy levels.
- To evaluate the impact of different hierarchical structures, including the Hornbostel-Sachs taxonomy versus random trees, on few-shot learning performance.
- To investigate the effectiveness of a novel weighted hierarchical cross-entropy loss in guiding the model to learn meaningful hierarchical representations.
Proposed method
- The method extends prototypical networks by computing prototypes at multiple granularities: fine-grained support examples are aggregated into higher-level metaprototypes using a hierarchical clustering-like process.
- A weighted hierarchical cross-entropy loss is introduced, where the loss is scaled by a learnable parameter α to emphasize either fine-grained or coarse-grained classification, with α ∈ {−1, −0.5, 0, 0.5, 1}.
- The hierarchical structure is modeled as a tree, with prototypes propagated upward from leaf nodes (specific instruments) to parent nodes (broad categories like 'chordophones').
- The model is trained end-to-end using episodic training, where each episode samples N classes with K support examples per class, and predictions are made using cosine similarity to prototypes.
- The method supports dynamic vocabulary expansion: new instrument classes can be added with only a few examples, leveraging ancestral relationships in the hierarchy.
- The Hornbostel-Sachs taxonomy is used as the canonical hierarchy, but ablation studies also evaluate random tree structures to assess robustness.
Experimental results
Research questions
- RQ1Can incorporating a hierarchical structure into few-shot learning improve classification accuracy and reduce mistake severity on unseen musical instrument classes?
- RQ2Does a hierarchical loss function that emphasizes both coarse and fine-grained categories lead to better generalization than a flat, multilabel cross-entropy baseline?
- RQ3How does the choice of hierarchy (e.g., Hornbostel-Sachs vs. random trees) affect few-shot performance and generalization to out-of-distribution instruments?
- RQ4To what extent can a model leverage shared ancestry in the instrument hierarchy to classify rare instruments like the zhongruan with only a few examples?
- RQ5Is the improvement due to the hierarchical structure itself, or can random trees achieve comparable performance?
Key findings
- The proposed method achieved a +16.56% relative improvement in F1 score for the zhongruan, a rare instrument not well-represented in Western music datasets.
- The model outperformed the non-hierarchical baseline on 18 out of 24 instrument classes in the test set, demonstrating broader generalization across diverse instrument types.
- The hierarchical loss with α = 1 (emphasizing fine-grained classes) yielded the best performance, significantly outperforming the flat binary cross-entropy baseline, which caused severe performance degradation.
- The Hornbostel-Sachs hierarchy significantly outperformed random tree structures: the 'random-best' hierarchy matched performance but failed to generalize in mistake severity, while 'random-worst' caused statistically significant performance drops (p < 0.005).
- The hierarchical prototype aggregation and loss function led to a statistically significant increase in classification accuracy and a significant decrease in mistake severity on unseen instrument classes.
- The method is robust and extensible: no architectural changes are needed, and new hierarchy levels can be added or removed easily.
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.