Papers › SSAST: Self-Supervised Audio Spectrogram Transformer

SSAST: Self-Supervised Audio Spectrogram Transformer

19 Oct 2021arXiv:2110.09784archive 2025-07-28

Yuan Gong, Cheng-I Jeff Lai, Yu-An Chung, James Glass

Recently, neural networks based purely on self-attention, such as the Vision Transformer (ViT), have been shown to outperform deep learning models constructed with convolutional neural networks (CNNs) on various vision tasks, thus extending the success of Transformers, which were originally developed for language processing, to the vision domain. A recent study showed that a similar methodology can also be applied to the audio domain. Specifically, the Audio Spectrogram Transformer (AST) achieves state-of-the-art results on various audio classification benchmarks. However, pure Transformer models tend to require more training data compared to CNNs, and the success of the AST relies on supervised pretraining that requires a large amount of labeled data and a complex training pipeline, thus limiting the practical usage of AST. This paper focuses on audio and speech classification, and aims to reduce the need for large amounts of labeled data for AST by leveraging self-supervised learning using unlabeled data. Specifically, we propose to pretrain the AST model with joint discriminative and generative masked spectrogram patch modeling (MSPM) using unlabeled audio from AudioSet and Librispeech. We evaluate our pretrained models on both audio and speech classification tasks including audio event classification, keyword spotting, emotion recognition, and speaker identification. The proposed self-supervised framework significantly boosts AST performance on all tasks, with an average improvement of 60.9%, leading to similar or even better results than a supervised pretrained AST. To the best of our knowledge, it is the first patch-based self-supervised learning framework in the audio and speech domain, and also the first self-supervised learning framework for AST.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2110.09784")

Code

Syntology Ran 11 of 16 code samples harvested from 2 repositories linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · honoured contract; 10 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 15 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

YuanGongND/ssast officialmentioned in papermentioned on GitHubpytorch report
YuanGongND/ast mentioned on GitHubpytorchBSD-3-Clause report
siavashshams/ssamba mentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 11 ran; 1 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
10ran
5unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_sinusoid_encoding YuanGongND/ssast/src/models/ast_models.py official repository ran · honoured contract fingerprinted BSD-3-Clause (permissive) · ced6bc2bfdfe0059 · report
calculate_stats YuanGongND/ast/src/utilities/stats.py community (archive-listed) ran BSD-3-Clause (permissive) · 571ae4f8e76e6bc8 · report
computeMatchmap YuanGongND/ast/src/utilities/util.py community (archive-listed) ran fingerprinted BSD-3-Clause (permissive) · 5ee11f4af0d2fc1e · report
d_prime YuanGongND/ast/src/utilities/stats.py community (archive-listed) ran fingerprinted BSD-3-Clause (permissive) · e469cef4384ff73a · report
get_immediate_subdirectories YuanGongND/ast/egs/esc50/prep_esc50.py community (archive-listed) ran BSD-3-Clause (permissive) · e217fb47bef3abe4 · report
lookup_list YuanGongND/ast/src/dataloader.py community (archive-listed) ran BSD-3-Clause (permissive) · c15efdd12442aeb4 · report
make_index_dict YuanGongND/ast/src/dataloader.py community (archive-listed) ran BSD-3-Clause (permissive) · a8fb3f62e2a901d7 · report
make_index_dict YuanGongND/ast/egs/audioset/gen_weight_file.py community (archive-listed) ran BSD-3-Clause (permissive) · ad2738e74fab6072 · report
make_name_dict YuanGongND/ast/src/dataloader.py community (archive-listed) ran BSD-3-Clause (permissive) · cbf115a314bcd23e · report
matchmapSim YuanGongND/ast/src/utilities/util.py community (archive-listed) ran BSD-3-Clause (permissive) · 546678fcbd2854db · report
validate_ensemble YuanGongND/ast/src/traintest.py community (archive-listed) ran BSD-3-Clause (permissive) · ecb5ae1f3a358b96 · report
calc_recalls YuanGongND/ast/src/utilities/util.py community (archive-listed) unverified BSD-3-Clause (permissive) · 0bed13389f791924 · report
get_immediate_files YuanGongND/ast/egs/esc50/prep_esc50.py community (archive-listed) unverified BSD-3-Clause (permissive) · 5ea88601f05850d6 · report
load_label YuanGongND/ast/egs/audioset/inference.py community (archive-listed) unverified BSD-3-Clause (permissive) · 1c75a85694e30f0b · report
validate YuanGongND/ast/src/traintest.py community (archive-listed) unverified BSD-3-Clause (permissive) · 340de5fa0cf72870 · report
validate_wa YuanGongND/ast/src/traintest.py community (archive-listed) unverified BSD-3-Clause (permissive) · 731e6108d9bb81c8 · report

Tasks

Audio ClassificationClassificationEmotion RecognitionKeyword SpottingSelf-Supervised LearningSpeaker IdentificationSpoken Command Recognition

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Audio Classification Balanced Audio Set SSAST-PATCH Mean AP 31.0 #6 of 8 Archive leaderboard report
Audio Classification Balanced Audio Set SSAST-FRAME Mean AP 29.2 #7 of 8 Archive leaderboard report
Speaker Identification VoxCeleb1 SSAST-FRAME Accuracy 80.8 #9 of 12 Archive leaderboard report
Speaker Identification VoxCeleb1 SSAST-FRAME Top-1 (%) 80.8 #9 of 12 Archive leaderboard report
Speaker Identification VoxCeleb1 SSAST-PATCH Accuracy 64.2 #11 of 12 Archive leaderboard report
Speaker Identification VoxCeleb1 SSAST-PATCH Top-1 (%) 64.2 #11 of 12 Archive leaderboard report
Spoken Command Recognition Speech Command v2 SSAST-FRAME Accuracy 98.1 #1 of 4 Archive leaderboard report
Spoken Command Recognition Speech Command v2 SSAST-PATCH Accuracy 98.0 #3 of 4 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformerVision Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections