{"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/from-the-least-to-the-most-building-a-plug","title":"From the Least to the Most: Building a Plug-and-Play Visual Reasoner via Data Synthesis","arxiv_id":"2406.19934","date":"2024-06-28","proceeding":null,"authors":["Chuanqi Cheng","Jian Guan","Wei Wu","Rui Yan"],"abstract":"We explore multi-step reasoning in vision-language models (VLMs). The problem is challenging, as reasoning data consisting of multiple steps of visual and language processing are barely available. To overcome the challenge, we first introduce a least-to-most visual reasoning paradigm, which interleaves steps of decomposing a question into sub-questions and invoking external tools for resolving sub-questions. Based on the paradigm, we further propose a novel data synthesis approach that can automatically create questions and multi-step reasoning paths for an image in a bottom-up manner. Our approach divides the complex synthesis task into a few simple sub-tasks, and (almost entirely) relies on open-sourced models to accomplish the sub-tasks. Therefore, the entire synthesis process is reproducible and cost-efficient, and the synthesized data is quality guaranteed. With the approach, we construct $50$k visual reasoning examples. Then, we develop a visual reasoner through supervised fine-tuning, which is capable of generally enhancing the reasoning abilities of a wide range of existing VLMs in a plug-and-play fashion. Extensive experiments indicate that the visual reasoner can consistently and significantly improve four VLMs on four VQA benchmarks. Our code and dataset are available at https://github.com/steven-ccq/VisualReasoner.","url_abs":"https://arxiv.org/abs/2406.19934v2","url_pdf":"https://arxiv.org/pdf/2406.19934v2.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":"from-the-least-to-the-most-building-a-plug","repo_url":"https://github.com/steven-ccq/visualreasoner","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"from-the-least-to-the-most-building-a-plug","repo_url":"https://github.com/jianguanthu/amor","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"visual-question-answering","task_name":"Visual Question Answering (VQA)"},{"task_slug":"visual-reasoning","task_name":"Visual Reasoning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.19934","atlas_url":"https://app.syntology.ai/?focus=2406.19934","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.19934"}},"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/steven-ccq/visualreasoner","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jianguanthu/amor","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/steven-ccq/VisualReasoner","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":4,"ran_fixture":3,"ran":1,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"repositories":1},"listed":{"samples":1,"ran":1,"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":"dacfeec0efdbe208","entry":"answer","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dacfeec0efdbe208"}},{"code_sha256_prefix":"428895c463d6dcad","entry":"call_planner","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"428895c463d6dcad"}},{"code_sha256_prefix":"a53aebe1a36db9fd","entry":"check_blurry","repo":"steven-ccq/visualreasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/visualreasoner/blob/HEAD/utils.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":"a53aebe1a36db9fd"}},{"code_sha256_prefix":"f3d58ce277c8c74e","entry":"counting","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f3d58ce277c8c74e"}},{"code_sha256_prefix":"bd4037a865476156","entry":"get_decompose_prompt","repo":"jianguanthu/amor","repo_kind":"listed","path":"code/prompts.py","file_url":"https://github.com/jianguanthu/amor/blob/HEAD/code/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bd4037a865476156"}},{"code_sha256_prefix":"ba86a02002985352","entry":"grounding","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ba86a02002985352"}},{"code_sha256_prefix":"4b9837cd50427259","entry":"highlight","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4b9837cd50427259"}},{"code_sha256_prefix":"5aba539bdc54b8a1","entry":"ocr","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5aba539bdc54b8a1"}},{"code_sha256_prefix":"c1244199cb822fe3","entry":"execuate","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.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":"c1244199cb822fe3"}},{"code_sha256_prefix":"c626111fb20cdab1","entry":"generate","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.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":"c626111fb20cdab1"}},{"code_sha256_prefix":"27b778253912dae6","entry":"reasoner","repo":"steven-ccq/VisualReasoner","repo_kind":"official","path":"utils.py","file_url":"https://github.com/steven-ccq/VisualReasoner/blob/HEAD/utils.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":"27b778253912dae6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}