Fighting Deepfake by Exposing the Convolutional Traces on Images

Advances in Artificial Intelligence and Image Processing are changing the way people interacts with digital images and video. Widespread mobile apps like FACEAPP make use of the most advanced Generative Adversarial Networks (GAN) to produce extreme transformations on human face photos such gender swap, aging, etc. The results are utterly realistic and extremely easy to be exploited even for non-experienced users. This kind of media object took the name of Deepfake and raised a new challenge in the multimedia forensics field: the Deepfake detection challenge. Indeed, discriminating a Deepfake from a real image could be a difficult task even for human eyes but recent works are trying to apply the same technology used for generating images for discriminating them with preliminary good results but with many limitations: employed Convolutional Neural Networks are not so robust, demonstrate to be specific to the context and tend to extract semantics from images. In this paper, a new approach aimed to extract a Deepfake fingerprint from images is proposed. The method is based on the Expectation-Maximization algorithm trained to detect and extract a fingerprint that represents the Convolutional Traces (CT) left by GANs during image generation. The CT demonstrates to have high discriminative power achieving better results than state-of-the-art in the Deepfake detection task also proving to be robust to different attacks. Achieving an overall classification accuracy of over 98%, considering Deepfakes from 10 different GAN architectures not only involved in images of faces, the CT demonstrates to be reliable and without any dependence on image semantic. Finally, tests carried out on Deepfakes generated by FACEAPP achieving 93% of accuracy in the fake detection task, demonstrated the effectiveness of the proposed technique on a real-case scenario.


I. INTRODUCTION
A digital image can be manipulated with many tools and software. Everyone with a glimpse of experience in using Photoshop or GIMP can forge photographs in order to change their contents, the semantics and -potentially -everything. However, this kind of forgery has been widely investigated throughout recent years and commercial tools with the ability to detect and describe them are also available [1], [2]. The possibility to detect forgeries made with Photoshop or similar tools are related to the experience of the image manipulator being able to hide any kind of unrealistic artifact.
Advances in Artificial Intelligence, and specifically, the advent of Generative Adversarial Networks (GAN) [3], enabled the creation and widespread of extremely refined techniques able to attack digital data, alter it or create its contents from scratch. These tools are able to obtain surprisingly realistic results leading to the birth of the Deepfake images phenomenon, or simply Deepfakes.
In general, a Deepfake is defined as a multimedia content synthetically modified or created through automatic (or barely controlled) machine learning models. Most state-of-the-art techniques are able to do the face swap from a source image/video to a target image/video. Recently, faces of showgirls, politicians, actors, TV presenters and many others have been the main protagonists of Deepfake attacks: one of the first example is the famous face swap of Jim Carrey on top of the the body of Alison Brie 1 (Figure 1a Deepfakes are not only involved in face-related tasks but they could be engaged to swap or generate realistic places, animals, object, etc. Indeed, this could bring disruptive innovation in many working areas, such as in the automotive industry or in architecture, since it is possible to generate a car or an apartment through dedicated GANs or in the film industry where it is possible, when necessary, to replace the face of a stuntman with an actor; but, on the other hand it could lead to serious social repercussions, privacy issues and major security concerns. For example, there are many Deepfake videos connected to the world of porn used to discredit famous actresses like Emma Watson o Angelina Jolie, or they can be used to spread disinformation and fake news. Moreover, the creation of Deepfakes is becoming extremely easy: widespread mobile apps like FACEAPP 5 , are able to produce transformations on human faces such gender swap, aging, etc. The results are utterly realistic and extremely easy to produce even for non-experienced users with a few taps on their mobile phone.
It is clear that the Deepfake phenomenon raises a serious safety issue and it is absolutely necessary to create new techniques able to detect and counteract it [1], [4].
While detecting a Deepfake is difficult for humans, recent works have shown that they could be detected surprisingly easy by employing Convolutional Neural Networks (CNN) specifically trained on the task. However, CNN solutions presented till today, lack of robustness, generalizing and explainability. They are extremely specific to the context in which they were trained and, being very deep, tend to extract the underlying semantics from images without inferring any unique fingerprint. A detailed discussion about such limits will be dealt with in the final part of the paper.
In order to find a unique fingerprint related to the specific GAN architecture that created the Deepfake image, in this paper an extension of our previous work [5] is presented. The fingerprint extraction method based on the Expectation-Maximization Algorithm will be furtherly discussed focusing on its capabilities to extract the Convolutional Traces (CT) embedded by the generative process. The CT could be employed in many related classification tasks but in this paper the finalized pipeline for fakeness detection is finalized with the adoption of a Random Forest classifier. Moreover, the method was deeply tested for robustness with many attacks carried out on images before the extraction of the CT. Also generalizing was demonstrated by testing real images against images generated by ten different GAN architectures, which is the widest test carried out on the task till today. Comparison with state-of-the-art methods demonstrated that the overall approach achieves in almost all cases best classification results. Moreover, we would like to highlight that different stateof-the-art methods for Deepfake detection used approaches based on CNN and these require extremely computational demanding (both for hardware and for time needed), while the proposed approach achieves excellent classification results using only the CPU power of a common laptop.
The remainder of this paper is organized as follows: Section II presents state-of-the-art Deepfake generation and detection methods. The proposed approach to extract the Convolutional Trace is described in Section III. Classification phase and experimental results are reported in Section IV. In Section V the proposed approach is demonstrated to be robust to different attacks. Finally, obtained classification results were compared with recent state-of-the-art methods in Section VI. Section VII concludes the paper.

II. RELATED WORKS
Deepfakes are generally created by techniques based on Generative Adversarial Networks (GANs) firstly introduced by Goodfellow et al. [3]. In [3], authors proposed a new framework in which two models simultaneously train: a generative model G, that captures the data distribution, and a discriminative model D, able to estimate the probability that a sample comes from the training data rather than from G. The training procedure for G is to maximize the probability of D making a mistake thus resulting in a min-max two-player game. Mathematically, the generator accepts a random input z with density p z and returns an output x = G(z, Θ g ) according to a certain probability distribution p g (Θ g represents the parameters of the generative model). The discriminator, D(x, Θ d ) computes the probability that x comes from the distribution of training data p data (Θ 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 p data . When this happens, the discriminator is "deceived" and will no longer be able to distinguish the samples from p data and p g ; therefore p g will follow the targeted probability distribution, i.e. p data . 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, while D stands to the police, trying to detect the malicious activity. G and D can be implemented as any kind of generative model, in particular when deep neural networks are employed results become extremely accurate. Through recent years, many GAN architectures were proposed for different applications e.g., image to image translation [6], image super resolution [7], image completion [8], and text-to-image generation [9].

A. Deepfake Generation Techniques for Faces
Advances in GAN architectures lead to different works dealing with human faces. STARGAN, created by Choi et al. [10], is a method capable of performing image-to-image translations on multiple domains using a single model (e.g, change hair color, facial expression). Many methods works in the latent space representation in order to set constraints to the attributes to be modified, an example is ATTGAN, created by He et al. [11]. Cho et al. [12] proposed the "group-wise deep whitening-and coloring method" (GDWCT) for a better styling capacity, obtaining a great improvement in the image translation and style transfer task in terms of computational efficiency and quality of generated images. The stage changes when surprising results of Deepfake images were obtained by Style Generative Adversarial Network (STYLEGAN) [13]. STYLEGAN was used to create the so-called "this person does not exist" website 6 . Moreover, a few imperfect artifact created by STYLEGAN were fixed by Karras et al. [14] with improvements to the generator (including re-designed 6 https://thispersondoesnotexist.com/ normalization, multi-resolution, and regularization methods), creating the even more realistic images with the so called STYLEGAN2.

B. Deepfake detection methods
A starting point to detect Deepfakes is indeed the analysis in the Fourier domain which is a well known technique to find anomalies for image forensics experts [15]. Indeed, some Deepfake images, in the Fourier domain, after being processed by a Discrete Fast Fourier Transform, show abnormal frequencies distributions. This preliminary insight was detected by Guarnera et al. [4] in which the authors tried preliminarly to detect Deepfakes by means of well-known forgery detection tools ( [2], [15], [16]) with only few insights for future works as results. The analysis in the Fourier domain was employed more in deep by Zhang et al. [17] in a naive strategy achieved good performances. Later, an interesting work known as FakeSpotter was proposed by Wang et al. [18]. They described a new method based on monitoring neuron behaviors of a dedicated CNN to detect faces generated by Deepfake technologies. The comparison with Zhang et al. [17] demonstrated an average detection accuracy of more than 90% Wang et al. [19] trained a ResNet-50 to discriminate real images from those generated by ProGAN [20] and demonstrated that the trained model is able to generalize for the detection of Deepfakes generated by other architectures than ProGAN. They also demonstrate to achieve good robustness to JPEG compression, spatial blurring and scaling transformations.
Jain et al. [21] proposed a work known as DAD-HCNN, a new framework based on a hierarchical classification pipeline composed of three levels to distinguish respectively real Vs altered images (first level), retouched Vs GANs generated images (second level) and finally, the specific GAN architecture (third level). From the conducted tests, the framework can detect retouching and GANs generated images with high accuracy.
A reference dataset was introduced by Rossler et al. [22] as a benchmark for fake detection. It is called FaceForensics++, and is based mainly on four manipulation methods: two computer graphics-based methods (Face2Face [23], FaceSwap 7 ) and 2 learning-based approaches (DeepFakes 8 , NeuralTextures [24]).
By roughly considering literature in the field, it seems like that Deepfake detection is an easy task, already solved. However, analytical techniques based on frequency domain still lack of accuracy and CNN techniques while achieving good results tend to discriminate semantics more than GANspecific traces. Moreover CNN techniques are computationally intensive and difficult to be understood or controlled [25]. To overcome this, Guarnera et al. [5] proposed a new analytical solution to extract an unique fingerprint from images that was demonstrated to be specific to the GAN that generated the image itself. In this paper, the technique 7 https://github.com/MarekKowalski/FaceSwap/ 8 https://github.com/deepfakes/faceswap/ will be presented in the mathematical details with furtherly discussion on robustness and generalization, by means of the many carried out experiments: the widest test cases, as today, in the Deepfake detection task will be presented. For this purpose we employed ten of the most famous and effective Deepfake generation architectures: CYCLEGAN [6], STARGAN [10], ATTGAN [11], GDWCT [12], STYLE-GAN [13], STYLEGAN2 [14], PROGAN [20], FACEFOREN-SICS++ [22], IMLE [26] and SPADE [27]. Figure 3 resumes the differences of these techniques in terms of image size, datasets used as input, goal and examples of generated images. For each architecture 2000 images were generated.

III. EXTRACTING CONVOLUTIONAL TRACES
Generative Adversarial Networks (GAN) are used to generate Deepfakes. Once trained, the fundamental element involved in the image creation is the generator G which is composed of Transpose Convolution layers [28]. They apply kernels to the input image, similarly to kernels in Convolutional Layer but they act inversely in order to obtain an output larger but proportional to the input dimensions. Thus, the image creation pipeline is different from the pipeline commonly used in a camera device in which each step introduces typical noise that is then used for naive image forgery detection [15]. However, the image creation process related to the Transpose Convolution layers of GAN should be consistent and identifiable in local correlations of pixels in the spatial RGB space. To find these traces, an Expectation-Maximization (EM) algorithm [29] was employed in order to define a conceptual mathematical model able to capture the pixel correlation in the images (e.g. spatially) and discriminate between two distributions: the expected one (natural) and others (possibly Deepfake). The result of EM is a feature vector representing the structure of the Transpose Convolution Layers employed during the generation of the image, encoding in some sense if such image is a Deepfake or not, thus it can be called Convolutional Trace (CT).
The CT extraction techniques works as follows. The initial goal is to extract a description, from input image I, able to numerically represent the local correlations between each pixel in a neighbourhood. This can be done by means of convolution with a kernel k of N × N size: In Equation 1, the value of the pixel I[x, y] is computed considering a neighborhood of size N × N of the input data. It is clear that the new estimated information I[x, y] mainly depends on the kernel used in the convolution operation, which establishes a mathematical relationship between the pixels. For this reason, our goal is to define a vector k of size N × N able to capture this hidden and implicit relationship which characterizes the forensic trace we want to exploit.
Let's assume that the element I[x, y] belongs to one of the following models: • M 1 : when the element I[x, y] satisfies Equation 1; • M 2 : otherwise. The EM algorithm is employed with its two different steps: 1) Expectation step: computes the (density of) probability that each element belongs to model (M 1 or M 2 ); 2) Maximization step: estimates the (weighted) parameters based on the probabilities of belonging to instances of (M 1 or M 2 ). Let's suppose that M 1 and M 2 have different probability distributions with M 1 Gaussian distribution with zero mean and unknown variance and M 2 uniform. In the Expectation step, the Bayes rule that I[x, y] belongs to the model M 1 is computed as follows: where the probability distribution of M 1 which represents the probability of observing a sample I[x, y], knowing that it was generated by the model M 1 is: .
The variance value σ 2 , which is still unknown, is then estimated in the Maximization step. Once defined if I[x, y] belongs to model M 1 (or M 2 ), the values of the vector k are estimated using Least Squares method, minimizing the following: . This error function (5) is minimized by computing the gradient of vector k. The update of k i,j is carried out by computing the partial derivative of (5) as follows: Hence, the following linear equations system is obtained:  The two steps of the EM algorithm are iteratively repeated. The algorithm is applied to each channel of the input image (RGB color space).
The obtained feature vector k is the desired CT and has dimensions dependent on parameter α. Note that the element k 0,0 will always be set equal to 0 (k 0,0 = 0). Thus, for example, if a kernel k with 3×3 size is employed, the resulting k will be a vector of 24 elements (since the values k 0,0 are excluded). This is obtained by concatenating the features extracted from each of the three RGB channels.
The computational complexity of the EM algorithm can be estimated to be linear in d (the number of characteristics of the input data taken into consideration), n (the number of objects) and t (the number of iterations) making it easily to be computed in seconds on a common laptop.
Two aspects are of extreme importance: (i) the proposed CT extraction technique does not need training, it is applied on images and extracts a discriminative feature vector; (ii) the CT extraction is not a deep learning architecture, thus it is not able to encode high level information such semantics. This will be demonstrated in the following Sections with experimental tests.

IV. CLASSIFICATION OF DEEPFAKES
In this Section, the Convolutional Trace (CT) extracted by means of the technique presented in Section III, will be demonstrated to have great discriminative power for the Deepfake detection task. Moreover, the independence on image semantics will be demonstrated in this Section by testing against Deepfakes not representing merely faces.
STYLEGAN images 9 and STYLEGAN2 images 10 were downloaded from the official websites, while, for images of the other architectures, the pre-trained models were employed to generate them. The CT was extracted from all the images with kernels of increasing sizes (3, 5 and 7). The CT obtained was employed as input feature vector for different naive classifiers (K-NN, SVM, LDA) with different tasks: (i) discriminating an authentic image from one generated by a specific GAN and (ii) discriminating authentic images from Deepfakes (binary classification -Real Vs Deepfake images generated by all the 10 techniques). We achieved the best classification solution by employing Random Forest as a final binary classifier, thus finalizing the pipeline (Figure 4).
Let's first analyse the discriminative power of the CT in order to distinguish authentic images from each of the considered GAN. Figure 5 shows a visual representation by means of t-SNE [30]: it is possible to notice how Deepfakes can be "linearly" separable from authentic samples. Moreover, in most cases the separation is utterly clear. Figure 5 visually demonstrates the discriminative power of the extracted CT which, if used as feature vector in a classification task, obtains excellent results as expected. All the classification results are reported in Table I. In particular, it is possible to note that:  • CELEBA Vs ATTGAN the maximum classification accuracy of 92.99%, was obtained with KNN (with K = 5, 7), and kernel size of 3x3.
• CELEBA Vs CYCLEGAN the maximum classification accuracy of 93.59%, was obtained with KNN (with K = 3), and kernel size of 3x3.
• CELEBA Vs FACEFORENSICS++ the maximum classification accuracy of 97.31%, was obtained with KNN (with K = 3), and kernel size of 3x3.
• CELEBA Vs GDWCT: the maximum classification accuracy of 91.58%, was obtained with KNN (with K = 9) and kernel size of 3x3.
• CELEBA Vs IMLE: the maximum classification accuracy of 97.76%, was obtained with KNN (with K = 3) and kernel size of 3x3.
• CELEBA Vs PROGAN: the maximum classification accuracy of 95.85%, was obtained with KNN (with K = 5) and kernel size of 3x3.
• CELEBA Vs SPADE: the maximum classification accuracy of 96.72%, was obtained with KNN (with K = 3) and kernel size of 3x3.
• CELEBA Vs STARGAN: the maximum classification accuracy of 90.55%, was obtained with linear SVM, and kernel size of 7x7.
• CELEBA Vs STYLEGAN: the maximum classification accuracy of 99.48%, was obtained with KNN -K = 3, and kernel size of 5x5.
• CELEBA Vs STYLEGAN2: the maximum classification accuracy of 99.64%, was obtained with linear SVM, and kernel size of 5x5. This leads to an empirical hypothesis: the kernel size used by output layers in Deepfake generation techniques is related to the kernel size parameter employed by the CT extraction approach. However, it has to be noted that, on average the kernel size of 3x3 achieves best results among all the classification tests.
Another interesting insight is that the extracted CT is able to discriminate between images from STYLEGAN and STYLE-GAN2: a binary test carried out to discriminate between images from the two "similar" techniques achieved a maximum accuracy of 99.31% (Table II). As stated by the authors of the STYLEGAN2 architecture, they have only updated parts of the generator G, in order to remove imperfections of the original STYLEGAN. This further confirms the former hypothesis, since even a slight modification of G, leaves different traces in the images generated and the CT is able to extract such fingerprint.
We also employed binary classification between real images and Deepfakes coming from all the 10 architectures taken into account. At first, another t-SNE representation was built in order to understand sample separability and distribution in two-dimensional plane. Figure 6 shows that, in this case, samples cannot be linearly separated thus we carried out tests looking for non-linear classifiers. Indeed, final results demonstrated and confirmed such insights. Best accuracy score was obtained by employing Random Forest properly chosen as the final step of the Deepfake detection pipeline (Figure 4) with a solid 98% of accuracy (Table III) obtained in our tests.
In this Section, experimental results and t-SNE visualizations demonstrated the discriminative power of the CT Recently, the mobile application called FACEAPP is having a lot of success due to the ability to change features of the input image of a face such as gender, age, hair style, etc. The images thus produced are utterly realistic. Hence, a test for automatic detection of Deepfakes produced by FACEAPP has been carried out employing the CT extraction method and the Random Forest classifier already trained for the test previously described. No further training was done on FACEAPP images. For experiments a dataset of Deepfake images was created starting from CELEBA images by using the Android version of FACEAPP (we employed the paid version that does not introduce watermarks on images): 471 images were generated with FACEAPP by applying gender swap on original images. CTs were extracted with kernel size 3x3 and employed as input for the pre-trained Random Forest classifier. Among the 471 images, 437 were correctly classified as Deepfakes while 34 images were classified as real faces. Figure 7a shows two examples of correct classifications while Figure 7b shows two examples of misclassification. It has to be noted that incorrect classifications are probably due to low light conditions or too few changes in the original images thus making difficult to extract a discriminative CT. According to the reported results we proved the effectiveness of the proposed Deepfake detection technique in a real-case scenario.

V. ROBUSTNESS EXPERIMENTS
Finally, we introduce further tests about overall robustness. A series of attacks were made at different Deepfake images of faces generated by ATTGAN, GDWCT, STARGAN, STYLEGAN and STYLEGAN2 and real images (CELEBA). In particular, the following attacks were carried out: 1) Adding one rectangle with different sizes, positions and colors at random: in this way details are removed. Since the CT extracts information from pixel correlations, the addition of this rectangle could lead to errors. This could happen specifically for STARGAN or ATTGAN considering that they change only few elements in a face (e.g. hair color) and if these elements are removed by the rectangle low classification accuracy values are expected; 2) Adding Gaussian Blur with different kernel sizes (3x3, 9x9, 15x15): the noise added to the images could destroy the pixels correlation created by Deepfake architectures and remove the CT; 3) Rotating images by 45, 90, 180 degrees: rotations could lead to interpolation transformation with modification on CTs similar to the Gaussian blur attack; 4) Scaling images (+50%, -50%): due to the interpolation operations carried out, information will be added or removed. CT extracted from images with high details (such as those of STYLEGAN and STYLEGAN2) would be more robust to this type of operation; 5) JPEG compression with quality factor equal to 50: in general, a compression operation (such as JPEG) removes high frequency information which could be of major importance for the CT discriminative power. Moreover, a JPEG compression with Quality Factor 50  is similar to those applied by social networks such as Facebook or Instant Messengers like Whatsapp [31], making this test another real-case scenario. Once the above mentioned filters are applied individually to images, the CT extraction method was applied and Real Vs Deepfake classifications carried out against each GAN (e.g. CELEBA RandomSquare Vs GDWCT RandomSquare , CELEBA GaussianBlur Vs STARGAN GaussianBlur , etc.).
The classification results are reported in Table IV 11 . Figure 8 shows an example of images obtained after operations listed before. It is possible to observe that the dataset plays a fundamental role: the output of ATTGAN, STARGAN and GDWCT and the output of STYLEGAN and STYLEGAN2 after the Gaussian Blur operation: images from ATTGAN, STARGAN and GDWC show a greater visible blur (and therefore a worse visual quality with greater lack of details) respect to STYLEGAN and STYLEGAN2 images. This is mainly determined by the capability of STYLEGAN and STYLEGAN2 to create images of a bigger size.
Results reported in Table IV show that the CT extracted is robust to almost all considered attacks.
In particular, as stated before, STYLEGAN and STYLE-GAN2 images obtained the best classification accuracy values (Real Vs Deepfake) due to their bigger original size. GDWCT, which creates the smallest images (Figure 3), is the least robust to attacks and maintains a proper accuracy result comparable with results without attacks only for JPEG compression. 11 We report in this table the maximum accuracy classification value obtained through k-NN (with k = {3, 5, 7, 9, 11, 13}), LDA (Linear Discriminant Analysis), SVM (Support Vector Machine) with linear kernel and Random Forest However, another interesting insight comes from the rotation attacks: a rotation of 90 degrees anticlockwise, which is a rotation that does not introduce interpolation, unexpectedly produces better classification results for each of the considered Deepfake architecture. This could be related to a specific major direction of the CT and should be better investigated in future works.

VI. COMPARISONS WITH DEEPFAKE DETECTION METHODS
Section II presented a detailed discussion of the state-ofthe-art in the field of Deepfakes and specifically in Section II-B the detection methods available as today were discussed.
While analytical techniques based on frequency domain still lack of accuracy, CNN based techniques seems to achieve good results but tend to be context-dependent, prone to overfitting and provably depending to high-level semantics extracted from images. Moreover, CNN techniques are computationally intensive and difficult to be explained or controlled. In [25] the authors discussed this limit about CNN. We carried out tests with a deep neural network VGG-16 12 -on spatial and frequency domains -to solve the binary classification task (Real Vs All 10 Deepfakes) on the datasets described above, obtaining the best result equal to only 53% of accuracy (similar to the random classifier). Better results are achievable by only a complex deep neural network architecture, is what done by recent state-of-the-art methods. The more the architecture is complex and the more is not only an higher computational power is necessary but it is more complicated understand what are the high level features that the network used (probably Fig. 9. Comparison of the proposed approach (Our) vs. FakeSpotter [18] and AutoGAN [17]. these features are focused on differences in eye sizes, asymmetries, etc.) to distinguish Real Vs Deepfakes images.
In this Section a detailed discussion is carried out, comparing results obtained by the proposed approach with the best literature methods: Wang et al. [18] (the authors of FakeSpotter), Zhang et al. [17] (the authors of AutoGAN) and Wang et al. [19] were taken into account for comparisons in the Real Vs. Deepfake binary classification task.
For FakeSpotter and AutoGAN, Deepfakes from STYLE-GAN, STYLEGAN2, STARGAN, PROGAN and FACE-FORENSICS++ architectures were taken into account. Results of this comparison are reported in Figure 9. It is possibile to note that, not only we obtained accuracy values of over 90% in all cases, but we overcame FakeSpotter on the average accuracy evaluation. Only in the case of PROGAN and FACEFORENSICS++ we obtained a slightly lower value.
In Wang et al. [19], the following seven Deepfake architectures were taken into account for a fair comparison: PROGAN, STYLEGAN, CYCLEGAN, STARGAN, SPADE, IMLE, FACEFORENSICS++. Wang et al. reported results in the binary classification task as Average Precision between different datasets: images with no data augmentation; images with Gaussian blur added; images JPEG compressed; images both blurred and JPEG compressed. Figure 10 shows the comparison results obtained by Wang et al. and the proposed approach, reporting the Average Precision (AP) and mean Average Precision (mPA) values for each different Deepfake architecture. It is possible to note that the proposed method obtains better results specifically on Deepfakes of SPADE, IMLE and CYCLEGAN: architectures that do not produce images of faces, furtherly demonstrating the robustness of the extracted CT and classification pipeline to semantics of the image.

VII. CONCLUSIONS AND FUTURE WORKS
In this paper, a finalization of a former work on analysis of Deepfake images was presented. An algorithm based on Expectation-Maximization was employed to extract the Convolutional Traces (CT): a sort of unique fingerprint useable to identify not only if an image is a Deepfake but also the GAN architecture that generated it. The CT extracted is a fingerprint demonstrated to have high discriminative power, robustness to attacks and independence to high-level concepts of images (semantics). Obtained results demonstrate also to overcome the state-of-the-art with a technique simple and fast to be computed. Indeed the CT is related to the generation process of images and further better results can be obtained by rotating input images in order to find the most important direction. This particular hint will be investigated in future works.