{"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/the-relativistic-discriminator-a-key-element","title":"The relativistic discriminator: a key element missing from standard GAN","arxiv_id":"1807.00734","date":"2018-07-02","proceeding":"ICLR 2019 5","authors":["Alexia Jolicoeur-Martineau"],"abstract":"In standard generative adversarial network (SGAN), the discriminator\nestimates the probability that the input data is real. The generator is trained\nto increase the probability that fake data is real. We argue that it should\nalso simultaneously decrease the probability that real data is real because 1)\nthis would account for a priori knowledge that half of the data in the\nmini-batch is fake, 2) this would be observed with divergence minimization, and\n3) in optimal settings, SGAN would be equivalent to integral probability metric\n(IPM) GANs.\n  We show that this property can be induced by using a relativistic\ndiscriminator which estimate the probability that the given real data is more\nrealistic than a randomly sampled fake data. We also present a variant in which\nthe discriminator estimate the probability that the given real data is more\nrealistic than fake data, on average. We generalize both approaches to\nnon-standard GAN loss functions and we refer to them respectively as\nRelativistic GANs (RGANs) and Relativistic average GANs (RaGANs). We show that\nIPM-based GANs are a subset of RGANs which use the identity function.\n  Empirically, we observe that 1) RGANs and RaGANs are significantly more\nstable and generate higher quality data samples than their non-relativistic\ncounterparts, 2) Standard RaGAN with gradient penalty generate data of better\nquality than WGAN-GP while only requiring a single discriminator update per\ngenerator update (reducing the time taken for reaching the state-of-the-art by\n400%), and 3) RaGANs are able to generate plausible high resolutions images\n(256x256) from a very small sample (N=2011), while GAN and LSGAN cannot; these\nimages are of significantly better quality than the ones generated by WGAN-GP\nand SGAN with spectral normalization.","url_abs":"http://arxiv.org/abs/1807.00734v3","url_pdf":"http://arxiv.org/pdf/1807.00734v3.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":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/AlexiaJM/RelativisticGAN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/AlexiaJM/GANsBeyondDivergenceMin","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"the-relativistic-discriminator-a-key-element","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":"the-relativistic-discriminator-a-key-element","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":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/jpjuvo/64-3D-RaSGAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/trevor-vincent/DeepChessComposer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/weishenho/SAGAN-with-relativistic","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/zxr931120/-","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"paper_slug":"the-relativistic-discriminator-a-key-element","repo_url":"https://github.com/soumik12345/Adventures-with-GANS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok"}}],"tasks":[{"task_slug":null,"task_name":"Generative Adversarial Network"},{"task_slug":"image-generation","task_name":"Image Generation"}],"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":"relu","method_name":"ReLU"},{"method_slug":"relativistic-gan","method_name":"Relativistic GAN"},{"method_slug":"spectral-normalization","method_name":"Spectral Normalization"},{"method_slug":"wgan-gp-loss","method_name":"WGAN-GP Loss"}],"datasets_introduced":[],"methods_introduced":[{"slug":"relativistic-gan","name":"Relativistic GAN","full_name":"Relativistic GAN"}],"results":[{"leaderboard":"/sota/image-generation-on-cat-256x256","task":"Image Generation","dataset":"CAT 256x256","model":"RaSGAN","rank_in_archive_order":2,"of":3,"metrics":{"FID":"32.11"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-cifar-10","task":"Image Generation","dataset":"CIFAR-10","model":"RSGAN-GP","rank_in_archive_order":64,"of":78,"metrics":{"FID":"25.60"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1807.00734","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1807.00734"}},"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/weishenho/SAGAN-with-relativistic","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/soumik12345/Adventures-with-GANS","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AlexiaJM/RelativisticGAN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jpjuvo/64-3D-RaSGAN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AlexiaJM/GANsBeyondDivergenceMin","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zxr931120/-","reach":{"status":"gone","observed_at":"2026-09-18","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/trevor-vincent/DeepChessComposer","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/taki0112/RelativisticGAN-Tensorflow","reach":{"status":"ok","spdx":"MIT"}},{"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/beresandras/gan-flavours-keras","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"unverified":8},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":7,"ran":0,"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":2,"samples":[{"code_sha256_prefix":"9617b12aa6ac6bbe","entry":"strToBool","repo":"AlexiaJM/RelativisticGAN","repo_kind":"official","path":"code/GAN_losses_iter.py","file_url":"https://github.com/AlexiaJM/RelativisticGAN/blob/HEAD/code/GAN_losses_iter.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9617b12aa6ac6bbe"}},{"code_sha256_prefix":"444f08bdefd32bb7","entry":"continue_download","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"444f08bdefd32bb7"}},{"code_sha256_prefix":"0f5619b402c78306","entry":"conv","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"ops.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/blob/HEAD/ops.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":"0f5619b402c78306"}},{"code_sha256_prefix":"4700cd22b8033044","entry":"deconv","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"ops.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/blob/HEAD/ops.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":"4700cd22b8033044"}},{"code_sha256_prefix":"d29bc3068b3eae3f","entry":"flatten","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"ops.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/blob/HEAD/ops.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":"d29bc3068b3eae3f"}},{"code_sha256_prefix":"135b3dc835ffe6ad","entry":"get_confirm_token","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"download.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/blob/HEAD/download.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":"135b3dc835ffe6ad"}},{"code_sha256_prefix":"66e93b6f5e7a8457","entry":"load_cifar10","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/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":"66e93b6f5e7a8457"}},{"code_sha256_prefix":"316a5cc5d22912a0","entry":"load_data","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/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":"316a5cc5d22912a0"}},{"code_sha256_prefix":"a5d19dceb0c8a790","entry":"load_mnist","repo":"taki0112/RelativisticGAN-Tensorflow","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/taki0112/RelativisticGAN-Tensorflow/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":"a5d19dceb0c8a790"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}