DeFakeQ: Enabling Real-Time Deepfake Detection on Edge Devices via Adaptive Bidirectional Quantization
Organizations: Digital Trust Centre, Nanyang Technological University · School of Information Science and Technology, ShanghaiTech University
Abstract
Deepfake detection has become a fundamental component of modern media forensics. Despite significant progress in detection accuracy, most existing methods remain computationally intensive and parameter-heavy, limiting their deployment on resource-constrained edge devices that require real-time, on-site inference. This limitation is particularly critical in an era where mobile devices are extensively used for media-centric applications, including online payments, virtual meetings, and social networking. Meanwhile, due to the unique requirement of capturing extremely subtle forgery artifacts for deepfake detection, state-of-the-art quantization techniques usually underperform for such a challenging task. These fine-grained cues are highly sensitive to model compression and can be easily degraded during quantization, leading to noticeable performance drops. This challenge highlights the need for quantization strategies specifically designed to preserve the discriminative features essential for reliable deepfake detection. To address this gap, we propose DefakeQ, the first quantization framework tailored for deepfake detectors, enabling real-time deployment on edge devices. Our approach introduces a novel adaptive bidirectional compression strategy that simultaneously leverages feature correlations and eliminates redundancy, achieving an effective balance between model compactness and detection performance. Extensive experiments across five benchmark datasets and eleven state-of-the-art backbone detectors demonstrate that DeFakeQ consistently surpasses existing quantization and model compression baselines. Furthermore, we deploy DefakeQ on mobile devices in real-world scenarios, demonstrating its capability for real-time deepfake detection and its practical applicability in edge environments.
Figures & tables
| Detectors | Type | Storage Cost (MB) | Compression Rate (%) | Detection Accuracy (%) | |||||||||||
| BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | GT | BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | GT | ||
| DeiT-Tiny | Backbones | 5.9 | 2.8 | 2.4 | 2.2 | 23.7 | 75.0 | 88.2 | 90.0 | 90.7 | 52.1 (-17.2%) | 54.5 (-14.8%) | 53.2 (-16.1%) | 69.3 | 77.8 |
| DeiT-Small | 20.2 | 9.3 | 7.6 | 7.5 | 84.1 | 76.0 | 88.9 | 91.0 | 91.1 | 50.3 (-21.8%) | 52.8 (-19.3%) | 54.1 (-18.0%) | 72.1 | 79.4 | |
| DeiT-Base | 75.9 | 33.0 | 26.4 | 31.7 | 330.2 | 77.0 | 90.0 | 92.0 | 90.4 | 58.6 (-15.9%) | 56.9 (-17.6%) | 60.3 (-14.2%) | 74.5 | 82.3 | |
| ViT-Small | 21.0 | 10.1 | 8.4 | 8.2 | 84.1 | 75.0 | 88.0 | 90.0 | 90.2 | 56.4 (-20.9%) | 58.2 (-19.1%) | 61.7 (-15.6%) | 77.3 | 84.5 | |
| ViT-Base | 79.2 | 29.7 | 26.4 | 31.2 | 330.2 | 76.0 | 91.0 | 92.0 | 90.6 | 57.2 (-20.9%) | 58.8 (-19.3%) | 61.1 (-17.0%) | 78.1 | 86.7 | |
| Detectors | Type | CDF-v1 (Accuracy%) | CDF-v2 (Accuracy%) | DFDC (Accuracy%) | ||||||||||||
| BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | GT | BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | GT | BRECQ ICLR’22 | Adalog ECCV’24 | FIMA-Q CVPR’25 | Ours | GT | ||
| DeiT-Tiny | Backbones | 50.2 (-18.3%) | 55.8 (-12.7%) | 54.3 (-14.2%) | 68.5 | 76.7 | 45.3 (-19.2%) | 47.6 (-16.9%) | 49.9 (-14.6%) | 64.5 | 73.3 | 37.2 (-20.5%) | 39.4 (-18.3%) | 40.3 (-17.4%) | 57.7 | 65.1 |
| DeiT-Small | 48.9 (-22.2%) | 51.9 (-19.2%) | 55.0 (-16.1%) | 71.1 | 78.2 | 42.1 (-25.9%) | 50.1 (-17.9%) | 50.5 (-17.5%) | 68.0 | 74.8 | 36.1 (-23.9%) | 40.0 (-20.0%) | 42.5 (-17.5%) | 60.0 | 66.4 | |
| DeiT-Base | 60.8 (-12.7%) | 58.5 (-15.0%) | 61.2 (-12.3%) | 73.5 | 81.2 | 46.6 (-22.7%) | 48.2 (-21.1%) | 49.8 (-19.5%) | 69.3 | 77.8 | 42.7 (-21.4%) | 41.6 (-22.5%) | 47.5 (-16.6%) | 64.1 | 71.4 | |
| ViT-Small | 58.1 (-17.9%) | 59.7 (-16.3%) | 62.8 (-13.2%) | 76.0 | 82.0 | 44.7 (-29.3%) | 46.6 (-27.4%) | 52.2 (-21.8%) | 74.0 | 79.8 | 43.1 (-23.7%) | 42.8 (-24.0%) | 47.1 (-19.7%) | 66.8 | 72.1 | |
| ViT-Base | 58.9 (-17.5%) | 60.0 (-16.4%) | 62.2 (-14.2%) | 76.4 | 83.7 | 48.2 (-26.5%) | 47.2 (-27.5%) | 56.3 (-18.4%) | 74.7 | 81.9 | 45.2 (-22.0%) | 45.1 (-22.1%) | 52.4 (-14.8%) | 67.2 | 73.6 | |
| Dateset DFDCP Dolhansky et al. (2019) (Accuracy%) | ||||||
| Quantization Methods | ||||||
| Detectors | Type | BRECQ Li et al. (2022b) ICLR’22 | Adalog Wu et al. (2024) ECCV’24 | FIMA-Q Wu et al. (2025) CVPR’25 | Ours | GT |
| DeiT-Tiny | Backbones | 43.3(-20.4%) | 44.7(-18.8%) | 54.1(-15.1%) | 63.7 | 72.1 |
| DeiT-Small | 44.1(-33.6%) | 52.9(-20.3%) | 55.1(-17.0%) | 66.4 | 73.5 | |
| DeiT-Base | 46.1(-33.4%) | 55.3(-20.1%) | 57.6(-16.8%) | 69.2 | 76.8 | |
| ViT-Small | 46.2(-35.5%) | 55.4(-22.6%) | 57.8(-19.3%) | 71.6 | 77.0 | |
| Methods | Venue | Technology Category | DFD Zi et al. (2020) | CDF-v1 Li et al. (2020c) | DFDC Dolhansky et al. (2020) | ||||||
| DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | |||
| ADD Woo and others (2022) | AAAI’22 | Knowledge Distillation | 49.5 | 46.6 | 49.0 | 47.7 | 48.2 | 49.0 | 37.1 | 36.8 | 35.2 |
| GAC-FAS Le and Woo (2024) | CVPR’24 | Neural Architecture Search | 52.1 | 51.3 | 50.6 | 45.1 | 48.9 | 47.6 | 45.1 | 45.0 | 41.3 |
| X-Pruner Yu and Xiang (2023) | CVPR’23 | Model Pruning | 52.1 | 55.5 | 59.1 | 53.9 | 51.0 | 51.5 | 48.6 | 47.2 | 50.1 |
| One-bit Xu et al. (2024) | NIPS’24 | Low-Rank Factorization | 56.6 | 53.2 | 52.5 | 50.0 | 48.1 | 47.1 | 40.5 | 43.2 | 42.7 |
| HOLa Lei et al. (2025) | ICCV’25 | Low-Rank Factorization | 59.2 | 57.0 | 55.4 | 48.8 | 51.9 | 49.9 | 46.5 | 50.2 | 52.7 |
| Methods | Storage Cost (MB) | Compression Rate (%) |
| ADD Woo and others (2022) | 230.2 | 31.2 |
| GAC-FAS Le and Woo (2024) | 150.7 | 55.0 |
| X-Pruner Yu and Xiang (2023) | 133.9 | 60.0 |
| One-bit Xu et al. (2024) | 72.7 | 78.3 |
| HOLa Lei et al. (2025) | 86.6 | 74.1 |
| DeFakeQ (Ours) | 31.8 | 90.5 |
| Method | CDF-v1 Li et al. (2020c) | CDF-v2 Li et al. (2020c) | DFD Zi et al. (2020) | DFDC Dolhansky et al. (2020) | DFDCP Dolhansky et al. (2019) | ||||||||||
| DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | |
| ✗ HAQ, ✗ VEFT | 57.8 | 58.9 | 53.2 | 46.6 | 48.2 | 48.0 | 52.2 | 54.9 | 51.9 | 42.3 | 45.8 | 43.4 | 52.5 | 57.1 | 55.8 |
| ✓ HAQ, ✗ VEFT | 61.5 | 63.3 | 60.7 | 58.4 | 59.1 | 58.2 | 59.7 | 62.4 | 60.0 | 50.1 | 53.5 | 56.0 | 60.4 | 62.5 | 61.7 |
| ✗ HAQ, ✓ VEFT | 65.2 | 61.9 | 66.6 | 64.5 | 60.8 | 68.2 | 63.6 | 64.4 | 62.4 | 55.9 | 57.8 | 60.1 | 57.2 | 59.8 | 60.2 |
| ✓ HAQ, ✓ VEFT (Ours) | 73.5 | 76.4 | 76.3 | 69.3 | 74.7 | 73.7 | 74.5 | 78.1 | 77.1 | 64.1 | 67.2 | 65.0 | 69.2 | 72.3 | 71.9 |
| Calibration Set Size | DFD Zi et al. (2020) | CDF-v1 Li et al. (2020c) | DFDC Dolhansky et al. (2020) | ||||||
| DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | |
| 64 | 69.8 | 72.6 | 71.3 | 71.5 | 74.8 | 72.9 | 61.3 | 61.2 | 62.7 |
| 128 | 72.1 | 75.8 | 74.7 | 72.2 | 75.0 | 75.5 | 63.1 | 64.5 | 63.3 |
| 256 | 74.5 | 78.1 | 77.1 | 73.5 | 76.4 | 76.3 | 64.1 | 67.2 | 65.0 |
| 512 | 73.4 | 77.0 | 75.8 | 72.9 | 75.8 | 75.8 | 63.8 | 65.7 | 64.2 |
| 1024 | 73.1 | 76.8 | 75.5 | 72.6 | 75.5 | 75.6 | 63.5 | 65.3 | 64.0 |
| Method | CDF-v1 Li et al. (2020c) | CDF-v2 Li et al. (2020c) | DFD Zi et al. (2020) | DFDC Dolhansky et al. (2020) | DFDCP Dolhansky et al. (2019) | ||||||||||
| DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | DeiT-Base | ViT-Base | Swin-Base | |
| ✗ VEFT | 61.5 | 63.3 | 60.7 | 58.4 | 59.1 | 58.2 | 59.7 | 62.4 | 60.0 | 50.1 | 53.5 | 56.0 | 60.4 | 62.5 | 61.7 |
| ✓ VEFT (✗ Random Selection) | 70.2 | 69.1 | 72.3 | 65.9 | 70.8 | 69.2 | 67.6 | 71.5 | 72.3 | 61.5 | 62.6 | 61.8 | 64.4 | 68.9 | 67.2 |
| ✓ VEFT (✓ Random Selection) | 73.5 | 76.4 | 76.3 | 69.3 | 74.7 | 73.7 | 74.5 | 78.1 | 77.1 | 64.1 | 67.2 | 65.0 | 69.2 | 72.3 | 71.9 |