{"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/adanat-exploring-adaptive-policy-for-token","title":"AdaNAT: Exploring Adaptive Policy for Token-Based Image Generation","arxiv_id":"2409.00342","date":"2024-08-31","proceeding":null,"authors":["Zanlin Ni","Yulin Wang","Renping Zhou","Rui Lu","Jiayi Guo","Jinyi Hu","Zhiyuan Liu","Yuan YAO","Gao Huang"],"abstract":"Recent studies have demonstrated the effectiveness of token-based methods for visual content generation. As a representative work, non-autoregressive Transformers (NATs) are able to synthesize images with decent quality in a small number of steps. However, NATs usually necessitate configuring a complicated generation policy comprising multiple manually-designed scheduling rules. These heuristic-driven rules are prone to sub-optimality and come with the requirements of expert knowledge and labor-intensive efforts. Moreover, their one-size-fits-all nature cannot flexibly adapt to the diverse characteristics of each individual sample. To address these issues, we propose AdaNAT, a learnable approach that automatically configures a suitable policy tailored for every sample to be generated. In specific, we formulate the determination of generation policies as a Markov decision process. Under this framework, a lightweight policy network for generation can be learned via reinforcement learning. Importantly, we demonstrate that simple reward designs such as FID or pre-trained reward models, may not reliably guarantee the desired quality or diversity of generated samples. Therefore, we propose an adversarial reward design to guide the training of policy networks effectively. Comprehensive experiments on four benchmark datasets, i.e., ImageNet-256 & 512, MS-COCO, and CC3M, validate the effectiveness of AdaNAT. Code and pre-trained models will be released at https://github.com/LeapLabTHU/AdaNAT.","url_abs":"https://arxiv.org/abs/2409.00342v3","url_pdf":"https://arxiv.org/pdf/2409.00342v3.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":"adanat-exploring-adaptive-policy-for-token","repo_url":"https://github.com/leaplabthu/adanat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"scheduling","task_name":"Scheduling"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.00342","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.00342"}},"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/adanat","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/LeapLabTHU/AdaNAT","reach":{"status":"ok"}}],"summary":{"ran":5,"ran_draft_wrong":3,"ran_honours":1,"unverified":6},"by_repo_kind":{"official":{"samples":15,"ran":9,"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":15,"samples":[{"code_sha256_prefix":"55096fe2cb2f34d2","entry":"AdaLN","repo":"LeapLabTHU/AdaNAT","repo_kind":"official","path":"libs/policy.py","file_url":"https://github.com/LeapLabTHU/AdaNAT/blob/HEAD/libs/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"55096fe2cb2f34d2"}},{"code_sha256_prefix":"f057bf3471d77c43","entry":"center_crop","repo":"leaplabthu/adanat","repo_kind":"official","path":"datasets_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/datasets_uvit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f057bf3471d77c43"}},{"code_sha256_prefix":"369437c0fd47b308","entry":"d_vanilla","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_stylegan/losses.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_stylegan/losses.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"369437c0fd47b308"}},{"code_sha256_prefix":"233e3fc61244ce0c","entry":"enable_allreduce","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_stylegan/losses.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_stylegan/losses.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"233e3fc61244ce0c"}},{"code_sha256_prefix":"a091d19d483bafe2","entry":"format_time","repo":"leaplabthu/adanat","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/dnnlib/util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a091d19d483bafe2"}},{"code_sha256_prefix":"556dd2c77ff90670","entry":"format_time_brief","repo":"leaplabthu/adanat","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/dnnlib/util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"556dd2c77ff90670"}},{"code_sha256_prefix":"3673b761d410798a","entry":"g_vanilla","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_stylegan/losses.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_stylegan/losses.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3673b761d410798a"}},{"code_sha256_prefix":"670fe68b890c9792","entry":"normalize_2nd_moment","repo":"leaplabthu/adanat","repo_kind":"official","path":"stylegan2.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/stylegan2.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"670fe68b890c9792"}},{"code_sha256_prefix":"05d1f95a391c0ec3","entry":"random_crop_arr","repo":"leaplabthu/adanat","repo_kind":"official","path":"datasets_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/datasets_uvit.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"05d1f95a391c0ec3"}},{"code_sha256_prefix":"2d3ac7b0ca72697b","entry":"PolicyNet","repo":"LeapLabTHU/AdaNAT","repo_kind":"official","path":"libs/policy.py","file_url":"https://github.com/LeapLabTHU/AdaNAT/blob/HEAD/libs/policy.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":"2d3ac7b0ca72697b"}},{"code_sha256_prefix":"9d31d2c4cd16bb2d","entry":"ask_yes_no","repo":"leaplabthu/adanat","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/dnnlib/util.py","link_basis":"harvester_set","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":"9d31d2c4cd16bb2d"}},{"code_sha256_prefix":"f8b4a29a52612a41","entry":"center_crop_arr","repo":"leaplabthu/adanat","repo_kind":"official","path":"datasets_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/datasets_uvit.py","link_basis":"harvester_set","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":"f8b4a29a52612a41"}},{"code_sha256_prefix":"507ea4bd829ac4b0","entry":"dct2str","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_uvit.py","link_basis":"harvester_set","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":"507ea4bd829ac4b0"}},{"code_sha256_prefix":"45b4d5e9ee43e479","entry":"get_nnet","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_uvit.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":"45b4d5e9ee43e479"}},{"code_sha256_prefix":"7328f4d3c151e58b","entry":"get_optimizer","repo":"leaplabthu/adanat","repo_kind":"official","path":"utils_uvit.py","file_url":"https://github.com/leaplabthu/adanat/blob/HEAD/utils_uvit.py","link_basis":"harvester_set","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":"7328f4d3c151e58b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}