{"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/toward-guidance-free-ar-visual-generation-via","title":"Toward Guidance-Free AR Visual Generation via Condition Contrastive Alignment","arxiv_id":"2410.09347","date":"2024-10-12","proceeding":null,"authors":["Huayu Chen","Hang Su","Peize Sun","Jun Zhu"],"abstract":"Classifier-Free Guidance (CFG) is a critical technique for enhancing the sample quality of visual generative models. However, in autoregressive (AR) multi-modal generation, CFG introduces design inconsistencies between language and visual content, contradicting the design philosophy of unifying different modalities for visual AR. Motivated by language model alignment methods, we propose \\textit{Condition Contrastive Alignment} (CCA) to facilitate guidance-free AR visual generation with high performance and analyze its theoretical connection with guided sampling methods. Unlike guidance methods that alter the sampling process to achieve the ideal sampling distribution, CCA directly fine-tunes pretrained models to fit the same distribution target. Experimental results show that CCA can significantly enhance the guidance-free performance of all tested models with just one epoch of fine-tuning ($\\sim$ 1\\% of pretraining epochs) on the pretraining dataset, on par with guided sampling methods. This largely removes the need for guided sampling in AR visual generation and cuts the sampling cost by half. Moreover, by adjusting training parameters, CCA can achieve trade-offs between sample diversity and fidelity similar to CFG. This experimentally confirms the strong theoretical connection between language-targeted alignment and visual-targeted guidance methods, unifying two previously independent research fields. Code and model weights: https://github.com/thu-ml/CCA.","url_abs":"https://arxiv.org/abs/2410.09347v1","url_pdf":"https://arxiv.org/pdf/2410.09347v1.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":"toward-guidance-free-ar-visual-generation-via","repo_url":"https://github.com/thu-ml/cca","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"toward-guidance-free-ar-visual-generation-via","repo_url":"https://github.com/FoundationVision/VAR","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"philosophy","task_name":"Philosophy"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2410.09347","atlas_url":"https://app.syntology.ai/?focus=2410.09347","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.09347"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/thu-ml/cca","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/FoundationVision/VAR","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran":2,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":"ba65976c1d96a7cb","entry":"creat_optimizer","repo":"thu-ml/cca","repo_kind":"official","path":"LlamaGen_finetune.py","file_url":"https://github.com/thu-ml/cca/blob/HEAD/LlamaGen_finetune.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ba65976c1d96a7cb"}},{"code_sha256_prefix":"ff9b55c9b6e0cc4c","entry":"creat_optimizer_by_name","repo":"thu-ml/cca","repo_kind":"official","path":"LlamaGen_finetune_fsdp.py","file_url":"https://github.com/thu-ml/cca/blob/HEAD/LlamaGen_finetune_fsdp.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":"ff9b55c9b6e0cc4c"}},{"code_sha256_prefix":"7b21a01ae77703a3","entry":"create_npz_from_sample_folder","repo":"thu-ml/cca","repo_kind":"official","path":"LlamaGen_sample_ddp.py","file_url":"https://github.com/thu-ml/cca/blob/HEAD/LlamaGen_sample_ddp.py","link_basis":"harvester_set","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":"7b21a01ae77703a3"}},{"code_sha256_prefix":"4f771efa92658445","entry":"create_npz_from_sample_folder","repo":"thu-ml/cca","repo_kind":"official","path":"VAR_sample.py","file_url":"https://github.com/thu-ml/cca/blob/HEAD/VAR_sample.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":"4f771efa92658445"}},{"code_sha256_prefix":"9a7999128b34eb29","entry":"setup_fsdp_sync","repo":"thu-ml/cca","repo_kind":"official","path":"LlamaGen_finetune_fsdp.py","file_url":"https://github.com/thu-ml/cca/blob/HEAD/LlamaGen_finetune_fsdp.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":"9a7999128b34eb29"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}