Source-linked AI summary
CIFAKE: Image Classification and Explainable Identification of AI-Generated Synthetic Images
Jordan J. Bird, Ahmad Lotfi
TL;DR
As AI-generated images become difficult for humans to distinguish from photographs, reliable methods for image authentication are needed. The study constructs the CIFAKE dataset from real CIFAR-10 images and latent-diffusion synthetic counterparts, classifies them with CNNs, and interprets predictions using Grad-CAM. Binary classification achieved around 92.98% accuracy, while the released dataset supports future research on synthetic-image detection.
Problem
High-fidelity AI-generated imagery can be difficult for humans to distinguish from photographs, creating a need to improve image authentication and detection.
Method
The study pairs CIFAR-10 real images with latent-diffusion synthetic images, uses CNNs for binary classification, and applies Grad-CAM for interpretation.
Results
Around 92.98% accuracy was achieved for binary classification of real versus synthetic images.
Takeaways & Limitations
Grad-CAM indicated that predictions relied on small visual imperfections in image backgrounds, while the CIFAKE dataset was released for future research.
Takeaways & Limitations
Future work should update the dataset as synthetic imagery improves and expand it to domains such as human faces and clinical scans.
Abstract
from arXiv · showhide
Recent technological advances in synthetic data have enabled the generation of images with such high quality that human beings cannot tell the difference between real-life photographs and Artificial Intelligence (AI) generated images. Given the critical necessity of data reliability and authentication, this article proposes to enhance our ability to recognise AI-generated images through computer vision. Initially, a synthetic dataset is generated that mirrors the ten classes of the already available CIFAR-10 dataset with latent diffusion which provides a contrasting set of images for comparison to real photographs. The model is capable of generating complex visual attributes, such as photorealistic reflections in water. The two sets of data present as a binary classification problem with regard to whether the photograph is real or generated by AI. This study then proposes the use of a Convolutional Neural Network (CNN) to classify the images into two categories; Real or Fake. Following hyperparameter tuning and the training of 36 individual network topologies, the optimal approach could correctly classify the images with 92.98% accuracy. Finally, this study implements explainable AI via Gradient Class Activation Mapping to explore which features within the images are useful for classification. Interpretation reveals interesting concepts within the image, in particular, noting that the actual entity itself does not hold useful information for classification; instead, the model focuses on small visual imperfections in the background of the images. The complete dataset engineered for this study, referred to as the CIFAKE dataset, is made publicly available to the research community for future work.
1 Introduction
Rapid advances in synthetic image generation have made AI-produced images increasingly photorealistic and difficult for humans to distinguish from photographs. This study addresses that challenge with computer vision, a synthetic comparison dataset, binary classification, and explainable AI.
- High-fidelity AI-generated images can now compete with human-produced photographs, making reliable image authentication increasingly necessary.
- Latent Diffusion Models have enabled synthetic imagery that raises concerns about authenticity, privacy, fraud, and trustworthiness.
- The study uses computer vision to distinguish real photographs from AI-generated images by comparing existing photographic data with a synthetic equivalent.
- CIFAKE contributes a publicly released dataset containing 120,000 real and generated images across ten classes.
- The study combines binary image classification with Explainable AI to identify useful visual features in synthetic-image recognition.
2 Background
Rapidly improving generative models produce photorealistic images that humans often cannot distinguish from reality, creating an urgent detection challenge. Prior work explores fingerprints, visual glitches, optical flow, temporal methods, and pixel-level disparities as possible detection cues.
- Distinguishing real from machine-generated imagery matters for authenticating evidence and addressing risks involving misinformation, fraud, and cybersecurity.
- Latent Diffusion Models use attention mechanisms and a U-Net to reverse Gaussian noise and generate novel images from text-conditioned random noise.
- The literature on Latent Diffusion Models remains young, with relatively few applications explored so far.
- DE-FAKE indicates that latent-diffusion images may contain digital fingerprints detectable by computer vision even when visual glitches are rare.
- Existing detection studies examine optical flow, recurrence, EfficientNets, Vision Transformers, convolutional methods, and chrominance components.
- Human recognition of image manipulation has become less reliable as image-generation and editing methods improve.
3 Method
The method constructs matched real and synthetic image datasets, trains CNNs for binary real-versus-generated classification, and applies explainable AI to interpret predictions.
- Data collection and generation: The real class uses CIFAR-10’s ten classes, with 50,000 images for training and 10,000 for testing.CIFAR-10 contains 60,000 32 × 32 RGB images, with 6,000 images per class.
- Data collection and generation: Stable Diffusion generates a synthetic equivalent of the ten-class CIFAR-10 dataset using prompt modifiers applied equally across 6,000 images.The reverse diffusion process uses 50 noising steps to form each synthetic image.
- Image classification: The CNN extracts image features through convolution and pooling, flattens them, and passes them to dense layers with ReLU activations.The output is a single sigmoid neuron for binary classification, with FAKE encoded as 0 and REAL as 1.
- Data collection and generation: 120,000 images form the dataset: 60,000 real CIFAR-10 images and 60,000 synthetic images generated with Stable Diffusion.Both classes use 50,000 training images and 10,000 testing images.
- Image classification: Thirty-six CNN topologies are compared by varying convolutional-filter counts, layer counts, and dense-network configurations.The highest-performing convolutional feature extractor is used when benchmarking dense networks.
- Explainable AI: Explainable AI uses model interpretations to examine which image regions support real-versus-synthetic predictions, with minor defects identified as relevant visual cues.The study motivates this analysis by noting humans’ difficulty recognising synthetic imagery.
4 Results and Observations
The study evaluates a CNN for distinguishing real photographs from latent-diffusion outputs and examines the visual features supporting its predictions. The synthetic dataset contains both realistic photographic attributes and localized visual defects, while classification performance reaches above 93% in the best engineered topology.
- Dataset Exploration: Synthetic samples also contain visual defects, including alphabet-like shapes, missing aircraft cockpit details, and anatomical errors in cats.These imperfections appear in only some generated images and provide examples of residual generation artifacts.
- Dataset Exploration: Synthetic images reproduce complex photographic attributes, including realistic water ripples, reflections, lighting, depth of field, and framing.These attributes can make the generated images difficult for human observers to distinguish from photographs.
- Classification: The CNN performs binary classification by predicting whether an image is a real photograph or an output of a latent diffusion model.The experiments benchmark feature-extraction networks and then engineer dense layers across 36 network topologies.
- Classification Results: 93.55% validation accuracy was achieved by the network using a single dense layer of 64 neurons.The lowest observed binary cross-entropy loss was 0.177 for a CNN followed by three layers of 64 rectified linear units.
- Explainable AI: Grad-CAM indicates that real-image predictions use broader image content, whereas synthetic-image predictions focus on sparse regions containing difficult-to-see visual glitches.Across several classes, the depicted entity receives little or no activation, suggesting the model relies primarily on localized imperfections rather than object identity.
5 Conclusion and Future Work
The study combines synthetic-data generation, CNN classification, and Grad-CAM interpretation to distinguish AI-generated from real images. It reports approximately 92.98% accuracy, releases the 120,000-image CIFAKE dataset, and identifies future expansion toward newer generators and additional domains.
- The proposed pipeline generates synthetic images with Latent Diffusion, classifies them using CNNs, and interprets predictions with Grad-CAM.
- 92.98% accuracy was achieved for binary classification of real versus AI-generated images.
- CIFAKE contains 120,000 images, including 60,000 real CIFAR-10 images and 60,000 synthetic images, and is publicly released for future research.
- The approach addresses concerns about the authenticity and trustworthiness of visual data as AI-generated images become indistinguishable from photographs.
- Future work should examine additional classification and explainability techniques, update the dataset as synthesis improves, and include domains such as human faces and clinical scans.