Visual Anagrams: Generating Multi-View Optical Illusions with Diffusion Models

Daniel Geng, Inbum Park, Andrew Owens · DOI

Abstract

The paper "Visual Anagrams" presents a zero-shot method for generating multi-view optical illusions using pixel-based diffusion models. By modifying the denoising process to simultaneously satisfy multiple geometric transformations and text prompts, the authors create images that transform into different subjects when flipped, rotated, or rearranged. This "Parallel Denoising" technique leverages the properties of orthogonal transformations to maintain high-fidelity results without requiring model fine-tuning.

Introduction

Creating multi-view optical illusions—such as M.C. Escher’s "Sky and Water I" or Giuseppe Arcimboldo’s reversible heads—is a challenging task that requires finding shared visual features between disparate objects. Previous computational attempts often relied on complex optimization loops or explicit models of human perception, which were slow and produced low-quality results. "Visual Anagrams" addresses this by repurposing off-the-shelf diffusion models to solve the multi-view constraint during the iterative generation process.

Methodology: Parallel Denoising and Orthogonality

The core innovation is Parallel Denoising. In a standard diffusion model, an image is generated by iteratively removing noise based on a text prompt. The authors modify this process:

  1. Multiple Views: For a single noisy image, they apply $N$ different transformations (e.g., identity, 180° rotation, pixel permutation).
  2. Parallel Estimation: Each transformed version is passed through the diffusion model with a unique text prompt.
  3. Alignment and Averaging: The resulting noise estimates are inverse-transformed to align with the original image orientation and then averaged.
  4. Iterative Step: This averaged estimate guides the next step toward a clean image.
Examples of multi-view constraints, including three-view and four-view illusions and skews.

A key mathematical requirement is that transformations must be orthogonal. Orthogonal transformations, such as 90-degree rotations, flips, and pixel permutations, preserve the Gaussian noise statistics the model was trained on. Non-orthogonal transformations (like 45-degree rotations) introduce interpolation artifacts that degrade performance. Furthermore, the authors utilize pixel-based models (e.g., DeepFloyd IF) because latent-based models (like Stable Diffusion) produce spatial artifacts when their internal block-based representations are transformed.

Key Results and Insights

The method demonstrates remarkable versatility across various illusion types, ranging from simple flips to complex jigsaw puzzles.

A comprehensive gallery of visual anagrams, including flips, polymorphic jigsaw puzzles, rotations, and ambigrams.

Beyond simple flips, the authors generate "Three View" illusions and "Ambigrams"—cursive text that changes meaning when inverted. A particularly novel application is the Polymorphic Jigsaw Puzzle, where a single set of pixels can be rearranged into two entirely different images. To improve the "concealment" of secondary subjects, the authors employ Negative Prompting, using the prompt of one view as a negative prompt for the other.

Quantitatively, the method consistently outperforms baselines like Score Distillation Sampling (SDS) and alternating denoising in CLIP-based alignment scores.

Limitations and Future Work

While effective, the model occasionally fails to "merge" views, resulting in side-by-side subjects. It also struggles with non-orthogonal transformations due to noise correlation issues. Additionally, diffusion models' inherent "centering bias" can limit the spatial composition of the illusions. Future research may explore supporting non-orthogonal transformations or improving the consistency of the merging process.

Conclusion

Visual Anagrams provides an elegant, zero-shot framework for generating complex optical illusions. By aligning multiple denoising paths through orthogonal transformations, it opens new creative possibilities for AI-generated art, turning standard diffusion models into masters of visual deception.

Summary updated

BibTeX
@misc{geng2023visual,
  author = {Daniel Geng and Inbum Park and Andrew Owens},
  title = {{Visual Anagrams: Generating Multi-View Optical Illusions with Diffusion Models}},
  year = {2023},
  eprint = {2311.17919},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.17919},
}
Figure