--- license: apache-2.0 tags: - audio - anti-spoofing - deepfake-detection - speech-anti-spoofing-arena library_name: pytorch --- # DeepFense-CodecFake-W2V2-MLP: Speech Anti-Spoofing Arena wrapper Packaged for the [Speech Anti-Spoofing Arena](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena) from the authors' [code](https://github.com/Yaselley/deepfense-framework/tree/3f2fe1146c48ea4bacc480dd96d806b6c72c09cf) and [paper](https://arxiv.org/abs/2604.08450). DeepFense (Kheir et al., 2026) CodecFake recipe: a fully fine-tuned wav2vec 2.0 XLS-R 300M front-end (last transformer layer, features_only) followed by an MLP back-end (Linear 1024->128, LayerNorm, ReLU, mean pooling over time) and a 2-way linear CrossEntropy head. Trained on the Codecfake corpus (Xie et al., AISHELL-3/VCTK-based codec re-synthesis) without data augmentation, seed 42; the released best_model.pth (epoch 2) as is. Input as the DeepFense eval pipeline: raw float waveform (no normalisation), first 64000 samples (4 s), shorter clips repeat-padded. score = logit(bonafide) - logit(spoof); FP32. - Weights: **not re-hosted** (the authors grant no license for them). Get the authors' [checkpoint](https://huggingface.co/DeepFense/CodecFake_Wav2Vec2_MLP_NoAug_Seed42/blob/c08bd2125c83e6c8fdc64566bfbfda18dff4dfb4/best_model.pth); its sha256 is in the `meta.yaml` notes. - Params: 317.522306 M. Trained on Codecfake (Xie et al.) train, no augmentation. - Score: higher = bona fide. J-SPAW_LA was scored with the PyTorch wrapper; the other datasets with the TensorRT drop-in class (FP32 on the RTX 4070 Ti SUPER; FP32 on the RTX 5060 Ti), which matched PyTorch on the full J-SPAW_LA set. ## Arena results [![arena tier](https://img.shields.io/endpoint?url=https://speechantispoofingbenchmarks-speechantispoofingarena.hf.space/badge/deepfense-codecfake-w2v2-mlp/tier.json)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![arena rank](https://img.shields.io/endpoint?url=https://speechantispoofingbenchmarks-speechantispoofingarena.hf.space/badge/deepfense-codecfake-w2v2-mlp/rank.json)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) 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% 4.2 on ASVspoof2019_LA](https://img.shields.io/badge/EER%25%20on%20ASVspoof2019__LA-4.2%25-green)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 16.3 on ASVspoof2021_LA](https://img.shields.io/badge/EER%25%20on%20ASVspoof2021__LA-16.3%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 6.08 on ASVspoof2021_DF](https://img.shields.io/badge/EER%25%20on%20ASVspoof2021__DF-6.08%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 24.54 on ASVspoof5](https://img.shields.io/badge/EER%25%20on%20ASVspoof5-24.54%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 8.08 on InTheWild](https://img.shields.io/badge/EER%25%20on%20InTheWild-8.08%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 5.06 on ADD22_eval_31](https://img.shields.io/badge/EER%25%20on%20ADD22__eval__31-5.06%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 21.27 on ADD2023_track12_test_r1](https://img.shields.io/badge/EER%25%20on%20ADD2023__track12__test__r1-21.27%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 9.61 on CFAD](https://img.shields.io/badge/EER%25%20on%20CFAD-9.61%25-yellow)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 2.65 on CD-ADD](https://img.shields.io/badge/EER%25%20on%20CD--ADD-2.65%25-green)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 10.24 on CVoiceFake_small](https://img.shields.io/badge/EER%25%20on%20CVoiceFake__small-10.24%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 18.67 on DeepVoice](https://img.shields.io/badge/EER%25%20on%20DeepVoice-18.67%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 1.21 on LibriSeVoc](https://img.shields.io/badge/EER%25%20on%20LibriSeVoc-1.21%25-brightgreen)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 18.03 on SONAR](https://img.shields.io/badge/EER%25%20on%20SONAR-18.03%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 20.71 on ArAD](https://img.shields.io/badge/EER%25%20on%20ArAD-20.71%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 11.11 on DECRO](https://img.shields.io/badge/EER%25%20on%20DECRO-11.11%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 0.62 on J-SPAW_LA](https://img.shields.io/badge/EER%25%20on%20J--SPAW__LA-0.62%25-brightgreen)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 13.15 on ODSS](https://img.shields.io/badge/EER%25%20on%20ODSS-13.15%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 2.74 on HABLA](https://img.shields.io/badge/EER%25%20on%20HABLA-2.74%25-green)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 1.06 on DFADD](https://img.shields.io/badge/EER%25%20on%20DFADD-1.06%25-brightgreen)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 10.87 on PyAra](https://img.shields.io/badge/EER%25%20on%20PyAra-10.87%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 13.79 on XMAD](https://img.shields.io/badge/EER%25%20on%20XMAD-13.79%25-lightgrey)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![EER% 0.55 on EmoFake_test](https://img.shields.io/badge/EER%25%20on%20EmoFake__test-0.55%25-brightgreen)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![SRR COMPLEMENT 66.94 on EmoSpoofTTS](https://img.shields.io/badge/SRR%20COMPLEMENT%20on%20EmoSpoofTTS-66.94%25-blue)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) [![SRR COMPLEMENT 7.29 on LRLspoof](https://img.shields.io/badge/SRR%20COMPLEMENT%20on%20LRLspoof-7.29%25-blue)](https://huggingface.co/spaces/SpeechAntiSpoofingBenchmarks/SpeechAntiSpoofingArena?system=deepfense-codecfake-w2v2-mlp) ## Citation ```bibtex @article{kheir2026deepfense, title={DeepFense: A Unified, Modular, and Extensible Framework for Robust Deepfake Audio Detection}, author={Kheir, Yassine El and Das, Arnab and Xiao, Yixuan and Wang, Xin and Kallel, Feidi and Erdogan, Enes Erdem and Vu, Ngoc Thang and Polzehl, Tim and Moeller, Sebastian}, journal={arXiv preprint arXiv:2604.08450}, year={2026} } ```