betaFeedback

WorksComputer Science

Revisiting Cross-Reconstruction for Generalizable Deepfake Detection

Abstract

Existing image forgery detectors often suffer from generalization to unseen manipulation methods due to the limited ability to capture transferable forensic cues. Recent cross-reconstruction based methods attempt to improve generalization through semantic-artifact disentanglement, but typically align heterogeneous artifacts across generators and exclude artifact representations during reconstruction, which may overlook the inherent diversity and visual cues of manipulation artifacts. In this work, we revisit cross-reconstruction and introduce an artifact-oriented disentanglement framework for robust image forgery detection. We argue that artifact diversity, i.e., the intrinsic variations of manipulation artifacts introduced by different generation processes, contains complementary forensic cues rather than undesirable domain variations. Instead of enforcing explicit artifact alignment, our framework preserves diverse artifact characteristics through semantically aligned cross-generator reconstruction. Furthermore, we incorporate artifact representations into the reconstruction process and introduce a masked frequency-aware reconstruction strategy to emphasize manipulation-related residuals while reducing semantic interference. This design enables the model to learn transferable forensic representations from diverse artifacts. Extensive experiments on multiple benchmark datasets demonstrate improvements under both cross-dataset and cross-generator evaluation settings. Further analysis and ablation studies validate the effectiveness of artifact diversity preservation and artifact-aware cross-reconstruction.

Introduction

Recent image forgery detectors have increasingly explored disentangled representation learning to separate semantic information from manipulation artifacts for better generalization. Among them, cross-reconstruction based methods {(citep)}(Yan et al. 2023a; Lin et al. 2024) construct paired real-fake samples and decompose their representations into semantic and artifact components. By swapping artifact representations while preserving semantic representations, they reconstruct the original RGB images to encourage semantic-artifact disentanglement. They further divide artifact representations into generator-related and generator-invariant components, where the former is supervised by generator classification and the latter is utilized for forgery detection.

However, we argue that such paradigm overlooks an important property of forgery artifacts, namely artifact diversity as

shown in Figure 1. Artifact diversity refers to the intrinsic variations of manipulation artifacts introduced by different generation models, training strategies, and synthesis pipelines. Although these artifacts exhibit heterogeneous distributions across generators, they often contain complementary forensic cues that reveal different aspects of the manipulation process. Therefore, artifact diversity should not be regarded as undesirable domain variation that needs to be eliminated, but rather as valuable forensic knowledge that should be preserved and exploited.

Figure 1. Motivation of preserving artifact diversity. (a)-(b) Examples from different generators, showing diverse forgery artifacts, including color inconsistency and unnatural facial details (e.g., teeth). (c) Artifact alignment across generators may harm generalization to unseen generators, causing misclassification of unseen manipulations.

As illustrated in Figure 1, existing cross-reconstruction methods tend to align artifacts from different generators into a shared representation space. While this strategy improves

Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. invariance to seen generators, it may suppress generator-specific but transferable forensic cues and lead to overfitting. Consequently, the learned representation can be biased toward the artifact statistics of training generators and fail to capture the diverse forensic patterns required for unseen manipulations. Besides artifact alignment, another limitation lies in the role of artifacts during reconstruction. Existing methods typically exclude artifact representations from reconstruction process, assuming that artifacts are merely reconstruction-irrelevant noise. However, forgery artifacts are not merely reconstruction-irrelevant noise. As illustrated in Figure 1(a)-(Figure 1b), they contain meaningful visual information, such as color mismatch and detail distortion, providing complementary forensic cues for identifying manipulated images. Therefore, whether artifacts should participate in reconstruction remains an open question.

To address these limitations, we propose an artifact-oriented disentanglement framework for robust image forgery detection. Instead of enforcing explicit artifact alignment, our method preserves artifact diversity and learns transferable forensic representations from heterogeneous artifacts. We redesign cross-reconstruction by incorporating artifact representations as reconstruction guidance. To enhance artifact supervision, we introduce a masked frequency-aware reconstruction strategy that suppresses semantic-dominant components while emphasizing manipulation-related residuals. Extensive experiments on multiple benchmarks demonstrate consistent improvements under cross-dataset settings. Ablation studies further validate the effectiveness of artifact diversity preservation and artifact-aware reconstruction. Our contributions are summarized as follows:

  • We revisit cross-reconstruction for deepfake detection and identify two limitations: aligning heterogeneous artifacts suppresses artifact diversity, while the exclusion of artifact representations from reconstruction overlooks some forensic cues.

  • We propose an artifact-aware disentanglement framework using semantically aligned cross-generator pairs. Cross-reconstruction incorporates artifact representations into the reconstruction process, enabling the exploitation of diverse manipulation cues. Meanwhile, masked high-frequency residual reconstruction emphasizes manipulation-related details and promotes transferable forensic representation learning.

  • Extensive cross-dataset experiments demonstrate competitive state-of-the-art performance. Ablation studies further validate the benefits of artifact diversity preservation and artifact-aware cross-reconstruction.

Generalizable Deepfake Detection

Existing deepfake detectors [8] (Li et al. 2023; Ba et al. 2024) have achieved remarkable performance under in-domain evaluation, yet their generalization ability remains limited when encountering unseen manipulation methods or datasets. To alleviate this issue, recent studies [53, 7] have explored various strategies for learning more generalizable representations. Some works [41, 34] (Li et al. 2020a) exploit forgery artifacts in the spatial and frequency domains, such as blending inconsistencies, abnormal noise patterns, and spectral artifacts. Another direction introduces large-scale pre-trained vision models, such as XceptionChollet [6] and CLIPRadford et al. [37] into deepfake detection to leverage their powerful visual representations and superior transferability. Effort Yan et al. [47] explicitly enforces orthogonality between semantic and forgery subspaces based on CLIP representations. CFB (Li et al. 2025) performs multi-scale feature-level disentanglement of semantic and artifact representations using an Xception backbone. Beyond semantic-artifact disentanglement, recent studies [30, 51] further decompose forensic representations into generator-specific and generator-shared components to improve cross-generator generalization. Such methods assume that the shared artifact space can be effectively learned from a limited number of seen generators. However, given the limited diversity of generators available during training and the rapid evolution of deepfake generation techniques, this assumption may be overly restrictive and potentially lead to over-specialized representations. We therefore argue that preserving the diversity of forgery artifacts, rather than enforcing a predefined shared artifact space, may provide a more effective path toward robust generalization.

Reconstruction Based Representation Learning in Deepfake Detection

Reconstruction based representation learning[20, 23, 52] has been widely adopted to disentangle latent factors and learn discriminative feature representations. By reconstructing samples from latent representations, these methods encourage different representation subspaces to capture complementary information while suppressing nuisance factors. Inspired by its success in representation disentanglement, recent deepfake detection methods have incorporated reconstruction to separate semantic content from forgery-related representations. UCF Yan et al. [49] introduces cross-reconstruction to uncover common forgery features shared across different manipulation methods, encouraging the detector to focus on manipulation-relevant information. Similarly, PFGLin et al. [30] employs cross-reconstruction to disentangle demographic attributes from forgery representations, thereby learning domain-agnostic forensic features for improved cross-domain generalization. CFB(Li et al. 2025) extends reconstruction from the image level to the feature level, enabling multi-scale disentanglement of semantic and artifact representations. Despite their effectiveness, the reconstruction objective is designed in a task-agnostic manner rather than being tailored for forensic representation learning. Given that forgery artifacts are predominantly manifested in high-frequency components, directly reconstructing RGB images may provide suboptimal supervision for learning artifact-aware representations.

Method

Overview

Our framework aims to learn transferable forensic representations by preserving the diversity of manipulation artifacts rather than enforcing explicit artifact alignment. Given semantically aligned image pairs generated by different manipulation methods, the framework extracts disentangled semantic and artifact representations through a query-based encoder and a decouple head. To exploit the complementary information in diverse artifacts, we introduce a diversity-preserving cross-reconstruction module, where artifact representations are exchanged and incorporated into reconstruction. Meanwhile, masked high-frequency residuals are adopted as reconstruction targets to emphasize manipulation-related variations and facilitate the learning of transferable forensic representations.

For forgery detection, we introduce a CLIP-based classification module guided by artifact-aware attention biases. The entire framework is jointly optimized with classification loss, artifact contrastive loss, and cross-reconstruction loss, enabling effective exploitation of diverse manipulation cues for generalized deepfake detection.

Training Pair Formation

We adopt the FaceForensics++ (Rossler et al. [38]) dataset as the training set, since it provides pristine videos together with multiple face manipulation methods generated from the same source videos. Different from conventional cross-reconstruction methods, which typically construct training pairs from real and fake images, our training pairs are composed of semantically similar samples generated by different manipulation methods, as illustrated in Figure 2. Specifically, FF++ dataset consists of pristine videos together with two categories of manipulated videos: face reenactment and face swapping. During pair construction, pristine videos and face reenactment videos are grouped together, while face swapping videos are treated as a separate group. For each training pair, two videos are sampled from one group. The paired samples therefore exhibit highly consistent facial pose, expression, and background while originating from different generators. Afterward, frames with identical indices are extracted from each paired video to form image pairs for training. Standard face preprocessing, including face detection, alignment, and cropping, follows the protocol in DeepfakeBench (Yan et al. [50]).

Figure 2. Examples of the training data. (a) and (b) are generated by two face swapping methods. (c) and (d) are generated by two face reenactment methods. (e) and (f) show a face reenactment sample and its corresponding pristine image, which preserves the same semantic content.

Diversity Preserving Cross-Reconstruction

Encoder. Our encoder is built upon a lightweight Vision Transformer (ViT). Following ForensicAdapter (Cui et al. [9]) and VLA-Forge (Zhu et al. [53]), we introduce a set of learnable query tokens as Q0∈RNq×dv\mathbf{Q}_0 \in\mathbb{R}^{N_q \times d_v}. Instead of relying on a learnable projection to determine the functionality of query tokens, we explicitly assign different roles to the queries. Specifically, the first Nq/2=128N_q/2 = 128 query tokens Q0s∈RNq/2×dv\mathbf{Q}_0^s \in\mathbb{R}^{N_q/2 \times d_v} are designated as semantic queries, while the remaining 128 queries Q0a∈RNq/2×dv\mathbf{Q}_0^a \in\mathbb{R}^{N_q/2 \times d_v} are designated as artifact queries. The query tokens are then concatenated with the visual tokens and fed into ViT, where they progressively aggregate visual information through stacked Transformer blocks. Consequently, the output embeddings are denoted as [V,Qs,Qa]∈R(Np+Nq)×dv[\mathbf{V},\mathbf{Q}^s,\mathbf{Q}^a] \in\mathbb{R}^{(N_p+N_q)\times d_v}, where NpN_p denotes the number of spatial patches.

Decouple Head. We introduce a decouple head to transform the semantic and artifact query embeddings into task-specific latent representations. The semantic and artifact query embeddings are first projected into a shared latent space through multi-layer perceptrons (MLPs), yielding Q^s∈RNq/2×dl\hat{\mathbf{Q}}^s \in\mathbb{R}^{N_q/2 \times d_l} and Q^a∈RNq/2×dl\hat{\mathbf{Q}}^a \in\mathbb{R}^{N_q/2 \times d_l}, where dld_l denotes the latent embedding dimension. The visual tokens are projected into the same latent space as V^∈RL×dl\hat{\mathbf{V}} \in\mathbb{R}^{L \times d_l}. The query-conditioned features are generated using the inner product of query tokens [Q^s,Q^a][\hat{\mathbf{Q}}^s,\hat{\mathbf{Q}}^a] and visual tokens V^\hat{\mathbf{V}}:

fs=V^(Q^s)T,fa=V^(Q^a)T,(1)\mathbf{f}^s = \hat{\mathbf{V}}(\hat{\mathbf{Q}}^s)^\mathsf{T}, \qquad\mathbf{f}^a = \hat{\mathbf{V}}(\hat{\mathbf{Q}}^a)^\mathsf{T}, \tag*{(1)}

where fs,fa∈RNp×Nq/2\mathbf{f}^s,\mathbf{f}^a \in\mathbb{R}^{N_p \times N_q/2}. The resulting features retain the spatial correspondence of visual tokens and integrate query-specific information. fs\mathbf{f}^s captures semantic cues, while fa\mathbf{f}^a captures forgery-related artifact cues, which are further utilized for cross-reconstruction. For a pair of semantically aligned samples (xi,xj)(x_i,x_j), the decouple head produces four representations: {fis,fia,fjs,fja}\{\mathbf{f}_i^s,\mathbf{f}_i^a,\mathbf{f}_j^s,\mathbf{f}_j^a\}.

To enhance the discrimination of artifact representations, we introduce a mask-guided patch-level contrastive objective. Given a batch of artifact representations Fa∈RB×Np×dl\mathbf{F}^a \in\mathbb{R}^{B \times N_p \times d_l}, we further divide features into manipulated and non-manipulated regions according to the manipulation masks, denoted as Fra\mathbf{F}^a_r and Fna\mathbf{F}^a_n, respectively. Different from conventional contrastive learning that pulls all samples from the same category together, we do not impose alignment on manipulated patches. This is because artifacts introduced by different manipulation methods exhibit inherent diversity, and forcing them to be clustered may degrade the generalization ability to unseen generators. Therefore, we encourage the real patches to maintain feature consistency, while separating forgery patches from real regions. The artifact contrastive loss is formulated as:

Figure 3. Overview of the proposed artifact-aware disentanglement framework. Given a pair (xi,xj)(x_i, x_j), the encoder extracts visual tokens V\mathrm{V} and learns query tokens Qs\mathrm{Q}^{s} and Qa\mathrm{Q}^{a}. The decouple head produces semantic features fs\boldsymbol{f}^{s} and artifact features fa\boldsymbol{f}^{a}, which are used for cross-reconstruction. The artifact-aware attention bias guides the frozen CLIP encoder for forgery prediction. In the decoder, artifact features are exchanged between paired samples through AdaIN-based fusion to reconstruct the high-frequency masked targets. M\mathcal{M} denotes the union of manipulation masks, and Lcls\mathcal{L}_{cls}, Lcontra\mathcal{L}_{contra}, and Lcross\mathcal{L}_{cross} represent classification loss, artifact contrastive loss, and cross-reconstruction loss, respectively.

Lcontra=−log⁡exp⁡(δ(Fra,Fra)/τ)exp⁡(δ(Fra,Fra)/τ)+exp⁡(δ(Ffa,Fra)/τ)(2)\mathcal{L}_{contra}=-\log\frac{\exp(\delta(\mathbf{F}_{r}^{a},\mathbf{F}_{r}^{a})/\tau)}{\exp(\delta(\mathbf{F}_{r}^{a},\mathbf{F}_{r}^{a})/\tau)+\exp(\delta(\mathbf{F}_{f}^{a},\mathbf{F}_{r}^{a})/\tau)} \tag*{(2)}

Decoder. To further enforce the disentanglement between semantic and artifact representations, we introduce a reconstruction decoder. Given the four features produced by decouple head: {fis,fia,fjs,fja}\{f_i^s, f_i^a, f_j^s, f_j^a\}, the decoder performs cross-reconstruction by exchanging artifact representations while preserving semantic representations. Specifically, Adaptive Instance Normalization (AdaIN) [19] is employed to inject artifact representations into semantic representations:

AdaIN⁡(fs,fa)=σ(fa)fs−μ(fs)σ(fs)+μ(fa),(3)\operatorname{AdaIN}(f^s,f^a)=\sigma(f^a)\frac{f^s-\mu(f^s)}{\sigma(f^s)}+\mu(f^a), \tag*{(3)}

where μ(⋅)\mu(\cdot) and σ(⋅)\sigma(\cdot) denote the channel-wise mean and standard deviation, respectively. The exchanged representations are formulated as:

Zj←i=AdaIN⁡(fjs,fia),Zi←j=AdaIN⁡(fis,fja).(4)Z_{j\leftarrow i}=\operatorname{AdaIN}(f_j^s,f_i^a),\qquad Z_{i\leftarrow j}=\operatorname{AdaIN}(f_i^s,f_j^a). \tag*{(4)}

The reconstructed images are obtained through a lightweight decoder as:

x^j←i=D(Zj←i),x^i←j=D(Zi←j),(5)\hat{x}_{j\leftarrow i}=D(Z_{j\leftarrow i}),\qquad\hat{x}_{i\leftarrow j}=D(Z_{i\leftarrow j}), \tag*{(5)}

where DD denotes convolution layers that transform the dimension of the output as x^∈Rh×w×3\hat{x}\in\mathbb{R}^{h\times w\times3}.

Reconstruction Target. Directly reconstructing RGB images may introduce excessive low-frequency semantic information into the reconstruction objective, making it difficult to explicitly optimize the manipulation-related artifacts. To alleviate this issue, we redefine the reconstruction target by removing the low-frequency components from the original image. A Gaussian filter is adopted as a low-frequency filter, and the reconstruction target is formulated as:

xgt=x−G(x),(6)x^{gt}=x-G(x), \tag*{(6)}

where G(⋅)G(\cdot) denotes the Gaussian blur operation. By suppressing low-frequency information, the reconstructed target mainly preserves high-frequency variations, where manipulation artifacts are more prominent.

Given the reconstructed target xgtx^{gt} and the prediction x^\hat{x}, the reconstruction loss is defined as:

Lrec=∥x^−xgt∥.(7)\mathcal{L}_{rec}=\lVert\hat{x}-x^{gt}\rVert. \tag*{(7)}

Although the high-frequency reconstruction target emphasizes manipulation-related artifacts, not all high-frequency components are associated with forgery patterns. The background may contain irrelevant details, such as natural textures and scene details. Therefore, we introduce a spatial mask to focus the reconstruction supervision on manipulation-related regions. Since cross-reconstruction exchanges artifact representations between paired samples, the reconstructed target should contain artifact responses from both samples. We adopt the union of manipulation regions from the paired samples to cover all potential artifact areas. For a paired sample (xi,xj)(x_i, x_j), the reconstruction mask is defined as:

M=Mi∪Mj,(8)\mathcal{M} = \mathcal{M}_i \cup\mathcal{M}_j, \tag*{(8)}

where Mi\mathcal{M}_i and Mj\mathcal{M}_j denote the binary pixel-level masks of the manipulated regions in the paired samples. The final cross-reconstruction loss is calculated within the manipulated regions:

Lcross=M⊙(∥(x^j←i−xjgt)∥+∥(x^i←j−xigt)∥),(9)\mathcal{L}_{\mathrm{cross}} = \mathcal{M} \odot\left(\left\lVert\left(\hat{x}_{j\leftarrow i} - x_j^{\mathrm{gt}}\right) \right\rVert+ \left\lVert\left(\hat{x}_{i\leftarrow j} - x_i^{\mathrm{gt}}\right) \right\rVert\right), \tag*{(9)}

where ⊙\odot denotes element-wise multiplication.

Classification. To fully leverage the capability of the pre-trained VLM, we adopt a frozen CLIP visual encoder with an attention bias mechanism similar to SideAdapter(Xu et al. 2023a) as our classification module. Specifically, the initial CLS token of CLIP is duplicated NqN_q times to form additional tokens: X[CLS∗]=[X[CLS],…,X[CLS]]∈RNq×dcX_{[\mathrm{CLS}^*]} = [X_{[\mathrm{CLS}]}, \ldots, X_{[\mathrm{CLS}]}] \in\mathbb{R}^{N_q \times d_c}, which are concatenated with the original CLIP input tokens: [Xvis0,X[CLS]0,X[CLS∗]0][X_{\mathrm{vis}}^0, X_{[\mathrm{CLS}]}^0, X_{[\mathrm{CLS}^*]}^0]. During the training process, the CLIP parameters are frozen, while the duplicated CLS tokens are updated through self-attention with an artifact-aware attention bias. Specifically, an attention mask is applied to the self-attention operation, where the duplicated CLS tokens X[CLS∗]X_{[\mathrm{CLS}^*]} are allowed to interact only with the visual patch tokens. At the ll-th Transformer layer, the update of X[CLS∗]X_{[\mathrm{CLS}^*]} can be formulated as:

X[CLS∗]l+1=Softmax⁡(Q[CLS∗]l(Kvisl)T+ΔT)Vvisl,(10)X_{[\mathrm{CLS}^*]}^{l+1} = \operatorname{Softmax}\left(Q_{[\mathrm{CLS}^*]}^l (K_{\mathrm{vis}}^l)^{\mathsf{T}} + \Delta^{\mathsf{T}}\right)V_{\mathrm{vis}}^l, \tag*{(10)}

where Q[CLS∗]lQ_{[\mathrm{CLS}^*]}^l, KvislK_{\mathrm{vis}}^l, and VvislV_{\mathrm{vis}}^l denote the query of X[CLS∗]X_{[\mathrm{CLS}^*]}, key of visual tokens, and value of visual tokens at the ll-th layer, respectively. Δ\Delta represents the artifact-aware attention bias, which is generated from the decouple head using the same artifact queries QaQ^a as those used to generate the artifact representation. This process can be denoted as:

Δ=ϕ(V)(Q^a)T,(11)\Delta= \phi(V)(\hat{Q}^a)^{\mathsf{T}}, \tag*{(11)}

where ϕ(⋅)\phi(\cdot) denotes a learnable projection implemented by MLPs. After LL Transformer layers, the final duplicated CLS representations are obtained as X[CLS∗]L∈RNq×dcX_{[\mathrm{CLS}^*]}^L \in\mathbb{R}^{N_q \times d_c}. The authenticity prediction is produced by applying a classification head:

y^=Softmax⁡(Conv⁡(X[CLS∗]L)),(12)\hat{y} = \operatorname{Softmax}\left(\operatorname{Conv}\left(X_{[\mathrm{CLS}^*]}^L\right)\right), \tag*{(12)}

where y^\hat{y} denotes the predicted class. Given the ground truth label yy, the binary classification loss is formulated as:

Lcls=−(ylog⁡y^+(1−y)log⁡(1−y^)).(13)\mathcal{L}_{\mathrm{cls}} = -\left(y \log\hat{y} + (1-y)\log(1-\hat{y})\right). \tag*{(13)}

Overall Objectives

The overall training objective is designed to jointly optimize the classification capability, artifact contrastive learning, and cross-reconstruction. The final objective is formulated as:

L=λ1Lcls+λ2Lcontra+λ3Lcross,(14)\mathcal{L} = \lambda_1 \mathcal{L}_{\mathrm{cls}} + \lambda_2 \mathcal{L}_{\mathrm{contra}} + \lambda_3 \mathcal{L}_{\mathrm{cross}}, \tag*{(14)}

where λ1\lambda_1, λ2\lambda_2, and λ3\lambda_3 are hyper-parameters controlling the contribution of each loss term.

Experiments

Settings

Dataset. Following previous works, we train our model on the c23 version of FaceForensics++ (FF++) dataset [38]. For evaluation, we conduct cross-dataset experiments on widely-used benchmarks, including Celeb-DF-v1/v2 (Li et al. 2020b), DFDC (Dolhansky et al. [12]), DFDC (Dolhansky et al. [11]), DFD (Dufour and Gully [15]), and four full-face synthesis datasets in DF40 (Yan et al. [48]), including VQGAN (Esser, Rombach, and Ommer [16]), StyleGAN-XL (Sauer, Schwarz, and Geiger [39]), SiT-XL/2 (SiT) (Atito, Awais, and Kittler [1]), and DiT (Peebles and Xie [35]).

Implementation Details. We use ViT-Tiny/16 (Dosovitskiy et al. [14]) for visual feature extraction and a frozen CLIP ViT-L/14 (Radford et al. [37]) for classification. The entire model is trained on the FF++ c23 training set with a batch size of 16, using the Adam optimizer (Kingma and Ba [21]) with a learning rate of 0.0002 and a weight decay of 0.0005. The overall objective is optimized with a weighted combination of classification loss, artifact contrastive loss, and cross-reconstruction loss, where the loss weights λ1\lambda_1, λ2\lambda_2, and λ3\lambda_3 are set to 10, 20, and 50, respectively. Detection performance is evaluated by AUC (Area Under the ROC Curve), AP (Average Precision), and EER (Equal Error Rate).The random seed is fixed to 1020 for reproducible experiments. All experiments are conducted on one NVIDIA RTX 4090 GPU.

Evaluations

Cross-Dataset Evaluation. We first evaluate the generalization ability of our method under a cross-dataset setting, where models are trained on FF++ and tested on several unseen datasets. As shown in Table 1, our method achieves the best overall performance among compared approaches, obtaining the highest average AUC of 90.6% across five benchmark datasets. In particular, our method improves the detection performance on multiple unseen domains, achieving AUC scores of 93.0% and 90.3% on CDF-v1 and CDF-v2, respectively, while also maintaining strong performance on DFDC, DFDC, and DFD. These results demonstrate that our proposed representation learning strategy can effectively capture generalizable forensic patterns beyond dataset-specific artifacts, leading to more robust cross-domain deepfake detection.

MethodVenueCDF-v1CDF-v2DFDCDFDCPDFDAvg.
Xception ([38])ICCV’190.7790.7370.7080.7370.8160.755
F3Net ([36])AAAI’200.7770.7350.7020.7350.7980.749
X-ray ((Li et al. 2019))CVPR’200.7090.6790.6330.6940.7660.696
FFD ([10])CVPR’200.7840.7440.7030.7430.8020.755
SPSL ([31])CVPR’210.8150.7650.7040.7410.8120.767
SRM ([33])CVPR’210.7930.7550.7000.7410.8120.760
Recce ([4])CVPR’220.7680.7320.7130.7340.8120.752
SBI ([40])CVPR’22-0.813-0.7990.774-
UCF ([49])ICCV’230.7790.7530.7190.7590.8070.763
ED ((Ba et al. 2024))AAAI’240.8180.8640.7210.851--
LSDA ([46])CVPR’240.8670.8300.7360.8150.8800.826
CFM ([32])TIFS’24-0.828-0.7580.915-
UDD ((Fu et al. 2025))AAAI’25-0.8690.7580.8560.910-
ForAda ([9])†CVPR’250.9090.8820.8610.9050.9240.896
CRDA ([7])AAAI’260.9010.8540.7430.797--
VLAForge ([53])†CVPR’260.9070.8950.8690.9070.9290.901
Ours-0.9300.9030.8730.8980.9290.906

Table 1. Cross-dataset evaluation results (Frame-level AUC). All methods are trained on FF++ and evaluated on other datasets. The best results are indicated in bold and the second-best results are underlined. † denotes results reproduced by us.

We further evaluate whether the learned representations can be effectively generalized from frame-level detection to video-level prediction. Comparison with existing approaches is presented in Table 2. Notably, our method achieves state-of-the-art performance on CDF-v2 and DFDC, obtaining AUC scores of 95.1% and 89.5%, respectively.

MethodVenueCDF-v2DFDC
TALL ((Xu et al. 2023b))ICCV’230.9080.768
SeeABLE ([22])ICCV’230.8730.759
TALL++ ((Xu et al. 2024))IJCV’240.9200.785
SAM ([5])CVPR’240.890-
FCG ([18])CVPR’250.9500.818
AUNet ([3])CVPR’230.9280.738
CADDM ([13])CVPR’230.9390.739
SFDG ([42])CVPR’230.7580.736
LSDA ([46])CVPR’240.9110.770
ForAda ([9])†CVPR’250.9290.883
RepDFD ([29])AAAI’250.8990.810
VLAForge ([53])†CVPR’260.9420.893
Ours-0.9510.895

Table 2. Cross-dataset evaluation results (Video-level AUC). The top section presents video-based methods and the bottom section corresponds to frame-based methods. † denotes results reproduced by us.

These results further verify that the learned representations can capture robust forensic cues beyond specific datasets and remain effective when applied to practical video-level deepfake detection scenarios.

Cross-Generator Evaluation. To evaluate generalization to unseen generation methods, we conduct cross-dataset experiments on four unseen generators, including VQGAN, StyleGAN, SiT, and DiT. As shown in Table 3, our method achieves competitive performance at both frame and video levels. Particularly, our method outperforms existing approaches on diffusion-based generators, achieving AUC improvements on SiT and DiT. This demonstrates that preserving artifact diversity enables the model to capture complementary forensic cues beyond seen generator statistics, improving generalization to unseen manipulations. For GAN-based generators, our method also achieves comparable performance.

SettingMethodVQGANStyleGANSiTDiT
F-levelForAda†0.9780.8970.7670.707
F-levelVLAForge†0.9830.9800.7940.737
F-levelOurs0.9840.9580.8020.749
V-levelForAda†0.9980.9650.8500.800
V-levelVLAForge†0.9950.9930.8800.815
V-levelOurs0.9990.9950.8810.824

Table 3. AUC results on frame-level (F-level) and video-level (V-level) forgery detection across GAN- and diffusion-based generators. † denotes results reproduced by us.

Ablation Study

Impact of Loss Functions. We investigate the effectiveness of the proposed loss functions in Table 4. Since the classification loss directly supervises the final deepfake detection objective, we keep it unchanged and focus on evaluating the contributions of Lcontra\mathcal{L}_{contra} and Lcross\mathcal{L}_{cross}. Removing both losses results in a clear performance drop, demonstrating the importance of learning artifact-aware representations. Among them, Lcross\mathcal{L}_{cross} provides the dominant improvement, increasing the AUC from 85.6% to 91.4% on CDF-v1 and from 85.3% to 89.3% on CDF-v2.

Lcontra\mathcal{L}_{\mathrm{contra}}Lcross\mathcal{L}_{\mathrm{cross}}CDF-v1CDF-v2DFDCDFDCPDFD
AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓
××0.8560.91423.20.8530.92023.30.8600.88622.00.8940.94319.20.9200.98214.6
×✓0.9140.93918.40.8930.94013.10.8580.88322.50.8910.94119.50.9220.98913.9
✓×0.8890.92819.50.8690.92721.80.8460.87423.50.8760.93520.80.9180.99014.7
✓✓0.9300.95515.60.9030.94718.40.8730.89721.10.8980.94518.60.9290.99113.8

Table 4. Ablation study on the effect of contrastive and cross-reconstruction losses. Evaluation metrics are frame-level AUC, AP, and EER, respectively.

Impact of Cross-Reconstruction Settings. We investigate the impact of different cross-reconstruction designs, including the choice of reconstruction pairs and targets. As shown in Table 5, we establish a baseline using real-fake pairs with RGB image reconstruction. By replacing real-fake pairs with semantically identical fake pairs generated by different manipulation methods, the detection performance is improved on most datasets. The AUC on CDF-v1 increases from 87.1% to 90.5%, demonstrating that fake-fake pairs provide a more effective way to capture diverse forensic artifacts while reducing semantic interference.

SettingPairTargetCDF-v1CDF-v2DFDCDFDCPDFD
AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓AUC ↑AP ↑EER ↓
Conv.R-FRGB0.8710.91823.20.8410.90723.60.8180.83526.20.8450.91124.20.9030.98817.9
F-FRGB0.9050.94118.00.8960.94218.90.8690.89321.10.9080.94317.10.9250.98914.1
R-FRes0.8860.93220.90.8800.93620.80.8590.88321.90.8690.93021.90.9240.99113.9
OursF-FRes0.9300.95515.60.9030.94718.40.8730.89721.10.8980.94518.60.9290.99113.8

Table 5. Ablation study on the cross-reconstruction module. R-F and F-F denote real-fake pairs and semantically identical fake pairs. RGB and Res represent RGB image reconstruction target and our residual target.

Furthermore, replacing RGB reconstruction with residual reconstruction further enhances the generalization capability by focusing on high-frequency forensic cues rather than image content. Combining both designs, i.e., fake-fake pairs with residual reconstruction, achieves the best overall performance, obtaining the highest AUC on four out of five benchmark datasets and improving the AUC on CDF-v1 from 87.1% to 93.0%. These results verify that the proposed cross-reconstruction strategy benefits from both artifact-aware pair construction and residual-level supervision, enabling the model to learn more generalizable forensic representations beyond dataset-specific appearance information.

Visualization

The t-SNE Visualization. To further analyze the effectiveness of the proposed adapter, we visualize the feature distributions extracted from the original CLIP and the adapted CLIP with the proposed attention bias mechanism. Specifically, we construct a visualization set containing 2,000 samples, where the seen samples are randomly selected from the FF++ while the unseen samples are collected from the CDF-v1. We then apply the t-SNE algorithm to project the extracted features into a two-dimensional space for visualization. As shown in Figure 4, Our method does not require explicit feature alignment between different datasets, yet still

Figure 4. T-SNE visualization of feature distributions.

preserves clear discrimination under domain shifts. This further supports our motivation that modeling diverse and transferable forensic artifacts is more effective than enforcing dataset-level alignment for cross-domain generalization.

Conclusion

In this work, we revisit cross-reconstruction for image forgery detection and highlight the importance of artifact diversity in improving generalization. Unlike previous approaches that attempt to align heterogeneous artifacts or exclude them from reconstruction, we demonstrate that diverse manipulation artifacts contain complementary forensic cues that should be preserved and exploited. Based on this insight, we propose an artifact-aware disentanglement framework that leverages semantically aligned cross-generator pairs. By incorporating artifact representations into cross-reconstruction and introducing masked high-frequency residual targets, our framework learns transferable forensic representations while maintaining diverse artifact characteristics. Extensive experiments on multiple benchmarks demonstrate the effectiveness of our approach under both cross-dataset and cross-generator evaluation settings.

References

  1. [1]Atito, S.; Awais, M.; and Kittler, J. 2021. SiT: Self-supervised vision transformer. arXiv preprint arXiv:2104.03602.arxiv.org/abs/2104.03602
  2. [3]Bai, W.; Liu, Y.; Zhang, Z.; Li, B.; and Hu, W. 2023. Aunet: Learning relations between action units for face forgery detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 24709–24719.DOI
  3. [4]Cao, J.; Ma, C.; Yao, T.; Chen, S.; Ding, S.; and Yang, X. 2022. End-to-end reconstruction-classification learning for face forgery detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 4113–4122.DOI
  4. [5]Choi, J.; Kim, T.; Jeong, Y.; Baek, S.; and Choi, J. 2024. Exploiting style latent flows for generalizing deepfake video detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 1133–1143.arxiv.org/abs/2403.06592
  5. [6]Chollet, F. 2017. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, 1251–1258.arxiv.org/abs/1610.02357
  6. [7]Chou, Y.; Yu, T.; Huang, W.; Dai, T.; Xia, S.-T.; et al. 2026. Improving deepfake detection with reinforcement learning-based adaptive data augmentation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, 3381–3389.arxiv.org/abs/2511.07051
  7. [8]Concas, S.; La Cava, S. M.; Casula, R.; Orru, G.; Puglisi, G.; and Marcialis, G. L. 2024. Quality-based artifact modeling for facial deepfake detection in videos. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 3845–3854.DOI
  8. [9]Cui, X.; Li, Y.; Luo, A.; Zhou, J.; and Dong, J. 2025. Forensics adapter: Adapting clip for generalized face forgery detection. In Proceedings of the Computer Vision and Pattern Recognition Conference, 19207–19217.arxiv.org/abs/2411.19715
  9. [10]Dang, H.; Liu, F.; Stehouwer, J.; Liu, X.; and Jain, A. K. 2020. On the detection of digital face manipulation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 5781–5790.arxiv.org/abs/1910.01717
  10. [11]Dolhansky, B.; Britton, J.; Pflaum, B.; Lu, J.; Howes, R.; Wang, M.; and Ferrer, C. C. 2020. The deepfake detection challenge (dfdc) dataset. arXiv preprint arXiv:2006.07397.arxiv.org/abs/2006.07397
  11. [12]Dolhansky, B.; Howes, R.; Pflaum, B.; Baram, N.; and Ferrer, C. C. 2019. The deepfake detection challenge (dfdc) preview dataset. arXiv preprint arXiv:1910.08854.arxiv.org/abs/1910.08854
  12. [13]Dong, S.; Wang, J.; Ji, R.; Liang, J.; Fan, H.; and Ge, Z. 2023. Implicit identity leakage: The stumbling block to improving deepfake detection generalization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 3994–4004.arxiv.org/abs/2210.14457
  13. [14]Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. 2020. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929.arxiv.org/abs/2010.11929
  14. [15]Dufour, N.; and Gully, A. 2019. Contributing Data to Deepfake Detection Research. https://research.google/blog/contributing-data-to-deepfake-detection-research/. Accessed: 2021-11-13.
  15. [16]Esser, P.; Rombach, R.; and Ommer, B. 2021. Taming transformers for high-resolution image synthesis. In 2021 IEEE/CVF conference on computer vision and pattern recognition (CVPR), 12868–12878. IEEE.arxiv.org/abs/2012.09841
  16. [18]Han, Y.-H.; Huang, T.-M.; Hua, K.-L.; and Chen, J.-C. 2025. Towards more general video-based deepfake detection through facial component guided adaptation for foundation model. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 22995–23005.arxiv.org/abs/2404.05583
  17. [19]Huang, X.; and Belongie, S. 2017. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE international conference on computer vision, 1501–1510.arxiv.org/abs/1703.06868
  18. [20]Kim, H.; and Mnih, A. 2018. Disentangling by factorising. In International conference on machine learning, 2649–2658. PMLR.arxiv.org/abs/1802.05983
  19. [21]Kingma, D. P.; and Ba, J. 2014. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980.arxiv.org/abs/1412.6980
  20. [22]Larue, N.; Vu, N.-S.; Struc, V.; Peer, P.; and Christophides, V. 2023. Seeable: Soft discrepancies and bounded contrastive learning for exposing deepfakes. In Proceedings of the IEEE/CVF international conference on computer vision, 21011–21021.arxiv.org/abs/2211.11296
  21. [23]Lee, H.-Y.; Tseng, H.-Y.; Huang, J.-B.; Singh, M.; and Yang, M.-H. 2018. Diverse image-to-image translation via disentangled representations. In Proceedings of the European conference on computer vision (ECCV), 35–51.arxiv.org/abs/1808.00948
  22. [29]Lin, K.; Lin, Y.; Li, W.; Yao, T.; and Li, B. 2025. Standing on the shoulders of giants: Reprogramming visual-language model for general deepfake detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, 5262–5270.arxiv.org/abs/2409.02664
  23. [30]Lin, L.; He, X.; Ju, Y.; Wang, X.; Ding, F.; and Hu, S. 2024. Preserving fairness generalization in deepfake detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 16815–16825.arxiv.org/abs/2402.17229
  24. [31]Liu, H.; Li, X.; Zhou, W.; Chen, Y.; He, Y.; Xue, H.; Zhang, W.; and Yu, N. 2021. Spatial-phase shallow learning: rethinking face forgery detection in frequency domain. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 772–781.arxiv.org/abs/2103.01856
  25. [32]Luo, A.; Kong, C.; Huang, J.; Hu, Y.; Kang, X.; and Kot, A. C. 2023. Beyond the prior forgery knowledge: Mining critical clues for general face forgery detection. IEEE Transactions on Information Forensics and Security, 19: 1168–1182.arxiv.org/abs/2304.12489
  26. [33]Luo, Y.; Zhang, Y.; Yan, J.; and Liu, W. 2021. Generalizing face forgery detection with high-frequency features. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 16317–16326.arxiv.org/abs/2103.12376
  27. [34]Nguyen, D.; Mejri, N.; Singh, I. P.; Kuleshova, P.; Astrid, M.; Kacem, A.; Ghorbel, E.; and Aouada, D. 2024. Laa-net: Localized artifact attention network for quality-agnostic and generalizable deepfake detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 17395–17405.arxiv.org/abs/2401.13856
  28. [35]Peebles, W.; and Xie, S. 2023. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF international conference on computer vision, 4195–4205.arxiv.org/abs/2212.09748
  29. [36]Qian, Y.; Yin, G.; Sheng, L.; Chen, Z.; and Shao, J. 2020. Thinking in frequency: Face forgery detection by mining frequency-aware clues. In European conference on computer vision, 86–103. Springer.arxiv.org/abs/2007.09355
  30. [37]Radford, A.; Kim, J. W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; et al. 2021. Learning transferable visual models from natural language supervision. In International conference on machine learning, 8748–8763. PmLR.arxiv.org/abs/2103.00020
  31. [38]Rossler, A.; Cozzolino, D.; Verdoliva, L.; Riess, C.; Thies, J.; and Nießner, M. 2019. FaceForensics++: Learning to detect manipulated facial images. In Proceedings of the IEEE/CVF international conference on computer vision, 1–11.arxiv.org/abs/1901.08971
  32. [39]Sauer, A.; Schwarz, K.; and Geiger, A. 2022. Stylegan-xl: Scaling stylegan to large diverse datasets. In ACM SIGGRAPH 2022 conference proceedings, 1–10.arxiv.org/abs/2202.00273
  33. [40]Shiohara, K.; and Yamasaki, T. 2022. Detecting deepfakes with self-blended images. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 18720–18729.arxiv.org/abs/2204.08376
  34. [41]Stehouwer, J.; Dang, H.; Liu, F.; Liu, X.; and Jain, A. 2019. On the detection of digital face manipulation. arXiv, arXiv–1910.arxiv.org/abs/1910.01717
  35. [42]Wang, Y.; Yu, K.; Chen, C.; Hu, X.; and Peng, S. 2023. Dynamic graph learning with content-guided spatial-frequency relation reasoning for deepfake detection. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 7278–7287.DOI
  36. [46]Yan, Z.; Luo, Y.; Lyu, S.; Liu, Q.; and Wu, B. 2024a. Transcending forgery specificity with latent space augmentation for generalizable deepfake detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 8984–8994.arxiv.org/abs/2311.11278
  37. [47]Yan, Z.; Wang, J.; Wang, Z.; Jin, P.; Zhang, K.-Y.; Chen, S.; Yao, T.; Ding, S.; Wu, B.; and Yuan, L. 2024b. Effort: Efficient orthogonal modeling for generalizable ai-generated image detection. arXiv preprint arXiv:2411.15633, 2(6): 7.
  38. [48]Yan, Z.; Yao, T.; Chen, S.; Zhao, Y.; Fu, X.; Zhu, J.; Luo, D.; Wang, C.; Ding, S.; Wu, Y.; et al. 2024c. Df40: Toward next-generation deepfake detection. Advances in Neural Information Processing Systems, 37: 29387–29434.
  39. [49]Yan, Z.; Zhang, Y.; Fan, Y.; and Wu, B. 2023a. Ucf: Uncovering common features for generalizable deepfake detection. In Proceedings of the IEEE/CVF international conference on computer vision, 22412–22423.arxiv.org/abs/2304.13949
  40. [50]Yan, Z.; Zhang, Y.; Yuan, X.; Lyu, S.; and Wu, B. 2023b. Deepfakebench: A comprehensive benchmark of deepfake detection. arXiv preprint arXiv:2307.01426.arxiv.org/abs/2307.01426
  41. [51]Yang, Y.; Li, Y.; Huang, H.; Li, Z.; Du, B.; and Wu, Y. 2026. Improving Synthesized Image Detection by Disentangling Generator-Shared and Generator-Specific Image Artifacts. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 8019–8028.DOI
  42. [52]Zhao, S.; Liu, W.; Xu, D.; Zhou, J. T.; and Wang, Z. 2026. PhyTrace: Tracing Physical Inconsistency in AI-Generated Images via ISP Emulation. IEEE Transactions on Image Processing, 1–1.DOI
  43. [53]Zhu, J.; Miao, Y.; Zhang, X.; Deng, J.; and Pang, G. 2026. Unleashing Vision-Language Semantics for Deepfake Video Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 42953–42963.arxiv.org/abs/2603.24454

Paper details

vlnc:W_tu5te96j
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents