{"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/interpreting-the-latent-space-of-gans-for","title":"Interpreting the Latent Space of GANs for Semantic Face Editing","arxiv_id":"1907.10786","date":"2019-07-25","proceeding":"CVPR 2020 6","authors":["Yujun Shen","Jinjin Gu","Xiaoou Tang","Bolei Zhou"],"abstract":"Despite the recent advance of Generative Adversarial Networks (GANs) in high-fidelity image synthesis, there lacks enough understanding of how GANs are able to map a latent code sampled from a random distribution to a photo-realistic image. Previous work assumes the latent space learned by GANs follows a distributed representation but observes the vector arithmetic phenomenon. In this work, we propose a novel framework, called InterFaceGAN, for semantic face editing by interpreting the latent semantics learned by GANs. In this framework, we conduct a detailed study on how different semantics are encoded in the latent space of GANs for face synthesis. We find that the latent code of well-trained generative models actually learns a disentangled representation after linear transformations. We explore the disentanglement between various semantics and manage to decouple some entangled semantics with subspace projection, leading to more precise control of facial attributes. Besides manipulating gender, age, expression, and the presence of eyeglasses, we can even vary the face pose as well as fix the artifacts accidentally generated by GAN models. The proposed method is further applied to achieve real image manipulation when combined with GAN inversion methods or some encoder-involved models. Extensive results suggest that learning to synthesize faces spontaneously brings a disentangled and controllable facial attribute representation.","url_abs":"https://arxiv.org/abs/1907.10786v3","url_pdf":"https://arxiv.org/pdf/1907.10786v3.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":"interpreting-the-latent-space-of-gans-for","repo_url":"https://github.com/ShenYujun/InterFaceGAN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"interpreting-the-latent-space-of-gans-for","repo_url":"https://github.com/genforce/interfacegan","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"interpreting-the-latent-space-of-gans-for","repo_url":"https://github.com/pacifinapacific/StyleGAN_LatentEditor","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"interpreting-the-latent-space-of-gans-for","repo_url":"https://github.com/yuzq97/starter_project","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"disentanglement","task_name":"Disentanglement"},{"task_slug":"face-generation","task_name":"Face Generation"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"image-manipulation","task_name":"Image Manipulation"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1907.10786","atlas_url":"https://app.syntology.ai/?focus=1907.10786","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.10786"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/genforce/interfacegan","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ShenYujun/InterFaceGAN","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pacifinapacific/StyleGAN_LatentEditor","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yuzq97/starter_project","reach":null}],"summary":{"ran_fixture":2,"unverified":3},"by_repo_kind":{"listed":{"samples":2,"ran":1,"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":5,"samples":[{"code_sha256_prefix":"42c0a8e5638fc32b","entry":"linear_interpolate","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"42c0a8e5638fc32b"}},{"code_sha256_prefix":"f922c61f30d6300a","entry":"linear_interpolate","repo":"yuzq97/starter_project","repo_kind":"listed","path":"utils/manipulator.py","file_url":"https://github.com/yuzq97/starter_project/blob/HEAD/utils/manipulator.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f922c61f30d6300a"}},{"code_sha256_prefix":"4c8e9edfa576eee0","entry":"project_boundary","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":"4c8e9edfa576eee0"}},{"code_sha256_prefix":"f792951be0bbba64","entry":"project_boundary","repo":"yuzq97/starter_project","repo_kind":"listed","path":"utils/manipulator.py","file_url":"https://github.com/yuzq97/starter_project/blob/HEAD/utils/manipulator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f792951be0bbba64"}},{"code_sha256_prefix":"48b601a5bb56ec67","entry":"train_boundary","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":"48b601a5bb56ec67"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}