DE-FAKE: Detection and Attribution of Fake Images Generated by Text-to-Image Generation Models

Zeyang Sha, Zheng Li, Ning Yu, Yang Zhang

TL;DR

This paper introduces the first systematic approach to detect and attribute fake images generated by text-to-image models. They developed detectors and "attributors" that can identify fake images and trace them back to their source model, even when trained on different datasets.

What Problem Does This Paper Address?

The rapid advancement of text-to-image generation models (like DALL-E 2 and Stable Diffusion) has led to the creation of incredibly realistic synthetic images. While these tools have many beneficial applications, they also pose significant risks, such as the spread of misinformation and the potential to disrupt industries like art. Existing methods for detecting and attributing fake images primarily focus on traditional generative models (like GANs) and are not effective for these newer text-to-image models. This paper addresses this gap by developing methods specifically designed to tackle the unique challenges presented by text-to-image generated fakes.

Methods

The authors propose two main approaches:

  • Fake Image Detection: They developed a binary classifier to distinguish between real and fake images.
  • Image-Only Detector: This detector analyzes only the image content.
  • Hybrid Detector: This novel approach uses both the image and its corresponding text prompt. To handle cases where the original prompt isn't available, they use a captioning model (BLIP) to generate one.
  • Fake Image Attribution: This involves a multi-class classifier (an "attributor") trained to identify which specific text-to-image model generated a given fake image.
  • Image-Only Attributor: Relies solely on image features.
  • Hybrid Attributor: Combines image and prompt information for better attribution.

They also conducted a prompt analysis to understand what types of prompts lead to more "authentic" (harder-to-detect) fake images.

Datasets

The study utilized two benchmark prompt-image datasets:

  • MSCOCO: A large-scale dataset for object detection, segmentation, and captioning.
  • Flickr30k: A dataset commonly used for image captioning and multimodal learning.

They generated fake images using four popular text-to-image models:

  • Stable Diffusion (SD)
  • Latent Diffusion (LD)
  • GLIDE
  • DALL-E 2

Key Insights and Ideas

  • Common Artifacts: Fake images generated by different text-to-image models share a common artifact, allowing for detection even when the detector hasn't seen images from a specific model.
  • Prompt Power: Incorporating text prompts significantly enhances both fake image detection and attribution, as prompts provide a crucial "anchor" to differentiate real from fake content.
  • Model Fingerprints: Each text-to-image model leaves unique "fingerprints" in its generated images, enabling attribution to the source model.
  • Prompt Characteristics Matter: The nature of the prompt influences the authenticity of the generated image. Prompts related to "person" and those with a length between 25 and 75 words tend to produce more convincing fakes.
  • Generalizability: The proposed methods show good generalizability across different datasets and can be adapted to detect fakes from models not seen during training.

Key Results

  • Detection: The hybrid detector consistently outperformed the image-only detector, achieving accuracies up to 0.945 (on SD+MSCOCO with natural prompts). Even the image-only detector showed strong performance, indicating the presence of common artifacts.
  • Attribution: Both image-only and hybrid attributors achieved high accuracy (e.g., 0.936 for hybrid with natural prompts on MSCOCO). The hybrid approach again showed superior performance.
  • Prompt Analysis: Prompts with the topic "person" and lengths between 25-75 words were found to generate more authentic fake images, making them harder to detect.

Limitations and Future Work

  • Prompt Availability: The hybrid detector's performance is best when natural prompts are available. While BLIP helps, it's a workaround for cases where prompts are missing.
  • Unseen Models: While they proposed a method for adapting to unseen models in attribution, differentiating fake images from multiple unseen models remains a future challenge.
  • Fake Artwork Detection: Initial experiments suggest their methods can generalize to fake artwork, but more extensive research is needed.
  • Prompt Engineering for Authenticity: The paper identifies prompt characteristics that lead to more authentic fakes, suggesting future work could explore how to leverage this for more robust detection or to understand the underlying mechanisms better.

Summary updated

BibTeX
@inproceedings{sha2023de,
  author = {Zeyang Sha and Zheng Li and Ning Yu and Yang Zhang},
  title = {{DE-FAKE: Detection and Attribution of Fake Images Generated by Text-to-Image Generation Models}},
  booktitle = {CCS},
  year = {2023},
  doi = {10.1145/3576915.3616588},
}
Figure