Papers › Self-Attention Generative Adversarial Networks
Self-Attention Generative Adversarial Networks
Han Zhang, Ian Goodfellow, Dimitris Metaxas, Augustus Odena
In this paper, we propose the Self-Attention Generative Adversarial Network (SAGAN) which allows attention-driven, long-range dependency modeling for image generation tasks. Traditional convolutional GANs generate high-resolution details as a function of only spatially local points in lower-resolution feature maps. In SAGAN, details can be generated using cues from all feature locations. Moreover, the discriminator can check that highly detailed features in distant portions of the image are consistent with each other. Furthermore, recent work has shown that generator conditioning affects GAN performance. Leveraging this insight, we apply spectral normalization to the GAN generator and find that this improves training dynamics. The proposed SAGAN achieves the state-of-the-art results, boosting the best published Inception score from 36.8 to 52.52 and reducing Frechet Inception distance from 27.62 to 18.65 on the challenging ImageNet dataset. Visualization of the attention layers shows that the generator leverages neighborhoods that correspond to object shapes rather than local regions of fixed shape.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="1805.08318")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="1805.08318", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="1805.08318")
Code
Syntology 81 code samples: 80 from 17 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 81: 46 ran (of which 0 constructed an object rather than computing a result; 40 with no instrument failure: 4 honoured, 1 violated, 35 with no contract checked; 6 where Syntology's instrument failed) · 35 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: official repository: 8 samples from 1 repository, 1 ran (1 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 72 samples from 16 repositories, 44 ran (38 with no instrument failure; 6 where Syntology's instrument failed); 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
No sample is linked to this paper from 5 of its repositories that Syntology harvested for other papers:
- bayraktarbaris/SNGAN, community (archive-listed): harvested for another paper, listed under the repository
- franknb/Self-attention-DCGAN, community (archive-listed): harvested for another paper, listed under the repository
- hinofafa/Self-Attention-HearthStone-GAN, community (archive-listed): harvested for another paper, listed under the repository
- llvictorll/AS, community (archive-listed): harvested for another paper, listed under the repository
- PacktPublishing/Hands-On-Image-Generation-with-TensorFlow-2.0, community (archive-listed): harvested for another paper, listed under the repository
Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
48 repositories listed; official and paper-mentioned ones first.
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.
A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.
Code Syntology ran Syntology
81 samples harvested: 46 ran (of which 0 constructed an object rather than computing a result; 40 with no instrument failure: 4 honoured, 1 violated, 35 with no contract checked; 6 where Syntology's instrument failed) · 35 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 3 of the 81 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 17 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. 1 sample is listed last, in a group without a repository. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
3c8a8a1b83ec5aea · report
fixture: signature x:EagerTensor/4/float · returned EagerTensor · level recorded 2026-09-25 census: 8 implementations from 7 papers, 7 distinct outputs across 6 buckets, one shared input per bucket vgg_16_train.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant MIT (permissive) ·
18badd533b52adb3 · report
fixture: signature output:Tensor/2/float, target:Tensor/1/int, topk:tuple/1/int · returned list · level recorded 2026-09-22 0da8e3611f2915d1 · report
fixture: signature upload_directory:str/0/str, extension:str/0/str · returned str · level recorded 2026-09-26 046e55f2369394f8 · report
07bea8a5df5a9e59 · report
fixture: signature fn_name:str/0/str · returned ReLU · level recorded 2026-09-26 4c285e4ad37fd444 · report
fixture: signature dataset:DummyF2TDataset/0/?, batch_size:int/0/int, num_workers:int/0/int · returned DataLoader · level recorded 2026-09-24 e36470391de100a1 · report
fixture: signature new_size:tuple/1/int · returned Compose · level recorded 2026-09-26 81eef2989e68e1bb · report
fixture: signature inp_str:str/0/str · returned tuple · level recorded 2026-09-26 d5151aa5668d7556 · report
fixture: signature file_name:str/0/str, delimiter:str/0/str · returned ndarray · level recorded 2026-09-24 7b64c2c40ebe4e1d · report
fb18a372c2d6ae7c · report
3ef87d02964ebff2 · report
fixture: signature m:callable/0/?, cut:int/0/int · returned list · level recorded 2026-09-26 41ffbd7edb63900f · report
fixture: signature x:list/1/int · returned bool · level recorded 2026-09-26 3f8c44e7445adaad · report
fixture: signature x:Tensor/0/float · returned float · level recorded 2026-09-26 b80bba5071349f52 · report
fixture: signature l:list/1/int, r:list/1/str · returned zip · level recorded 2026-09-26 df604797d5e1e1f4 · report
fixture: signature im_size:int/0/int, batch_size:int/0/int, workers:int/0/int, dataset:str/0/str, data_path:str/0/str · returned DataLoader · level recorded 2026-09-26 49e2b0cc4b0c854f · report
fixture: signature scope:NoneType/0/?, suffix:NoneType/0/? · returned list · level recorded 2026-09-24 bfe05de19b4eb8d1 · report
fixture: signature given_name:str/0/str, scope:str/0/str · returned list · level recorded 2026-09-24 c2576a700c35ebba · report
fixture: signature input_tensor:EagerTensor/4/float, grid_shape:list/1/int, image_shape:list/1/int, num_channels:int/0/int · returned EagerTensor · level recorded 2026-09-24 census: 18 implementations from 18 papers, 15 distinct outputs across 7 buckets, one shared input per bucket tensorflow_gan/python/eval/classifier_metrics.py ran Apache-2.0 (permissive) ·
a3e29c3eb31126b7 · report
fixture: signature p:EagerTensor/2/float, p_logits:EagerTensor/2/float, q:EagerTensor/1/float · returned SymbolicTensor · level recorded 2026-09-24 3c1810a3f62b3156 · report
fixture: signature input_array:ndarray/4/int, grid_shape:list/1/int · returned ndarray · level recorded 2026-09-24 c9b8371a08cafd98 · report
fixture: signature input_tensor:EagerTensor/2/float, classifier_fn:callable/0/?, num_batches:int/0/int, dtypes:NoneType/0/?, name:str/0/str · returned SymbolicTensor · level recorded 2026-09-24 e56d29a30182c70a · report
fixture: signature sample_fn:callable/0/?, sample_inputs:list/1/EagerTensor, classifier_fn:callable/0/?, dtypes:NoneType/0/?, name:str/0/str · returned EagerTensor · level recorded 2026-09-24 86ee4730f89c1466 · report
fixture: signature fn:callable/0/? · returned function · level recorded 2026-09-24 6dfacdb4f7f296a6 · report
fixture: signature discriminator_real_outputs:EagerTensor/2/float, discriminator_gen_outputs:EagerTensor/2/float, real_weights:float/0/float, generated_weights:float/0/float, scope:str/0/str, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24 ef511aaa7c479fd0 · report
fixture: signature discriminator_gen_outputs:EagerTensor/2/float, weights:EagerTensor/2/float, scope:NoneType/0/?, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24 3160840ade588e25 · report
fixture: signature discriminator_real_outputs:SymbolicTensor/2/float, discriminator_gen_outputs:SymbolicTensor/2/float, real_weights:float/0/float, generated_weights:float/0/float, real_hinge:float/0/float, generated_hinge:float/0/float, scope:NoneType/0/?, loss_collection:str/0/str, reduction:str/0/str, add_summaries:bool/0/bool · returned SymbolicTensor · level recorded 2026-09-24 3ed7cb04ca358824 · report
1341ccc8c51a764e · report
ace1970711646371 · report
6b36eef1846a9c6e · report
f9934d2088fd316e · report
8257e435f9a8eec2 · report
1ea274c92e014f1e · report
456672524c536ea3 · report
fixture: signature pil_image:Image/0/? · returned Image · level recorded 2026-09-26 d0dbc1ec9e12116f · report
fixture: signature device:str/0/str · returned str · level recorded 2026-09-26 c58d89114d55c178 · report
fixture: signature seed:int/0/int · returned int · level recorded 2026-09-26 ad810d34df32ec81 · report
fixture: signature train_root:str/0/str, test_root:str/0/str, batch_size:int/0/int, shuffle_data:bool/0/bool · returned tuple · level recorded 2026-09-26 696143e37ed7ad3e · report
fixture: signature tensor:Tensor/4/float, samples_per_class:int/0/int, num_classes:int/0/int, padding:int/0/int, im_size:int/0/int · returned ndarray · level recorded 2026-09-26 de6376e3c77191a9 · report
fixture: signature input:Tensor/2/float · returned Tensor · level recorded 2026-09-22 6c51f01ab7abcc0d · report
fixture: signature module:callable/0/?, gain:float/0/float · returned Linear · level recorded 2026-09-22 a493780508978abe · report
fixture: signature module:callable/0/?, name:str/0/str · returned SimpleLinear · level recorded 2026-09-22 c9a6012d7fbd67dd · report
fixture: signature ni:int/0/int, nf:int/0/int, ks:int/0/int, stride:int/0/int, bias:bool/0/bool · returned Conv2d · level recorded 2026-09-22 135b3dc835ffe6ad · report
2adc88ed4c50017c · report
fixture: signature image:Tensor/4/float, mask:Tensor/4/float · returned tuple · level recorded 2026-09-26 9519c43c0017c576 · report
fixture: signature image:Image/0/?, target_size:int/0/int · returned Image · level recorded 2026-09-26 6e16337c88174e00 · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-25 d605248fc0b2740e · report
fixture: signature batch_size:int/0/int, dataset_type:str/0/str, data_path:str/0/str, shuffle:bool/0/bool, drop_last:bool/0/bool, dataloader_args:dict/0/?, resize:bool/0/bool, imsize:int/0/int, centercrop:bool/0/bool, centercrop_size:int/0/int, totensor:bool/0/bool, normalize:bool/0/bool, norm_mean:tuple/1/float, norm_std:tuple/1/float · returned tuple · level recorded 2026-09-26 01aaeccd433501f0 · report
fixture: signature resize:bool/0/bool, imsize:int/0/int, centercrop:bool/0/bool, centercrop_size:int/0/int, totensor:bool/0/bool, normalize:bool/0/bool, norm_mean:tuple/1/float, norm_std:tuple/1/float · returned Compose · level recorded 2026-09-26 9dadf7efa8619d2e · report
fixture: signature num_embeddings:int/0/int, embedding_dim:int/0/int · returned Embedding · level recorded 2026-09-25 572d43d0e50a2023 · report
fixture: signature in_channels:int/0/int, out_channels:int/0/int, kernel_size:int/0/int, stride:int/0/int, padding:int/0/int, dilation:int/0/int, groups:int/0/int, bias:bool/0/bool · returned Conv2d · level recorded 2026-09-25 d7e3fc2fa558d6ef · report
fixture: signature in_features:int/0/int, out_features:int/0/int · returned Linear · level recorded 2026-09-25 9c7967df1b87b856 · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-26 a991cda315bdf446 · report
fixture: signature dir:str/0/str, classes_idx:NoneType/0/? · returned tuple · level recorded 2026-09-26 4e6a8faaf8e44abe · report
fixture: signature filename:str/0/str · returned bool · level recorded 2026-09-24 776ca5e6e79753e3 · report
fixture: signature dir:str/0/str, class_to_idx:dict/0/? · returned list · level recorded 2026-09-26 1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
5e2ed23acb71ee11 · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22 Tasks
1 archive task tag without a task page not shown.
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Conditional Image Generation | ImageNet 128x128 | SAGAN | FID | 18.65 | #20 of 22 | Archive leaderboard | report |
| Conditional Image Generation | ImageNet 128x128 | SAGAN | Inception score | 52.52 | #20 of 22 | 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
Introduced by this paper: SAGAN
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