Reproduce “Training-Free Layout Control with Cross-Attention Guidance” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Minghao Chen, Iro Laina, Andrea Vedaldi

Researchers at the Visual Geometry Group at Oxford University developed "backward guidance," a training-free method that enables precise spatial layout control in images generated by pre-trained text-to-image diffusion models like Stable Diffusion. This approach significantly improves adherence to user-specified object placement, achieving a 96.9% conditional probability of correct spatial relationships on the VISOR benchmark.

Key insights

  • Backward guidance provides more robust and holistic control than direct "forward guidance" by indirectly influencing cross-attention maps of all tokens (including special tokens) and all layers through latent space updates.
  • Special tokens like `[SoT]` (start-of-text) and `[EoT]` (end-of-text/padding) carry substantial semantic and spatial layout information within diffusion models, with `[EoT]` often aligning with foreground objects and `[SoT]` with background.
  • The initial random noise supplied to the diffusion process significantly influences the intrinsic layout of the generated image, and selecting noise patterns pre-aligned with desired layouts further boosts control and image fidelity.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.