Diffusion-based Visual Anagram as Multi-task Learning

Zhiyuan Xu, Yinhe Chen, Huan-ang Gao, Weiyan Zhao, Guiyu Zhang +1 more
12/3/2024
8 citations
cs.CV
diffusion-flow

Official code: Pixtella/Anagram-MTL (61 stars, Python, Apache-2.0, last commit 2025-05-25).

Abstract

Visual anagrams are images that change appearance upon transformation, like flipping or rotation. With the advent of diffusion models, generating such optical illusions can be achieved by averaging noise across multiple views during the reverse denoising process.

Show full abstract

However, we observe two critical failure modes in this approach: (i) concept segregation, where concepts in different views are independently generated, which can not be considered a true anagram, and (ii) concept domination, where certain concepts overpower others. In this work, we cast the visual anagram generation problem in a multi-task learning setting, where different viewpoint prompts are analogous to different tasks,and derive denoising trajectories that align well across tasks simultaneously. At the core of our designed framework are two newly introduced techniques, where (i) an anti-segregation optimization strategy that promotes overlap in cross-attention maps between different concepts, and (ii) a noise vector balancing method that adaptively adjusts the influence of different tasks. Additionally, we observe that directly averaging noise predictions yields suboptimal performance because statistical properties may not be preserved, prompting us to derive a noise variance rectification method. Extensive qualitative and quantitative experiments demonstrate our method's superior ability to generate visual anagrams spanning diverse concepts.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[WACV 2025] Official implementation for the paper "Diffusion-based Visual Anagram as Multi-task Learning"

613Python, Jupyter NotebookNov 30, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{xu2024diffusionbased,
  title  = {Diffusion-based Visual Anagram as Multi-task Learning},
  author = {Zhiyuan Xu and Yinhe Chen and Huan-ang Gao and Weiyan Zhao and Guiyu Zhang and Hao Zhao},
  year   = {2024},
  eprint = {2412.02693},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.02693v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.02693.svg)](https://codeofpaper.com/paper/2412.02693)

Discussion