v1.0 Now Available

Build, Train and Evaluate
Deepfake Audio Detectors

An open-source, configuration-driven toolkit for audio deepfake detectors

Fundamental Building Blocks

DeepFense is built upon key concepts that enable flexible and powerful detection pipelines.

Modular Design

Decoupled architecture allows you to swap Wav2Vec2 for WavLM or AASIST for MLP with a single line of config.

Configuration-Driven

All hyperparameters, augmentation pipelines, and model architectures are defined in simple YAML files.

Advanced Augmentations

Built-in pipelines for RawBoost, RIR reverb, Codec simulation, Morph, AdditiveNoise, SpeedPerturb, AddBabble, DropFreq, DropChunk, and more to robustify your models.

Standardized Metrics

Automatic tracking of EER, minDCF, and F1-score with integrated WandB logging and checkpointing.

Smart Data Pipeline

Robust handling of variable-length audio with smart padding, unified dataset construction, and efficient collation.

Reproducible Research

Unified reporting protocols ensure every experiment is tractable, comparable, and fully reproducible.

Core Modules

Explore DeepFense's specialized components for building detection systems.

Frontends

  • Wav2Vec 2.0
  • WavLM
  • HuBERT
  • MERT
  • EAT

Backends

  • AASIST
  • ECAPA_TDNN
  • RawNet2
  • MLP
  • Pool
  • Nes2Net
  • TCM

Loss Functions

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

Optimizers

  • Adam
  • AdamW
  • SGD
  • RMSprop
  • SAM

Augmentations

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

DeepFense Hugging Face

Accelerate your research with our open-source model zoo and datasets scripts.

Pre-trained Models

Access state-of-the-art checkpoints for WavLM, EAT, and AASIST. Ready for inference or fine-tuning on your own data.

Processed Datasets

We provide cleaned and aligned versions of major audio deepfake benchmarks (ASVspoof 2019/2021, In-the-Wild) released as prepared Parquet files for immediate use.

The Parquet files contain standardized metadata and file references rather than wav files. For reproducibility, we also provide scripts to automatically download the original datasets (wav files and labels) and construct the Parquet files.

Installation

Install via pip
pip install deepfense==0.1
Install from source
git clone https://github.com/Yaselley/deepfense-framework
cd deepfense-framework
pip install -e .

Want to learn more? Check out our step-by-step tutorials and pre-configured recipes.

View Tutorials View Recipes

Join the Community

DeepFense is an open-source project. We welcome contributions to add new models, datasets, and improvements.

Contribute on GitHub