{'fraction_non_alphanumeric': 0.032939946220495966, 'fraction_numerical': 0.01236181655213624, 'mean_word_length': 5.112074868751427, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Exposing Deep-faked Videos by Anomalous Co-motion Pattern Detection

Recent deep learning based video synthesis approaches, in particular with applications that can forge identities such as"DeepFake", have raised great security concerns. Therefore, corresponding deep forensic methods are proposed to tackle this problem. However, existing methods are either based on unexplainable deep networks which greatly degrades the principal interpretability factor to media forensic, or rely on fragile image statistics such as noise pattern, which in real-world scenarios can be easily deteriorated by data compression. In this paper, we propose an fully-interpretable video forensic method that is designed specifically to expose deep-faked videos. To enhance generalizability on videos with various content, we model the temporal motion of multiple specific spatial locations in the videos to extract a robust and reliable representation, called Co-Motion Pattern. Such kind of conjoint pattern is mined across local motion features which is independent of the video contents so that the instance-wise variation can also be largely alleviated. More importantly, our proposed co-motion pattern possesses both superior interpretability and sufficient robustness against data compression for deep-faked videos. We conduct extensive experiments to empirically demonstrate the superiority and effectiveness of our approach under both classification and anomaly detection evaluation settings against the state-of-the-art deep forensic methods.


Introduction
Media forensic, referring to judge the authenticity, detect potentially manipulated region and reason its decision of the given images/videos, plays an important role in real life to prevent media data from being edited and utilized for malicious purposes, e.g., spreading fake news [16,2]. Unlike traditional forgery methods (e.g., copy-move and slicing) which can falsify the original content with low cost but are also easily observable, the development of deep generative models such as generative adversarial net (GAN) [13] makes the boundary between realness and forgery more blurred than ever, as deep models are capable of learning the distribution from real-world data so well. In this paper, among all the forensic-related tasks, we focus on exposing forged videos produced by face swapping and manipulation applications [25,23,56,40,45,55]. These methods, while initially designed for entertainment purposes, have gradually become arXiv:2008.04848v1 [cs.CV] 11 Aug 2020 Fig. 1: Example of motion analysis results by our method. Landmarks with the same color are considered having analogous motion patterns, which are consistent with facial structure in real videos but not in deep-faked videos. We compactly model such patterns and utilize them to determine the authenticity of given videos. uncontrollable in particular when the face of celebrities, who possess greater social impact such as Obama [43], can be misused at no cost, leading to pernicious influence.
Traditional forensic methods focusing on detecting specific traces remained ineluctably during the editing (e.g., inconsistency in re-sampling [44], shadowing [22], reflection [41], compression quality [11] and noise pattern [42]) fail to tackle the indistinguishable DNN-generated images/videos due to the powerful generative ability of existing deep models. Therefore, the demand for forensic approaches explicitly against deep-faked videos is increasing. Existing deep forensic models can be readily categorized into three branches including realforged binary classification-based methods [30,67,49,1], anomaly image statistics detection based approaches [29,32,36,10,64] and high-level information driven cases [62,63,31]. However, no matter which kind of methods, their success heavily relies on a high-quality, uncompressed and well-labeled forensic dataset to facilitate the learning. Once the given data are compressed or in low-resolution, their performance is inevitably affected. More importantly, these end-to-end deep forensic methods are completely unexplainable, no explicit reason can be provided by these methods to justify based on what a real or fake decision is made.
To overcome the aforementioned issues, in this paper, we propose a video forensic method based on motion features to explicitly against deep-faked videos.
Our method aims to model the conjoint patterns of local motion features from real videos, and consequently spot the abnormality of forged videos by comparing the extracted motion pattern against the real ones. To do so, we first estimate The pipeline of our proposed co-motion pattern extraction method. As illustrated, we firstly estimate the motion of corresponding keypoints, which are then to be grouped for analysis. On top of that, we construct co-motion pattern as a compact representation to describe the relationship between motion features. motion features of keypoints that are commonly shared across deep-faked videos. In order to enhance the generalizability of obtained motion features as well as eliminate noises introduced by inaccurate estimation results, we divide motion features into various groups which are further reformed into a correlation matrix as a more compact frame-wise representation. Then a sequence of correlation matrices are calculated from each video, with each weighted by the grouping performance to form the co-motion pattern which describes the local motion consistency and correlation of the whole video. In general, co-motion patterns collected from real videos obey the movement pattern of facial structures and are homogeneous with each other regardless of the video content variation, while it becomes less associated across fake videos.
To sum up, our contributions are four-fold: (1) We propose co-motion pattern, a descriptor of consecutive image pairs that can be used to effectively describe local motion consistency and correlation. (2) The proposed co-motion pattern is being entirely explainable, robust to video compression/pixel noises and generalizes well. (3) We conduct experiments under both classification and anomaly detection settings, showing that the co-motion pattern is able to accurately reveal the motion-consistency level of given videos. (4) We also evaluate our method on datasets with different quality and forgery methods, with the intention to demonstrate the robustness and transferability of our method.

Face Forgery by Media Manipulation
First of all, we review relevant human face forgery methods. Traditionally, methods such as copy-move and slicing, if employed for face swapping tasks, can hardly produce convincing result due to the inconsistency caused by image quality [44,59,12], lighting changing [17,18] and noise patterns [42,35] between the tampered face region and other regions. With the rapid expeditious development of deep generative models [13], the quality of generated images has significantly improved. The success of ProGAN [19] makes visually determining the authenticity of generated images pretty challenging if only focusing on the face region. Furthermore, the artifacts remained in boundary regions whose corresponding distribution in training datasets are relatively disperse are also progressively eliminated by [20,21,24,4]. Although these methods have demonstrated appealing generating capability, they do not focus on a certain identity but generate faces with random input.
Currently, the capability of deep neural networks has also been exploited for human-related tasks such as face swapping [57,26,25,56,55,38,40,51], face expression manipulation [45,56,61,52] and facial attribute editing [52,15,60,47,14] majorly for entertainment purposes at the initial stage (samples of deep-faked face data are shown in Fig. 3.). However, since the face swapping methods in particular have already been misused for commercial purposes, homologous techniques should be studied and devised as prevention measures before it causing irreparable adverse influence. Bottom right [14]: face attribute editing, original images on top and edited on bottom.

Deep-faked Manipulation Detection
While media forensic has been a long existing field, the countermeasures against deep-faked images and videos are scarce. As we mentioned earlier, existing methods can be categorized into three genres, respectively by utilizing a deep neural network [30,48,49,1,67,3,37,28,53], by exploiting the unnatural low-level statistics and by detecting the abnormality of high-level information. In the very first category, it has been usually considered as a binary classification problem where a classifier is constructed to learn the boundary between original and manipulated data via hand-crafted or deep features. As one of the earliest works in this branch, [1] employs an Inception [54] with proper architecture improvement to directly classify each original or edited frame. Later, in order to consider the intra-frame correlation, [49] constructed a recurrent convolutional neural network that learns from temporal sequences. Due to the variety of video content and the characteristics of neural network, a sufficiently large dataset is required. To overcome this problem, [3] attempted using the optical flow as input to train a neural network. While high classification accuracy achieved, since the features learned directly by neural networks yet to be fully comprehended, the decision of whether the input data has been manipulated cannot be appropriately elucidated.
Regarding the second category, [10,36,64,8] have all utilized the characteristics that the current deep generated images can barely learn the natural noise carried with untampered images, hence using the noise pattern for authentication. In [29], the diminutive difference of color components between original and manipulated images for classification. While effective, these methods are also exceedingly susceptible to the quality of dataset. Our method lies in the third category and is constructed based upon high-level information [62,63], which are generally being more explainable and robust to the miniature pixel change introduced by compression or noise. Furthermore, as co-motion pattern is derived by second-order statistics, it is being more robust than [62,63] to instance-wise variation.

Methodology
In this section, we elaborate on the details of our proposed video forensic method based on co-motion pattern extraction from videos and the overall pipeline of our method is illustrated in Fig. 2. Firstly, we obtain aligned local motion feature describing the movement of specific keypoints from the input videos (Sect. 3.1). To eliminate the instance-wise deviation, we then design high-order patterns among the extracted local motion features. Subsequently, we demonstrate how to construct co-motion patterns that describe the motion consistency over each video, as well as its usage altogether in Sect. 3.2.

Local Motion Estimation
The fundamental of constructing co-motion pattern is to extract local motion features firstly. Since each co-motion pattern is comprised by multiple independent correlation matrices (explained in Sect. 3.2), we expound on how to obtain local motion features from two consecutive frames in this section first.
Denote a pixel on image I with coordinate (x, y) at time t as I(x, y, t), according to brightness constancy assumption, we have [27,5]: where ∆x, ∆y and ∆t denote the displacements on R 3 respectively. ∆t is usually 1 to denote two consecutive frames. This leads to the optical flow constraint: However, such a hard constraint can lead motion estimation result to be sensitive to even slight changes in brightness, and therefore gradient constancy assumption is proposed [58,5]: Based on above constraints, the objective function can be formulated as: where: E brightness = ψ(I(x, y, t) − I(x + ∆x, y + ∆y, t + 1)) + ψ(∇I(x, y, t) − ∇I(x + ∆x, y + ∆y, t + 1))dxdy (6) α denotes a weighting parameter and ψ denotes a concave cost function, and E smoothness penalization term is introduced to avoid too significant motion displacement: In our approach, we utilize Liu's [33] dense optical flow to estimate motion over frame pairs. However, while the intra-frame movement is estimable, it cannot be used directly as motion features because the content of each video varies considerably which makes the comparison between the estimated motion of different videos unreasonable [3]. Moreover, the estimated motion cannot be pixel-wise accurate due to the influence of noises and non-linear displacements. To overcome the above problems, we propose to narrow the region of interests via finding facial landmarks for comparison. By employing an arbitrary facial landmark detector f D , we are able to obtain a set of spatial coordinates L as: so that the local motion features M I can be denoted as: representing the Gaussian-weighted average of estimated motion map I ∆x,∆y centered on (l x i , l y i ) with stridek. The Gaussian smoothing is introduced to further mitigate the negative impact by inaccurate estimation result. By doing so, we align the motion feature extracted from each video for equitable comparison. An intuitive illustration of this step is presented in Fig. 4. Due to the lack of sufficient motion in some I ∆x,∆y , we abandon these with trivial magnitude by setting a hyperparameter as threshold where the detailed choice will be discussed in Sect. 4.

Co-motion Patterns
Depending merely on local motion features obtained above would require an incredibly large-scale dataset to cover as many scenarios as possible, which is redundant and costly. Based on the observation that a human face is an articulated structure, the intra-component correlation can also depict the motion in an efficient manner. Inspired by the co-occurrence feature [65], which has been frequently employed in texture analysis, we propose to further calculate the second-order statistics from extracted local motion features.

Grouping Intra-Correlated Motion Features
In this step, we group analogous m i I ∈ M I to estimate articulated facial structure by motion features since motion features that are collected from the same facial component would more likely to share consistent movement. Meanwhile, the negative correlation can also be represented where motion features having opposite directions (e.g. upper lip and lower lip) would be assigned to disjoint groups. As m i I ∈ R 2 denotes motion on two orthogonal directions, we construct the affinity matrix A I on M I such that: We here choose the inner product over other metrics such as cosine and euclidean since we wish to both emphasize the correlation instead of difference and to lighten the impact of noise within M I . In specific, using inner product can ensure the significance of two highly correlated motions that both possess certain magnitude to be highlighted, while noises with trivial magnitude would relatively affect less. The normalized spectral clustering [39,34] is then performed, where we calculate the degree matrix D such that: and the normalized Laplacian matrix L as: In order to split M I into K disjoint groups, the first K eigenvectors of L, denote as V = {ν k |k ∈ [1, K]}, are extracted to form matrix F ∈ R n×K . After normalizing F by dividing the corresponding L2-norms row-wisely, a K-Means clustering is used to separate However, since K is not directly available in our case, we will demonstrate how to determine the optimal K in the next step.

Constructing Co-motion Patterns
As previously stated, determining a proper K can also assist in describing the motion pattern more accurately. A straightforward approach is to iterate through all possible K such that the Calinski-Harabasz index [7] is maximized: where with C µ y is the centroid of C y , M µ I is the center of all local motion features and tr denotes taking the trace of the corresponding matrix. After all the efforts, the motion correlation matrix ρ It,It+1 of two consecutive frames I t and I t+1 can be calculated as: and consequently, the co-motion pattern of sequence S = {I 1 , ..., I T } is calculated as the weighted average of all correlation matrices: where the weighting procedure is also to reduce the impact of noise: the greater the f CH ({C k |k ∈ [1, K]}, K), naturally the more consistent the motions are; simultaneously, co-motion pattern constructed on noisy estimated local motion would scatter more sparse, which should be weighted as less important.

Usage of Co-motion Patterns
The co-motion pattern can be utilized as a statistical feature for comparison purposes. When used for supervised classification, each co-motion must be normalized by its L1 norm:ḟ andḟ CP (S) can be used as features for arbitrary objectives. In order to illustrate that our co-motion pattern can effectively distinguish all forgery types by only modeling on real videos, we also conduct anomaly detection experiments where a real co-motion pattern is firstly built as template. Then, co-motion patterns from real and forgery databases are all compared against the template where the naturalness is determined by the threshold. JensenShannon divergence is suggested to be employed as distance measure between any two co-motion patterns: and S1, S2 denote two sequences.

Experiments
In this section, extensive experiments are conducted to empirically demonstrate the feasibility of our co-motion pattern, coupled with the advantages over other methods. We first describe the experiment protocol, followed by the choice of hyperparameters. The quantitative performance of our method evaluated on different datasets is reported and analyzed in Sect. 4.1. Subsequently, we interpret the composition of the co-motion pattern, showing how it can be used for determining the genuineness of any given sequence or even individual estimated motion set. Finally, we demonstrate the transferability and robustness of our method under different scenarios.
Dataset We evaluate our method on FaceForensics++ [48] dataset which consists of four sub-databases that produce face forgery via different methods, i.e. Deepfake [57], FaceSwap [26], Face2Face [56] and NeuralTexture [55]. In addition, we utilize the real set from [9] to demonstrate the similarity of co-motion patterns from real videos. Since each sub-database contains 1,000 videos, we form 2,000 co-motion patterns with each composed of picking N ρ matrices for training and testing respectively. We use c23 and c40 to indicate the quality of datasets, which are compressed by H.264 [46] with 23 and 40 as constant rate quantization parameters. Unless otherwise stated, all of our performance reported are achieved on c23. The validation set and testing set are split before any experiments to ensure no overlapping would interfere the results. Implementation In this section, we specify hyperparameters and other detailed settings in order to reproduce our method. The local motion estimation procedure is accomplished by integrating [5] as the estimator and [6] as the landmark detector, both with default parameter settings as reported in the original papers. For the facial landmarks, we only keep the last 51 landmarks out of 68 in total as the first 17 denotes the face boundary which is usually not manipulated. During the calculation of co-motion, we constrain K to be at most 8 as only 8 facial components, thus avoiding unnecessary computation. Since a certain portion of frames do not contain sufficient motion, we only preserve co-motion patterns with p% motion features having greater magnitude than the total p% of others, i.e. p = 0.5 with magnitude ≥ 0.85, where the number is acquired by randomly sampling a set of 100 videos. An AdaBoost [66] classifier is employed for all supervised classification tasks. For Gaussian smoothing, we setk = 3 for all experiments.

Quantitative Results
In this section, we demonstrate the quantitative results of our method under different settings. At first, we show that the co-motion pattern can adequately separate forged and real videos in classification tasks as shown in Tab. 1. Comparing with other state-of-the-art forensic methods in terms of classification accuracy, we have achieved competent performance and have outperformed them by a large margin on Deepfakes [57] and FaceSwap [26], respectively 99.10% and 98.30%. In [3], while the researchers have similarly attempted establishing a forensic pipeline on top of motion features, we have outperformed its performance by approx. 12%. It is noteworthy that [49,53,48] are all exploiting deep features that are learned in an end-to-end manner and consequently cannot be properly explained. By contrast, as interpretability is one of the principal factors to media forensics, our attention lies on proposing a method such that it can be justified and make no effort on deliberately outperforming deep learning based methods. Equally importantly, as forgery methods are various and targeting each is expensive, we demonstrate that the proposed co-motion pattern can also be employed for anomaly detection tasks, where only the behaviors of real videos require to be modeled, and forged videos can be separated if an appropriate threshold is selected. As presented in Fig. 5, we show receiver operating characteristic (ROC) curves on each forgery database with increasing N . The real co-motion template is constructed of 3,000 randomly selected ρ matrices for each co-motion pattern (real or fake) to compare against during evaluation. In general, our method can be used for authenticating videos even without supervision. In the next section, we exhibit that the co-motion pattern is also robust to random noise and data compression.

Robustness Analysis
In this section, we demonstrate the robustness of our proposed method against noises or data compression and the generalizability of co-motion patterns. Experiments about whether the compression rate of the video and noise would affect the effectiveness of co-motion patterns are conducted and the results are shown in Tab. 2. Empirically, co-motion has demonstrated great robustness against heavy compression (c40) and random noise, i.e. N (µ, σ 2 ) with µ = 0 and σ = 1. Such results verify our proposed co-motion patterns exploiting high-level temporal information are much less sensitive to pixel-level variation, while statistics based methods as reviewed in Sect. 2.2 do not possess this property. In addition to demonstrating the robustness, we also investigate in whether the modeled co-motion patterns are generalizable, as recorded in Tab. 3. It turns out that co-motion patterns constructed on relatively high-quality forgery databases such as NeuralTextures [55] and Face2Face [56] can easily be generalized for classifying other low-quality databases, while the opposite results in inferior accuracy. This phenomenon is caused by that videos forged by Neural-Textures are generally being more consistent, thus the inconsistency learned is more narrowed down and specific, while the types of inconsistency vary greatly in low-quality databases, which can be hard to model.

Abnormality Reasoning
In this section, we explicitly interpret the implication of each co-motion pattern for an intuitive understanding. A co-motion example of real videos can be found in Fig. 6. As we illustrated, the local motion at 51 facial landmarks are estimated as features, where the order of landmarks are preserved identically in all places on purpose for better visual understanding. It is noteworthy that the order of landmarks do not affect the performance as long as they are aligned during experiments.
Consequently, each co-motion pattern describes the relationship of any pair of two local motion features, where features from the same or highly correlated facial component would instinctively have greater correlation. For instance, it is apparent that two eyes would generally move in the same direction, as the center area highlighted in Fig. 6. Similarly, a weak yet stable high correlation of the first 31 features is consistently observed on all real co-motion patterns, which conforms to the accordant movement of facial components on upper and middle face area. We also observe strong negative correlation, indicating opposite movements, between upper lip and lower lip. This credits to the dataset containing a large volume of videos with people talking, while in forged videos such a negative correlation is undermined, usually due to the fact that the videos are synthesized in a frame-by-frame manner, thus the temporal relationship is not well-preserved. Moreover, the co-motion is normalized in range [0, 1] for visualization purpose which leads to the weakened difference between real and fake co-motion patterns, while in original scale the difference can be more magnificent, verified by the experiments.
For an explicit comparison, we also average 1,000 ρ matrices from each source to illustrate the distinction and which motion pattern in specific was not welllearned as in Fig. 7. Evidently, co-motion patterns from forged videos fail to model the negative correlation between upper lip and lower lip. Moreover, in Deepfake and FaceSwap, the positive correlation between homogeneous components (e.g. eyes and eyebrows) is also diluted, while in reality it would be difficult to control them having uncorrelated motion. We also attempt to construct comotion patterns on another set of real videos [9] to illustrate the commonality of co-motion patterns over all real videos. Additionally, we show that visually, the structure of co-motion pattern could quickly converge as illustrated in Fig. 8, which sustains our choices of building second-order pattern as it is less sensitive to intra-instance variation.

Real videos Deepfakes FaceSwap
Real videos from [9] Face2Face NeuralTexture Fig. 7: Averaged co-motion pattern from different sources. Two real co-motion patterns (leftmost column) collectively present component-wise motion consistency while forged videos fail to maintain that property.

Conclusion & Future Work
In this work, we propose a novel co-motion pattern, a second-order local motion descriptor in order to detect whether the video is deep-faked. Our method is fully interpretable and pretty robust to slight variations such as video compression and noises. We have achieved superior performance on the latest datasets under classification and anomaly detection settings, and have comprehensively evaluated various characteristics of our method including robustness and generalizability. In the future, an interesting direction is to investigate whether a more accurate motion estimation can be achieved as well as how temporal information can be integrated within our method.