{"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/neighboring-autoregressive-modeling-for","title":"Neighboring Autoregressive Modeling for Efficient Visual Generation","arxiv_id":"2503.10696","date":"2025-03-12","proceeding":null,"authors":["Yefei He","Yuanyu He","Shaoxuan He","Feng Chen","Hong Zhou","Kaipeng Zhang","Bohan Zhuang"],"abstract":"Visual autoregressive models typically adhere to a raster-order ``next-token prediction\" paradigm, which overlooks the spatial and temporal locality inherent in visual content. Specifically, visual tokens exhibit significantly stronger correlations with their spatially or temporally adjacent tokens compared to those that are distant. In this paper, we propose Neighboring Autoregressive Modeling (NAR), a novel paradigm that formulates autoregressive visual generation as a progressive outpainting procedure, following a near-to-far ``next-neighbor prediction\" mechanism. Starting from an initial token, the remaining tokens are decoded in ascending order of their Manhattan distance from the initial token in the spatial-temporal space, progressively expanding the boundary of the decoded region. To enable parallel prediction of multiple adjacent tokens in the spatial-temporal space, we introduce a set of dimension-oriented decoding heads, each predicting the next token along a mutually orthogonal dimension. During inference, all tokens adjacent to the decoded tokens are processed in parallel, substantially reducing the model forward steps for generation. Experiments on ImageNet$256\\times 256$ and UCF101 demonstrate that NAR achieves 2.4$\\times$ and 8.6$\\times$ higher throughput respectively, while obtaining superior FID/FVD scores for both image and video generation tasks compared to the PAR-4X approach. When evaluating on text-to-image generation benchmark GenEval, NAR with 0.8B parameters outperforms Chameleon-7B while using merely 0.4 of the training data. Code is available at https://github.com/ThisisBillhe/NAR.","url_abs":"https://arxiv.org/abs/2503.10696v1","url_pdf":"https://arxiv.org/pdf/2503.10696v1.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":"neighboring-autoregressive-modeling-for","repo_url":"https://github.com/thisisbillhe/nar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"},{"task_slug":"video-generation","task_name":"Video Generation"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2503.10696","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.10696"}},"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/thisisbillhe/nar","reach":null}],"summary":{"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":5,"ran":2,"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":"3a7d232cb0775401","entry":"FeedForward","repo":"thisisbillhe/nar","repo_kind":"official","path":"NAR-images/autoregressive/models/gpt.py","file_url":"https://github.com/thisisbillhe/nar/blob/HEAD/NAR-images/autoregressive/models/gpt.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":"3a7d232cb0775401"}},{"code_sha256_prefix":"ff18a471216c16a9","entry":"ModelArgs","repo":"thisisbillhe/nar","repo_kind":"official","path":"NAR-images/autoregressive/models/gpt.py","file_url":"https://github.com/thisisbillhe/nar/blob/HEAD/NAR-images/autoregressive/models/gpt.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":"ff18a471216c16a9"}},{"code_sha256_prefix":"653880a319e2a083","entry":"Attention","repo":"thisisbillhe/nar","repo_kind":"official","path":"NAR-images/autoregressive/models/gpt.py","file_url":"https://github.com/thisisbillhe/nar/blob/HEAD/NAR-images/autoregressive/models/gpt.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":"653880a319e2a083"}},{"code_sha256_prefix":"c3060bac0efc642b","entry":"Transformer","repo":"thisisbillhe/nar","repo_kind":"official","path":"NAR-images/autoregressive/models/gpt.py","file_url":"https://github.com/thisisbillhe/nar/blob/HEAD/NAR-images/autoregressive/models/gpt.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":"c3060bac0efc642b"}},{"code_sha256_prefix":"0421358adba1260b","entry":"TransformerBlock","repo":"thisisbillhe/nar","repo_kind":"official","path":"NAR-images/autoregressive/models/gpt.py","file_url":"https://github.com/thisisbillhe/nar/blob/HEAD/NAR-images/autoregressive/models/gpt.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":"0421358adba1260b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}