Abstract
Visual illusions provide a unique window into the underlying mechanisms of perception, revealing how biological systems interpret ambiguous stimuli based on natural world statistics. This paper investigates whether state-of-the-art generative models, specifically Denoising Diffusion Implicit Models (DDIMs), exhibit similar perceptual biases. We demonstrate that the deterministic inversion process in DDIMs naturally replicates human-like illusory perception by "correcting" stimuli toward a learned natural image manifold. Furthermore, we introduce a novel optimization framework to generate high-resolution, realistic visual illusions from text prompts. Our results, validated by both automated benchmarks and human psychophysical studies, suggest that these models' "errors" are actually sophisticated features of their learned priors, bridging the gap between artificial and biological vision.
Introduction
Visual illusions (VIs) occur when the brain's interpretation of a stimulus deviates from its physical reality, typically because the stimulus is "out-of-distribution" relative to the statistical regularities of the natural environment. A long-standing question in computer vision is whether artificial neural networks (ANNs) trained on natural images develop similar vulnerabilities. While previous work has explored this in Convolutional Neural Networks (CNNs), the behavior of modern generative Diffusion Models (DMs) remains largely unexplored. This study posits that DMs, by virtue of being trained on massive datasets of natural images, inherit the same perceptual priors—and thus the same "deceptions"—as human observers.
Methodology
The core of our approach centers on the deterministic inversion process of Denoising Diffusion Implicit Models (DDIM).
Replication via DDIM Inversion
To test if a model "perceives" an illusion, we perform DDIM inversion on classic stimuli, such as the Adelson Checkerboard. As the image is mapped back into its latent noise representation, the model attempts to "Gaussianize" the input. During the intermediate steps, the model's internal priors force the image toward the natural image manifold. This process introduces shifts in brightness and color that align with human illusory perception, effectively "correcting" the physical stimulus to match a more probable natural interpretation.
Generation of Novel Illusions
We extend this insight to create a generation pipeline using text-to-image models (e.g., DeepFloyd IF). We optimize the noisy latent ($z_t$) using two primary loss functions:
- Perceptual Loss ($\mathcal{L}_{VI}$): This term enforces a desired perceived intensity in specific "target" regions, ensuring that physically identical patches appear different to a human observer.
- Similarity Loss ($\mathcal{L}_{sim}$): This ensures the illusory elements blend seamlessly into the generated scene and remain faithful to the provided text prompt.
Experimental Results
We evaluated our approach across several benchmarks and human studies.
Automated Benchmarks
- BRI3L Dataset: On this large-scale brightness illusion dataset, our DDIM-based method achieved a 100% Perceptual Accuracy Score (PAS) at a threshold of 1.0. This significantly outperformed classical vision models like ODOG (72%) and CIWAM (56%).
- Visual Question Answering (VQA): On the HallusionBench dataset, the DDIM method reached 100% accuracy in identifying illusory intensity, whereas standard Variational Autoencoders (VAEs) and other deep learning baselines typically scored below 35%.
Human Psychophysical Validation
To confirm the efficacy of our generated illusions, we conducted experiments with 15 human observers. Participants identified the model-enforced illusions as "different" in 64% of cases, compared to a baseline of 13% for control images. This confirms that the model can successfully engineer deception that fools human vision.
Discussion and Conclusion
Our findings suggest that perceptual illusions are not flaws but rather a byproduct of learning the complex statistics of the natural world. By treating these biases as features, we can use Diffusion Models to both predict human perception and generate sophisticated visual stimuli.
One limitation of the current approach is that spatial resolution decreases as the inversion process approaches pure noise, making it difficult to replicate fine-grained illusions. Future work will explore the use of attention maps to automate the placement of illusory targets, potentially leading to even more seamless and complex visual deceptions. Ultimately, integrating these diffusion-based perceptual priors could significantly enhance the contextual understanding of Vision-Language Models (VLMs).
Summary updated