Can we focus on Forgery Cues?: Weighted Token Aggregation and Prompt Optimization for Deepfake Detection

AAAI 2027

Seunghyun Kim, Minyoung Jeon, Juheon Park, Junyong Jang, Jaehyup Lee†

Kyungpook National University

† Corresponding author

Abstract

Recent advances in Vision-Language Models (VLMs) have significantly improved the generalization capability of video deepfake detection by leveraging large-scale pretrained knowledge. However, most existing methods primarily focus solely on the visual encoder, while the few that leverage the text encoder still depend on fixed text prompts, limiting their ability to adapt to diverse forgery patterns.

To address this issue, we propose a robust deepfake detection framework that jointly exploits both the visual and text encoder. Specifically, we fine-tune the final transformer block of CLIP’s visual encoder, to produce discriminative patch embeddings for real and fake regions. Meanwhile, multiple replicated class tokens are fed into Weighted Token Aggregation (WTA) module, which aggregates complementary forgery cues into a discriminative representation. Furthermore, we introduce a Prompt Refinement Module, where misclassified images are fed into an auxiliary VLM to optimize the prompts. The optimized prompts are then encoded by the text encoder to produce more discriminative textual representations, thereby improving classification performance.

Extensive experiments on multiple datasets demonstrate that our method consistently outperforms existing state-of-the-art approaches while exhibiting strong cross-dataset generalization. More importantly, this work establishes a principled framework for jointly optimizing visual and textual representations in CLIP-based deepfake detection, providing a strong foundation for future research on adaptive vision-language forensics models.

Method

Misclassified frames reveal forgery cues that the current class prompts overlook. We use these frames to revise the descriptions of real and fake faces during training.

Fixed class prompts are replaced by real and fake prompts updated from misclassified examples.
From fixed to adaptive prompts. Incorrect predictions feed back into the class descriptions during training.

Framework overview

Architecture showing the CLIP visual encoder, weighted class tokens, patch adaptation, prompt refinement, and classification branches.
Framework overview. Global, patch, and text-guided predictions are combined for the final decision.

Prompt refinement across training

Successive prompts describe more specific cues, including jawline definition, mouth contours, and reflections. Each column traces the revisions for one class.

Real and fake prompts evolve from generic labels to descriptions of facial boundaries, texture, and light reflections.
Prompt evolution. The two columns trace the updates for the real and fake classes.

Quantitative Results

The detector is trained on FaceForensics++ (c23). The first two tables report cross-dataset ROC AUC. The third reports frame-level and video-level ROC AUC on the DF40 full-face synthesis subset. Higher values are better.

Frame-level AUC

MethodVenueCDF-v1CDF-v2DFDCDFDAvg.
Xception (Rossler et al. 2019)ICCV’1977.973.770.881.676.0
X-ray (Li et al. 2020a)CVPR’2070.967.963.376.669.7
FFD (Dang et al. 2020)CVPR’2078.474.470.380.275.8
SPSL (Liu et al. 2021)CVPR’2181.576.570.481.277.4
SRM (Luo et al. 2021)CVPR’2179.375.570.081.276.5
Recce (Cao et al. 2022)CVPR’2276.873.271.381.275.6
SBI (Shiohara and Yamasaki 2022)CVPR’2283.180.271.477.478.0
UCF (Yan et al. 2023a)ICCV’2377.975.371.980.776.5
ProDet (Cheng et al. 2024)Neurips’2490.984.572.4––
LSDA (Yan et al. 2024a)CVPR’2486.783.073.688.082.8
RepDFD (Lin et al. 2025)AAAI’2583.080.077.385.881.5
VLAForge† (Zhu et al. 2026)CVPR’2689.289.884.692.389.0
Ours–92.689.886.793.390.6

† Reproduced using the official code under consistent experimental settings.

Video-level AUC

MethodVenueCDF-v2DFDCDFD
SBI (Shiohara and Yamasaki 2022)CVPR’2293.272.488.2
TALL (Xu et al. 2023)ICCV’2383.169.383.3
SeeABLE (Larue et al. 2023)ICCV’2387.375.9–
IID (Huang et al. 2023)CVPR’2383.870.093.9
SFDG (Wang et al. 2023)CVPR’2375.873.688
CADDM (Dong et al. 2023)CVPR’2393.973.9–
LAA-NET (Nguyen et al. 2024)CVPR’2495.4–80.0
SAM (Choi et al. 2024)CVPR’2489.0–96.1
ProDet (Cheng et al. 2024)Neurips’2492.670.790.1
LSDA (Yan et al. 2024a)CVPR’2489.873.595.6
CDFA (Lin et al. 2024)ECCV’2493.883.095.4
Effort† (Yan et al. 2024b)ICML’2592.785.195.7
Yan et al. (Yan et al. 2025)CVPR’2594.784.396.5
FCG (Han et al. 2025)CVPR’2595.081.8–
RepDFD (Lin et al. 2025)AAAI’2589.981.095.1
VLAForge† (Zhu et al. 2026)CVPR’2694.886.896.3
Ours–95.588.997.2

† Reproduced using the official code under consistent experimental settings.

Cross-generator Results

LevelMethodVQGANStyleGANSiTDiTPixArt
Frame-levelRepDFD80.582.258.258.788.5
VLAForge97.396.976.070.097.9
Ours99.798.982.377.799.1
Video-levelRepDFD85.086.369.358.994.8
VLAForge99.196.984.080.399.3
Ours10010096.494.1100

Qualitative Results

Patch–text similarity maps show which facial regions align with the fake prompt. Compare the predictions with the ground-truth mask across the four examples below.

Four rows comparing each manipulated input with its ground truth, VLAForge prediction, and our prediction.
Patch–text similarity. Each row shows one example, from the input frame on the left to our prediction on the right.

Localization viewer

Sample A / D
Manipulated input frame, sample A
Input frame
Our patch–text similarity prediction, sample A
Explore samples

Figure

Original PDF