Deepfake Detection by Analyzing Convolutional Traces
Total Page:16
File Type:pdf, Size:1020Kb
DeepFake Detection by Analyzing Convolutional Traces Luca Guarnera Oliver Giudice Sebastiano Battiato University of Catania - iCTLab University of Catania University of Catania - iCTLab Catania, Italy Catania, Italy Catania, Italy [email protected] [email protected] [email protected] Abstract more worrying examples are the video of ex US Presi- dent Barack Obama (Figure 1(a)), created by Buzzfeed 3 The Deepfake phenomenon has become very popular in collaboration with Monkeypaw Studios, or the video in nowadays thanks to the possibility to create incredibly real- which Mark Zuckerberg 4 (Figure 1(b)) claims a series of istic images using deep learning tools, based mainly on ad- statements about his platform ability to steal users’ data. hoc Generative Adversarial Networks (GAN). In this work Even in Italy, in September 2019, the satirical TV program we focus on the analysis of Deepfakes of human faces with “Striscia La Notizia” 5 showed a video of the ex-premier the objective of creating a new detection method able to de- Matteo Renzi talking about his colleagues in a “not so re- tect a forensics trace hidden in images: a sort of finger- spectful” way (Figure 1 (c)). Indeed, Deepfakes may have print left in the image generation process. The proposed serious repercussions on the authenticity of the news spread technique, by means of an Expectation Maximization (EM) by the mass-media while representing a new threat for pol- algorithm, extracts a set of local features specifically ad- itics, companies and individual privacy. In this dangerous dressed to model the underlying convolutional generative scenario, tools are needed to unmask the Deepfakes or just process. Ad-hoc validation has been employed through detect them. experimental tests with naive classifiers on five different Several big companies have decided to take action architectures (GDWCT, STARGAN, ATTGAN, STYLEGAN, against this phenomenon: Google has created a database STYLEGAN2) against the CELEBA dataset as ground-truth of fake videos [36] to support researchers who are devel- for non-fakes. Results demonstrated the effectiveness of the oping new techniques to detect them, while Facebook and technique in distinguishing the different architectures and Microsoft have launched the Deepfake Detection Challenge the corresponding generation process. initiative 6. In this paper a new Deepfake detection method will be introduced focused on images representing human faces. 1. Introduction At first an Expectation Maximization (EM) algorithm [29], extracts a set of local features specifically addressed to One of the phenomena that is rapidly growing is the well- model the convolutional traces that could be found in im- known Deepfake: the possibility to automatically generate ages. Then, naive classifiers were trained to discriminate and/or alter/swap a person’s face in images and videos us- between authentic images and images generated by the five ing algorithms based on Deep Learning technology. It is most realistic architectures as today (GDWCT, STARGAN, possible to generate excellent results by creating new mul- ATTGAN, STYLEGAN, STYLEGAN2). Experimental re- timedia contents that cannot be easily recognized as real or sults demonstrated that the information modelled by EM is fake by human eye. Then, the term Deepfake refers to all related to the specific architecture that generated the im- those multimedia contents synthetically altered or created age thus giving the overall detection solution explainability, by means of machine learning generative models. being also of great value for forensic investigations (e.g., Various examples of Deepfake, involving celebrities, are camera model identification techniques of image forensics). easily discoverable on the web: the insertion of Nicholas Moreover, a multitude of experiments will be presented not Cage 1 in movies where he did not act like “Fight Club” and “The Matrix” or the impressive video in which Jim 3https://www.youtube.com/watch?v=cQ54GDm1eL0 2 Carrey plays Shining in place of Jack Nicholson. Other 4https://www.youtube.com/watch?v=NbedWhzx1rs 5https://www.striscialanotizia.mediaset.it/ 1https://www.youtube.com/watch?v=-yQxsIWO2ic video/il-fuorionda-di-matteo-renzi_59895.shtml 2https://www.youtube.com/watch?v=Dx59bskG8dc 6https://deepfakedetectionchallenge.ai/ Figure 1. Examples of Deepfake: (a) Obama (Buzzfeed in collaboration with Monkeypaw Studios); (b) Mark Zuckerberg (Bill Posters and Daniel Howe in partnership with advertising company Canny); (c) Matteo Renzi (the italian TV program “Striscia la Notizia”). The discriminator, D(x, Θd) computes the probability that x comes from the distribution of training data pdata (Θd represents the parameters of the discriminative model). The overall objective is to obtain a generator, after the training phase, which is a good estimator of pdata. When this hap- pens, the discriminator is “deceived” and will no longer be able to distinguish the samples from pdata and pg; there- fore pg will follow the targeted probability distribution, i.e. Figure 2. Simplified description of a GAN learning framework. pdata. Figure 2 shows a simplified description of a GAN framework. In the case of Deepfakes, G can be thought as a team of counterfeiters trying to produce fake currency, only to demonstrated the effectiveness of the technique but while D stands to the police, trying to detect the malicious also to demonstrate to be un-comparable with state-of-the- activity. G and D can be implemented as any kind of gen- art: tests were carried out on an almost-in-the-wild dataset erative model, in particular when deep neural networks are with images generated by five different techniques with dif- employed results become extremely accurate. Through re- ferent image sizes. As today, all proposed technique work cent years, many GAN architectures were proposed for dif- with specific image sizes and against at most one GAN tech- ferent applications e.g., image to image translation [45], im- nique. age super resolution [24], image completion [17], and text- The remainder of this paper is organized as follows: Sec- to-image generation [35]. tion 2 presents some Deepfake generation and detection methods. The proposed detection technique is explained in 2.1. Deepfake Generation Techniques Section 3 as regards the feature extraction phase while the classification phase and experimental results are reported in An overview on Media forensics with particular focus on Section 4. Finally, Section 5 concludes the paper with in- Deepfakes has been recently proposed in [41]. sights for future works. STARGAN is a method capable of performing image- to-image translations on multiple domains using a single 2. Related Works model. Proposed by Choi et al. [6] was trained on two dif- ferent types of face datasets: CELEBA [27] containing 40 Deepfakes are generally created by techniques based on labels related to facial attributes such as hair color, gender Generative Adversarial Networks (GANs) firstly introduced and age, and RaFD dataset [22] containing 8 labels corre- by Goodfellow et al. [14]. Authors proposed a new frame- sponding to different types of facial expressions (“happy”, work for estimating generative models via an adversarial “sad”, etc.). Given a random label as input, such as hair mode in which two models simultaneously train: a gen- color, facial expression, etc., STARGAN is able to per- erative model G, that captures the data distribution, and form an image-to-image translation operation. Results have a discriminative model D, able to estimate the probabil- been compared with other existing methods [26, 30, 45] and ity that a sample comes from the training data rather than showed how STARGAN manages to generate images of su- from G. The training procedure for G is to maximize the perior visual quality. probability of D making a mistake thus resulting to a min- Style Generative Adversarial Network, namely STYLE- max two-player game. Mathematically, the generator ac- GAN [19], changed the generator model of STARGAN by cepts a random input z with density pz and returns an output means of mapping points in latent space to an intermediate x = G(z, Θg) according to a certain probability distribution latent space which controls the style output at each point of pg (Θg represent the parameters of the generative model). the generation process. Moreover the introduction of noise as a source of variation in those mentioned points demon- to fail and more refined ones are needed. strates to achieve better results. Thus, STYLEGAN is capa- Thanks to a new discriminator that uses “contrastive ble not only of generating impressively photorealistic and loss” it is possible to find the typical characteristics of high-quality photos of faces, but also offers control param- the synthesized images generated by different GANs and eters in terms of the overall style the generated image at therefore detect such fake images by means of a classi- different levels of detail. While being able to create real- fier. Rossler et al. [36] proposed an automated bench- istic pseudo-portraits, small details might reveal the fake- mark for fake detection, based mainly on four manip- ness of generated images. To correct those imperfections ulation methods: two computer graphics-based methods in STYLEGAN, Karras et al. made some improvements to (Face2Face [40], FaceSwap 7) and 2 learning-based ap- the generator (including re-designed normalization, multi- proaches (DeepFakes 8, NeuralTextures [39]). They ad- resolution, and regularization methods) proposing STYLE- dressed the problem of fake detection as a binary classifi- GAN2 [20]. cation problem for each frame of manipulated videos, con- Instead of imposing constraints on latent representation, sidering different techniques present in the state of the art He et al. [15], proposed a new technique called ATTGAN [1, 4, 7, 8, 10, 34]. in which an attribute classification constraint is applied to Zhang et al. [44] proposed a method to classify Deep- the generated image, in order to guarantee only the correct fakes considering the spectra of the frequency domain as modifications of the desired attributes.