v0.2 — 455+ Pretrained Models on HuggingFace

Build, Train & Evaluate
Deepfake Audio Detectors

Clip-level detection and partial deepfake localization — one YAML config, swap frontends, backends, and losses with no code changes.

Raw Audio
Frontend
Backend
Loss
Score
Partial deepfake localization

Two detection modes

Same modular pipeline — different handling of the time axis.

Branch: master · PyPI

Clip-level

One label per utterance. Is the whole clip real or fake?

  • Raw audio → Frontend → Backend pools time
  • CrossEntropy / OC-Softmax → one score
  • Metrics: EER, minDCF, ACC
Clip-level documentation
Install & train
pip install deepfense

# Or from source (master)
git clone https://github.com/Yaselley/deepfense-framework
cd deepfense-framework
pip install -e .

deepfense train --config deepfense/config/train.yaml
Branch: deepfense-partial

Partial deepfake

Dense frame labels. Where is the spoof in the clip?

  • Raw audio → Frontend → FrameMLP / GMLP keeps time
  • FramewiseCrossEntropy → score per frame
  • Metrics: FRAME_F1, Range EER, Segment EER, MULTIRES_EER
Partial deepfake documentation
Install & train
git clone https://github.com/Yaselley/deepfense-framework
cd deepfense-framework
git fetch origin
git checkout deepfense-partial
pip install -e .

deepfense train --config deepfense/config/experiments/temporal_deepfake_example.yaml

Why DeepFense?

Everything you need for deepfake audio detection research, in one framework.

Modular Design

Swap Wav2Vec2 for WavLM, or AASIST for MLP, with a single line of YAML. All components are decoupled and interchangeable.

Configuration-Driven

Define model architecture, data pipeline, augmentations, loss functions, and training schedule in one YAML file.

HuggingFace Integration

Download any of 455+ pretrained models and 12 benchmark datasets with a single CLI command.

Standardized Metrics

Clip-level: EER, minDCF, actDCF, F1. Partial branch: framewise metrics plus Range EER and Segment EER for localization.

Rich Augmentations

Built-in RawBoost, RIR, Codec, AdditiveNoise, SpeedPerturb, AddBabble, DropFreq, DropChunk, and more.

Reproducible Research

Configs are saved with every experiment. Same seed + same config = identical results.

Core Modules

All components are plug-and-play via the registry pattern. Use built-in ones or add your own.

Frontends

Pretrained SSL feature extractors

  • Wav2Vec 2.0
  • WavLM
  • HuBERT
  • MERT
  • EAT

Backends

Classifier heads

  • AASIST
  • ECAPA-TDNN
  • Nes2Net
  • RawNet2
  • MLP
  • TCM
  • FrameMLP
  • GMLP

Loss Functions

Training objectives

  • CrossEntropy
  • OC-Softmax
  • AM-Softmax
  • A-Softmax
  • FramewiseCE

Augmentations

Data augmentation pipeline

  • RawBoost
  • RIR
  • Codec
  • AdditiveNoise
  • SpeedPerturb
  • AddBabble
  • DropFreq
  • DropChunk

Metrics

Evaluation metrics

  • EER
  • minDCF
  • FRAME_F1
  • Range EER
  • Segment EER

Optimizers

Optimization & scheduling

  • Adam
  • AdamW
  • SGD
  • CosineAnnealing
  • StepLR

DeepFense Hugging Face

455+ pretrained models and 12 benchmark datasets, ready to download.

455+ Pretrained Models

Checkpoints across 12 datasets, multiple frontends (WavLM, Wav2Vec2, EAT, MERT), backends (AASIST, Nes2Net, MLP, TCM), and seeds.

deepfense download model ASV19_WavLM_Nes2Net_NoAug_Seed42

12 Benchmark Datasets

ASVSpoof19, CompSpoof, DECRO, SONICS, SpeechFake, WaveFake, FakeMusicCaps, and more — as ready-to-use Parquet files.

deepfense download dataset CompSpoof

Browse & Filter

Search for models by frontend, backend, dataset, or seed from the CLI. Download the config and checkpoint in one command.

deepfense download list-models --filter WavLM

Get Started

Install, download, and train in under 5 minutes.

1. Install
pip install deepfense
Or install from source
git clone https://github.com/Yaselley/deepfense-framework
cd deepfense-framework
pip install -e .
2. Download a dataset & model
deepfense download dataset CompSpoof
deepfense download model ASV19_WavLM_Nes2Net_NoAug_Seed42
3. Train
deepfense train --config deepfense/config/train.yaml
4. Test
deepfense test \
    --config models/ASV19_WavLM_Nes2Net_NoAug_Seed42/config.yaml \
    --checkpoint models/ASV19_WavLM_Nes2Net_NoAug_Seed42/best_model.pth
5. List all components
deepfense list

Full documentation with tutorials, config reference, and extension guides.

Clip-level docs Partial deepfake docs PyPI

Open Source

DeepFense is Apache 2.0 licensed. Contributions welcome — add new models, datasets, augmentations, or improvements.

Contribute on GitHub