USAD 2.0 is a bidirectional transformer-based universal audio encoder that extracts useful representations across multiple audio domains (speech/sound/music) by distilling from SSL/supervised audio foundation models without labeled data. USAD 2.0 achieves strong or state-of-the-art performance across probing (
HEAR and
MARBLE) and LLM-based evaluations (
XARES-LLM).
1import torch
2from transformers import AutoModel
3
4# Load pre-trained model
5model = AutoModel.from_pretrained(
6 "MIT-SLS/USAD2-Small", trust_remote_code=True
7).cuda().eval()
8
9# Model properties
10model.sample_rate # required audio sample rate
11model.encoder_frame_rate # frames per second (Hz)
12model.mel_dim # mel feature dimension
13model.encoder_dim # hidden dimension
14model.num_layers # number of encoder layers
15model.device # device
16model.dtype # dtype
17
18# Model methods
19model.set_audio_chunk_size(30.0) # audio will be chunked if exceeds 30 seconds (default 30s)
20
21# Load audio and resample to 16kHz
22wavs, wav_lengths = model.load_audio_batch(["audio1.wav", "audio2.wav"])
23# wavs: raw waveforms (batch_size, max_wav_len)
24# wav_lengths: length of each sample (batch_size, )
25# You can also load waveforms directly with torchaudio.load
26
27# Extract features
28with torch.no_grad():
29 results = model(
30 wavs=wavs,
31 wav_lengths=wav_lengths,
32 target_layer=None, # None for last layer, or integer 1 ~ model.num_layers
33 )
34
35# result["x"]: model final output (batch_size, seq_len, encoder_dim)
36# result["x_lengths"]: valid output lengths after encoder subsampling
37# result["x_padding_mask"]: output padding mask, where padding is True
38# result["mel"]: mel fbank (batch_size, mel_len, mel_dim)
39# result["mel_lengths"]: valid mel lengths before encoder subsampling
40# result["hidden_states"]: list of (batch_size, seq_len, encoder_dim)
41# result["ffn"]: list of (batch_size, seq_len, encoder_dim)
1@inproceedings{chang2026usad2,
2 title={{USAD 2.0}: Scaling Representation Distillation for Universal Audio Understanding},
3 author={Chang, Heng-Jui and Liu, Alexander H. and Bhati, Saurabhchand and Athi, Mrudula and Ratnarajah, Anton and Chhetri, Amit and Glass, James},
4 booktitle={Interspeech},
5 year={2026}
6}
Our implementation is based on the awesome
facebookresearch/fairseq,
cwx-worst-one/EAT, and
sooftware/conformer repositories.