{"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/least-squares-generative-adversarial-networks","title":"Least Squares Generative Adversarial Networks","arxiv_id":"1611.04076","date":"2016-11-13","proceeding":"ICCV 2017 10","authors":["Xudong Mao","Qing Li","Haoran Xie","Raymond Y. K. Lau","Zhen Wang","Stephen Paul Smolley"],"abstract":"Unsupervised learning with generative adversarial networks (GANs) has proven\nhugely successful. Regular GANs hypothesize the discriminator as a classifier\nwith the sigmoid cross entropy loss function. However, we found that this loss\nfunction may lead to the vanishing gradients problem during the learning\nprocess. To overcome such a problem, we propose in this paper the Least Squares\nGenerative Adversarial Networks (LSGANs) which adopt the least squares loss\nfunction for the discriminator. We show that minimizing the objective function\nof LSGAN yields minimizing the Pearson $\\chi^2$ divergence. There are two\nbenefits of LSGANs over regular GANs. First, LSGANs are able to generate higher\nquality images than regular GANs. Second, LSGANs perform more stable during the\nlearning process. We evaluate LSGANs on five scene datasets and the\nexperimental results show that the images generated by LSGANs are of better\nquality than the ones generated by regular GANs. We also conduct two comparison\nexperiments between LSGANs and regular GANs to illustrate the stability of\nLSGANs.","url_abs":"http://arxiv.org/abs/1611.04076v3","url_pdf":"http://arxiv.org/pdf/1611.04076v3.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":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/xudonmao/LSGAN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/JeongHyunJin/Jeong2020_SolarFarsideMagnetograms","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/JeongHyunjin/SolarFarsideMagneticFields","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/Jittor/lsgan-jittor","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/LynnHo/DCGAN-LSGAN-WGAN-WGAN-GP-Tensorflow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/MakeDirtyCode/DC-GAN-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/MakeDirtyCode/DCGAN-celebA-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/SongDark/generate_normal","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/beelze-b/LSGAN-Implementation","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/beresandras/gan-flavours-keras","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/bmeenakshi123/lsgan","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/conan7882/tf-gans","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/eriklindernoren/Keras-GAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/eriklindernoren/PyTorch-GAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/kang205/DVBPR","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/kangyeolk/pytorch-gan-collections","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/marload/GANs-TensorFlow2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/marload/TensorFlow2-GANs","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/masataka46/demo_LSGAN_TF","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/ChristophReich1996/Dirac-GAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/ChristophReich1996/Mode_Collapse","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/MaximeVandegar/Papers-in-100-Lines-of-Code/tree/main/Least_Squares_Generative_Adversarial_Networks","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/MindSpore-scientific/code-8/tree/main/Least_Generative","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"least-squares-generative-adversarial-networks","repo_url":"https://github.com/open-mmlab/mmgeneration","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[],"methods":[{"method_slug":"adam","method_name":"Adam"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"gan-least-squares-loss","method_name":"GAN Least Squares Loss"},{"method_slug":"lsgan","method_name":"LSGAN"},{"method_slug":"rmsprop","method_name":"RMSProp"},{"method_slug":"relu","method_name":"ReLU"}],"datasets_introduced":[],"methods_introduced":[{"slug":"gan-least-squares-loss","name":"GAN Least Squares Loss","full_name":"GAN Least Squares Loss"},{"slug":"lsgan","name":"LSGAN","full_name":"LSGAN"}],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1611.04076","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1611.04076"}},"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/kang205/DVBPR","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jittor/lsgan-jittor","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ChristophReich1996/Dirac-GAN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MakeDirtyCode/DCGAN-celebA-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JeongHyunjin/SolarFarsideMagneticFields","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/LynnHo/DCGAN-LSGAN-WGAN-WGAN-GP-Tensorflow","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/marload/TensorFlow2-GANs","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/JeongHyunJin/Jeong2020_SolarFarsideMagnetograms","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MaximeVandegar/Papers-in-100-Lines-of-Code/tree/main/Least_Squares_Generative_Adversarial_Networks","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kangyeolk/pytorch-gan-collections","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MakeDirtyCode/DC-GAN-pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SongDark/generate_normal","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ChristophReich1996/Mode_Collapse","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/beelze-b/LSGAN-Implementation","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/eriklindernoren/Keras-GAN","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xudonmao/LSGAN","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/eriklindernoren/PyTorch-GAN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/open-mmlab/mmgeneration","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/beresandras/gan-flavours-keras","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/marload/GANs-TensorFlow2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-scientific/code-8/tree/main/Least_Generative","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bmeenakshi123/lsgan","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/masataka46/demo_LSGAN_TF","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/conan7882/tf-gans","reach":{"status":"unanswered"}}],"summary":{"ran_honours":3,"ran_draft_wrong":1,"ran_violates":1,"unverified":4},"by_repo_kind":{"listed":{"samples":9,"ran":5,"repositories":3}},"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":"ebefb865cf54a7ee","entry":"convert_np2pil","repo":"masataka46/demo_LSGAN_TF","repo_kind":"listed","path":"utility.py","file_url":"https://github.com/masataka46/demo_LSGAN_TF/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ebefb865cf54a7ee"}},{"code_sha256_prefix":"120e89c447407dfc","entry":"convert_to_10class","repo":"masataka46/demo_LSGAN_TF","repo_kind":"listed","path":"utility.py","file_url":"https://github.com/masataka46/demo_LSGAN_TF/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"120e89c447407dfc"}},{"code_sha256_prefix":"ab1e91f948a776f3","entry":"get_minibatch","repo":"MaximeVandegar/Papers-in-100-Lines-of-Code","repo_kind":"listed","path":"Least_Squares_Generative_Adversarial_Networks/lsgan.py","file_url":"https://github.com/MaximeVandegar/Papers-in-100-Lines-of-Code/blob/HEAD/Least_Squares_Generative_Adversarial_Networks/lsgan.py","link_basis":"first_harvest_node","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":"ab1e91f948a776f3"}},{"code_sha256_prefix":"cbc13ef676058576","entry":"sample_noise","repo":"MaximeVandegar/Papers-in-100-Lines-of-Code","repo_kind":"listed","path":"Least_Squares_Generative_Adversarial_Networks/lsgan.py","file_url":"https://github.com/MaximeVandegar/Papers-in-100-Lines-of-Code/blob/HEAD/Least_Squares_Generative_Adversarial_Networks/lsgan.py","link_basis":"first_harvest_node","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":"cbc13ef676058576"}},{"code_sha256_prefix":"9db731fbd1aac357","entry":"unnorm_img","repo":"masataka46/demo_LSGAN_TF","repo_kind":"listed","path":"utility.py","file_url":"https://github.com/masataka46/demo_LSGAN_TF/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9db731fbd1aac357"}},{"code_sha256_prefix":"01c68e1ee8740fd7","entry":"get_grid","repo":"JeongHyunJin/Jeong2020_SolarFarsideMagnetograms","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/JeongHyunJin/Jeong2020_SolarFarsideMagnetograms/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01c68e1ee8740fd7"}},{"code_sha256_prefix":"a7c8f4d82aed45aa","entry":"get_norm_layer","repo":"JeongHyunJin/Jeong2020_SolarFarsideMagnetograms","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/JeongHyunJin/Jeong2020_SolarFarsideMagnetograms/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7c8f4d82aed45aa"}},{"code_sha256_prefix":"09b6a14bbc70261c","entry":"get_pad_layer","repo":"JeongHyunJin/Jeong2020_SolarFarsideMagnetograms","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/JeongHyunJin/Jeong2020_SolarFarsideMagnetograms/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09b6a14bbc70261c"}},{"code_sha256_prefix":"7d6b4d1002b99d2f","entry":"train","repo":"MaximeVandegar/Papers-in-100-Lines-of-Code","repo_kind":"listed","path":"Least_Squares_Generative_Adversarial_Networks/lsgan.py","file_url":"https://github.com/MaximeVandegar/Papers-in-100-Lines-of-Code/blob/HEAD/Least_Squares_Generative_Adversarial_Networks/lsgan.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d6b4d1002b99d2f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}