v1.0 Now Available

Build, Simulate, and Train
Deepfake Audio Detectors

An open-source, configuration-driven toolkit for state-of-the-art audio defense.

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 processed datasets.

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 host cleaned and aligned versions of major deepfake datasets (ASVspoof 2019/2021, In-the-wild) for immediate use.

Installation

Install via pip
pip install deepfense
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