{"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/generative-models-as-a-data-source-for","title":"Generative Models as a Data Source for Multiview Representation Learning","arxiv_id":"2106.05258","date":"2021-06-09","proceeding":"ICLR 2022 4","authors":["Ali Jahanian","Xavier Puig","Yonglong Tian","Phillip Isola"],"abstract":"Generative models are now capable of producing highly realistic images that look nearly indistinguishable from the data on which they are trained. This raises the question: if we have good enough generative models, do we still need datasets? We investigate this question in the setting of learning general-purpose visual representations from a black-box generative model rather than directly from data. Given an off-the-shelf image generator without any access to its training data, we train representations from the samples output by this generator. We compare several representation learning methods that can be applied to this setting, using the latent space of the generator to generate multiple \"views\" of the same semantic content. We show that for contrastive methods, this multiview data can naturally be used to identify positive pairs (nearby in latent space) and negative pairs (far apart in latent space). We find that the resulting representations rival or even outperform those learned directly from real data, but that good performance requires care in the sampling strategy applied and the training method. Generative models can be viewed as a compressed and organized copy of a dataset, and we envision a future where more and more \"model zoos\" proliferate while datasets become increasingly unwieldy, missing, or private. This paper suggests several techniques for dealing with visual representation learning in such a future. Code is available on our project page https://ali-design.github.io/GenRep/.","url_abs":"https://arxiv.org/abs/2106.05258v3","url_pdf":"https://arxiv.org/pdf/2106.05258v3.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":"generative-models-as-a-data-source-for","repo_url":"https://github.com/ali-design/GenRep","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.05258","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.05258"}},"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/ali-design/GenRep","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran":1,"unverified":5},"by_repo_kind":{"official":{"samples":7,"ran":2,"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":"b0f936d4d6ae3b8c","entry":"accuracy","repo":"ali-design/GenRep","repo_kind":"official","path":"util.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b0f936d4d6ae3b8c"}},{"code_sha256_prefix":"a44a1925c2c778ba","entry":"set_optimizer","repo":"ali-design/GenRep","repo_kind":"official","path":"util.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/util.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a44a1925c2c778ba"}},{"code_sha256_prefix":"97b0318d066d1e93","entry":"convert_to_images","repo":"ali-design/GenRep","repo_kind":"official","path":"util.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/util.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":"97b0318d066d1e93"}},{"code_sha256_prefix":"2d521ca23db0c594","entry":"convert_to_images","repo":"ali-design/GenRep","repo_kind":"official","path":"utils/generate_dataset_biggan_gauss1_ImageNet100_Nsamples.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/utils/generate_dataset_biggan_gauss1_ImageNet100_Nsamples.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":"2d521ca23db0c594"}},{"code_sha256_prefix":"2332fac912facded","entry":"cor_square_error_loss","repo":"ali-design/GenRep","repo_kind":"official","path":"main_autoencoder.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/main_autoencoder.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":"2332fac912facded"}},{"code_sha256_prefix":"6040f0f13cf01153","entry":"truncated_noise_sample_neighbors","repo":"ali-design/GenRep","repo_kind":"official","path":"utils/generate_dataset_biggan_gauss1_ImageNet100_Nsamples.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/utils/generate_dataset_biggan_gauss1_ImageNet100_Nsamples.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":"6040f0f13cf01153"}},{"code_sha256_prefix":"2a523d39c38e50b7","entry":"truncated_noise_sample_neighbors","repo":"ali-design/GenRep","repo_kind":"official","path":"utils/generate_dataset_biggan_gauss_angular_ImageNet100_Nsamples.py","file_url":"https://github.com/ali-design/GenRep/blob/HEAD/utils/generate_dataset_biggan_gauss_angular_ImageNet100_Nsamples.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":"2a523d39c38e50b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}