Music Tagging Transformer (MTT)
A CNN front end and Transformer back end that tags music audio with labels such as genre, mood and instrument.
Audio and speech · 165 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Audio and speech
- Parameters
- 4.6M
- Operations
- 165
- Framework
- PyTorch
- Recurrent
- No
- Published
- ISMIR 2021
- Cited by
- 25 (as of 28 October 2026)
- Authors
- Minz Won, Keunwoo Choi, Xavier Serra
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m18603
- Graph hash
- 10ae7195adac446041ccb8a88b48c36da70243b2f722020c60c28e52c8dddfa0
- Skeleton hash
- ecdc6239311c739ffd6195ec3e8db52bfb865fc54b131612ed0dff0e6a23e00b
- Architecture hash
- 676abd4e871e512d845bde47335312bd1d7aec695621793295d1a0f3fedf9d64
- Diagram SHA-256
- b10d5df4a5898269bfca09235135c117fb0b108c419595bf2696dbb81c7a0b41
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
Music Tagging Transformer predicts tags such as genre, mood and instrument for a music clip. It has two parts: shallow convolutional layers pick up local acoustic detail, and stacked self-attention layers summarize the resulting sequence over time. The front end is a three-layer CNN using 3 × 3 convolution filters with residual connections on mel spectrogram inputs. After a hyperparameter search the authors chose a back end of 4 layers, 256 attention dimensions and 8 attention heads.
The structure follows the earlier CNNSA model, with two changes in the front end: the CNN architecture and the reshaping layer. Where CNNSA max-pooled along the frequency axis at the end of its front end, this model reshapes instead, so the attention layers receive more detailed spectral information. Each element of the sequence passed to the Transformer corresponds to approximately 0.1 second of audio.
The paper also trains the model with noisy student training, a semi-supervised method that uses labeled and unlabeled data together with data augmentation. On the conventional Million Song Dataset split for top-50 tagging it reports ROC-AUC 0.8916 and PR-AUC 0.3358, and 0.8972 and 0.3479 with data augmentation. In the paper's input length experiment the short-chunk ResNet baseline lost accuracy as the audio input got longer, while the Music Tagging Transformer stayed consistent in general.
Key idea. The paper combines a shallow CNN front end with a Transformer back end for music tagging and improves it with noisy student training on labeled and unlabeled audio.
- music tagging transformer
- mtt
- semi-supervised music tagging transformer
- music tagging
- music auto-tagging
- audio classification
- noisy student training
- million song dataset
- music information retrieval
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{won2021semisupervisedmusictaggingtransformer,
title={Semi-Supervised Music Tagging Transformer},
author={Minz Won and Keunwoo Choi and Xavier Serra},
year={2021},
eprint={2111.13457},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2111.13457},
}