Detecting Deepfakes via Hamiltonian Dynamics

Authors: Harry Cheng, Ming-Hui Liu, Tianyi Wang, Weili Guan, Liqiang Nie, Mohan Kankanhalli

Published: 2026-05-06 01:55:38+00:00

Comment: First Version

AI Summary

This paper introduces Hamiltonian Action Anomaly Detection (HAAD), a novel approach to deepfake detection that shifts from static pattern recognition to dynamical stability analysis. It hypothesizes that real images reside near stable, low-energy equilibria while deepfakes occupy unstable, high-energy states on a learned potential energy surface. HAAD operationalizes this by employing Hamiltonian-inspired dynamics to probe latent image features and quantifying dynamic behaviors through Hamiltonian action and energy dissipation for classification, demonstrating superior generalization across challenging cross-dataset transfer benchmarks.

Abstract

Driven by the rapid development of generative AI models, deepfake detectors are compelled to undergo periodic recalibration to capture newly developed synthetic artifacts. To break this cycle, we propose a new perspective on deepfake detection: moving from static pattern recognition to dynamical stability analysis. Specifically, our approach is motivated by physics-inspired priors: we hypothesize that natural images, as products of dissipative physical processes, tend to settle near stable, low-energy equilibria. In contrast, generative models optimize for statistical similarity to real images but do not explicitly enforce structural constraints such as geometric smoothness, leaving deepfakes more likely to occupy unstable, high-energy states. To operationalize this, we introduce Hamiltonian Action Anomaly Detection (HAAD), comprising three contributions: \\textbf{i)} We model the image latent manifold as a potential energy surface. Under this hypothesis, real images are expected to produce basin-like low-energy responses, whereas fake images are more likely to induce high-potential, high-gradient responses. \\textbf{ii)} We employ Hamiltonian-inspired dynamics as a stability probe. By releasing latent states from rest, samples near stable regions remain bounded, while high-gradient samples produce larger trajectory responses. \\textbf{iii)} We quantify these dynamic behaviors through two trajectory statistics, \\ie, Hamiltonian action and energy dissipation. Extensive experiments show that HAAD outperforms evaluated state-of-the-art baselines on challenging cross-dataset transfer benchmarks, supporting a physics-inspired stability prior for digital forensics.


Key findings
HAAD achieves the highest average AUC (0.921) on cross-dataset deepfake detection and (0.944) on cross-manipulation benchmarks, significantly outperforming 14 state-of-the-art baselines. It also demonstrated the highest average accuracy (0.931) for synthetic image detection across various unseen generative models. The approach showed improved robustness against common post-processing corruptions and generalized effectively across different backbone architectures, validating the efficacy of its physics-inspired stability prior.
Approach
HAAD models image latent features as particles on a potential energy surface, where real images are hypothesized to be in stable, low-energy basins, and deepfakes in unstable, high-gradient regions. It employs Hamiltonian-inspired dynamics (specifically, a symplectic integrator) to simulate particle trajectories. The dynamic behaviors are then quantified using two trajectory statistics: Hamiltonian action and energy dissipation, which serve as discriminative features for binary classification.
Datasets
FaceForensics++ (FF++), Celeb-DF++, CDF-v2, DFDC, DFD, DFo, WildDeepfake, FFIW, DF40, GenImage (including subsets: Midjourney, SDv1.4, SDv1.5, ADM, GLIDE, Wukong, VQDM, BigGAN).
Model(s)
CLIP ViT-L/14 (as backbone). The HAAD module itself consists of lightweight linear layers for physical state projection and potential parameterization heads, and a lightweight MLP for the mass estimation network.
Author countries
Singapore, China