--- license: mit tags: - audio - anti-spoofing - audio-deepfake-detection - speech - asvspoof - multi-view --- # AMSDF **Audio Multi-view Spoofing Detection Framework (AMSDF)** (Wu et al., IEEE TIFS 2024). AMSDF captures intra- and inter-view spoofing cues from **audio–text–emotion correlations**: an XLS-R (wav2vec2-xls-r-300m) **text view**, an ACRNN **emotion view** (logfbank + delta + delta²), and a raw-audio **graph view**, fused by heterogeneous graph attention with a group-based readout. The model takes a raw speech waveform (and a derived emotion spectrogram) and returns a score where **higher = more bona fide**. - **Original code:** https://github.com/ItzJuny/AMSDF - **Paper:** https://ieeexplore.ieee.org/document/10605761 (IEEE TIFS 2024) - **Original authors:** Junyan Wu, Qilin Yin, Ziqi Sheng, Wei Lu, Jiwu Huang, Bin Li - **Parameters:** ~325.4 M - **Checkpoint:** [`M1.pth`](./M1.pth) (the authors' best-EER seed; M2/M3 also released) This repo is self-contained for inference: the multi-view network is vendored in [`models/`](./models), the builder in [`_net.py`](./_net.py), and the exact wrapper in [`amsdf.py`](./amsdf.py). ## Arena results [![arena tier](https://img.shields.io/endpoint?url=https://speechantispoofingbenchmarks-speechantispoofingarena.hf.space/badge/amsdf/tier.json)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![arena rank](https://img.shields.io/endpoint?url=https://speechantispoofingbenchmarks-speechantispoofingarena.hf.space/badge/amsdf/rank.json)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) EER% (lower is better); EmoSpoofTTS and LRLspoof are spoof-only and use 1-SRR% at the model's DeepVoice EER threshold. Per-dataset scores are under `.eval_results/`. [![EER% 0.3 on ASVspoof2019_LA](https://img.shields.io/badge/EER%25%20on%20ASVspoof2019__LA-0.3%25-brightgreen)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 7.83 on ASVspoof2021_LA](https://img.shields.io/badge/EER%25%20on%20ASVspoof2021__LA-7.83%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 5.28 on ASVspoof2021_DF](https://img.shields.io/badge/EER%25%20on%20ASVspoof2021__DF-5.28%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 20.4 on ASVspoof5](https://img.shields.io/badge/EER%25%20on%20ASVspoof5-20.4%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 18.44 on InTheWild](https://img.shields.io/badge/EER%25%20on%20InTheWild-18.44%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 18.78 on ADD22_eval_31](https://img.shields.io/badge/EER%25%20on%20ADD22__eval__31-18.78%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 27.54 on ADD2023_track12_test_r1](https://img.shields.io/badge/EER%25%20on%20ADD2023__track12__test__r1-27.54%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 23.25 on CFAD](https://img.shields.io/badge/EER%25%20on%20CFAD-23.25%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 16.63 on CD-ADD](https://img.shields.io/badge/EER%25%20on%20CD--ADD-16.63%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 15.6 on CVoiceFake_small](https://img.shields.io/badge/EER%25%20on%20CVoiceFake__small-15.6%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 46.15 on DeepVoice](https://img.shields.io/badge/EER%25%20on%20DeepVoice-46.15%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 5.6 on LibriSeVoc](https://img.shields.io/badge/EER%25%20on%20LibriSeVoc-5.6%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 39.25 on SONAR](https://img.shields.io/badge/EER%25%20on%20SONAR-39.25%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 34.8 on ArAD](https://img.shields.io/badge/EER%25%20on%20ArAD-34.8%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 14.99 on DECRO](https://img.shields.io/badge/EER%25%20on%20DECRO-14.99%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 21.75 on J-SPAW_LA](https://img.shields.io/badge/EER%25%20on%20J--SPAW__LA-21.75%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 31.9 on ODSS](https://img.shields.io/badge/EER%25%20on%20ODSS-31.9%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 4.07 on HABLA](https://img.shields.io/badge/EER%25%20on%20HABLA-4.07%25-green)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 18.5 on DFADD](https://img.shields.io/badge/EER%25%20on%20DFADD-18.5%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 19.24 on PyAra](https://img.shields.io/badge/EER%25%20on%20PyAra-19.24%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 21.74 on XMAD](https://img.shields.io/badge/EER%25%20on%20XMAD-21.74%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![EER% 3.29 on EmoFake_test](https://img.shields.io/badge/EER%25%20on%20EmoFake__test-3.29%25-green)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![1-SRR% 81.08 on EmoSpoofTTS](https://img.shields.io/badge/1--SRR%25%20on%20EmoSpoofTTS-81.08%25-blue)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) [![1-SRR% 38.96 on LRLspoof](https://img.shields.io/badge/1--SRR%25%20on%20LRLspoof-38.96%25-blue)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=amsdf) ## Architecture & inference notes - **Two inputs** computed by the wrapper from each waveform: the raw waveform (text + audio views) and an emotion spectrogram `(3, 300, 40)` = logfbank(40) + Δ + Δ² (first 300 frames), as in the upstream `data_io.extract_mel`. - **Score = `P(real) − P(fake)`** (`out[:,0] − out[:,1]`). The repo's label convention is class 0 = real, class 1 = fake, so the bonafide score is the *negative* of the repo's reported `out[:,1]`. - Input: raw float32 mono @ 16 kHz, first-**64600**-sample (≈4 s) window (tile-repeat if shorter). FP32. - Requires the public XLS-R `xlsr2_300m.pt` and the emotion model `ser_acrnn.pth` in `pretrained_models/` (loaded at construction; the M*.pth checkpoint then overwrites the fine-tuned weights). The fairseq XLS-R is loaded via `merge_with_parent` (cross-fairseq-version fix). ## Credits All model design and weights are the work of the original AMSDF authors (https://github.com/ItzJuny/AMSDF). This repository only packages their released checkpoint for the Speech Anti-Spoofing Arena. ```bibtex @article{wu2024audio, author = {Wu, Junyan and Yin, Qilin and Sheng, Ziqi and Lu, Wei and Huang, Jiwu and Li, Bin}, journal = {IEEE Transactions on Information Forensics and Security}, title = {Audio Multi-view Spoofing Detection Framework Based on Audio-Text-Emotion Correlations}, year = {2024}, volume = {19}, pages = {7133--7146}, doi = {10.1109/TIFS.2024.3431888} } ```