All models

music2vec

Self-supervised speech encoder that regresses a teacher's contextualized representations from masked audio.

Audio and speech · 376 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (35 KB)

Open in a new tab

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

Parameters
93.2M
Operations
376
Framework
PyTorch
Recurrent
No
Published
ICML 2022
Cited by
231 (as of 19 October 2026)
Authors
Alexei Baevski, Wei-Ning Hsu, Qiantong Xu and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m13012
Graph hash
72a2ade8dcce12cf413fe793bdb7cf64343b09836e9b3c5902d617766cfbc5b4
Skeleton hash
35c88e18cc0114f39dd422d0d7a6b9731d2ac6eb08e4a8474cab5d0c421acf60
Architecture hash
f932307edd7a877929e31185443d40fced0f2230ecca59d7c0959c168c3f490e
Diagram SHA-256
450d168dade904343f373f4c9e5a5aec2175ae6984ffad4d9b0709eb67fac80b
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

Music2Vec keeps the data2vec audio architecture but is a completely unsupervised model trained on 1000 hour music audios.

About this model's family

data2vec is a self-supervised learning framework that applies one learning method to speech, natural language processing and computer vision. Instead of predicting words, visual tokens or units of speech, it predicts contextualized latent representations that contain information from the entire input from a masked view of that input. A teacher copy of the Transformer encodes the unmasked sample, its weights an exponentially moving average of the student, and the student regresses the average of the top K teacher layers for the masked time-steps.

For speech, the input is a 16 kHz waveform processed by a feature encoder of seven temporal convolutions with 512 channels. Unlike wav2vec 2.0, data2vec directly predicts contextualized latent representations without quantization, and unlike HuBERT it predicts the average over multiple layers rather than discretized units. On Librispeech test-other the paper reports improvements for most labeled data setups, with the largest gain at 10 minutes of labeled data, a 20% relative word error rate improvement for the Base models.

Music2Vec applies the same recipe to music audio, following the standard pretraining protocols of data2vec with the fairseq framework. With 95M parameters, the card reports performance comparable to the Jukebox-5B representation on music information retrieval tasks at under 2% of its size. The music paper found that the CNN representations sometimes outperform the Transformer layers, especially for key detection.

Key idea. A single masked self-distillation objective, regressing contextualized teacher representations, works across speech, vision and language and improves speech recognition in low-resource Libri-light setups.

  • data2vec
  • data2vec-audio
  • data2vec speech
  • music2vec
  • map-music2vec
  • self-supervised learning
  • speech representation
  • audio pretraining
  • masked prediction
  • self-distillation

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{baevski2022data2vecgeneralframeworkselfsupervised,
      title={data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language}, 
      author={Alexei Baevski and Wei-Ning Hsu and Qiantong Xu and Arun Babu and Jiatao Gu and Michael Auli},
      year={2022},
      eprint={2202.03555},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2202.03555}, 
}