{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/styleformer-transformer-based-generative","title":"Styleformer: Transformer based Generative Adversarial Networks with Style Vector","arxiv_id":"2106.07023","date":"2021-06-13","proceeding":"CVPR 2022 1","authors":["Jeeseung Park","Younggeun Kim"],"abstract":"We propose Styleformer, which is a style-based generator for GAN architecture, but a convolution-free transformer-based generator. In our paper, we explain how a transformer can generate high-quality images, overcoming the disadvantage that convolution operations are difficult to capture global features in an image. Furthermore, we change the demodulation of StyleGAN2 and modify the existing transformer structure (e.g., residual connection, layer normalization) to create a strong style-based generator with a convolution-free structure. We also make Styleformer lighter by applying Linformer, enabling Styleformer to generate higher resolution images and result in improvements in terms of speed and memory. We experiment with the low-resolution image dataset such as CIFAR-10, as well as the high-resolution image dataset like LSUN-church. Styleformer records FID 2.82 and IS 9.94 on CIFAR-10, a benchmark dataset, which is comparable performance to the current state-of-the-art and outperforms all GAN-based generative models, including StyleGAN2-ADA with fewer parameters on the unconditional setting. We also both achieve new state-of-the-art with FID 15.17, IS 11.01, and FID 3.66, respectively on STL-10 and CelebA. We release our code at https://github.com/Jeeseung-Park/Styleformer.","url_abs":"https://arxiv.org/abs/2106.07023v3","url_pdf":"https://arxiv.org/pdf/2106.07023v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"styleformer-transformer-based-generative","repo_url":"https://github.com/Jeeseung-Park/Styleformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"styleformer-transformer-based-generative","repo_url":"https://github.com/younggeun-kim/Styleformer","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"styleformer-transformer-based-generative","repo_url":"https://github.com/BR-IDL/PaddleViT/blob/main/gan/Styleformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"paddle","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linformer","method_name":"Linformer"},{"method_slug":"multi-head-linear-attention","method_name":"Multi-Head Linear Attention"},{"method_slug":"path-length-regularization","method_name":"Path Length Regularization"},{"method_slug":"r1-regularization","method_name":"R1 Regularization"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-demodulation","method_name":"Weight Demodulation"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-stl-10","task":"Image Generation","dataset":"STL-10","model":"Styleformer","rank_in_archive_order":12,"of":31,"metrics":{"FID":"15.17","Inception score":"11.01"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.07023","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.07023"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jeeseung-Park/Styleformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/younggeun-kim/Styleformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BR-IDL/PaddleViT/blob/main/gan/Styleformer","reach":null}],"summary":{"ran_draft_wrong":1,"ran_violates":1,"ran_honours":2},"by_repo_kind":{"official":{"samples":4,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a2b45afa097b55b6","entry":"file_ext","repo":"Jeeseung-Park/Styleformer","repo_kind":"official","path":"dataset_tool.py","file_url":"https://github.com/Jeeseung-Park/Styleformer/blob/HEAD/dataset_tool.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a2b45afa097b55b6"}},{"code_sha256_prefix":"902146c964b18a9a","entry":"is_image_ext","repo":"Jeeseung-Park/Styleformer","repo_kind":"official","path":"dataset_tool.py","file_url":"https://github.com/Jeeseung-Park/Styleformer/blob/HEAD/dataset_tool.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"902146c964b18a9a"}},{"code_sha256_prefix":"dd1dc700e87f36cc","entry":"maybe_min","repo":"Jeeseung-Park/Styleformer","repo_kind":"official","path":"dataset_tool.py","file_url":"https://github.com/Jeeseung-Park/Styleformer/blob/HEAD/dataset_tool.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd1dc700e87f36cc"}},{"code_sha256_prefix":"6f6beb9107cb48e8","entry":"num_range","repo":"Jeeseung-Park/Styleformer","repo_kind":"official","path":"generate.py","file_url":"https://github.com/Jeeseung-Park/Styleformer/blob/HEAD/generate.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6f6beb9107cb48e8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}