Introduction
Visual anagrams are a unique form of optical illusion where a single image represents two distinct concepts depending on its orientation—for example, a garden gnome that transforms into a hot air balloon when turned upside down. While modern diffusion models have shown promise in generating these illusions by averaging noise predictions across different views, they frequently encounter two significant failure modes: concept segregation, where the model generates two separate objects side-by-side, and concept domination, where one prompt overwhelms the other.
Reframing Anagrams as Multi-Task Learning
Researchers have recently proposed reframing the creation of visual anagrams as a Multi-Task Learning (MTL) problem. In this framework, each view/prompt pair is treated as a separate task. To address the inherent conflicts between these tasks, the authors introduced three core components to the standard diffusion denoising process:
- Anti-Segregation Optimization (ASO): This technique uses cross-attention maps to prevent objects from appearing in separate regions of the image. By applying an inference-time loss that encourages attention maps for different concepts to overlap, the model is forced to find a single geometry that satisfies both prompts simultaneously.
- Noise Vector Balancing (NVB): To prevent one concept from dominating, a "noise-aware" CLIP model measures task completion at each step. If one view is progressing faster, its weight is reduced, allowing the "struggling" view to exert more influence.
- Noise Variance Rectification (NVR): Averaging noise vectors from multiple views shifts the statistical variance, which can lead to artifacts. The authors derived a mathematical rectification factor to ensure the combined noise remains within the expected Gaussian distribution of the model.
Methodology and Implementation
The researchers utilized DeepFloyd IF, a pixel-space diffusion model, as their backbone. Pixel-space models were chosen over latent-space models (like Stable Diffusion) because they handle geometric transformations more reliably without the interference of non-invariant VAE decoders.
Testing was conducted on a variety of datasets, including a CIFAR-10 2-view dataset and a more complex 3-view extension requiring the image to remain coherent across three different orientations (identity, flip, and rotation).
Key Results and Insights
The proposed MTL approach significantly outperformed previous state-of-the-art methods across both quantitative and qualitative metrics. Specifically, the method achieved higher Alignment Scores, indicating a closer match to text prompts in all views, and improved Concealment Scores, meaning the illusions more effectively hide the "other" concept in any given orientation.
Qualitatively, the results show that the MTL method successfully avoids the "side-by-side" object problem. Instead of a tiny rabbit next to a tiny violin, the model produces a singular, complex shape that morphs convincingly between the two concepts. This confirms that treating illusions as optimization conflicts allows models to find the necessary "middle ground" for high-quality optical illusions.
Limitations and Future Directions
Despite its success, the method currently faces challenges with latent diffusion models due to VAE decoder variance. Additionally, the optimization step (ASO) adds computational overhead at each denoising timestamp. Future work may explore extending this framework to non-orthogonal transforms, such as extreme skews or non-linear warps, which remain an open challenge in the field of automated illusion generation.
Summary updated