--- license: mit tags: - deepfake-detection - computer-vision - efficientnet - xai - explainable-ai --- # XADE Deepfake Detector EfficientNet-B4 model trained for deepfake detection as part of the XADE (eXplainable Automated Deepfake Evaluation) thesis project at Jönköping University, 2026. ## Model Details - **Architecture:** EfficientNet-B4 with custom two-layer classifier head - **Task:** Binary classification (real vs. fake faces) - **Training:** Progressive mixed training across 4 manipulation types - **Final checkpoint:** Run 4 (140k + CIPLAB + FF++ + Celeb-DF) ## Cross-Dataset Performance (AUC-ROC) | Dataset | Manipulation Type | AUC | |---|---|---| | 140k Real-Fake (training dist.) | GAN / StyleGAN synthesis | 0.9992 | | Fake-Vs-Real Hard | StyleGAN2 harder cases | 0.8948 | | FF++ derived | Neural face swap | 0.8789 | | CIPLAB | Photoshop manipulation | 0.7563 | | Celeb-DF v2 | High-quality face swap | 0.8049 | ## Training Details - **Base dataset:** 140k Real and Fake Faces (StyleGAN-generated) - **Additional training data:** CIPLAB (~960 images), FF++ derived (~1500 frames), Celeb-DF v2 (~1500 images) - **Training samples:** 100,000 per run (sampled from combined pool) - **Epochs:** 10 (early stopping patience 7) - **Optimizer:** AdamW with differential learning rates (backbone: 1e-4, classifier: 1e-3) - **Batch size:** 64 - **Validation accuracy:** 98.51% ## Architecture ``` EfficientNet-B4 (ImageNet pretrained, last 30% unfrozen) └── Custom classifier head: Dropout(0.5) Linear(in_features → 512) ReLU BatchNorm1d(512) Dropout(0.4) Linear(512 → 2) ``` ## Usage ```python import torch from huggingface_hub import hf_hub_download from torchvision.models import efficientnet_b4 import torch.nn as nn # Download model model_path = hf_hub_download( repo_id="viktorahnstrom/xade-deepfake-detector", filename="best_model.pt" ) # Load checkpoint checkpoint = torch.load(model_path, map_location="cpu", weights_only=False) print(f"Trained for {checkpoint['epoch']} epochs") print(f"Classes: {checkpoint['class_names']}") # ['fake', 'real'] ``` ## Citation ```bibtex @misc{xade2026, author = {Viktor Ahnström and Viktor Carlsson}, title = {XADE: Cross-Platform Explainable Deepfake Detection Using Vision-Language Models}, year = {2026}, institution = {Jönköping University}, howpublished = {\url{https://huggingface.co/viktorahnstrom/xade-deepfake-detector}} } ```