{"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/anytime-sampling-for-autoregressive-models-1","title":"Anytime Sampling for Autoregressive Models via Ordered Autoencoding","arxiv_id":"2102.11495","date":"2021-02-23","proceeding":"ICLR 2021 1","authors":["Yilun Xu","Yang song","Sahaj Garg","Linyuan Gong","Rui Shu","Aditya Grover","Stefano Ermon"],"abstract":"Autoregressive models are widely used for tasks such as image and audio generation. The sampling process of these models, however, does not allow interruptions and cannot adapt to real-time computational resources. This challenge impedes the deployment of powerful autoregressive models, which involve a slow sampling process that is sequential in nature and typically scales linearly with respect to the data dimension. To address this difficulty, we propose a new family of autoregressive models that enables anytime sampling. Inspired by Principal Component Analysis, we learn a structured representation space where dimensions are ordered based on their importance with respect to reconstruction. Using an autoregressive model in this latent space, we trade off sample quality for computational efficiency by truncating the generation process before decoding into the original data space. Experimentally, we demonstrate in several image and audio generation tasks that sample quality degrades gracefully as we reduce the computational budget for sampling. The approach suffers almost no loss in sample quality (measured by FID) using only 60\\% to 80\\% of all latent dimensions for image data. Code is available at https://github.com/Newbeeer/Anytime-Auto-Regressive-Model .","url_abs":"https://arxiv.org/abs/2102.11495v1","url_pdf":"https://arxiv.org/pdf/2102.11495v1.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":"anytime-sampling-for-autoregressive-models-1","repo_url":"https://github.com/Newbeeer/Anytime-Auto-Regressive-Model","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"audio-generation","task_name":"Audio Generation"},{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2102.11495","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2102.11495"}},"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":"deterministic:regex_extraction","url":"https://github.com/Newbeeer/Anytime-Auto-Regressive-Model","reach":null}],"summary":{"ran_draft_wrong":1,"ran_honours":2,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":3,"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":"f240c71dd79d8c7b","entry":"generate_samples","repo":"newbeeer/anytime-auto-regressive-model","repo_kind":"official","path":"vqvae.py","file_url":"https://github.com/newbeeer/anytime-auto-regressive-model/blob/HEAD/vqvae.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f240c71dd79d8c7b"}},{"code_sha256_prefix":"60cdac09435e14aa","entry":"generate_samples_train","repo":"newbeeer/anytime-auto-regressive-model","repo_kind":"official","path":"vqvae.py","file_url":"https://github.com/newbeeer/anytime-auto-regressive-model/blob/HEAD/vqvae.py","link_basis":"first_harvest_node","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":"60cdac09435e14aa"}},{"code_sha256_prefix":"dd59052ee56ad885","entry":"test","repo":"newbeeer/anytime-auto-regressive-model","repo_kind":"official","path":"vqvae.py","file_url":"https://github.com/newbeeer/anytime-auto-regressive-model/blob/HEAD/vqvae.py","link_basis":"first_harvest_node","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":"dd59052ee56ad885"}},{"code_sha256_prefix":"c65865cbf1037896","entry":"generate","repo":"Newbeeer/Anytime-Auto-Regressive-Model","repo_kind":"official","path":"transfomer_sample.py","file_url":"https://github.com/Newbeeer/Anytime-Auto-Regressive-Model/blob/HEAD/transfomer_sample.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":"c65865cbf1037896"}},{"code_sha256_prefix":"a915925abcaddcd1","entry":"sample","repo":"Newbeeer/Anytime-Auto-Regressive-Model","repo_kind":"official","path":"transfomer_sample.py","file_url":"https://github.com/Newbeeer/Anytime-Auto-Regressive-Model/blob/HEAD/transfomer_sample.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":"a915925abcaddcd1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}