Region-Aware Temporal Inconsistency Learning for DeepFake Video Detection
Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence. Main Track. Pages 920-926.
https://doi.org/10.24963/ijcai.2022/129
Keywords
- Computer Vision: Biometrics, Face, Gesture and Pose Recognition
Abstract
The rapid development of face forgery techniques has drawn growing attention due to security concerns. Existing deepfake video detection methods always attempt to capture the discriminative features by directly exploiting static temporal convolution to mine temporal inconsistency, without explicit exploration on the diverse temporal dynamics of different forged regions. To effectively and comprehensively capture the various inconsistency, in this paper, we propose a novel Region-Aware Temporal Filter (RATF) module which automatically generates corresponding temporal filters for different spatial regions. Specifically, we decouple the dynamic temporal kernel into a set of region-agnostic basic filters and region-sensitive aggregation weights. And different weights guide the corresponding regions to adaptively learn temporal inconsistency, which greatly enhances the overall representational ability. Moreover, to cover the long-term temporal dynamics, we divide the video into multiple snippets and propose a Cross-Snippet Attention (CSA) to promote the cross-snippet information interaction. Extensive experiments and visualizations on several benchmarks demonstrate the effectiveness of our method against state-of-the-art competitors.
- [Carreira and Zisserman, 2017] Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017.
- [Chen et al., 2021] Shen Chen, Taiping Yao, Yang Chen, Shouhong Ding, Jilin Li, and Rongrong Ji. Local relation learning for face forgery detection. In AAAI, 2021.
- [Dolhansky et al., 2019] Brian Dolhansky, Russ Howes, Ben Pflaum, Nicole Baram, and Cristian Canton Ferrer. The deepfake detection challenge (dfdc) preview dataset. In arXiv, abs/1910.08854, 2019.
- [Gu et al., 2021a] Qiqi Gu, Shen Chen, Taiping Yao, Yang Chen, Shouhong Ding, and Ran Yi. Exploiting fine- grained face forgery clues via progressive enhancement learning. In AAAI, 2021.
- [Gu et al., 2021b] Zhihao Gu, Yang Chen, Taiping Yao, Shouhong Ding, Jilin Li, Feiyue Huang, and Lizhuang Ma. Spatiotemporal inconsistency learning for deepfake video detection. In ACM MM, 2021.
- [Hu et al., 2021] Ziheng Hu, Hongtao Xie, Yuxin Wang, Ji- ahong Li, Zhongyuan Wang, and Yongdong Zhang. Dy- namic inconsistency-aware deepfake video detection. In IJCAI, 2021. IJCAI
- [Jia et al., 2016] Xu Jia, Bert De Brabandere, Tinne Tuyte- laars, and Luc V Gool. Dynamic filter networks. In NIPS, 2016.
- [Li et al., 2020a] Lingzhi Li, Jianmin Bao, Ting Zhang, Hao Yang, Dong Chen, Fang Wen, and Baining Guo. Face x-ray for more general face forgery detection. In CVPR, 2020.
- [Li et al., 2020b] Xiaodan Li, Yining Lang, Yuefeng Chen, Xiaofeng Mao, Yuan He, Shuhui Wang, Hui Xue, and Quan Lu. Sharp multiple instance learning for deepfake video detection. In ACM MM, 2020.
- [Li et al., 2020c] Yuezun Li, Xin Yang, Pu Sun, Honggang Qi, and Siwei Lyu. Celeb-df: A large-scale challenging dataset for deepfake forensics. In CVPR, 2020.
- [Liu et al., 2020] Zhaoyang Liu, Donghao Luo, Yabiao Wang, Limin Wang, Ying Tai, Chengjie Wang, Jilin Li, Feiyue Huang, and Tong Lu. Teinet: Towards an efficient architecture for video recognition. In AAAI, 2020.
- [Liu et al., 2021] Zhaoyang Liu, Limin Wang, Wayne Wu, Chen Qian, and Tong Lu. Tam: Temporal adaptive module for video recognition. In ICCV, 2021.
- [Masi et al., 2020] Iacopo Masi, Aditya Killekar, Roys- ton Marian Mascarenhas, Shenoy Pratik Gurudatt, and Wael AbdAlmageed. Two-branch recurrent network for isolating deepfakes in videos. In ECCV, 2020.
- [Qi et al., 2020] Hua Qi, Qing Guo, Felix Juefei-Xu, Xiaofei Xie, Lei Ma, Wei Feng, Yang Liu, and Jianjun Zhao. Deep- rhythm: Exposing deepfakes with attentional visual heart- beat rhythms. In ACM MM, 2020.
- [Rossler et al., 2019] Andreas Rossler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. Faceforensics++: Learning to detect manipulated facial images. In ICCV, 2019.
- [Selvaraju et al., 2017] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017.
- [Sohrawardi et al., 2019] Saniat Javid Sohrawardi, Akash Chintha, Bao Thai, Sovantharith Seng, Andrea Hickerson, Raymond Ptucha, and Matthew Wright. Poster: Towards robust open-world detection of deepfakes. In CCS, 2019.
- [Sun et al., 2022] Ke Sun, Taiping Yao, Shen Chen, Shouhong Ding, Rongrong Ji, et al. Dual contrastive learn- ing for general face forgery detection. In AAAI, 2022.
- [Wang et al., 2018] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018.
- [Wang et al., 2020a] Gengxing Wang, Jiahuan Zhou, and Ying Wu. Exposing deep-faked videos by anomalous co- motion pattern detection. In arXiv, abs/2008.04848, 2020.
- [Wang et al., 2020b] Xinyao Wang, Taiping Yao, Shouhong Ding, and Lizhuang Ma. Face manipulation detection via auxiliary supervision. In ICONIP, 2020.
- [Wu et al., 2021] Wenhao Wu, Yuxiang Zhao, Yanwu Xu, Xiao Tan, Dongliang He, Zhikang Zou, Jin Ye, Yingying Li, Mingde Yao, Zichao Dong, et al. Dsanet: Dynamic segment aggregation network for video-level representa- tion learning. In ACM MM, 2021.
- [Zhang et al., 2020] Shiwen Zhang, Sheng Guo, Weilin Huang, Matthew R Scott, and Limin Wang. V4d: 4d con- volutional neural networks for video-level representation learning. In arXiv, abs/2002.07442, 2020.
- [Zhang et al., 2021] Daichi Zhang, Chenyu Li, Fanzhao Lin, Dan Zeng, and Shiming Ge. Detecting deepfake videos with temporal dropout 3dcnn. In IJCAI, 2021. IJCAI
- [Zhou et al., 2021] Jingkai Zhou, Varun Jampani, Zhixiong Pi, Qiong Liu, and Ming-Hsuan Yang. Decoupled dynamic filter networks. In CVPR, 2021.
- [Zi et al., 2020] Bojia Zi, Minghao Chang, Jingjing Chen, Xingjun Ma, and Yu-Gang Jiang. Wilddeepfake: A chal- lenging real-world dataset for deepfake detection. In ACM MM, 2020.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
With the tremendous development of generative models, various face manipulation techniques have been proposed, such as DeepFakes and Face2Face. Since they can generate highquality fake face videos that are even indistinguishable by human eyes, they can easily be abused and trigger severe societal problems or political threats over the world. Therefore, it is urgent to develop effective face forgery detection methods.
Recently, significant progress has been achieved for identifying DeepFakes. Image-based detection methods attempt to exploit diverse cues to learn discriminative features, including blending boundary [Li et al., 2020a; Wang et al., 2020b] and frequency information [Chen et al., 2021; Gu et al., 2021a; Sun et al., 2022]. However, as the forged faces become more and more realistic, it is challenging for these approaches to mine the subtle clues. Besides, since the temporal information between frames is not considered, these methods can only identify the fake videos frame by frame, which also limits the performance. Therefore, many works have developed video-based methods [Li et al., 2020b; Gu et al., 2021b] to take such temporal information into consideration. Earlier methods directly adopt general temporal modeling networks, e.g., LSTM [Sohrawardi et al., 2019] and 3DCNN, resulting in inferior performance and high computational cost. Recently, several approaches propose effective and efficient temporal modeling for this task. S-MIL [Li et al., 2020b] treats faces and each input video as instances and a bag respectively, and designs a multi-instance learning framework to model the inconsistency in nearby frames. STIL [Gu et al., 2021b] presents a temporal modeling paradigm by exploiting the temporal difference over adjacent frames along with different directions. Though these methods have effectively improved the performance, there are still some limitations in learning the comprehensive temporal inconsistency.
∗Equal Contributions. This work is done when Zhihao Gu was a research intern at Tencent Youtu Lab.
†Corresponding Authors.

On the one hand, these methods always apply a sparse sampling strategy on videos to capture temporal information over the entire video. However, the stride between sampled frames might be too large to capture the inconsistency resulting from subtle forgery traces. On the other hand, in terms of local temporal inconsistency modeling, these methods utilize the traditional static temporal convolution without explicit exploration of the temporal dynamics of different forged regions, which is not sufficient to capture the comprehensive inconsistency information. To show this more intuitively, in Fig. 1, we select two different forged regions of a deepfake video and denote the absolute difference value of the region between adjacent frames as temporal inconsistency. These two regions have not only different magnitudes of inconsistency but also different temporal inconsistency patterns.
To address these issues, we propose a novel Region-Aware Temporal Inconsistency Learning framework for deepfake video detection. Concretely, the Region-Aware Temporal Filter (RATF) module is introduced to automatically generate corresponding temporal filters for different spatial regions, which decouples the dynamic temporal kernel into a set of region-agnostic basic filters and region-aware aggregation weights. And different weights guide the corresponding regions to adaptively learn self-unique temporal inconsistency. Moreover, to cover the long-term temporal dynamics, we divide the video into multiple snippets and propose a Cross-Snippet Attention (CSA) to promote the cross-snippet information interaction and obtain comprehensive representations for the entire video. Extensive experiments on several popular benchmarks, i.e., FF++, DFDC, Celeb-DF, and WildDeepfake datasets, demonstrate the effectiveness of our method against the state-of-the-art competitors in both intradataset and cross-dataset evaluations. In summary, our main contributions are as follows:
- We propose a novel Region-Aware Temporal Inconsistency Learning framework for deepfake video detection, which automatically generates corresponding temporal filters for guiding different regions to learn self-unique temporal inconsistency.
- Combined with the specially designed sampling strategy, the Cross-Snippet Attention (CSA) module is proposed to facilitate the cross-snippet information interaction for more comprehensive representations.
- Extensive experiments and visualizations demonstrate the effectiveness of our method against the state-of-theart competitors on several widely used benchmarks.
2 RelatedWork
DeepFake Detection. The recent deepfake video detectors can be divided into image-based and video-based methods. Image-based detection methods attempt to exploit diverse cues to learn discriminative features, including blending boundary [Li et al., 2020a; Wang et al., 2020b] and frequency information [Chen et al., 2021; Gu et al., 2021a; Sun et al., 2022]. However, these works ignore the temporal information in videos, which is also an essential clue for deepfake detection. Therefore, recent video-based approaches take temporal inconsistency into consideration. Comotion [Wang et al., 2020a] models the temporal motion of multiple specific spatial locations to extract robust representation. TD-3DCNN [Zhang et al., 2021] introduces a temporal dropout 3D-CNN to detect deepfake videos. S-MIL [Li et al., 2020b] treats faces and each input video as instances and a bag respectively, and designs a multi-instance learning framework to model the inconsistency in nearby frames. DIANet [Hu et al., 2021] handles the problem by capturing both the global and local inconsistency between adjacent two frames. And STIL [Gu et al., 2021b] designs a temporal modeling paradigm by exploiting temporal difference over adjacent frames along different directions. Though these methods have effectively improved the performance, they always utilize the traditional static temporal convolution without explicit exploration of the temporal dynamics of different forged regions, which may be not sufficient to capture the comprehensive inconsistency information.
Dynamic Filters. Methods in this category aim to generate filter values based on the input features instead of traditional static convolution. [Jia et al., 2016] first introduces the idea of dynamic filter, and has been developed by its successors. DDF [Zhou et al., 2021] designs a dynamic filter module to learn channel-wise filters along with spatial weights for dense convolution. However, these methods only focus on generating spatial filters. Recently, several works try to generate dynamic temporal filters for the action recognition task. TAM [Liu et al., 2021] presents an adaptive module to generate temporal kernels for video-specific information aggregation. DSANet [Wu et al., 2021] introduces a dynamic segment aggregation module to aggregate temporal information. As for deepfake video detection task, since different regions have diverse temporal inconsistency patterns, these methods inspire us to adopt dynamic temporal filters for comprehensive inconsistency learning. Instead of directly learning the temporal kernels, we decouple the dynamic temporal kernel into a set of region-agnostic basic filters and region-sensitive aggregation weights. And the different weights guide regions to adaptively learn self-unique temporal inconsistency.
3 ProposedMethod
3.1 Overview
We propose to learn dynamic temporal filters at each spatial position for modeling diverse temporal inconsistency. Given a video V = [F1, . . . , F|V|], where |V| is the length of the video, we divide it into N equal segments and randomly sample T consecutive frames in each segment to obtain N snippets. Based on them, we design a Region-Aware Temporal Filter (RATF) module to decouple the dynamic temporal kernel into a set of region-agnostic basic filters and regionsensitive aggregation weights. Different aggregation weights thus guide the corresponding regions to adaptively learn the intra-snippet temporal inconsistency. Then a Cross-Snippet Attention (CSA) is introduced to promote the information interaction between snippets. Finally, the outputs are further averaged for deciding whether the video is forged or not. Figure 2 illustrates the pipeline.
3.2 Region-Aware Temporal Filter Module
Instead of applying static convolution on the temporal dimension, we propose a self-adaptive mechanism to generate different temporal convolution filters for different spatial regions. This mechanism is instantiated as the Region-Aware Temporal Filter (RATF) module and applied within each snippet. As depicted in Figure 2, the module mainly contains two branches: the basis branch and the weight branch. The former generates region-agnostic basic filters while the latter generates corresponding region-sensitive weights at each spatial location. The two branches produce depth-wise temporal filters through multiplication.

Formally, the input feature Sn of nth snippet is first split along the channel dimension with ratio γ into two parts: S1n ∈ RγC×T×H×W and S2n ∈ R(1-γ)C×T×H×W . S1n is fed into the two branches to learn the temporal filters. In the basis branch, since we aim to generate region-agnostic temporal bases, we first flatten the input features S1n along the spatial dimension, and then use adaptive average pooling to down-sample the dimension to r, resulting in F . Two fully connected (FC) layers with the ReLU function follow next to produce the final basis vectors:
where W1 and W2 correspond to the weights of the FC layers and r is the number of basis. Each basis is in the dimension of γc × k, where k denotes the temporal kernel size.
In the weight branch, we design an Align Convolution block at the head to compensate for the pixel position shifts between adjacent frames caused by subtle facial movements. This alignment is accomplished in a self-adaptive manner:
where Conv1, Conv2 and Conv3 are covolutions with kernel size 3×3, 1×1 and 3×3 respectively. After that, for each spatial position (:, i, j), all the channels of every frame are aggregated together and then reduced to r by a 1 × 1 convolution.
So that the region-sensitive weights are obtained and the r aggregation weights for each location [η:,i,j 0 , η:,i,j 1 , . . . .η:,i,j r-1 ] are generated, which are further normalized into [0, 1] via the softmax operation:
where τ is the temperature scalar. Finally, the learned pixelwise temporal filters are obtained by linearly summing the r basis with r weights at each spatial location, which is in the dimension of γc × k × h × w.
The learned weights WA dynamically endow each spatial location with different temporal filters and depth-wise convolving S1n with [W:,i,j] pixel-wisely leads to S′1n . Then the concatenation of S′1n and the remaining unprocessed S2n gives the final output SO n . Under this design, different forged regions may be assigned with different temporal filters, so that the captured local inconsistency is more fine-grained and comprehensive. Note that if the aggregation weights between adjacent spatial positions are similar, then they share the same temporal kernel. Therefore, the regions are formed. This is why our method is region-aware.
3.3 Cross-Snippet Attention
With RATF mining region-aware local inconsistency within each snippet, we further propose a Cross-Snippet Attention (CSA) to promote inter-snippet interactions, which focuses on the long-range inconsistency over the entire video.
The CSA gathers the network outputs and then conducts interactions between them to guide the attention map generation. Inspired by NonLocal [Wang et al., 2018], we utilize the outer product operation and accumulate the dependencies from each snippet to the remained ones for inter-snippet information encoding:
| Methods | FaceForensics++ HQ | FaceForensics++ LQ | ||||||
|---|---|---|---|---|---|---|---|---|
| DF | F2F | FS | NT | DF | F2F | FS | NT | |
| ResNet-50† | 0.9893 | 0.9857 | 0.9964 | 0.9500 | 0.9536 | 0.8893 | 0.9464 | 0.8750 |
| Xception | 0.9893 | 0.9893 | 0.9964 | 0.9500 | 0.9678 | 0.9107 | 0.9464 | 0.8714 |
| LSTM | 0.9964 | 0.9929 | 0.9821 | 0.9393 | 0.9643 | 0.8821 | 0.9429 | 0.8821 |
| I3D | 0.9286 | 0.9286 | 0.9643 | 0.9036 | 0.9107 | 0.8643 | 0.9143 | 0.7857 |
| TEI† | 0.9786 | 0.9714 | 0.9750 | 0.9429 | 0.9500 | 0.9107 | 0.9464 | 0.9036 |
| TAM† | 0.9929 | 0.9857 | 0.9964 | 0.9536 | 0.9714 | 0.9214 | 0.9571 | 0.9286 |
| DSANet† | 0.9929 | 0.9929 | 0.9964 | 0.9571 | 0.9679 | 0.9321 | 0.9536 | 0.9178 |
| V4D† | 0.9964 | 0.9929 | 0.9964 | 0.9607 | 0.9786 | 0.9357 | 0.9536 | 0.9250 |
| FaceNetLSTM | 0.8900 | 0.8700 | 0.9000 | - | - | - | - | - |
| Co-motion-70 | 0.9910 | 0.9325 | 0.9830 | 0.9045 | - | - | - | - |
| DeepRhythm | 0.9870 | 0.9890 | 0.9780 | - | - | - | - | - |
| ADDNet-3d† | 0.9214 | 0.8393 | 0.9250 | 0.7821 | 0.9036 | 0.7821 | 0.8000 | 0.6929 |
| S-MIL | 0.9857 | 0.9929 | 0.9929 | 0.9571 | 0.9679 | 0.9143 | 0.9464 | 0.8857 |
| S-MIL-T | 0.9964 | 0.9964 | 1.0 | 0.9429 | 0.9714 | 0.9107 | 0.9607 | 0.8679 |
| STIL | 0.9964 | 0.9929 | 1.0 | 0.9536 | 0.9821 | 0.9214 | 0.9714 | 0.9178 |
| Ours | 0.9964 | 0.9929 | 1.0 | 0.9607 | 0.9928 | 0.9536 | 0.9714 | 0.9393 |
where Sin i denotes the network output of the ith snippet and WI is a shared 1 × 1 convolution for channel reduction with default ratio 8. ˆ S′n encodes the inter-snippet mutual information and is re-mapped back to each snippet Sout n :
En is a snippet-specific global representation for Sin n and we further obtain the output:
where WO is a 1 × 1 convolution for dimension retrieval and GAP represents the global average pooling. The CSA is placed at the end of the last RATF block, and the output Sout n is fed to the fully-connected layer for final binary decisions.
4 Experiments
4.1 Experimental Settings
Datasets. To evaluate the proposed method, we perform state-of-the-art comparison under intra-dataset and crossdataset generalization settings on four popular benchmarks: FaceForensics++ (FF++) [Rossler et al., 2019], Celeb-DF [Li et al., 2020c], DFDC [Dolhansky et al., 2019], WildDeepfake [Zi et al., 2020]. FaceForensics++ contains 1,000 real and 4,000 fake videos synthesized by four forgery techniques, i.e., DeepFakes (DF), Face2Face (F2F), FaceSwap (FS), and NeuralTextures (NT) with multiple visual quality, e.g., high quality (HQ) and low quality (LQ). Celeb-DF comprises of 590 real and 5,639 forged videos and is processed by an improved synthesis algorithm. DFDC comprises of around 5,000 videos with some faces partially forged, and the manipulations are unknown. WildDeepfake makes up 7,314 face sequences with various duration and thus is more challenging.
Baseline Methods. We take SOTA methods in deepfake video detection and video analysis as baselines. For imagebased methods, ResNet and Xception are selected. For deepfake video detectors, FaceNetLSTM [Sohrawardi et al., 2019], Co-motion [Wang et al., 2020a], S-MIL [Li et al., 2020b], DeepRhythm [Qi et al., 2020], ADDNet-3d [Zi et al., 2020], STIL [Gu et al., 2021b] and DIANet [Hu et al., 2021] are considered. Moreover, action recognition methods comprises of I3D [Carreira and Zisserman, 2017], TEI [Liu et al., 2020] and V4D [Zhang et al., 2020]. Models learning dynamic temporal filters, i.e., TAM [Liu et al., 2021] and DSANet [Wu et al., 2021] are also compared.
Implementation Details. We detect faces following common practice [Li et al., 2020b]. We use γ = 0.5 for simplification and empirically set τ 0.01. During training, we sample U = 4 snippets and each snippet contains T = 4 frames. And images are resized to 224×224 as input to the network. The off-the-shelf ResNet-50 is exploited as the backbone with parameters pre-trained on the ImageNet. The RATF module is inserted before every 3 × 3 Conv in each building block while the CSA is put upon the output of the backbone. The temperature scalar is set as 10-2 . We adopt the Adam algorithm to optimize the binary cross-entropy loss and train the network for 45 epochs on 8 GPUs with the initial learning rate of 10-4 . The learning rate is divided by 10 for every 15 epochs and batch-size is 12. Random horizontal flip is employed as the data augmentation. During inference, eight 4-length snippets are centrally sampled from each segment.
| Methods | Celeb-DF | DFDC | Wild-DF |
| Xception | 0.9944 | 0.8458 | 0.8325 |
|---|---|---|---|
| I3D† | 0.9923 | 0.8082 | 0.6269 |
| DIANet | - | 0.8583 | - |
| TEI† | 0.9912 | 0.8697 | 0.8164 |
| TAM† | 0.9923 | 0.8932 | 0.8251 |
| V4D† | 0.9942 | 0.8739 | 0.8375 |
| DSANet† | 0.9942 | 0.8867 | 0.8474 |
| ADDNet-3D† | 0.9516 | 0.7966 | 0.6550 |
| S-MIL | 0.9923 | 0.8378 | - |
| S-IML-T | 0.9884 | 0.8511 | - |
| STIL† | 0.9961 | 0.8980 | 0.8462 |
| Ours | 0.9981 | 0.9331 | 0.8573 |
| model | DF | F2F | FS | NT |
|---|---|---|---|---|
| ResNet-50 | 0.9536 | 0.8893 | 0.9464 | 0.8750 |
| + T-Conv | 0.9821 | 0.9250 | 0.9607 | 0.9143 |
| + RATF | 0.9821 | 0.9393 | 0.9678 | 0.9312 |
| + CSA | 0.9821 | 0.9286 | 0.9607 | 0.9178 |
| + RATF∗ + CSA | 0.9893 | 0.9286 | 0.9643 | 0.9178 |
| + RATF + CSA | 0.9928 | 0.9536 | 0.9714 | 0.9393 |
basis num DF
F2F
FS NT
21
22
23
0.9750 0.9321 0.9571 0.9178
0.9821 0.9428 0.9607 0.9321
0.9928 0.9536 0.9714 0.9393
24
0.9857 0.9500 0.9643 0.9357
(b) Study on the amount of temporal basis.
stages DF F2F
FS NT
Stage1
0.9785 0.9250 0.9571 0.9107
Stage2
0.9821 0.9250 0.9607 0.9143
Stage3
0.9821 0.9286 0.9607 0.9178
Stage4
0.9857 0.9286 0.9643 0.9214
Stage1+2+3+4 0.9928 0.9536 0.9714 0.9393
(c) Study on stages of RATF module.
Table 4: Ablation study of our method on FF++ dataset under LQ setting. RATF∗ and T-Conv represent RATF without align conv and the vanilla temporal convolution, respectively.
4.2 State-of-the-art Comparisons
We perform intra-dataset comparisons on FF++, Celeb-DF, DFDC, and WildDeepfake datasets, and report the accuracy as the evaluation metrics. Cross-dataset generalization is evaluated under the Area Under Curve (AUC) metrics.
Intra-dataset Comparisons
Results on FF++. Table 1 illustrates the comprehensive experiments on FF++ dataset under both LQ and HQ settings. We can observe that the SOTA action recognition models perform better than image-based methods like ResNet-50 and the advanced V4D is competitive with STIL which is specially designed for deepfake detection. However, detectors including ADDNet-3d, S-MIL, and STIL model the inconsistency upon sparsely sampled frames and ignore the intra-snippet information, which limits their representation capacity. On the contrary, our method captures diverse inconsistency through generating corresponding temporal filters for different spatial regions and promotes the cross-snippet information interaction by CSA. It thus outperforms nearly all competitors under all settings. What's more, on more difficult F2F and NT LQ settings, we achieve 95.36% and 93.93% accuracies, exceeding about 2% than V4D and 3% than the previous best deepfake detector STIL. All these analyses show the advancement of learning dynamic filters in our method.
| Methods | FF++ DF | Celeb-DF | DFDC |
|---|---|---|---|
| Xception | 0.9550 | 0.6550 | 0.5939 |
| I3D† | 0.9541 | 0.7411 | 0.6687 |
| TEI† | 0.9654 | 0.7466 | 0.6742 |
| TAM† | 0.9704 | 0.6796 | 0.6714 |
| V4D† | 0.9674 | 0.7008 | 0.6734 |
| DIANet | 0.9040 | 0.7040 | - |
| TD-3DCNN | - | 0.5732 | 0.5502 |
| DSANet† | 0.9688 | 0.7371 | 0.6808 |
| DoubleRNN | 0.9318 | 0.7341 | - |
| ADDNet-3D† | 0.9622 | 0.6085 | 0.6589 |
| STIL† | 0.9712 | 0.7558 | 0.6788 |
| Ours | 0.9824 | 0.7650 | 0.6906 |
Results on Celeb-DF, DFDC and WildDeepfake. The proposed framework is also evaluated on three other datasets as listed in Table 2. It can be found that our method consistently surpasses the SOTAs, especially on DFDC by a large margin of about 4%. This derives from the fact that our RATF module captures dynamic and more fine-grained local inconsistency through generating region-aware temporal filters. Especially, our method is snippet based and the CSA mechanism encodes the inter-snippets global information, which is beneficial to the detection of partially forged videos and therefore achieves significant performance improvements on the DFDC dataset.
Cross-dataset Generalization Following [Masi et al., 2020], we validate the generalization of the proposed framework by training the model under FF++ LQ setting against four manipulations and then testing it on FF++ DF, Celeb-DF, and DFDC datasets respectively. We report the AUC metrics in Table 3. It can be observed that our framework outperforms all the competitors with about 1% performance gain on average. FF++ and Celeb-DF derive from the single forgery and thus are relatively easy to generalize to. However, the manipulations in DFDC are unknown and videos may be partially forged. In this case, the inter-snippet interaction may help make better video-level decisions and, therefore, our method achieves better results.
4.3 Ablation Study
Study on RATF and CSA. The importance of RATF and CSA is evaluated in Table 4 (a). Extracting image-level information, the vanilla ResNet-50 performs worst. Compared to directly using the fixed temporal filters for temporal inconsistency, learning them via RATF improves the overall performance more than 2% especially on NT. Surprisingly, only encoding inter-snippet interaction through an attention mechanism upon the ResNet-50 also promotes the detection and performs slightly better than it. Combining intra and intersnippet information achieves the best results.


Study on the number of temporal basis. In general, the performance is robust to r as studied in Table 4 (b). We can observe that fewer temporal basis, limiting the extraction of inconsistency representations, leads to relatively inferior results. However, too large values will also cause a certain performance drop, the possible reason for which may be that too many bases are hard to optimize.
Study on stage of RATF. Table 4 (c) explores the impacts of inserting RATF module into different stages. All stages benefit from learning dynamic kernels, achieving performance gain from 0.4% to 1.8%. Inserting one module to stage 4 obtains better performance than others, implying that the higher level of semantic features benefits more from it. Finally, inserting RATF into all stages yields the best results.
4.4 Visualization and Analysis
Activation maps. To study what the network depends on to identify forged videos, we visualize the activation maps via Grad-CAM [Selvaraju et al., 2017] as shown in Figure 3. Clearly, the activation varies for different forgery techniques. For DeepFake and FaceSwap, deriving from manipulating the whole facial areas, our model successfully focuses on the forged areas. However, for Face2Face and NeuralTextures, which manipulate partial areas, the focus of the proposed method shrinks to smaller areas such as mouth and center regions. Therefore, our method can learn essential features under only video-level supervision.

Effects of CSA. The CSA is designed to promote crosssnippet interaction to form a more comprehensive global view. We study the impacts of CSA on the FF++ dataset and present the visualization in Figure 5. The pixel-level difference map between the original and the forged frame is used as the ground truth (GT) manipulation map. It shows that CSA helps to comprehensively focus on the forged areas (the mouth area of the left example) and suppress the activation of irrelevant areas(the neck area of the right example). This demonstrates the effectiveness of the CSA.
Aggregationweights. To intuitively display the learned aggregate weights in RATF, we select the temporal filter fr with the maximum aggregation weight as the representative for this spatial position. Then, we aggregate the positions which select the same temporal filter and get r maps. As shown in Figure 4, we first show the maps for DF and NT attacks in the r = 4 setting, and we can see that the forged region individually chooses its filter to model their special temporal inconsistency, such as the face region in DF attack and the mouth region in NT attack. And the other regions like background, face contour, non-forged face region also select different filters. Moreover, in the r = 8 setting, we display the filter map which focuses on the forged face regions, and it is obvious that different regions, such as nose, eyes, select different filters, which further proves that different regions have diverse temporal dynamics, and the necessity of learning region-aware temporal inconsistency for the task.
5 Conclusion
In this paper, we propose a novel region-aware temporal inconsistency learning framework for deepfake video detection, which dynamically generates diverse temporal filters for different forged regions through a novel Region-Aware Temporal Filter (RATF) module. To capture the long-term temporal inconsistency, we divide the video into multiple snippets and propose a Cross-Snippet Attention (CSA) mechanism to promote the cross-snippet interaction. The proposed framework presents superior performance on four popular benchmarks, and extensive visualizations also illustrate its effectiveness.
Acknowledgements
This research is supported in part by the National Natural Science Foundation of China (No. 61972157 and No. 72192821), National Key Research and Development Program of China (No. 2019YFC1521104), Shanghai Municipal Science and Technology Major Project (2021SHZDZX0102), Shanghai Science and Technology Commission (21511101200), Art major project of National Social Science Fund (I8ZD22), National Natural Science Foundation of China (No. 72192821) and Shanghai Science and Technology Commission (22YF1420300).
@inproceedings{ijcai2022p129,
title = {Region-Aware Temporal Inconsistency Learning for DeepFake Video Detection},
author = {Gu, Zhihao and Yao, Taiping and Chen, Yang and Yi, Ran and Ding, Shouhong and Ma, Lizhuang},
booktitle = {Proceedings of the Thirty-First International Joint Conference on
Artificial Intelligence, {IJCAI-22}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Luc De Raedt},
pages = {920--926},
year = {2022},
month = {7},
note = {Main Track},
doi = {10.24963/ijcai.2022/129},
url = {https://doi.org/10.24963/ijcai.2022/129},
}
TY - CPAPER TI - Region-Aware Temporal Inconsistency Learning for DeepFake Video Detection AU - Gu, Zhihao AU - Yao, Taiping AU - Chen, Yang AU - Yi, Ran AU - Ding, Shouhong AU - Ma, Lizhuang T2 - Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, IJCAI-22 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2022 SP - 920 EP - 926 DO - 10.24963/ijcai.2022/129 UR - https://doi.org/10.24963/ijcai.2022/129 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: