All models

audio-spectrogram-transformer

A Vision Transformer pointed at spectrograms: convolution-free audio classification.

Audio and speech · 303 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 (29 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
86.2M
Operations
303
Framework
PyTorch
Recurrent
No
Published
2021
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
m3550
Graph hash
302eba5b5fba8947159dac8ec5bd7ba37ab23b940dd342d82cd2eb54d7b2fcd2
Skeleton hash
6861ba2c190e68105f34e05f220c38f64a44124eea43ddf9ce1fe15d3e66d1d3
Architecture hash
6b9820bde4d06ca11be2ffa546397de316d54f1fef5553da5a2c121533c93a24
Diagram SHA-256
4a149d854105438010bd1c67b35b2ed643cfdc990e86f008d539369fbf1c3fae
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

How this diagram was made

transformers.ASTModel()

What it is

About this model's family

The Audio Spectrogram Transformer, usually shortened to AST, is an audio classifier that treats sound as a picture: it applies a Vision Transformer to audio by first turning the audio into an image, a spectrogram. It was proposed by Yuan Gong, Yu-An Chung and James Glass in the paper AST: Audio Spectrogram Transformer. The question the paper asks is whether audio classifiers really need a convolutional network at all, or whether a network purely based on attention is enough.

Their answer is AST, described as the first convolution-free, purely attention-based model for audio classification. It reached 0.485 mAP on AudioSet, 95.6% accuracy on ESC-50 and 98.1% accuracy on Speech Commands V2. One practical quirk: AST wants a low learning rate, 10 times smaller than the one the authors used for their CNN model. The feature extractor normalises inputs to a mean of 0 and a standard deviation of 0.5, using the AudioSet statistics by default.

Key idea. AST is the first convolution-free, purely attention-based model for audio classification.

  • audio spectrogram transformer
  • ast
  • audio classification
  • spectrogram transformer
  • vision transformer for audio
  • audioset
  • esc-50
  • speech commands
  • acoustic scene transformer

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