{"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/improve-vision-language-model-chain-of","title":"Improve Vision Language Model Chain-of-thought Reasoning","arxiv_id":"2410.16198","date":"2024-10-21","proceeding":null,"authors":["Ruohong Zhang","BoWen Zhang","Yanghao Li","Haotian Zhang","Zhiqing Sun","Zhe Gan","Yinfei Yang","Ruoming Pang","Yiming Yang"],"abstract":"Chain-of-thought (CoT) reasoning in vision language models (VLMs) is crucial for improving interpretability and trustworthiness. However, current training recipes lack robust CoT reasoning data, relying on datasets dominated by short annotations with minimal rationales. In this work, we show that training VLM on short answers does not generalize well to reasoning tasks that require more detailed responses. To address this, we propose a two-fold approach. First, we distill rationales from GPT-4o model to enrich the training data and fine-tune VLMs, boosting their CoT performance. Second, we apply reinforcement learning to further calibrate reasoning quality. Specifically, we construct positive (correct) and negative (incorrect) pairs of model-generated reasoning chains, by comparing their predictions with annotated short answers. Using this pairwise data, we apply the Direct Preference Optimization algorithm to refine the model's reasoning abilities. Our experiments demonstrate significant improvements in CoT reasoning on benchmark datasets and better generalization to direct answer prediction as well. This work emphasizes the importance of incorporating detailed rationales in training and leveraging reinforcement learning to strengthen the reasoning capabilities of VLMs.","url_abs":"https://arxiv.org/abs/2410.16198v1","url_pdf":"https://arxiv.org/pdf/2410.16198v1.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":"improve-vision-language-model-chain-of","repo_url":"https://github.com/riflezhang/llava-reasoner-dpo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"improve-vision-language-model-chain-of","repo_url":"https://github.com/riflezhang/llava-hound-dpo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"model","task_name":"model"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.16198","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.16198"}},"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/riflezhang/llava-hound-dpo","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/riflezhang/llava-reasoner-dpo","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":4,"ran":2,"ran_violates":3,"ran_fixture":1,"unverified":12},"by_repo_kind":{"official":{"samples":5,"ran":5,"repositories":1},"listed":{"samples":16,"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":22,"samples":[{"code_sha256_prefix":"f1a2ea781d07a5ee","entry":"get_id_from_path","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/inference.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/inference.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f1a2ea781d07a5ee"}},{"code_sha256_prefix":"20e4f665698a3d18","entry":"collate_fn","repo":"riflezhang/llava-reasoner-dpo","repo_kind":"official","path":"llava_reasoner/llava/eval/model_vqa_loader.py","file_url":"https://github.com/riflezhang/llava-reasoner-dpo/blob/HEAD/llava_reasoner/llava/eval/model_vqa_loader.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"20e4f665698a3d18"}},{"code_sha256_prefix":"7e03b180fa317c9a","entry":"divide_to_patches","repo":"riflezhang/llava-reasoner-dpo","repo_kind":"official","path":"llava_reasoner/llava/mm_utils.py","file_url":"https://github.com/riflezhang/llava-reasoner-dpo/blob/HEAD/llava_reasoner/llava/mm_utils.py","link_basis":"harvester_set","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":"7e03b180fa317c9a"}},{"code_sha256_prefix":"42a46570620cd9fa","entry":"get_chunk","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/run_inference_video_caption.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/run_inference_video_caption.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"42a46570620cd9fa"}},{"code_sha256_prefix":"bae18947b56f2be1","entry":"is_none","repo":"riflezhang/llava-reasoner-dpo","repo_kind":"official","path":"llava_reasoner/llava/eval/model_vqa_mmbench.py","file_url":"https://github.com/riflezhang/llava-reasoner-dpo/blob/HEAD/llava_reasoner/llava/eval/model_vqa_mmbench.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bae18947b56f2be1"}},{"code_sha256_prefix":"763f6fe20bd52fbb","entry":"parse_score","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"763f6fe20bd52fbb"}},{"code_sha256_prefix":"4354061aab23f5b9","entry":"remove_special_tokens","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/inference.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/inference.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4354061aab23f5b9"}},{"code_sha256_prefix":"468eedeba67f1b00","entry":"resize_and_pad_image","repo":"riflezhang/llava-reasoner-dpo","repo_kind":"official","path":"llava_reasoner/llava/mm_utils.py","file_url":"https://github.com/riflezhang/llava-reasoner-dpo/blob/HEAD/llava_reasoner/llava/mm_utils.py","link_basis":"harvester_set","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":"468eedeba67f1b00"}},{"code_sha256_prefix":"3999ff487573f32c","entry":"select_best_resolution","repo":"riflezhang/llava-reasoner-dpo","repo_kind":"official","path":"llava_reasoner/llava/mm_utils.py","file_url":"https://github.com/riflezhang/llava-reasoner-dpo/blob/HEAD/llava_reasoner/llava/mm_utils.py","link_basis":"harvester_set","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":"3999ff487573f32c"}},{"code_sha256_prefix":"076c252c52cbb161","entry":"split_list","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/inference_dpo_reward.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/inference_dpo_reward.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"076c252c52cbb161"}},{"code_sha256_prefix":"c32b636f13ed9ee5","entry":"convert_to_scalar","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/trl/core.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/trl/core.py","link_basis":"harvester_set","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":"c32b636f13ed9ee5"}},{"code_sha256_prefix":"a51ae45a1f6c0b5b","entry":"flatten_dict","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/trl/core.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/trl/core.py","link_basis":"harvester_set","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":"a51ae45a1f6c0b5b"}},{"code_sha256_prefix":"f345a47ea5dbb5bc","entry":"get_id_from_frame_path","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/data_processing/utils.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/data_processing/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":"f345a47ea5dbb5bc"}},{"code_sha256_prefix":"1f804baed33a101d","entry":"get_image","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/data_processing/utils.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/data_processing/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":"1f804baed33a101d"}},{"code_sha256_prefix":"fa1225dfac92bc0d","entry":"get_peft_state_maybe_zero_3","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/dpo_scripts/run_dpo.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/dpo_scripts/run_dpo.py","link_basis":"harvester_set","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":"fa1225dfac92bc0d"}},{"code_sha256_prefix":"1c53657305b66e9f","entry":"get_peft_state_non_lora_maybe_zero_3","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/dpo_scripts/run_dpo.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/dpo_scripts/run_dpo.py","link_basis":"harvester_set","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":"1c53657305b66e9f"}},{"code_sha256_prefix":"5321a2aa0d7681cb","entry":"get_score","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/utils.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/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":"5321a2aa0d7681cb"}},{"code_sha256_prefix":"6fac133e5d5b321b","entry":"load_frames","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/data_processing/utils.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/data_processing/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":"6fac133e5d5b321b"}},{"code_sha256_prefix":"616ffbdc154ed2d8","entry":"maybe_zero_3","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/dpo_scripts/run_dpo.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/dpo_scripts/run_dpo.py","link_basis":"harvester_set","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":"616ffbdc154ed2d8"}},{"code_sha256_prefix":"b4ccd68cffe08123","entry":"openai_generate","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/inference/chatgpt_inference.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/inference/chatgpt_inference.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":"b4ccd68cffe08123"}},{"code_sha256_prefix":"fba50892dd813a72","entry":"parse_output","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/eval/gpt4v_eval.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/eval/gpt4v_eval.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":"fba50892dd813a72"}},{"code_sha256_prefix":"085e70e0bd6e492d","entry":"stack_dicts","repo":"riflezhang/llava-hound-dpo","repo_kind":"listed","path":"llava_hound_dpo/trl/core.py","file_url":"https://github.com/riflezhang/llava-hound-dpo/blob/HEAD/llava_hound_dpo/trl/core.py","link_basis":"harvester_set","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":"085e70e0bd6e492d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}