AI models based on latent diffusion models (LDMs), such as Stable Diffusion, FLUX, and Midjourney, have made it possible for virtually anyone to generate photorealistic images with arbitrary content. This rapid development has created a growing need for reliable methods to detect AI-generated images.
Many popular AI models rely on a pretrained variational autoencoder (VAE) to reduce computational costs and improve performance. Several existing detection methods exploit the fact that AI-generated images can be reconstructed more accurately through a VAE than real photographs. Since the models that these detection methods were trained to identify were primarily optimized to generate aesthetically pleasing images, it is possible that part of their detection capability relies on an inherent aesthetic bias rather than on more general traces of AI generation. Over time, even humans have learned to recognize the "perfect" AI aesthetic that has characterized earlier models.
Newer models, such as Flux, Qwen, and Nano Banana, have increasingly moved away from this idealized aesthetic and instead focus on generating images with a high degree of realism. For example, they can produce images that appear to have been taken with a shaky smartphone, exhibiting motion blur and various visual imperfections. These models now also can be prompted to edit existing images by altering only parts of the original image, which increases the potential for their misuse in deepfakes.
This development has placed greater demands on AI detectors, and methods that relied solely on the reconstruction error from a single forward pass through the VAE may struggle to detect images that lack a distinct AI aesthetic.
This thesis investigates whether optimizing the latent representation through gradient descent affects reconstruction error differently depending on whether an image is a real photograph or AI-generated. By studying the change in reconstruction error over repeated optimization steps using image gradients as loss function, detection seem to improve over previous methods on newer AI-generative models.
2026.