Veritas: Generalizable Deepfake Detection via Pattern-Aware Reasoning

Hao Tan, Jun Lan, Zichang Tan, Ajian Liu, Chuanbiao Song, Senyuan Shi, Huijia Zhu, Weiqiang Wang, Jun Wan, Zhen Lei

TL;DR

This paper introduces HydraFake, a comprehensive new deepfake dataset designed to simulate real-world industrial challenges through rigorous out-of-distribution testing. Leveraging this dataset, the authors propose Veritas, a multi-modal large language model (MLLM) detector that mimics human forensic experts by using a structured, pattern-aware reasoning framework to achieve state-of-the-art generalization on unseen forgeries and novel data domains.

What Problem Does This Paper Address?

Deepfake detection (DFD) is a rapidly evolving game of cat-and-mouse. While academic detectors have made significant strides, a massive gap remains between laboratory benchmarks and real-world industrial deployment. Standard academic evaluations typically involve training a model on one homogeneous dataset and testing it on another. However, in production environments, detectors have access to abundant training samples but must generalize to completely unseen, high-quality forgery techniques (e.g., advanced face personalization or relighting) and diverse data domains (e.g., compressed social media uploads).

Furthermore, while multi-modal large language models (MLLMs) possess strong general reasoning capabilities, they are notoriously poor at direct deepfake detection out of the box. Existing attempts to use MLLMs for this task usually rely on them merely as "post-hoc explainers" for decisions already made by smaller, specialized vision models, failing to leverage the MLLM's intrinsic reasoning potential.

Methods

The authors introduce Veritas, an MLLM-based deepfake detector trained via a novel two-stage pipeline designed to internalize human-like forensic thinking patterns.

1. Pattern-Aware Reasoning Framework

Instead of relying on vanilla Chain-of-Thought (CoT) prompting, Veritas structures its decision-making process using five distinct human-like thinking patterns, explicitly demarcated by XML tags:

  • <fast>: Initial quick judgment or first impression.
  • <planning>: A layered, systematic strategy for analyzing challenging samples.
  • <reasoning>: Detailed evidence collection and artifact localization.
  • <reflection>: In-depth thinking to verify, support, or overturn the initial judgment.
  • <conclusion>: Synthesis of all evidence into a final verdict.

2. Two-Stage Training Pipeline

To seamlessly embed these patterns into the base MLLM (InternVL3-8B), the authors develop a two-stage training strategy:

Figure 3: Overview of two-stage training pipeline. (a) For Pattern-Guided Cold-Start, we first employ SFT to internalize thinking patterns. Then we introduce MiPO to facilitate human-aligned reasoning. The MiPO dataset consists of mixed non-preference data, encouraging model to perform precise and fine-grained reasoning. (b) For Pattern-Aware GRPO, we introduce pattern-aware re- ward to incentivize adaptive reasoning ability on pattern granularity, yielding our VERITAS model.
  • Stage 1: Pattern-Guided Cold-Start: The model undergoes Supervised Fine-Tuning (SFT) on a meticulously annotated dataset to inject the required tag formats. To ensure the model actually learns to reason rather than just memorizing answers, the authors introduce Mixed Preference Optimization (MiPO). MiPO uses a combination of human-annotated preferences and rejected trajectories (where the model gave vague or incorrect reasoning) to steer the model toward precise, fine-grained visual analysis.
  • Stage 2: Pattern-Aware Exploration: To encourage adaptive planning and self-reflection, the model is further optimized using Pattern-aware Group Relative Policy Optimization (P-GRPO). This reinforcement learning stage uses a custom reward function that penalizes overthinking on easy images but highly rewards correct answers achieved through successful planning and self-reflection on difficult ones.

Datasets

The authors introduce the HydraFake dataset, which consists of 50,000 real images and 50,000 fake images.

  • Real Images: Sourced from 8 public datasets spanning low- to high-resolution face images.
  • Fake Images: Combines classic deepfakes (localized face-swapping/reenactment), public deepfake benchmarks, and advanced self-reimplemented techniques (such as face relighting via IC-Light, face personalization via PuLID, and autoregressive generation via VAR). It also includes real-world deepfakes crawled from commercial applications like GPT-4o and Dreamina.

To simulate real-world conditions, the evaluation protocol is split hierarchically into four levels: In-Domain, Cross-Model (unseen architectures), Cross-Forgery (unseen manipulation techniques), and Cross-Domain (unseen data sources and qualities).

Figure 2: Overview of HydraFake dataset. (a) We carefully collect and reimplement advanced deepfake techniques to construct our HydraFake dataset. Real images are collected from 8 datasets. Fake images are from classic datasets, high-quality public datasets and our self-constructed deepfake data. (b) We introduce a rigorous evaluation protocol. Training data contains abundant samples but limited forgery types. Evaluations are split into four levels. (c) Illustration of the subsets in different evaluation splits. (d) Performance of existing detectors. Most detectors generalize well on Cross- Model setting but perform poorly on Cross-Forgery and Cross-Domain scenarios.

Key Insights and Ideas

  • Structure Over Length: Simply encouraging an MLLM to write longer explanations does not improve deepfake detection. Instead, enforcing structured forensic patterns—specifically planning and self-reflection—is what unlocks out-of-distribution (OOD) generalization.
  • The Resolution Bias: MLLMs exhibit a strong intuitive split based on image quality. They excel at analyzing high-resolution images (where they can "see" fine-grained texture anomalies) but struggle significantly on low-resolution images, where traditional small vision models still maintain an edge due to better distribution modeling.
  • Mitigating the "Honest" MLLM Bias: Zero-shot MLLMs naturally tend to classify facial images as authentic photographs. Forcing the model to actively look for inconsistencies via preference optimization is essential to break this cognitive bias.

Key Results

Veritas achieves state-of-the-art performance across all evaluation splits on the HydraFake dataset, yielding a 6.0% average accuracy gain over the best specialized small vision detectors.

Figure 1: Comparison of the detection outputs. InternVL3-78B (Zhu et al., 2025) gets incorrect answer. GPT-4o (Hurst et al., 2024) and our model trained without the proposed MiPO both fail to provide precise explanation. In contrast, our model gives transparent and faithful decision process.
  • OOD Generalization: Veritas achieves over 90.0% accuracy on entirely unseen forgery types like face restoration and personalization. It also maintains robust performance on in-the-wild data, scoring 92.3% on Dreamina and 89.2% on GPT-4o generated images.
  • Comparison to Base MLLMs: Veritas outperforms its base model by an average of 32.4%, and beats powerful closed-source models like Gemini-2.5-Pro by 11.8%.
  • Robustness: Without being explicitly trained on data augmentations, Veritas demonstrates remarkable intrinsic robustness against JPEG compression and Gaussian blur, maintaining high detection accuracy where other models degrade.

Limitations and Future Work

  • Image Modality Only: HydraFake and Veritas are currently limited to static images. Extending this framework to extract and evaluate temporal artifacts in video generation models remains a challenging next step.
  • Low-Resolution Performance: Veritas still exhibits performance drops on low-quality subsets (like DeepFaceLab and FFIW) because its reasoning engine relies heavily on fine visual details.
  • Future Directions: The authors suggest exploring collaborative hybrid systems that combine the semantic, high-resolution reasoning strengths of MLLMs with the low-resolution distribution-modeling advantages of smaller vision models.

Summary updated

BibTeX
@inproceedings{tan2026veritas,
  author = {Hao Tan and Jun Lan and Zichang Tan and Ajian Liu and Chuanbiao Song and Senyuan Shi and Huijia Zhu and Weiqiang Wang and Jun Wan and Zhen Lei},
  title = {{Veritas: Generalizable Deepfake Detection via Pattern-Aware Reasoning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=5VXJPS1HoM},
}
Figure