Papers › ViTGAN: Training GANs with Vision Transformers

ViTGAN: Training GANs with Vision Transformers

9 Jul 2021ICLR 2022 4arXiv:2107.04589archive 2025-07-28

Kwonjoon Lee, Huiwen Chang, Lu Jiang, Han Zhang, Zhuowen Tu, Ce Liu

Recently, Vision Transformers (ViTs) have shown competitive performance on image recognition while requiring less vision-specific inductive biases. In this paper, we investigate if such performance can be extended to image generation. To this end, we integrate the ViT architecture into generative adversarial networks (GANs). For ViT discriminators, we observe that existing regularization methods for GANs interact poorly with self-attention, causing serious instability during training. To resolve this issue, we introduce several novel regularization techniques for training GANs with ViTs. For ViT generators, we examine architectural choices for latent and pixel mapping layers to facilitate convergence. Empirically, our approach, named ViTGAN, achieves comparable performance to the leading CNN-based GAN models on three datasets: CIFAR-10, CelebA, and LSUN bedroom.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2107.04589")

Code

Syntology Ran 16 of 18 code samples harvested from 4 repositories linked to this paper; 2 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 13 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 16 samples from 2 repositories, 14 ran; community: 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mlpc-ucsd/ViTGAN officialpytorch report
lucidrains/parti-pytorch mentioned on GitHubpytorch report
wilile26811249/ViTGAN mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 16 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
13ran
2unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

r1_loss mlpc-ucsd/ViTGAN/train_stylegan2.py official repository ran · our draft was wrong MIT (permissive) · 0dacaab9f42c160b · report
Attention lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran MIT (permissive) · e2a8ba11e0a8cc86 · report
Attention wilile26811249/ViTGAN/models.py community (archive-listed) ran MIT (permissive) · d4e0313631ba260f · report
ChanLayerNorm lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran fingerprinted MIT (permissive) · f5b6aedd01aee2e5 · report
FeedForward lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran · our draft was wrong MIT (permissive) · fc258e8fab867fb8 · report
GEncoderBlock wilile26811249/ViTGAN/models.py community (archive-listed) ran MIT (permissive) · b8553e30e2a59605 · report
GTransformerEncoder wilile26811249/ViTGAN/models.py community (archive-listed) ran MIT (permissive) · db9e09fa314a8450 · report
MLP wilile26811249/ViTGAN/models.py community (archive-listed) ran fingerprinted MIT (permissive) · d1fb8f114fe3bf13 · report
PEG lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran MIT (permissive) · 5fe00770f0011e28 · report
RelPosBias2d lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran fingerprinted MIT (permissive) · 64f19fade720d0a0 · report
SLN wilile26811249/ViTGAN/models.py community (archive-listed) ran MIT (permissive) · 7bf61b3936e50c87 · report
SPT lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran MIT (permissive) · ef119489abae949f · report
SineLayer wilile26811249/ViTGAN/models.py community (archive-listed) ran MIT (permissive) · b4ad6aadc33ddbd3 · report
SinusoidalPosEmb lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran MIT (permissive) · df2561ae8a008410 · report
Transformer lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) ran MIT (permissive) · 9502a3bad7826863 · report
Generator wilile26811249/ViTGAN/models.py community (archive-listed) unverified MIT (permissive) · ffa338e5b0089e84 · report
ViTEncDec lucidrains/parti-pytorch/parti_pytorch/vit_vqgan.py community (archive-listed) unverified MIT (permissive) · 1c988e9ef49a3005 · report
normalize_2nd_moment teodorToshkov/ViTGAN-pytorch/models/vitgan_generator.py community ran · our draft was wrong fingerprinted MIT (permissive) · 1b999f986d09befe · report

Tasks

Image Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Generation CIFAR-10 ViTGAN FID 6.66 #38 of 78 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

ConvolutionPath Length RegularizationR1 RegularizationWeight Demodulation

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections