Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models

Giannis Daras, Augustus Odena, Han Zhang, Alexandros G. Dimakis
11/27/2019
63 citations
cs.LGcs.CVstat.ML
transformer-attention

Official code: giannisdaras/ylg (135 stars, Python, GPL-3.0, last commit 2022-11-22).

Abstract

We introduce a new local sparse attention layer that preserves two-dimensional geometry and locality. We show that by just replacing the dense attention layer of SAGAN with our construction, we obtain very significant FID, Inception score and pure visual improvements.

Show full abstract

FID score is improved from $18.65$ to $15.94$ on ImageNet, keeping all other parameters the same. The sparse attention patterns that we propose for our new layer are designed using a novel information theoretic criterion that uses information flow graphs. We also present a novel way to invert Generative Adversarial Networks with attention. Our method extracts from the attention layer of the discriminator a saliency map, which we use to construct a new loss function for the inversion. This allows us to visualize the newly introduced attention heads and show that they indeed capture interesting aspects of two-dimensional geometry of real images.

View on arXivView PDF

Code Implementations(1)

giannisdaras/ylgOfficial100%
GPL-3.0

[CVPR 2020] Official Implementation: "Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models".

13516PythonNov 27, 20194 years agoGPL-3.0
attention-mechanismcomputer-visioncvprcvpr20cvpr2020+4 more

Similar Papers

Cite this paper

@article{daras2019your,
  title  = {Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models},
  author = {Giannis Daras and Augustus Odena and Han Zhang and Alexandros G. Dimakis},
  year   = {2019},
  eprint = {1911.12287},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1911.12287}
}

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/1911.12287.svg)](https://codeofpaper.com/paper/1911.12287)

Discussion