D4: Detecting adversarial diffusion deepfakes with disjoint ensemblesD4: Detection of Adversarial Diffusion Deepfakes Using Disjoint Ensembles
The authors propose D4, an ensemble trained on spectrally disjoint subsets to detect diffusion-model deepfakes; the authors state that black-box attack ASR drops to as low as 0% (PNDM, Table 3).
The attacker's goal is to perturb deepfake images so that they are judged as real by the detector; the setting is black-box, with only query access to the detector; the attack uses ℓ2 norm, perturbation budget ϵ=10, query budget 50,000; the victim system is a DNN deepfake detector (such as a black-box service).
- Detectors of deepfakes generated by diffusion models can be bypassed by adversarial perturbations: an attacker can add imperceptible perturbations to make the detector classify a deepfake as real, and this also holds in the black-box (query-only access) setting.
- Proposes D4: exploiting the redundancy of detection signals in the frequency domain, it partitions the DCT spectrum by saliency in a round-robin manner among multiple disjoint models, adversarially trains each, and then votes; it also proves that the disjoint ensemble reduces the adversarial subspace dimension.
- On LDM deepfakes from LSUN Bedroom, the six black-box attacks achieve ASR above 90% against at least one baseline, while D4 (SIZE=4) reaches at most 28% (SurFree); on PNDM the ASR of all six attacks is 0%; there is also generalization on cross-domain and unseen generative models, but it is weaker on GANs.
- The authors state that D4 relies on frequency-domain redundancy and may be ineffective against future deepfakes that do not produce such traces; white-box defense is left to future work; on CIFAR10 the gains disappear as the perturbation budget increases; when cross-domain to DDIM, AP without attack drops to 78%.
- Evaluated models
- D4 (SIZE=4)D4 (SIZE=1)
- Benchmarks
- LSUN BedroomCelebaHQLDMDDIMPNDMProGANStyleGANDiff-StyleGAN2CIFAR10
- Metrics
- APASR
The D4 detector uses a disjoint frequency-domain ensemble to detect adversarial diffusion deepfakes, in order to improve black-box adversarial robustness. It disperses frequency-domain components across multiple models via saliency partitioning, and theoretically proves that it can shrink the input subspace in which adversarial deepfakes reside, making them harder for black-box attacks to find. Under multiple black-box attacks, D4 significantly outperforms existing diffusion deepfake detection defenses and remains robust to unseen data distributions and unseen generation techniques.
Paper analysis
What problem does this paper attempt to solve?
To address the failure of diffusion model deepfake detectors under black-box adversarial perturbations, D4 with disjoint ensembling is proposed.
Core problem: deepfake detectors for diffusion-model-generated images can be bypassed by adversarial perturbations—an attacker can add imperceptible perturbations to a deepfake and make the detector misjudge it as real, and existing defenses largely fail under black-box attacks.
- Scenario and motivation: diffusion models can already generate highly realistic images and can be used to forge social media accounts, pornographic content and political propaganda; detectors are mostly based on DNNs, which the authors state are vulnerable to adversarial examples, and adversarial deepfakes can be constructed even in the black-box (query-only access) setting.
- Shortcomings of existing methods: the authors state that adversarial training alone is difficult to bring noticeable improvement on deepfake detection (citing Carlini et al.); arbitrary ensembles are not necessarily more robust (citing He et al.), and individual models tend to learn the same non-robust features (citing Ilyas et al.); inference-time preprocessing defenses are computationally expensive (the paper states up to 30 minutes per image).
- Core observation: in the frequency domain, the generative traces used for detection are distributed across the entire spectrum and are redundant—Figure 3 shows that using only about 6% of frequency components, a single CNN classifier still maintains an AP of about 0.7, whereas subsets in pixel space do not have this property.
- Proposed in the paper: D4 (Disjoint Diffusion Deepfake Detection), which partitions the spectrum disjointly among multiple models to form an ensemble, and provides theoretical bounds on the adversarial subspace dimension (Lemma 3.1, 3.2).
- Threat model:
- Goal: perturb deepfake images so that they are classified as the real class.
- Knowledge: black-box, with only query access to the detector; the paper explicitly does not do white-box and leaves it for future work.
- Capability: ℓ2-norm perturbation, ϵ=10, query budget of 50,000 per attack.
- Victim system: DNN deepfake detectors; the paper mentions that in practice these are mostly black-box services (such as Intel, Deepware, etc.).
What related research exists?
Related work is divided into four groups: deepfake generation and detection, adversarial deepfakes, training-time and inference-time defenses; the baselines are EnsembleDet, ARDD, ARDD-AT, CNNDet.
Deepfake generation
- GANs and diffusion models: GANs (Goodfellow et al., 2014) synthesize images through generator-discriminator adversarial training; diffusion models (Ho et al., 2020) generate through iterative noising and denoising, and the authors state that they achieved a new SOTA FID on image generation benchmarks (citing Dhariwal & Nichol, 2021), making diffusion deepfake detection more urgent.
Deepfake detection
- Pixel and handcrafted features: one line of work trains classification DNNs on pixels (e.g., CNNDet by Wang et al., 2020); another uses co-occurrence matrices, color anomalies, convolutional traces, texture, pixel blocks or CLIP neural features (Ojha et al., 2023).
- Frequency features: Frank et al. (2020) proposed using DCT as DNN preprocessing for detection; subsequent work (e.g., Ricker et al., 2022) applied frequency features to GAN and diffusion model detection. D4 also uses frequency features, but adopts a disjoint ensemble.
Adversarial deepfakes and their defenses (training-time)
- Adversarial deepfakes: Carlini & Farid (2020) state that DNN detectors can be bypassed by white-box and black-box adversarial examples, corroborated by multiple works; this paper focuses on black-box.
- Ensemble defenses: He et al. (2017) point out that arbitrary ensembles of weak defenses are not necessarily stronger; Ilyas et al. (2019) point out that individual models tend to learn the same non-robust features. EnsembleDet by Dutta et al. (2021) and ARDD by Khan et al. (2021) ensemble different architectures, and Devasthale et al. (2022) further apply adversarial training to each model. The paper states that D4 differs from them in that it does not rely on different architectures but achieves disjointness through frequency partitioning.
Inference-time defenses
- Preprocessing-based: perturbations are removed through transformations, which the authors state is computationally expensive (up to 30 minutes per image, citing Gandhi & Jain et al.), but can complement D4.
- Others: stateful defenses (Li et al., 2020) were recently broken (the authors' own 2023 work); post-processing defenses that manipulate confidence are ineffective against hard-label black-box attacks.
Baselines and benchmarks: the comparison baselines are EnsembleDet (EfficientNet/XCeption/Resnet50), ARDD (VGG16/InceptionV3/Xception), ARDD-AT (VGG19/ViT/Wide-ResNet + PGD-150 adversarial training), D4 (SIZE=1) (full spectrum + PGD-50/TRADES adversarial training) and CNNDet; the data are real images from LSUN Bedroom and CelebaHQ and deepfakes generated by the LDM/DDIM/PNDM diffusion models and ProGAN/StyleGAN/Diff-StyleGAN2.
Authors' positioning: D4 is an ensemble detector, but it uses frequency partitioning based on the redundancy of frequency-domain traces rather than architectural differences, which the authors state has theoretical and empirical advantages in scenarios with feature redundancy (such as generated deepfakes).
How does the paper address this problem?
D4 partitions the DCT spectrum by saliency in round-robin fashion among 4 disjoint models, adversarially trains each, then votes, and proves that the adversarial subspace dimension shrinks.
Overall idea: exploit the redundancy of detection signals in the frequency domain by partitioning frequency components disjointly among the models in the ensemble, so that an attacker cannot fool all models at once by perturbing the same set of frequencies. The framework is named D4 (Disjoint Diffusion Deepfake Detection); the pipeline is shown in Figure 2.
Problem setting and redundancy observation
- Task: classify a given image as deepfake or real; an adversarial example is defined as a perturbed input within an ϵ ball that causes misclassification.
- Redundancy observation: the authors use the same CNN architecture as Frank et al. and train on progressively smaller random feature subsets; Figure 3 shows that using about 6% of components in the frequency domain still yields about 0.7 AP, whereas pixel-domain subsets do not have this property; the authors therefore argue that the spectrum contains exploitable redundancy.
Disjoint ensemble construction
- Mask partitioning: for each model, unused frequencies are set to zero; for example, with two models the inputs are [f1; 0] and [0; f2], with no shared frequencies.
- Design requirement: the partitioning scheme should make the models as "equal" as possible, otherwise an attacker could focus on the weaker model to overturn the ensemble decision.
- Saliency partitioning: first run the Carlini-Wagner ℓ2 attack for 1000 steps to obtain the perturbation δx, then compute the saliency of the i-th frequency as si = Ex∈ X ∇f(x+δx)i · δxi (larger gradient and perturbation magnitude give higher saliency), sort by saliency, and assign frequencies to the models in round-robin fashion, so that each model receives a balanced proportion of high-saliency frequencies.
Theoretical analysis
- Orthogonality: Appendix 7.1.1 proves that the gradients of disjoint classifiers are pairwise orthogonal (because the partition matrices satisfy Ti Tjᵀ = O).
- Dimension bound: extending the adversarial subspace dimension bound of Tramèr et al., Lemma 3.1 (ℓ2) and Lemma 3.2 (ℓ∞) give tight bounds on the number k of adversarial directions shared by n disjoint models under at-least-one and majority voting (proofs in Appendix 7.1).
- Implication: the authors state that if the models are "nearly identical", the adversarial subspace dimension under at-least-one voting shrinks to about 1/n of that of a single model, and to 1/n² under ℓ∞.
Implementation and training
- Architecture: D4 (SIZE=4) contains 4 ResNet50s; inputs are first transformed to the frequency domain via 2D-DCT and then distributed; each model is adversarially trained separately with PGD-50 attack and TRADES loss.
- Voting: the theoretical part considers two mechanisms: majority (at least ⌈n/2⌉ judge fake) and at-least-one (at least one judges fake).
- Success criterion: natural performance uses AP; robustness uses ASR (the proportion of deepfakes successfully perturbed to real), and lower ASR is better.
What experiments did the paper conduct?
Under the six black-box attacks, at least one attack achieves ASR above 90% against the baselines, while D4 (SIZE=4) reaches at most 28%; on PNDM the ASR of all six attacks is 0%.
Experimental setup
- Subjects tested: D4 (SIZE=4) (4 ResNet50s, saliency partitioning); baselines EnsembleDet, ARDD, ARDD-AT, D4 (SIZE=1) (full-spectrum adversarial training), CNNDet (pretrained, generalization experiments only).
- Data: real images from LSUN Bedroom and CelebaHQ; deepfakes from the LDM, DDIM, PNDM diffusion models, with ProGAN, StyleGAN, Diff-StyleGAN2 used for GAN generalization; each diffusion model × dataset combination contains 39k training, 1k validation and 10k test images per class, uniformly resized to 256×256 and then center-cropped to 224×224.
- Attacks: six black-box attacks—gradient-based HSJA, QEBA; random-search-based SurFree, Triangle, Boundary, SignOPT; ℓ2 norm ϵ=10, query budget 50,000, default hyperparameters.
- Metrics: no-attack detection performance uses AP; robustness uses ASR (the success rate of perturbing deepfakes to real).
- Sample size: ASR is computed on 100 images; training uses Adam, initial learning rate 0.0001, batch 32, at most 20 epochs; the paper does not report the number of repetitions.
Main results
According to Table 1 (LSUN Bedroom, LDM deepfakes, 50k queries, ϵ=10):
Swipe horizontally to read the table
Detector No-attack AP SurFree HSJA QEBA Triangle Boundary SignOPT EnsembleDet 100% 100% 100% 100% 77% 100% 100% ARDD 100% 100% 100% 100% 99% 90% 100% ARDD-AT 100% 91% 23% 97% 18% 19% 43% D4 (SIZE=1) 98% 93% 11% 53% 51% 6% 10% D4 (SIZE=4) 93% 28% 3% 2% 0% 8% 8% - Baselines fail: at least one attack achieves ASR above 90% against each baseline; SurFree is the most effective against all baselines.
- D4 performance: the authors state that no attack achieves ASR above 28% against D4 (SIZE=4), and that its natural detection AP still reaches 93%.
- Query cost: Figure 4 shows that for the baselines, SurFree ASR typically already exceeds 80% within 20k queries, whereas D4 (SIZE=4) still does not exceed 28% at 50k queries (the authors interpret this as increased attack cost).
Generalization: other diffusion models and unseen domains
- Switching diffusion models (Table 3): on DDIM, the ASR of the six attacks against D4 (SIZE=4) is 5%–15%, and on PNDM the ASR of all six attacks is 0%; in the same table, D4 (SIZE=1) reaches 100% SurFree ASR on PNDM.
- Unseen image domains (Table 2): D4 (SIZE=4) trained only on LSUN Bedroom is directly tested on CelebaHQ (faces); under SurFree attack, the ASR for LDM drops from 95% for SIZE=1 to 28%, and for PNDM from 100% to 0%; the exception is DDIM, whose no-attack AP drops to 78% (ASR drops from 97% to 15%).
- The authors' explanation: the authors believe that full-feature detectors may overfit to non-robust features specific to the training domain, whereas D4's partitioning forces each model to rely more on the robust traces caused by diffusion models.
Generalization: unseen generative models and post-processing/adaptive attacks
- Unseen generative models (Table 4): CNNDet (trained on ProGAN) achieves AP above 80% on all non-adversarial GAN deepfakes, but under attack the ASR for both GAN and diffusion deepfakes is 100%; D4 (SIZE=4) (trained on LDM) generalizes well to diffusion models (e.g., DDIM AP 70%, ASR 9%) but is weaker on GANs (ProGAN AP 59%, ASR 28%).
- Ensembling the two: after combining D4 (SIZE=4) and CNNDet by at-least-one voting, non-adversarial AP is ≥80% on GANs and ≥70% on diffusion, and ASR drops from CNNDet's 100% to 54%–67%; the authors state that D4 can complement existing detectors.
- Post-processing and adaptive attacks (Table 5): for D4 (SIZE=4), after Gaussian noise (σ=2) AP is 78%, after blur (σ=2) 93%, after JPEG (80%) 83%; under the frequency-peaks adaptive attack targeting frequency detectors, AP is 92%, and the authors state that the partitioning makes detection not rely solely on peaks.
Other ablations and analyses
- Saliency distribution (Figure 5): the absolute values of D4 (SIZE=4)'s frequency saliency are overall lower than those of D4 (SIZE=1) and more concentrated near the mode, which the authors state implies higher feature robustness.
- CIFAR10 (Appendix Table 6): D4 (SIZE=4) improves under the smallest perturbation budget (adversarial accuracy 59.8% vs 1.7% for SIZE=1 at ℓ∞ 1/255), but the gain disappears as the budget increases (6.2% vs 0.8% at ℓ2 ϵ=10); the authors believe a more suitable redundant feature space needs to be found for this task.
What are some points that can be further explored?
The authors list limitations such as reliance on frequency-domain redundancy and the unsolved white-box problem, and propose directions such as improving the partitioning and extending to audio.
Limitations and future directions noted by the authors
- Reliance on frequency-domain redundancy (Sec. 5): D4 targets diffusion-generated deepfakes; the authors state that if deepfakes that do not produce such frequency-domain traces emerge in the future, D4 may be ineffective.
- White-box defense not covered (Sec. 2): the authors state that defense against white-box attacks is an open problem across all vision tasks and leave it for future work.
- Partitioning strategy can be improved (Sec. 5): the authors state that better saliency partitioning methods may further widen the gap and improve robustness, and leave this for future exploration.
- Extension to other tasks (Sec. 5): the authors hypothesize that the framework can be applied to other classification tasks with feature redundancy, mention keyword spotting and fake speech detection in the audio domain, and call this an interesting future direction; they also state that they do not know of such redundancy space on CIFAR10/ImageNet.
- Hindering benign uses (Sec. 5): the authors note that countering deepfakes also has benign uses (such as user anonymization), and that D4 may prevent such anonymization.
Experimental coverage
- 6 defenses tested: D4 (SIZE=4), D4 (SIZE=1), EnsembleDet, ARDD, ARDD-AT, CNNDet (Table 1, 4).
- Attack coverage: six black-box query attacks (HSJA, QEBA, SurFree, Triangle, Boundary, SignOPT), ℓ2, ϵ=10, 50k queries; additionally three post-processing methods and one frequency-peaks adaptive attack were tested (Table 5); the appendix tested APGD-CE on CIFAR10 (Table 6).
- Generative model coverage: diffusion models LDM, DDIM, PNDM; GAN-based ProGAN, StyleGAN, Diff-StyleGAN2; image domains are LSUN Bedroom and CelebaHQ.
- Sample size: ASR is evaluated on 100 images (Sec. 4.2); the paper does not report the number of experimental repetitions or variance.
- Ensemble size: the experiments report only two configurations, SIZE=1 and SIZE=4; the paper does not report comparison experiments with other ensemble sizes or partitioning schemes.
Summarize the main content of the paper
D4 uses a spectrally disjoint ensemble to detect diffusion deepfakes; black-box attack ASR drops to as low as 0%, but it relies on frequency-domain redundancy.
A defense paper: to address the failure of diffusion model deepfake detectors under black-box adversarial perturbations, it proposes D4—partitioning the DCT spectrum by saliency in round-robin fashion among 4 disjoint ResNet50s, adversarially training each, then voting.
- Core basis: detection traces in the frequency domain are redundant (Figure 3: about 6% of frequency components still yield about 0.7 AP); disjoint partitioning prevents an attacker from fooling all models by perturbing the same set of frequencies.
- Theoretical results: extending the adversarial subspace dimension bound of Tramèr et al., the authors state that n nearly identical disjoint models reduce the adversarial subspace dimension to about 1/n under at-least-one voting (ℓ2), and to 1/n² under ℓ∞ (Lemma 3.1, 3.2).
- Main results: on LDM deepfakes from LSUN Bedroom, six black-box attacks exceed 90% ASR against at least one baseline each, while D4 (SIZE=4) reaches at most 28% (SurFree), with 93% AP without attack (Table 1).
- Generalization: on PNDM, ASR is 0% for all six attacks (Table 3); training only on bedroom images transfers to the face domain CelebaHQ (Table 2); generalization is relatively good to unseen diffusion models and weaker to GANs, and it can complement CNNDet ensembles (Table 4).
- Other: after Gaussian noise, AP drops to 78%; under the frequency-peaks adaptive attack, AP is 92% (Table 5); on CIFAR10 the gains disappear as the perturbation budget increases (Appendix Table 6).
- Authors' conclusion: the authors state that D4 reduces ASR to as low as 0% under black-box attacks, while acknowledging that it relies on frequency-domain redundancy, may be ineffective against future deepfakes without such traces, and leaves white-box defense to future work.
Related papers
Show 3 more papers
- Adversarial Robustness through Local LinearizationDefensesarXiv
- Stratified Adversarial Robustness with RejectionDefensesarXiv