{"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/improved-masked-image-generation-with-token","title":"Improved Masked Image Generation with Token-Critic","arxiv_id":"2209.04439","date":"2022-09-09","proceeding":null,"authors":["José Lezama","Huiwen Chang","Lu Jiang","Irfan Essa"],"abstract":"Non-autoregressive generative transformers recently demonstrated impressive image generation performance, and orders of magnitude faster sampling than their autoregressive counterparts. However, optimal parallel sampling from the true joint distribution of visual tokens remains an open challenge. In this paper we introduce Token-Critic, an auxiliary model to guide the sampling of a non-autoregressive generative transformer. Given a masked-and-reconstructed real image, the Token-Critic model is trained to distinguish which visual tokens belong to the original image and which were sampled by the generative transformer. During non-autoregressive iterative sampling, Token-Critic is used to select which tokens to accept and which to reject and resample. Coupled with Token-Critic, a state-of-the-art generative transformer significantly improves its performance, and outperforms recent diffusion models and GANs in terms of the trade-off between generated image quality and diversity, in the challenging class-conditional ImageNet generation.","url_abs":"https://arxiv.org/abs/2209.04439v1","url_pdf":"https://arxiv.org/pdf/2209.04439v1.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":"improved-masked-image-generation-with-token","repo_url":"https://github.com/lucidrains/phenaki-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2209.04439","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.04439"}},"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/lucidrains/phenaki-pytorch","reach":null}],"summary":{"ran":3,"ran_draft_wrong":2,"ran_fixture":1,"unverified":4},"by_repo_kind":{"listed":{"samples":9,"ran":5,"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":1,"samples":[{"code_sha256_prefix":"1aaa3002a09281e8","entry":"AlibiPositionalBias","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1aaa3002a09281e8"}},{"code_sha256_prefix":"69b968d8053ddaa5","entry":"FeedForward","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"69b968d8053ddaa5"}},{"code_sha256_prefix":"579b2c6b2cba46b3","entry":"GEGLU","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"579b2c6b2cba46b3"}},{"code_sha256_prefix":"a79da4959e7da465","entry":"LayerNorm","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a79da4959e7da465"}},{"code_sha256_prefix":"3eb58dae620046d3","entry":"l2norm","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"3eb58dae620046d3"}},{"code_sha256_prefix":"3c6433dd421724e0","entry":"prob_mask_like","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c6433dd421724e0"}},{"code_sha256_prefix":"20759ff768a1ec91","entry":"Attention","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.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":"20759ff768a1ec91"}},{"code_sha256_prefix":"370fef2ad04c6629","entry":"PEG","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.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":"370fef2ad04c6629"}},{"code_sha256_prefix":"429489f94b946a0f","entry":"TokenCritic","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.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":"429489f94b946a0f"}},{"code_sha256_prefix":"8ce27c87cf7c3f89","entry":"Transformer","repo":"lucidrains/phenaki-pytorch","repo_kind":"listed","path":"phenaki_pytorch/phenaki_pytorch.py","file_url":"https://github.com/lucidrains/phenaki-pytorch/blob/HEAD/phenaki_pytorch/phenaki_pytorch.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":"8ce27c87cf7c3f89"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}