{"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/revisiting-non-autoregressive-transformers","title":"Revisiting Non-Autoregressive Transformers for Efficient Image Synthesis","arxiv_id":"2406.05478","date":"2024-06-08","proceeding":"CVPR 2024 1","authors":["Zanlin Ni","Yulin Wang","Renping Zhou","Jiayi Guo","Jinyi Hu","Zhiyuan Liu","Shiji Song","Yuan YAO","Gao Huang"],"abstract":"The field of image synthesis is currently flourishing due to the advancements in diffusion models. While diffusion models have been successful, their computational intensity has prompted the pursuit of more efficient alternatives. As a representative work, non-autoregressive Transformers (NATs) have been recognized for their rapid generation. However, a major drawback of these models is their inferior performance compared to diffusion models. In this paper, we aim to re-evaluate the full potential of NATs by revisiting the design of their training and inference strategies. Specifically, we identify the complexities in properly configuring these strategies and indicate the possible sub-optimality in existing heuristic-driven designs. Recognizing this, we propose to go beyond existing methods by directly solving the optimal strategies in an automatic framework. The resulting method, named AutoNAT, advances the performance boundaries of NATs notably, and is able to perform comparably with the latest diffusion models at a significantly reduced inference cost. The effectiveness of AutoNAT is validated on four benchmark datasets, i.e., ImageNet-256 & 512, MS-COCO, and CC3M. Our code is available at https://github.com/LeapLabTHU/ImprovedNAT.","url_abs":"https://arxiv.org/abs/2406.05478v1","url_pdf":"https://arxiv.org/pdf/2406.05478v1.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":"revisiting-non-autoregressive-transformers","repo_url":"https://github.com/leaplabthu/improvednat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2406.05478","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.05478"}},"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/leaplabthu/improvednat","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/LeapLabTHU/ImprovedNAT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":5,"ran_draft_wrong":1,"unverified":10},"by_repo_kind":{"official":{"samples":16,"ran":6,"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":"7001b82c42bcf7a8","entry":"BertEmbeddings","repo":"LeapLabTHU/ImprovedNAT","repo_kind":"official","path":"libs/nat_model.py","file_url":"https://github.com/LeapLabTHU/ImprovedNAT/blob/HEAD/libs/nat_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7001b82c42bcf7a8"}},{"code_sha256_prefix":"9ef9985f5609c318","entry":"add_gumbel_noise","repo":"leaplabthu/improvednat","repo_kind":"official","path":"libs/nat_misc.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/libs/nat_misc.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ef9985f5609c318"}},{"code_sha256_prefix":"f057bf3471d77c43","entry":"center_crop","repo":"leaplabthu/improvednat","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/dataset.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":"f057bf3471d77c43"}},{"code_sha256_prefix":"5ef87f1a172f152b","entry":"count_params","repo":"leaplabthu/improvednat","repo_kind":"official","path":"taming/modules/util.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/taming/modules/util.py","link_basis":"first_harvest_node","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":"5ef87f1a172f152b"}},{"code_sha256_prefix":"20380250dc418d5c","entry":"get_lr_scheduler","repo":"leaplabthu/improvednat","repo_kind":"official","path":"utils.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/utils.py","link_basis":"first_harvest_node","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":"20380250dc418d5c"}},{"code_sha256_prefix":"05d1f95a391c0ec3","entry":"random_crop_arr","repo":"leaplabthu/improvednat","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/dataset.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":"05d1f95a391c0ec3"}},{"code_sha256_prefix":"c707cacd32c81e73","entry":"Attention","repo":"LeapLabTHU/ImprovedNAT","repo_kind":"official","path":"libs/nat_model.py","file_url":"https://github.com/LeapLabTHU/ImprovedNAT/blob/HEAD/libs/nat_model.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":"c707cacd32c81e73"}},{"code_sha256_prefix":"edd136332f6ae67e","entry":"Block","repo":"LeapLabTHU/ImprovedNAT","repo_kind":"official","path":"libs/nat_model.py","file_url":"https://github.com/LeapLabTHU/ImprovedNAT/blob/HEAD/libs/nat_model.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":"edd136332f6ae67e"}},{"code_sha256_prefix":"d5608565226216c9","entry":"UViT","repo":"LeapLabTHU/ImprovedNAT","repo_kind":"official","path":"libs/nat_model.py","file_url":"https://github.com/LeapLabTHU/ImprovedNAT/blob/HEAD/libs/nat_model.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":"d5608565226216c9"}},{"code_sha256_prefix":"f8b4a29a52612a41","entry":"center_crop_arr","repo":"leaplabthu/improvednat","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/dataset.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":"f8b4a29a52612a41"}},{"code_sha256_prefix":"4c4a870f0a791ce8","entry":"customized_lr_scheduler","repo":"leaplabthu/improvednat","repo_kind":"official","path":"utils.py","file_url":"https://github.com/leaplabthu/improvednat/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":"4c4a870f0a791ce8"}},{"code_sha256_prefix":"376bf22d5737fc2a","entry":"get_logger","repo":"leaplabthu/improvednat","repo_kind":"official","path":"taming/models/logging.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/taming/models/logging.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":"376bf22d5737fc2a"}},{"code_sha256_prefix":"7328f4d3c151e58b","entry":"get_optimizer","repo":"leaplabthu/improvednat","repo_kind":"official","path":"utils.py","file_url":"https://github.com/leaplabthu/improvednat/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":"7328f4d3c151e58b"}},{"code_sha256_prefix":"bfdddec04a7257ca","entry":"get_parameter_device","repo":"leaplabthu/improvednat","repo_kind":"official","path":"taming/models/modeling_utils.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/taming/models/modeling_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":"bfdddec04a7257ca"}},{"code_sha256_prefix":"4f52e71d06a15422","entry":"get_parameter_dtype","repo":"leaplabthu/improvednat","repo_kind":"official","path":"taming/models/modeling_utils.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/taming/models/modeling_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":"4f52e71d06a15422"}},{"code_sha256_prefix":"934f2eb98d647821","entry":"load_state_dict","repo":"leaplabthu/improvednat","repo_kind":"official","path":"taming/models/modeling_utils.py","file_url":"https://github.com/leaplabthu/improvednat/blob/HEAD/taming/models/modeling_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":"934f2eb98d647821"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}