All models

Cacophony

A contrastive audio-text model pairing an MAE-pretrained spectrogram ViT with a RoBERTa-style text encoder.

Multimodal · 895 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 (27 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
289.3M
Operations
895
Framework
PyTorch
Recurrent
No
Published
IEEE/ACM Transactions on Audio, Speech, and Language Processing (arXiv 2024)
Cited by
15 (as of 28 October 2026)
Authors
Ge Zhu, Jordan Darefsky, Zhiyao Duan
License
MIT
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
m15220
Graph hash
9f1ce1aba7e987d844a8d781095bff99e2f8f02164441bdb6ab118821135253d
Skeleton hash
8bd13df499558237004f34d9ca29ebb0a3684c5566606d17c5992c700672f3f2
Architecture hash
fbbb62f20a8b4de001cdbdce4a586e8aea92d4f53774b8853d91d21a6635d8bb
Diagram SHA-256
71c7adb8ddbe45b7e81f26327c6cab2a616845409ab0e87b21b3d3a334ec3bc2
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

Cacophony is a contrastive audio-text model whose authors start from the observation that audio-text models still lag behind their image-text counterparts in scale and performance. The paper works on both the data and the training procedure, beginning with a dataset of 13,000 hours of text-labeled audio.

Training has two stages, and the first trains a spectrogram-based audio encoder with a masked autoencoder (MAE) objective, masking random patches of the input spectrogram and then reconstructing them. The second stage adds a text encoder and decoder and trains a contrastive model with an auxiliary captioning objective, in a setup the paper describes as similar to BLIP and CoCa. The audio encoder is a 12-layer ViT-Base Transformer with 8 attention heads and a hidden size of 768. The text encoder follows the RoBERTa architecture and is initialized with the RoBERTa pretrained weights, but applies causal self-attention instead of bidirectional self-attention. To get a single embedding vector for each modality, multi-head attention poolers sit on top of the sequential outputs of the two encoders.

The paper reports leading results on audio-text retrieval tasks at the time of publication, and competitive results on the HEAR benchmark and on other downstream tasks such as zero-shot classification. The original implementation uses Jax and Flax, and the repository also carries a Torch model.

Key idea. Cacophony pretrains its audio encoder with a masked autoencoder objective, then trains a contrastive audio-text model with an auxiliary captioning objective.

  • Cacophony
  • CaCo
  • contrastive audio-text model
  • audio-text retrieval
  • audio-language embedding
  • zero-shot audio classification
  • audio captioning
  • joint audio-text embedding

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

Cite the paper

@misc{zhu2024cacophonyimprovedcontrastiveaudiotext,
      title={Cacophony: An Improved Contrastive Audio-Text Model}, 
      author={Ge Zhu and Jordan Darefsky and Zhiyao Duan},
      year={2024},
      eprint={2402.06986},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2402.06986}, 
}