All models

clap (base audio text contrastive)

A contrastive model that embeds audio and text in a shared space for zero-shot audio classification.

Multimodal · 1,220 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 (16 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
153.5M
Operations
1,220
Framework
PyTorch
Recurrent
No
Published
ICASSP 2023
Cited by
451 (as of 20 October 2026)
Authors
Yusong Wu, Ke Chen, Tianyu Zhang and others
Name in source
clap:base-audio-text-contrastive
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
m3779
Graph hash
ee5e61eb92ce5712d2dcfcc0d0f0d55f93f690f9684a65b019051d951cdad76c
Skeleton hash
58f2e7cf53296302e522be20f8aa93d4893dd69a61eeef5a16a4be8b35bf77f1
Architecture hash
2be4da897a9a136dda7b32c786b3157d5919351689da83b634eb1404976119aa
Diagram SHA-256
eac26da8004ccef4c274f2f8c4950bf6ddec2a90ebc9f61aab31259bf6cafbf9
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

CLAP is a contrastive language-audio pretraining model: it learns an audio representation by combining audio data with natural language descriptions. An audio encoder and a text encoder process their inputs separately, and 2-layer MLPs with ReLU activation map both outputs into 512 dimensions. The model can be used for zero-shot audio classification or for extracting audio and text features.

The paper tried two audio encoders, PANN and HTSAT, and three text encoders, the CLIP transformer, BERT and RoBERTa, and took HTSAT with RoBERTa as its best setting. HTSAT is a transformer-based model with 4 groups of swin-transformer blocks. Training is contrastive between paired audio and text embeddings, with a learnable temperature that scales the loss.

For audio of variable length the paper adds feature fusion, which combines coarse global information with randomly sampled local information; without it, audio longer than 10 seconds is randomly chunked to a 10-second segment. The authors also released LAION-Audio-630K, a collection of 633,526 audio-text pairs.

Key idea. The paper builds a contrastive language-audio pretraining model with feature fusion and keyword-to-caption augmentation, and releases LAION-Audio-630K, a collection of 633,526 audio-text pairs.

  • clap
  • laion clap
  • laion-clap
  • contrastive language-audio pretraining
  • clap-htsat-unfused
  • zero-shot audio classification
  • text-to-audio retrieval
  • audio-text embedding
  • audio representation

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

Cite the paper

@misc{wu2024largescalecontrastivelanguageaudiopretraining,
      title={Large-scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentation}, 
      author={Yusong Wu and Ke Chen and Tianyu Zhang and Yuchen Hui and Marianna Nezhurina and Taylor Berg-Kirkpatrick and Shlomo Dubnov},
      year={2024},
      eprint={2211.06687},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2211.06687}, 
}