arXiv HuggingFace License Made with Python

AudioMosaic: Contrastive Masked Audio Representation Learning

Code: https://github.com/HanxunH/AudioMosaic

Pretrained encoder: hanxunh/AudioMosaic-vit-b16-pretrained


AudioMosaic — EnvSDD (TTA) Spoof Detector

This is the AudioMosaic ViT-B/16 encoder fine-tuned on the EnvSDD (TTA) train split for binary real/fake environmental-sound spoof detection. Evaluated on four test splits.

Test Split EER (%)
test01 0.00
test02 0.06
test03 0.37
test04 4.50

EER values are reported as percentages; lower is better.

Model Details

  • Architecture: ViT-B/16 with linear classifier head (2-way)
  • Embedding dim: 768, Depth: 12, Heads: 12
  • Input: log-mel spectrogram of size 1024 × 128
  • Patch size: 16 × 16
  • Pooling: average over patch tokens
  • Classes: 2 (real vs fake)
  • Training condition: TTA

Model Usage

import sys, torch
from huggingface_hub import snapshot_download

local_dir = snapshot_download("hanxunh/AudioMosaic-vit-b16-finetune-envsdd-tta")
sys.path.insert(0, local_dir)

from load_model import load_classifier
model = load_classifier(device="cuda")

# Forward a log-mel spectrogram batch of shape [B, 1, 1024, 128]
fbank = torch.randn(2, 1, 1024, 128).cuda()
with torch.no_grad():
    logits = model(fbank)        # [B, 2]
    probs  = logits.softmax(-1)  # [P(real), P(fake)]

The release contains:

  • model.safetensors — fine-tuned classifier weights
  • config.json — architecture hyperparameters
  • modeling.py — vendored model architecture (no need to install AudioMosaic)
  • load_model.py — convenience loader

Required dependencies: torch, timm, torchlibrosa, safetensors, huggingface_hub.


Citation

@inproceedings{huang2026audiomosaic,
  title={AudioMosaic: Contrastive Masked Audio Representation Learning},
  author={Hanxun Huang and Qizhou Wang and Xingjun Ma and Cihang Xie and Christopher Leckie and Sarah Erfani},
  booktitle={ICML},
  year={2026}
}
Downloads last month
9
Safetensors
Model size
85.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for hanxunh/AudioMosaic-vit-b16-finetune-envsdd-tta

Finetuned
(14)
this model

Collection including hanxunh/AudioMosaic-vit-b16-finetune-envsdd-tta

Paper for hanxunh/AudioMosaic-vit-b16-finetune-envsdd-tta

Evaluation results