{"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/got-r1-unleashing-reasoning-capability-of","title":"GoT-R1: Unleashing Reasoning Capability of MLLM for Visual Generation with Reinforcement Learning","arxiv_id":"2505.17022","date":"2025-05-22","proceeding":null,"authors":["Chengqi Duan","Rongyao Fang","Yuqing Wang","Kun Wang","Linjiang Huang","Xingyu Zeng","Hongsheng Li","Xihui Liu"],"abstract":"Visual generation models have made remarkable progress in creating realistic images from text prompts, yet struggle with complex prompts that specify multiple objects with precise spatial relationships and attributes. Effective handling of such prompts requires explicit reasoning about the semantic content and spatial layout. We present GoT-R1, a framework that applies reinforcement learning to enhance semantic-spatial reasoning in visual generation. Building upon the Generation Chain-of-Thought approach, GoT-R1 enables models to autonomously discover effective reasoning strategies beyond predefined templates through carefully designed reinforcement learning. To achieve this, we propose a dual-stage multi-dimensional reward framework that leverages MLLMs to evaluate both the reasoning process and final output, enabling effective supervision across the entire generation pipeline. The reward system assesses semantic alignment, spatial accuracy, and visual quality in a unified approach. Experimental results demonstrate significant improvements on T2I-CompBench benchmark, particularly in compositional tasks involving precise spatial relationships and attribute binding. GoT-R1 advances the state-of-the-art in image generation by successfully transferring sophisticated reasoning capabilities to the visual generation domain. To facilitate future research, we make our code and pretrained models publicly available at https://github.com/gogoduan/GoT-R1.","url_abs":"https://arxiv.org/abs/2505.17022v1","url_pdf":"https://arxiv.org/pdf/2505.17022v1.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":"got-r1-unleashing-reasoning-capability-of","repo_url":"https://github.com/gogoduan/got-r1","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"spatial-reasoning","task_name":"Spatial Reasoning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2505.17022","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.17022"}},"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/gogoduan/GoT-R1","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gogoduan/got-r1","reach":{"status":"ok"}}],"summary":{"ran":7,"ran_draft_wrong":1,"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":11,"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":11,"samples":[{"code_sha256_prefix":"71736837a54c2c84","entry":"Decoder","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"71736837a54c2c84"}},{"code_sha256_prefix":"6618daf64230cf0c","entry":"Downsample","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6618daf64230cf0c"}},{"code_sha256_prefix":"eed2973632740358","entry":"Encoder","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eed2973632740358"}},{"code_sha256_prefix":"51c13049b5aebe83","entry":"ModelArgs","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51c13049b5aebe83"}},{"code_sha256_prefix":"01b5cf639b6bac89","entry":"Normalize","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"01b5cf639b6bac89"}},{"code_sha256_prefix":"b9580b7064989831","entry":"ResnetBlock","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.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":"b9580b7064989831"}},{"code_sha256_prefix":"6687b2b39ca9fecc","entry":"Upsample","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6687b2b39ca9fecc"}},{"code_sha256_prefix":"177a67c6ea19650c","entry":"VectorQuantizer","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"177a67c6ea19650c"}},{"code_sha256_prefix":"774c95b77d7621f3","entry":"compute_entropy_loss","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"774c95b77d7621f3"}},{"code_sha256_prefix":"93ec039f4b98caf7","entry":"AttnBlock","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.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":"93ec039f4b98caf7"}},{"code_sha256_prefix":"5cb4851ddaa665bf","entry":"VQModel","repo":"gogoduan/got-r1","repo_kind":"official","path":"src/models/vq_model.py","file_url":"https://github.com/gogoduan/got-r1/blob/HEAD/src/models/vq_model.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":"5cb4851ddaa665bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}