Skip to content

TwinD: Generalizing deepfake detection from blending to entire-face synthesisTwinD: Generalizing Deepfake Detection from Blending to Entire Face Synthesis

Hugging Face Daily Papers· arXiv:2611.25935· Andrii Yermakov, Jan Cech, Mario Fritz, Jiri MatasCzech Technical University in Prague; CISPA Helmholtz Center for Information SecurityIndexed by this site · 3 days ago· Originally publishedDefenses· Its place in the scan record →

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors propose a deepfake detector, TwinD, which achieves an average AUROC of 96.3% across 19 datasets, 8.9 percentage points higher than the previous best, GenD-PE.

Threat modelThe defender trains a frame-level detector to judge whether a face crop is fake, and it must generalize to generators unseen in training; fakes fall into two categories: blending (a generated face pasted back into a real frame) and EFS (whole-frame synthesis with no blending traces). Evaluation is cross-dataset generalization and does not involve adaptive evasion by an attacker.

Questions
Face deepfake detectors are mostly trained on blending fakes, whereas new generators perform whole-frame synthesis (EFS) and leave no blending traces. The authors report that the previous best detector averages no more than 78.1% AUROC on 5 EFS datasets, and AIGC detectors also fail to close this gap.
Methods
In addition to FF++ fakes, TwinD adds two types of "twins" made from real frames: reconstruction twins are reconstructed with the CogVideoX autoencoder and have real pixels put back in a random region, targeting decoder traces; blob twins blend a modified copy with the original frame using a circular soft mask, targeting blending traces. The backbone is a frozen PEcore L plus LoRA, with weights averaged over three seeds.
Experiments and results
On 19 datasets from 2019–2026, TwinD averages 96.3% AUROC, 8.9 percentage points higher than GenD-PE; 98.1% on Blending and 95.6% on EFS, with at least 90.4% on every dataset. Trained with twins only, it still reaches 94.3%. Ablations show that removing reconstruction twins lowers EFS by 18.1 percentage points, and removing blob twins lowers Blending by 5.8 percentage points.
Limitations and future work
The authors note two limitations: Gaussian noise and downsampling affect TwinD more than previous detectors (training did not include these two degradations), and reconstruction twins use only a single autoencoder; both are listed as future work. The robustness experiments cover only four degradations: JPEG, blur, noise, and downsampling.
Experimental setupTwinD、Effort-SDv1.4 et al. · FF++、CCv2 et al. · video-level AUROC、EER et al.
Evaluated models
TwinDEffort-SDv1.4DGS-NetLTD-UFDAlignedForensicsDDAB-FreeSBIFSFMForAdaEffortDFD-FCGVLAForgeFS-VFMDFD-HRGenD-PE
Benchmarks
FF++CCv2DFDFShCDFv2FFIWFAVCDFDMPGFIDFDSv1HiDFCDFv3DSv2RFHFTHBOFDFAVMVDF26
Metrics
video-level AUROCEERmAP
AI summaryResearchers propose a deepfake detector, TwinD, achieving an average AUROC of 96.3% across benchmarks on 19 datasets released between 2019 and 2026, 8.9 percentage points higher than the previous best method, and 95.6% on five entire-face synthesis (EFS) datasets. Existing detectors are mostly trained on blended forgeries (generated faces pasted back into real frames); the previous best averaged an AUROC of 96.2% on ten blended datasets but did not exceed 78.1% on any EFS dataset, and AIGC detectors also failed to close this gap. Beyond FaceForensics++ forgery samples, TwinD adds two types of twin samples constructed from real frames: reconstruction twins replace a random region in autoencoder-reconstructed frames with real pixels, targeting decoder neural traces; color-block twins blend a modified copy of a real frame with the original frame, targeting blending artifacts, and neither requires a generator or a face-shape mask. When trained only on twin samples without deepfake datasets, a single model still averaged 94.3% across three random seeds.

Researchers propose a deepfake detector, TwinD, achieving an average AUROC of 96.3% across benchmarks on 19 datasets released between 2019 and 2026, 8.9 percentage points higher than the previous best method, and 95.6% on five entire-face synthesis (EFS) datasets. Existing detectors are mostly trained on blended forgeries (generated faces pasted back into real frames); the previous best averaged an AUROC of 96.2% on ten blended datasets but did not exceed 78.1% on any EFS dataset, and AIGC detectors also failed to close this gap. Beyond FaceForensics++ forgery samples, TwinD adds two types of twin samples constructed from real frames: reconstruction twins replace a random region in autoencoder-reconstructed frames with real pixels, targeting decoder neural traces; color-block twins blend a modified copy of a real frame with the original frame, targeting blending artifacts, and neither requires a generator or a face-shape mask. When trained only on twin samples without deepfake datasets, a single model still averaged 94.3% across three random seeds.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors aim to solve the problem that face deepfake detectors cannot simultaneously generalize to blending and entire-frame synthesis (EFS) forgeries.

    Core problem: face deepfake detectors trained on blending forgeries cannot generalize to entire-frame synthesis (EFS) forgeries that leave no blending traces.

    • Problem setting: Most deepfake datasets are blending fakes (face swaps or reenactment pasted back into real frames), whereas recent generators synthesize the entire video frame directly, and EFS datasets only appeared around 2026. The authors argue detectors must capture both types of forgery, and the fundamental challenge is generalizing to unseen generators.
    • Shortcomings of existing methods: The authors report that on a benchmark of 19 datasets, the previous best face deepfake detector averaged 96.2% AUROC on 10 blending datasets, but none exceeded 78.1% on 5 EFS datasets; among AIGC detectors, the best, B-Free, averaged 73.8% on EFS and none exceeded 71.4% on blending, so neither type of method closes the gap (Table 1).
    • Core observation: Recent generators use an autoencoder's decoder as the final step to turn latents into pixels, and the decoder leaves traces in the output; blending forgeries instead leave compositing traces. The authors hypothesize that these two complementary forensic cues can each be taught using self-made "twins".
    • Proposed in the paper: The detector TwinD, trained in addition to FF++ fakes with two types of pseudo-forgeries (twins) made from real frames: reconstruction twins target decoder traces, and blob twins target blending traces; the paper also provides an evaluation benchmark covering 19 datasets from 2019–2026 with unified face cropping.
    • Threat model:
      • Defense target: a frame-level binary classifier that outputs the probability that a face crop is fake, with video-level scores taken as the frame average.
      • Attacker capability: uses generators unseen in training to create forgeries, including closed-source generators; the paper does not address a setting in which attackers adaptively evade the detector.
      • Defender knowledge: training sees only the four blending generators of FF++ and one autoencoder (CogVideoX), and the generators of all 19 test datasets are unseen.
      • Victim system: deepfake detection systems deployed on real platforms, facing degradations such as recompression and resizing.
  2. What related research exists?

    Related work is divided into four lines—pseudo-forgery, reconstruction training, parameter-efficient fine-tuning, and benchmarks—and the authors state that Twins is simpler than SBI and complementary.

    Pseudo-fakes methods

    • Face X-ray [25]—pastes another real face, matched by facial landmarks, into the frame.
    • Self-blended images (SBI) [38]—blends a modified copy of the same face using a face-shaped mask built from landmarks, with randomized mask and geometry. The paper states that blob twins are simpler than both: the mask is circular rather than face-shaped, no landmarks are needed, and the only geometric change is a small translation; and it outperforms SBI on blending datasets (Table 4).

    AIGC detectors trained on reconstruction

    • DRCT [4], B-Free [10]—trained by reconstructing real images with diffusion models; AlignedForensics [35], DDA [5]—use only the autoencoder reconstruction of latent diffusion models. AlignedForensics also places reconstructions and real images in the same batch with the same augmentation, and TwinD follows this practice.
    • DDA averages reconstructions and real images with a random weight, and B-Free puts real pixels back outside some segmentation target. The paper notes that these methods are all trained on generic images, and that the evaluated AlignedForensics, DDA, and B-Free cannot transfer to face deepfakes (Table 1); reconstruction twins build on them, but the mask requires no segmentation annotation and is redrawn each time.

    Parameter-efficient fine-tuning

    • GenD [57] applies LN-tuning to PEcore L, CLIP, and DINOv3; Effort [54] trains the trailing singular components of each CLIP weight; DDA [5] trains LoRA on DINOv2. TwinD trains LoRA on PEcore L.

    Benchmark

    • DeepfakeBench [53] unified preprocessing and evaluation protocols, but its test sets are mostly blending fakes, and recent EFS datasets have not yet been included; GenD [57] used 14 datasets from 2019–2025. This paper's benchmark contains 19 datasets from 2019–2026, grouped by forgery type into Blending, EFS, and B+EFS, using the same face crops for all detectors.

    Baselines and positioning: the comparison baselines are 9 face deepfake detectors (SBI, FSFM, ForAda, Effort, DFD-FCG, VLAForge, FS-VFM, DFD-HR, GenD-PE) and 6 AIGC detectors (Effort-SDv1.4, DGS-Net, LTD-UFD, AlignedForensics, DDA, B-Free), all run with the authors' released checkpoints on the same crops. The authors state that this is, to their knowledge, the largest same-crop detector evaluation, and that TwinD's advantage comes from training data (two types of twins plus CCv2 real frames) rather than from the model or training recipe.

  3. How does the paper address this problem?

    TwinD trains LoRA on a frozen PEcore L using FF++ fakes plus two types of self-made twins, with weights averaged over three seeds.

    Overall approach: TwinD is a frame-level binary classifier whose training data mixes real frames, FF++ fakes, and two types of twins made from real frames; each fake is paired with the real frame it came from and receives the same augmentation, so the two differ only by the manipulation itself. The backbone is a frozen PEcore L plus LoRA, and the final model is the weight average of three seed-trained models.

    Training data

    • Real frames: 8 frames per training video from FF++, 5,739 frames in total, plus 1,913 random CCv2 frames, at a 3:1 ratio; face crops with side length no more than 100 px are discarded.
    • FF++ fakes: all four generators are used (Deepfakes, Face2Face, FaceSwap, NeuralTextures); fakes are cropped with the face box of their real frame, pixel-aligned with it; samples whose ground-truth mask covers less than 10% are discarded.
    • Training set size: 38,211 frames in total, of which 7,652 are real, 7,652 are CogVideoX reconstructions, and 22,907 are FF++ fake frames; the masks for blob twins and reconstruction twins are generated online during training.

    Reconstruction twins

    • A real frame I is passed through the CogVideoX video autoencoder to obtain a reconstruction I′, and real pixels are then put back in the region defined by a binary mask Mr: \hat{I} = M_r \odot I + (1 - M_r) \odot I', i.e., the detector learns to find decoder traces even when they cover only part of the image.
    • The real region randomly occupies 0–90%; half the time Mr is random cells of a 32×32 grid (grid mask), and the other half is a noise mask obtained by thresholding Gaussian-blurred white noise, with hard edges. The authors state that the mask design is intended to reduce overfitting to a specific decoder.

    Blob twins

    • An image F is blended into an image B through a soft mask Mb: \tilde{I} = sM_b \odot F + (1 - sM_b) \odot B, where the blend strength s is 0.3 or 1 with equal probability. One of F and B is the real frame I with equal probability, and the other is a modified copy of I (contrast and hue changed, 2× nearest-neighbor downsampling followed by bilinear upsampling).
    • The mask is a circular soft blob centered at 50% of the crop width and 60% of the crop height, covering 8–50% of the crop; before blending, F and Mb are randomly translated together by up to 1.8%. No generator, landmarks, or face-shaped mask are needed.

    Training pairs and augmentation

    • Each epoch contains 34,434 pairs (batch 64): the number of twin pairs is 4 times the number of FF++ real frames (reconstruction and blob twins with equal probability), FF++ fake pairs are half that, and the three types of fakes each account for about one third.
    • The two images in each pair receive the same set of new random augmentations: horizontal flip, affine, Gaussian blur, brightness/contrast jitter, sharpening, JPEG compression; the authors state that pairing can mitigate shortcut learning.

    Model and training

    • PEcore L (224×224 input) plus a linear binary classification head; LoRA rank r=32, α=32, applied to Wq, Wk, Wv, Wo of all 24 blocks, with 6.29M trainable parameters (1.95%).
    • Cross-entropy loss, trained for 10 epochs, Adam, learning rate 3·10⁻⁴ (1 epoch linear warm-up), bf16; L2-SP (λ=1) is used instead of weight decay; no validation set is used, and neither the number of epochs nor the learning rate was tuned; SWA averages the checkpoints from epochs 6–10.
    • Each of three random seeds is trained once, LoRA is merged into the frozen weights, and a uniform model soup is made; the authors state that the three runs start from the same pretrained model and that L2-SP keeps them close, so linear mode connectivity is expected to hold. A single training run takes about 1 hour (one A100).

    Inference and evaluation

    • At most 32 frames are taken per test video; SCRFD-10GF detects faces, a five-point similarity transform aligns them, the face box is enlarged 1.3× for cropping, scaled to 224×224, and normalized to [−1,1]; the video score is the mean of frame-level fake probabilities.
    • The main metric is video-level AUROC; EER and mAP are reported in Appendix S3. Throughput is about 1,000 frames/second at batch 128 frames (one A100).
  4. What experiments did the paper conduct?

    Across 19 datasets, TwinD averages 96.3% AUROC, 8.9 percentage points higher than GenD-PE; ablations show the two types of twins each handle one type of forgery.

    Experimental setup

    • Methods evaluated: TwinD and 15 detectors with released checkpoints—9 face deepfake detectors (SBI, FSFM, ForAda, Effort, DFD-FCG, VLAForge, FS-VFM, DFD-HR, GenD-PE) and 6 AIGC detectors (Effort-SDv1.4, DGS-Net, LTD-UFD, AlignedForensics, DDA, B-Free).
    • Benchmark: 19 datasets from 2019–2026, split into Blending (10), EFS (5), and B+EFS (4); 66,180 real and 100,139 fake videos in total (Table 2); the test split is used when available, otherwise the full set.
    • Unified preprocessing: all methods use the same face crops (SCRFD-10GF detection, five-point alignment, box enlarged 1.3×), at most 32 frames per video; each method uses its own resize and normalization.
    • Data cleaning: in Blending datasets, failed fakes that are pixel-identical to the source video are removed; videos whose original face is smaller than 100 px are removed. The authors used the InsightFace buffalo l face recognition model to check the 100 most similar face pairs between CCv2 and each test set and state that no pair is the same person; the test sets contain no CogVideoX-generated fakes.
    • Metrics: the main metric is video-level AUROC (frame scores averaged); Appendix S3 reports EER and mAP (average AP over the two classes).
    • Number of repetitions: ablation and twins-only experiments are the mean over 3 seeds; TwinD in Table 1 is a single result from the three-seed soup.

    Main results

    According to Table 1 (video-level AUROC %, Avg is the macro average over 19 datasets; Blending / EFS group means are from the main text):

    Swipe horizontally to read the table

    MethodTypeBlending (10)EFS (5)Avg (19)
    B-FreeAIGCgroup mean not given in the paper73.873.8
    DDAAIGCgroup mean not given in the papernot given in the paper68.6
    SBIFacegroup mean not given in the papernot given in the paper74.4
    DFD-HRFace96.2not given in the paper86.4
    GenD-PEFacegroup mean not given in the paper78.187.4
    TwinDThis paper98.195.696.3
    • The authors state that TwinD is best on 17 of the 19 datasets, with at least 90.4% on every dataset; the two exceptions are CDFv3 (the temporal model DFD-FCG is 2.7 percentage points higher) and HF (the AIGC detector B-Free is 2.4 percentage points higher).
    • On the B+EFS group, TwinD averages 92.7%, and GenD-PE 80.1%.
    • Appendix metrics are consistent: TwinD averages 9.0% EER (GenD-PE 19.1%, Table S2) and 93.6% mAP (DFD-HR 83.0%, Table S3).

    Cross-generator generalization (Table 3)

    • What was measured: EFS fakes from DF26, OF, and MV are labeled by generator, 17 generators in total (DF26 includes 4 closed-source ones), comparing per-generator AUROC between TwinD and the 8 strongest baselines.
    • Results: TwinD averages 95.6%, with at least 88.8% in every column and 91.4%–97.4% on closed-source generators; GenD-PE averages 20.8 percentage points lower. Baselines are uneven across generators, e.g., B-Free is only 0.1 lower on ACTalker but 62.8 percentage points lower on EDTalk; in all 17 columns no face deepfake detector exceeds TwinD, and AIGC detectors are higher in only 6 cells.
    • Swapping autoencoders: replacing CogVideoX with KVAE 2D, LTX-Video, HunyuanVideo 1.0, or LTX-2 for reconstruction twins averages 3.3–6.2 percentage points lower, but still far above GenD-PE; the authors state that the gain does not depend on the choice of CogVideoX, and that no single autoencoder is best on all generators.

    Training data ablation (Table 4)

    • FF++ fakes only (standard protocol): EFS drops 24.4 percentage points, All is 85.7%, 1.7 percentage points lower than GenD-PE; the authors conclude from this that TwinD's gain comes from training data rather than the model or recipe.
    • Twins only (no FF++ fakes, no identity or expression changes): All is 94.3%, 6.9 percentage points higher than GenD-PE; the authors state that this exceeds all 15 previous detectors. Using only FF++ real frames plus twins (no CCv2) gives 91.3% (Table S10).
    • Complementarity: removing reconstruction twins lowers EFS by 18.1 percentage points while Blending is within seed variance; removing blob twins lowers Blending by 5.8 percentage points while EFS is within seed variance. With reconstruction twins only, Blending drops 33.0 percentage points.

    Robustness (Figure 2, Table S15)

    • What was measured: TwinD and 5 face detectors are tested on 19 datasets under four degradations: JPEG (quality 80–10), Gaussian blur (σ 0.5–3.0), Gaussian noise (variance 0.001–0.05), and downsampling (112, 64 px).
    • Results: the authors state that TwinD has the highest average AUROC under every degradation and strength, but the gap to GenD-PE narrows under noise and downsampling, and the two are on par at the strongest noise. Table S15: at the weakest noise (0.001), DF26 drops from 95.8 to 55.8 and OF from 94.9 to 60.0; degradation costs the most on EFS datasets.
    • Exceptions: HF, DFAV, and MV have higher AUROC at 64 px than at 112 px, not decreasing monotonically with degradation strength; the paper does not explain why.

    Other ablations and analyses

    • Partial reconstruction: without putting real pixels back (full reconstruction), EFS drops 2.7 and B+EFS drops 3.5 percentage points (Table 4, S6).
    • Replacing blob twins with SBI: All drops 0.6 percentage points (Table S5).
    • CCv2 real frames: removing them lowers All by 1.8 percentage points; the Shapley decomposition in Appendix S7 shows that of the +1.8, +2.0 comes from the real-video side of the test sets; without FF++ fakes, adding only CCv2 real frames without their twins instead lowers by 1.7, while adding twins raises by 3.0 (Table S10).
    • L2-SP: removing it lowers All by 0.7 percentage points.
    • LoRA rank: All for r=2 to 64 ranges from 95.2% to 96.1%, and r=8, 16, and r=32 are within seed variance; the authors state that every rank exceeds all previous detectors.
    • HF exception: on HF, TwinD is at least 89.4% on 18 of the 20 generators, but 63.9% on Adobe Firefly and 67.9% on GPT-4o, and B-Free and DDA average 2.0 and 0.3 percentage points higher on HF, respectively (Table S13).
  5. What are some points that can be further explored?

    The authors list two future directions: robustness to noise/downsampling and multiple autoencoders; the experiments cover 19 datasets and four degradations.

    Limitations and future directions noted by the authors

    • Noise and downsampling (Sec. 5): Gaussian noise and downsampling affect TwinD's AUROC more than prior detectors, most noticeably on EFS; neither was used in training, and the authors suggest they may mask high-frequency decoder traces. Training robustness against them is listed as future work.
    • Single autoencoder (Sec. 5): reconstruction twins come from only one autoencoder, and none of the tested autoencoders was best across all generators (Table 3); using multiple autoencoders to make twins simultaneously is listed as future work.
    • Limitations of the decomposition method described in Appendix S7.8: the Shapley decomposition of CCv2 gains is relative to a reference set (the FF++ test set), and a different reference set would yield different values; it decomposes the contribution to the gap rather than the errors themselves; it shows which test category the gains appear in, not what in the training data caused the gains.

    Scope of experiments

    • The evaluated methods are TwinD plus 15 detectors with published checkpoints, 16 in total; the benchmark is 19 datasets from 2019–2026, with 66,180 real and 100,139 fake videos (Table 2).
    • The per-generator analysis covers 17 generators from DF26, OF, and MV (Table 3); generators from THB, DFAV, and HF are in Appendix Tables S12 and S13.
    • The robustness evaluation covers four degradations—JPEG, Gaussian blur, Gaussian noise, and downsampling—and compares 5 face detectors (DFD-HR was excluded for being 15 times slower).
    • The ablation and twins-only experiments are means over 3 seeds; the main results in Table 1 are a single evaluation of the three-seed soup, and the paper does not report between-seed variance for the soup results.
    • The paper does not report detector false rejection or miss rates at a fixed threshold (EER/mAP are in Appendix S3), nor does it conduct adaptive evasion attack experiments against the detector.
  6. Summarize the main content of the paper

    TwinD trains a detector with two types of self-made twins, averaging 96.3% AUROC across 19 datasets, which the authors state exceeds all 15 prior detectors.

    TwinD is a face deepfake detector addressing the problem that prior detectors only catch blending forgeries and fail on entire-frame synthesis (EFS) forgeries.

    • Problem: The authors report that the previous best face detector averaged 96.2% AUROC on 10 blending datasets, but none exceeded 78.1% on 5 EFS datasets; AIGC detectors likewise cannot handle both types of forgery.
    • Method: In addition to FF++ fakes, two types of twins made from real frames are added—reconstruction twins reconstruct with the CogVideoX autoencoder and put real pixels back within a random mask, targeting decoder traces; blob twins blend a modified copy with the original frame using a circular soft mask, targeting blending traces, and require no generator or keypoints. Each forgery is paired with its source real frame and shares augmentation. The backbone is a frozen PEcore L plus LoRA (r=32), with L2-SP regularization, and weights from three seeds are averaged into a soup.
    • Main results: Average AUROC of 96.3% across 19 datasets from 2019–2026, 8.9 percentage points higher than GenD-PE; Blending 98.1%, EFS 95.6%, B+EFS 92.7%, with at least 90.4% on every dataset (Table 1).
    • Generalization: Average 95.6% across 17 labeled generators, at least 88.8% per column, including 4 closed-source generators (Table 3); using four other autoencoders to make twins averages only 3.3–6.2 percentage points lower.
    • Ablation: Training with twins only (no deepfake dataset at all) still reaches 94.3%; removing reconstruction twins lowers EFS by 18.1 percentage points, and removing blob twins lowers Blending by 5.8 percentage points; the authors state the two types of twins are complementary and both are indispensable.
    • Authors' conclusion: Cross-dataset generalization comes from two complementary training signals and does not require face swaps or reenactment in the training set; the authors also note that Gaussian noise and downsampling degrade TwinD's performance and that reconstruction twins depend on a single autoencoder, listing work on these two points as future directions.

Related papers

Read originalhuggingface.co