Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member

DeepSafe

Dataset auditing and provenance

An Open Source DeepFake Detection Platform

ai-security

How DeepSafe Works

DeepSafe is an open-source platform designed for enterprise-grade deepfake detection across images, videos, and audio. It operates as a modular ensemble system, combining multiple state-of-the-art detection models into a unified framework. Each model runs independently within its own Docker container, ensuring isolation and scalability. A central FastAPI gateway orchestrates requests, distributes them to the appropriate model services, and aggregates results using predefined fusion strategies. This architecture allows users to deploy, manage, and update individual models without disrupting the entire system.

The platform evaluates deepfake detection models against a comprehensive benchmark dataset, which includes 411 AI generators. Testing revealed that the ensemble achieves a 66.2% detection rate for fakes while maintaining a low false-positive rate of 7% for genuine content, particularly effective against Sora-generated videos. These results are reproducible via the separate deepsafe-bench project, which provides a benchmarking toolkit, model zoo, and adaptation framework under a non-commercial license.

At its core, DeepSafe’s architecture follows a microservices design. A browser-based interface routes requests through an Nginx server to the FastAPI gateway, which then forwards them to specialized model containers. The gateway reads model configurations from a single JSON file, dynamically dispatching requests based on modality (image, video, or audio) and fusing results using one of three ensemble methods: voting, averaging, or a trained meta-learner.

The ensemble methods are configurable and tailored to balance accuracy and computational efficiency. Voting relies on majority consensus among model predictions, averaging computes the mean probability score, and stacking employs a meta-learner (e.g., LightGBM or XGBoost) trained on aggregated model outputs. Users can retrain the meta-learner with a single command, adapting the system to new threats or updated models.

Adding a new detection model to DeepSafe is streamlined through an SDK that abstracts away boilerplate code for HTTP serving, health checks, and thread safety. Developers only need to implement the inference logic in a predefined detector.py file, adhering to the ImageModel, VideoModel, or AudioModel base classes. The platform provides a CLI command (make add-model) to automate model registration, scaffold the necessary files, and update the Docker configuration. Once integrated, the new model can be immediately tested and incorporated into the ensemble.

DeepSafe’s benchmark dataset is a critical component, offering a balanced multi-modal corpus for evaluation. This corpus enables rigorous testing of detection models against a diverse range of AI-generated content, including emerging threats like Sora videos.

The platform’s API is designed for both programmatic and interactive use. Users can submit detection requests via JSON payloads or file uploads, specifying the modality (image, video, or audio) and the ensemble method (voting, averaging, or stacking). Responses include a verdict (real or fake), confidence scores, and individual model results. The API documentation is accessible via Swagger at /docs, providing detailed endpoints and request/response examples.

DeepSafe’s project structure reflects its modular and extensible design. The api/ directory houses the FastAPI gateway, database models for tracking analysis history, and meta-learner artifacts. The sdk/ directory contains shared base classes for model integration, while models/ organizes individual detectors by modality (image, video, audio). Configuration files, scripts for model management, and Docker orchestration are centralized in config/, scripts/, and docker-compose.yml, respectively. This organization simplifies maintenance, updates, and contributions, with clear documentation for adding new models or retraining the ensemble.

Key Features and Capabilities

DeepSafe’s modular architecture enables seamless integration of new detection models. The SDK provides a standardized interface for developers to implement custom detectors, reducing the barrier to entry. Models are containerized, ensuring compatibility and isolation, while the gateway dynamically routes requests based on modality. This flexibility allows organizations to deploy specialized detectors for niche threats without overhauling the entire system. For example, a researcher could add a detector for a newly identified AI generator and retrain the ensemble in minutes, adapting to evolving deepfake techniques.

The platform’s ensemble methods enhance detection accuracy by combining the strengths of multiple models. Voting and averaging are simple yet effective for balancing predictions, while stacking leverages machine learning to optimize decision-making.

DeepSafe addresses data and training integrity through its benchmarking framework and reproducible evaluation pipeline. The deepsafe-bench project provides tools to replicate detection results, including the full evaluation corpus and a pip-installable benchmarking suite. The platform’s support for multi-modal analysis (images, videos, audio) makes it versatile for real-world applications, where deepfakes may span multiple formats. Additionally, the MIT license encourages collaboration and customization, aligning with open-source principles.

The benchmark dataset is a cornerstone of DeepSafe’s reliability. It includes a broad spectrum of AI generators, from widely used tools like Stable Diffusion to cutting-edge models such as Sora. This diversity ensures that the ensemble is tested against both common and emerging threats. By making this dataset publicly available on HuggingFace, DeepSafe fosters community-driven improvements, as researchers can contribute new generators or detection models. The platform’s ability to evaluate 24 detectors against 411 generators demonstrates its scalability and adaptability to the rapidly evolving landscape of AI-generated content.

File upload endpoints simplify manual testing, while Swagger documentation provides clear guidance for API usage. The platform’s Docker-based deployment further simplifies setup, as users can launch the entire system with a single command (make start), including the web dashboard and API services.

Use Cases

DeepSafe is primarily targeted at organizations concerned with data and training integrity, particularly those vulnerable to AI-generated misinformation. In media and journalism, it can verify the authenticity of images, videos, and audio clips shared on social platforms or news outlets. Similarly, social media platforms could integrate the platform to flag potentially manipulated media, enhancing trust in user-generated content.

In enterprise settings, DeepSafe can safeguard against AI-driven fraud or impersonation. By detecting deepfake videos of executives or audio recordings of voice assistants, companies can mitigate risks associated with synthetic media. The platform’s support for multi-modal analysis ensures comprehensive coverage, as attackers may exploit any combination of images, videos, or audio. The ensemble’s high detection rate for Sora videos underscores its relevance to high-stakes environments where advanced AI generators pose significant threats.

Researchers and developers can leverage DeepSafe as a testing ground for new detection algorithms. The platform’s modular design allows for rapid experimentation with custom models, while the benchmark dataset provides a standardized way to evaluate performance. Academics studying deepfake detection can use DeepSafe to replicate experiments, compare models, or contribute new detectors to the community. The separation between the original DeepSafe repository (MIT-licensed) and deepsafe-bench (non-commercial) ensures that commercial and research use cases are accommodated without licensing conflicts.

Deepfake content can undermine investigations or manipulate public perception, making detection a critical tool for maintaining integrity. The platform’s reproducibility and transparency—enabled by the benchmark dataset and evaluation pipeline—ensure that detection results are defensible in court. Additionally, the ability to retrain the ensemble with new data allows agencies to adapt to evolving tactics used by malicious actors.

The platform’s open-source nature and detailed documentation make it accessible for academic courses on digital forensics, cybersecurity, or machine learning. Students can explore ensemble methods, benchmark datasets, or contribute new models as part of their learning. The web dashboard provides an intuitive interface for visualizing detection results, while the API offers hands-on experience with real-world tools.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.