Detecting GAN generated Fake Images using Co-occurrence Matrices

Authors: Lakshmanan Nataraj, Tajuddin Manhar Mohammed, Shivkumar Chandrasekaran, Arjuna Flenner, Jawadul H. Bappy, Amit K. Roy-Chowdhury, B. S. Manjunath

Published: 2019-03-15 23:24:08+00:00

AI Summary

This paper introduces a novel approach for detecting GAN-generated fake images using a combination of co-occurrence matrices and deep learning. It extracts co-occurrence matrices from the three color channels of an image and feeds them into a deep convolutional neural network for classification. The method demonstrates high classification accuracy (over 99%) and good generalizability across diverse GAN datasets like CycleGAN and StarGAN.

Abstract

The advent of Generative Adversarial Networks (GANs) has brought about completely novel ways of transforming and manipulating pixels in digital images. GAN based techniques such as Image-to-Image translations, DeepFakes, and other automated methods have become increasingly popular in creating fake images. In this paper, we propose a novel approach to detect GAN generated fake images using a combination of co-occurrence matrices and deep learning. We extract co-occurrence matrices on three color channels in the pixel domain and train a model using a deep convolutional neural network (CNN) framework. Experimental results on two diverse and challenging GAN datasets comprising more than 56,000 images based on unpaired image-to-image translations (cycleGAN [1]) and facial attributes/expressions (StarGAN [2]) show that our approach is promising and achieves more than 99% classification accuracy in both datasets. Further, our approach also generalizes well and achieves good results when trained on one dataset and tested on the other.


Key findings
The approach achieved over 99% classification accuracy on both CycleGAN (99.71%) and StarGAN (99.37%) datasets. It demonstrated good generalizability, with cross-dataset accuracy of 99.49% (trained on CycleGAN, tested on StarGAN) and 93.42% (trained on StarGAN, tested on CycleGAN). The method also outperformed state-of-the-art techniques and showed robustness to JPEG compression when trained on compressed images.
Approach
The problem is solved by computing co-occurrence matrices directly on the red, green, and blue color channels of an input image, resulting in a 3x256x256 tensor. This tensor is then passed through a custom multi-layer deep convolutional neural network for feature learning and binary classification to distinguish between real and GAN-generated fake images.
Datasets
CycleGAN dataset (36,302 images), StarGAN dataset (19,990 images including 1,999 real images from CelebA dataset).
Model(s)
A custom deep convolutional neural network (CNN) architecture consisting of multiple convolutional layers with ReLU activations, max-pooling layers, and fully connected dense layers, followed by a sigmoid output layer. A variant of adaptive stochastic gradient descent is used as the optimizer.
Author countries
USA