[Paper Review] Toward Interpretable Music Tagging with Self-Attention
Proposes a self-attention based back-end for music tagging with CNN front-ends, achieving competitive results and offering interpretable attention visualizations.
Self-attention is an attention mechanism that learns a representation by relating different positions in the sequence. The transformer, which is a sequence model solely based on self-attention, and its variants achieved state-of-the-art results in many natural language processing tasks. Since music composes its semantics based on the relations between components in sparse positions, adopting the self-attention mechanism to solve music information retrieval (MIR) problems can be beneficial. Hence, we propose a self-attention based deep sequence model for music tagging. The proposed architecture consists of shallow convolutional layers followed by stacked Transformer encoders. Compared to conventional approaches using fully convolutional or recurrent neural networks, our model is more interpretable while reporting competitive results. We validate the performance of our model with the MagnaTagATune and the Million Song Dataset. In addition, we demonstrate the interpretability of the proposed architecture with a heat map visualization.
Motivation & Objective
- Motivate modeling long-term musical context beyond local spectro-temporal features.
- Explore self-attention as a back-end to improve interpretability in music tagging.
- Compare spectrogram-based and raw-audio front-ends with attention-based back-ends.
- Demonstrate visual interpretability through attention heat maps and tag-wise contribution maps.
Proposed method
- Use two front-ends: Spectrogram-based (Spec) with vertical/horizontal filters and Raw waveform-based front-end (Raw).
- Employ back-ends: CNN P (spectrogram back-end from Pons et al.), CNN L (sample-level CNN back-end), and Att (multi-head self-attention back-end).
- Integrate a front-end on top of a self-attention back-end where each time-bin feature acts as a token for attention.
- Adopt a SWATS-inspired optimization: start with ADAM for 60 epochs, then switch to SGD with momentum, selecting best validation AUROC for switching.
- Train and evaluate on MagnaTagATune (MTAT) and Million Song Dataset (MSD) using AUROC and AUPR metrics.
Experimental results
Research questions
- RQ1Can a self-attention based back-end capture long-range musical structure for multi-label tagging?
- RQ2Does replacing conventional RNN/CNN back-ends with a self-attention back-end retain competitive performance on MTAT and MSD?
- RQ3Do attention visualizations provide interpretable insights into which audio regions support tags?
Key findings
- Att back-end with Spec front-end achieves competitive AUROC and AUPR on MTAT and MSD compared to baselines.
- Attention-based models require careful tuning (2 attention layers, 8 heads) for best performance.
- Longer input sequences (≈16.4s) yield comparable results to shorter inputs, with increased memory usage.
- Attention heat maps show model focus on audio-event regions, including strong responses to non-target regions in quiet tags.
- Tag-wise contribution heat maps help identify input regions most relevant to specific tags.
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.