Do GANs leave artificial fingerprints?

In the last few years, generative adversarial networks (GAN) have shown tremendous potential for a number of applications in computer vision and related fields. With the current pace of progress, it is a sure bet they will soon be able to generate high-quality images and videos, virtually indistinguishable from real ones. Unfortunately, realistic GAN-generated images pose serious threats to security, to begin with a possible flood of fake multimedia, and multimedia forensic countermeasures are in urgent need. In this work, we show that each GAN leaves its specific fingerprint in the images it generates, just like real-world cameras mark acquired images with traces of their photo-response non-uniformity pattern. Source identification experiments with several popular GANs show such fingerprints to represent a precious asset for forensic analyses.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

page 6

11/20/2018

Learning GAN fingerprints towards Image Attribution

Recent advances in Generative Adversarial Networks (GANs) have shown inc...
10/03/2019

Incremental learning for the detection and classification of GAN-generated images

Current developments in computer vision and deep learning allow to autom...
11/12/2021

Self-supervised GAN Detector

Although the recent advancement in generative models brings diverse adva...
08/07/2020

Fighting Deepfake by Exposing the Convolutional Traces on Images

Advances in Artificial Intelligence and Image Processing are changing th...
11/10/2020

Using GANs to Synthesise Minimum Training Data for Deepfake Generation

There are many applications of Generative Adversarial Networks (GANs) in...
01/24/2021

Fighting deepfakes by detecting GAN DCT anomalies

Synthetic multimedia content created through AI technologies, such as Ge...
05/10/2021

Towards Discovery and Attribution of Open-world GAN Generated Images

With the recent progress in Generative Adversarial Networks (GANs), it i...

1 Introduction

Generative adversarial networks are pushing the limits of image manipulation. A skilled individual can easily generate realistic images sampled from a desired distribution [19, 8, 1], or convert original images to fit a new context of interest [21, 9, 23, 12, 3]. With progressive GANs [10], images of arbitrary resolution can be created, further improving the level of photorealism.

(a) (b) (c)
Figure 1: Sample images generated by Pro-GAN (a), Cycle-GAN (b), Star-GAN. Top: easily detected bad results. Bottom: photorealistic results.

There is widespread concern on the possible impact of this technology in the wrong hands. Well-crafted fake multimedia add further momentum to the already alarming phenomenon of fake news, if “seeing is believing”, as they say. Although today’s GAN-based manipulations present often artifacts that raise the suspect of observers, see Fig.1(top), this is not always the case (bottom), and it is only a matter of time before GAN-generated images will consistently pass visual scrutiny. Therefore, suitable multimedia forensic tools are required to detect such fakes.

In recent years, a large number of methods have been proposed to single out fake visual data, relying on their semantic, physical, or statistical inconsistencies [7].

Figure 2:

Cycle-GAN o2a (top) and Pro-GAN kitchen (bottom) fingerprints estimated with 2, 8, 32, 128, 512 residuals.

Statistical-based approaches, in particular, rely on the long trail of subtle traces left in each image by the acquisition devices, traces that can be hardly disguised even by a skilled attacker. In fact, each individual device, due to manufacturing imperfections, leaves a unique and stable mark on each acquired photo, the photo-response non-uniformity (PRNU) pattern [13], which can be estimated and used as a sort of device fingerprint. Likewise, each individual acquisition model, due to its peculiar in-camera processing suite (demosaicking, compression, etc.), leaves further model-related marks on the images, which can be used to extract a model fingerprint [5]. Such fingerprints can be used to perform image attribution [13, 2], as well as to detect and localize image manipulations [2, 5], and represent one of the strongest tools in the hands of the forensic analyst.

GANs have little in common with conventional acquisition devices, and GAN-generated images will not show the same camera-related marks. Still, they are the outcome of complex processing systems involving a large number of filtering processes, which may well leave their own distinctive marks on output images. So the question111Winking at P.K.Dick novel: “Do androids dream of electric sheep?” is: do GANs leave artificial fingerprints? That is, do the images generated by a given GAN share a common and stable pattern that allows to establish their origin? And, if this is the case, how reliable will such a fingerprint be? How robust to defensive measures? And how discriminative about the image origin?

In this paper we investigate on this interesting issue, and provide a first answer to the above questions. Our experiments with several popular GAN architectures and datasets, show that GAN do leave specific fingerprints on the image they generate, which can be used to carry out reliable forensic analyses.

2 Related Work

Recently there has been a growing interest in distinguishing GAN-generated images from real ones. As shown in Fig.1, the current state of the art in GANs is far from perfection, and often generated images exhibit strong visual artifacts that can be exploited for forensic use. For example, to detect fake faces, [15] exploits visual features regarding eyes, teeth and facial contours. Tellingly, the authors observe that in GAN-generated images the color of left and right eye are often inconsistent. Color information is also used in [16, 11]. In particular, [16]

proposes to use some features shared by different GAN architectures, related to the synthesis of RGB color channels. Other methods rely on deep learning. Several architectures have been tested so far

[14, 17, 20] showing a good accuracy in detecting GAN-generated images, even on compressed images. Unfortunately, if a network is trained on a specific architecture, its performance degrades sharply when used to detect image generated by another architecture [4]. This observation suggests the presence of different artifacts peculiar of each specific GAN model. Recently, it has also been shown [22] that a deep network can reliably discriminate images generated with different architectures. However, the network requires intensive training on an aligned dataset, and there is no hint, let alone exploitation, of the presence of GAN-induced fingerprints.

3 Exposing GAN fingerprints

In this Section we show evidence on the existence of GAN fingerprints. This goal is pursued in a minimal experimental setting, considering only two GANs, a Cycle-GAN trained to convert orange images into apple images and a Progressive-GAN (Pro-GAN) trained to generate kitchen images, call them GAN A and B, from now on. Lacking any statistical model, we consider an extraction pipeline similar to that of the PRNU pattern. For the generic image generated by a given GAN, the fingerprint represents a disturbance, unrelated with the image semantics. Therefore, we first estimate the high-level image content, , through a suitable denoising filter , then subtract it from the original image to extract the noise residual

(1)

Then, we assume the residual to be the sum of a non-zero deterministic component, the fingerprint , and a random noise component

(2)

Accordingly, the fingerprint is estimated by a simple average over the available residuals

(3)

Fig.2 shows (suitably amplified) the fingerprints of the two GANs, estimated over a growing number of residuals, . Of course, for low values on , the estimates are dominated by image-related noise. However, as grows, the additive noise component tends to vanish and both estimates converge to stable quasi-periodical patterns, which we regard as accurate approximations of the true GAN fingerprints. In Fig.3 we show the energy of these estimated fingerprints as a function of , together with the best fitting curve of the type

(4)

The fitting is clearly very accurate for large values of , and the value estimates the energy of the limit fingerprint, 0.0377 and 0.0088, respectively. Fig.4, instead, shows the autocorrelation functions of the two estimates for =512, with clear quasi-periodical patterns providing further evidence of the non-random nature of these signals.

Figure 3: True energy and fitting curve for the Cycle-GAN and Pro-GAN fingerprints of Figure 2.
Figure 4: Autocorrelation matrices of the Cycle-GAN and Pro-GAN fingerprints (=512) of Figure 2.

We now take a more application-oriented point of view, looking for these fingerprints’ ability to tell apart images of different origin. Based on image-to-fingerprint correlation or similar indicators, meaningful fingerprints should allow one to decide which of the two GANs generated a given image.

Let

(5)

be the correlation index between images and , where is the zero-mean unit-norm version of and indicates inner product. For both GANs under analysis, we regard the estimates obtained with as the “true” fingerprints, and , respectively. Then, we compute the correlation indices between residuals generated by GAN (and not used to estimate the fingerprint), and the same-GAN () and cross-GAN () fingerprints, that is

(6)

and

(7)
Figure 5: Correlation of Cycle-GAN (left) and Pro-GAN (right) residuals with same/cross-GAN fingerprints.

Fig.5(left) shows the histograms of same-GAN (green) and cross-GAN (red) correlations. Cross-GAN correlations are evenly distributed around zero, indicating no correlation between generated images and the unrelated fingerprint. On the contrary, same-GAN correlations are markedly larger than zero, testifying of a significant correlation with the correct fingerprint. The behavior is very similar when GAN-B residuals are considered and the roles are reversed, see Fig.5(right). Moreover, in both cases the two distributions are well separated, allowing reliable discrimination. The corresponding receiver operating curves (ROC) are nearly perfect with area under curve (AUC) 0.990 and 0.998, respectively.

We carried out similar experiments for many other GANs, differing for architecture and/or training set, obtaining always similar results. These results provide a convincing answer to our fundamental question, showing that each GAN leaves a distinctive mark on each image generated by it, which can be legitimately called fingerprint.

4 Source identification experiments

Let us now consider a more challenging experimental setting, to carry out larger-scale source identification tests. We consider three GAN architectures, Cycle-GAN, Pro-GAN, and Star-GAN. Cycle-GAN was proposed in [23]

to perform image-to-image translation. The generator takes an input image of the source domain and transforms it into a new image of the target domain (

e.g., apples to oranges). To improve the photorealism of generated images, a cycle consistency constraint is enforced. Here, we consider several Cycle-GAN networks, trained by the authors on different source/target domains. The second architecture, Progressive-GAN [10], uses progressively growing generator and discriminator to create images of arbitrary-size which mimic images of the target domain. In this case too, six different target domains are considered. Like Cycle-GAN, Star-GAN [3] performs image-to-image translation, but adopts a unified approach such that a single generator is trained to map an input image to one of multiple target domains, which can be selected by the user. By sharing the generator weights among different domains, a dramatic reduction of the number of parameters is achieved. Finally, we include also two sets, from the RAISE dataset [6], of images acquired by real cameras, so as to compare the behavior of real-world and GAN fingerprints. Table I lists all networks and cameras, with corresponding abbreviations. For each dataset , we generate/take 1000 RGB images of 256256 pixels, extract residuals, and use =512 of them to estimate the fingerprint , and the remaining =488, for testing.

Architecture Target / Camera model Abbreviation
Cycle-GAN apple2orange C1
horse2zebra C2
monet2photo C3
orange2apple C4
photo2Cezanne C5
photo2Monet C6
photo2Ukiyoe C7
photo2VanGogh C8
zebra2horse C9
Pro-GAN bedroom G1
bridge G2
church G3
kitchen G4
tower G5
celebA G6
Star-GAN black hair S1
blond hair S2
brown hair S3
male S4
smiling S5
n/a Nikon-D90 N1
Nikon-D7000 N2
Table 1: Cameras and GANs used in the experiments
Figure 6: Average residual-fingerprint correlations.

First of all we compute the average correlation between all sets of residuals and all fingerprints, that is

(8)

with spanning all sets. Fig.6 shows a false-color representation of all such correlations. It appears that diagonal entries are much larger, in general, than off-diagonal ones, confirming that residuals of a dataset correlate well only with the fingerprint of the same dataset, be it GAN or natural. There is also a clear block structure, showing that some (weaker) correlation exists between residuals of a dataset and fingerprints of “sibling” datasets, associated with the same GAN architecture. This holds especially for the Star-GAN datasets, since the weights of a single generator are shared among all target domains. Finally, as expected, no significant correlation exists between real and GAN-generated images, which can be told apart easily based on their respective fingerprints.

We now perform camera attribution. For each image, we compute the distance between the corresponding residual and all fingerprints, attributing the image with a minimum-distance rule. In Fig.7 we show the resulting ROCs, and in Fig.8 the confusion matrix (entries below 1% are canceled to improve readability). Despite the 2

zooming, the ROC figure is hard to read as all curves amass in the upper-left corner. On the other hand, this is the only real message we wanted to gather from this figure: attribution is very accurate in all cases, with the only exception of the Star-GAN male and smiling networks. This observation is reinforced by the confusion matrix, showing almost perfect attribution in all cases (with the same exceptions as before), and with a slightly worse performance for the real cameras, characterized by a lower-energy PRNU. Since real cameras usually compress images at high quality to save storage space, we also repeated the attribution experiment after JPEG compressing all GAN-generated images at QF=95, observing a negligible loss in accuracy, from 90.3% to 90.1%.

Figure 7: One-vs.-all source identification ROCs.
Figure 8: Source identification confusion matrix. Entries below 1% are canceled.

We conclude this Section by reporting very briefly on the results obtained in the “Forensics GAN Challenge” [18]

organized in June-July 2018 by the US National Institute of Standards and Technology in the context of the Medifor program. The goal was to classify as real or GAN-generated 1000 images of widely different resolution, from 52

256 to 46083072 pixels. As baseline method we used a deep network trained on a large number of images retrieved from the InterNet. However, we also tested the GAN fingerprint idea, following the scheme outlined in Fig.9. We computed fingerprints for several popular GANs and, eventually, identified a large cluster of size-10241024 images generated with the same GAN. This allowed us to improve the deep net accuracy by a simple fusion rule, for a final 0.999 AUC.

Figure 9: GAN-fingerprints for the Forensics Challenge.

5 Conclusions and future work

The goal of this work was to demonstrate the existence of GAN fingerprints and their value for reliable forensic analyses. We believe both facts are supported by a sufficient experimental evidence. This answers our fundamental question, but introduces many more questions and interesting topics which deserve further investigation.

First of all, it is important to understand how the fingerprint depends on the network, both its architecture (number and type of layers) and its specific parameters (filter weights). This may allow one to improve the fingerprint quality or, with the attacker’s point of view, find ways to remove the fingerprint from generated images as a counter-forensic measure. Along the same path, our preliminary results suggest that training the same architecture with different datasets gives rise to well distinct fingerprints. Is this true in general? Will fine-tuning produce similar effects?

Under a more practical point of view, further studies are necessary to assess the potential of GAN fingerprints in multimedia forensics. Major aims, besides source identification, are the discrimination between real and GAN-generated images, and the localization of GAN-generated material spliced in real images. It is also important to study the robustness of such fingerprints to subsequent processing, such as JPEG compression, resizing, blurring, noising. Finally, it is worth assessing the dependence of performance on the number and size of images used for fingerprint estimation, with blind attribution and clustering as an interesting limiting case.

References