{"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/mdpo-conditional-preference-optimization-for","title":"mDPO: Conditional Preference Optimization for Multimodal Large Language Models","arxiv_id":"2406.11839","date":"2024-06-17","proceeding":null,"authors":["Fei Wang","Wenxuan Zhou","James Y. Huang","Nan Xu","Sheng Zhang","Hoifung Poon","Muhao Chen"],"abstract":"Direct preference optimization (DPO) has shown to be an effective method for large language model (LLM) alignment. Recent works have attempted to apply DPO to multimodal scenarios but have found it challenging to achieve consistent improvement. Through a comparative experiment, we identify the unconditional preference problem in multimodal preference optimization, where the model overlooks the image condition. To address this problem, we propose mDPO, a multimodal DPO objective that prevents the over-prioritization of language-only preferences by also optimizing image preference. Moreover, we introduce a reward anchor that forces the reward to be positive for chosen responses, thereby avoiding the decrease in their likelihood -- an intrinsic problem of relative preference optimization. Experiments on two multimodal LLMs of different sizes and three widely used benchmarks demonstrate that mDPO effectively addresses the unconditional preference problem in multimodal preference optimization and significantly improves model performance, particularly in reducing hallucination.","url_abs":"https://arxiv.org/abs/2406.11839v2","url_pdf":"https://arxiv.org/pdf/2406.11839v2.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":"mdpo-conditional-preference-optimization-for","repo_url":"https://github.com/luka-group/mDPO","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[{"method_slug":"dpo","method_name":"DPO"},{"method_slug":"mdpo","method_name":"MDPO"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.11839","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.11839"}},"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/luka-group/mDPO","reach":{"status":"ok"}}],"summary":{"ran":1,"ran_draft_wrong":3,"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":10,"samples":[{"code_sha256_prefix":"a42bf90646a3347f","entry":"build_vision_projector","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/modeling_bunny_phi.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/modeling_bunny_phi.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":"a42bf90646a3347f"}},{"code_sha256_prefix":"592b3c1a88f93d7c","entry":"expand2square","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/bunny_utils/util/mm_utils.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/bunny_utils/util/mm_utils.py","link_basis":"harvester_set","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":"592b3c1a88f93d7c"}},{"code_sha256_prefix":"3aada9ef083faccd","entry":"load_image_from_base64","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/bunny_utils/util/mm_utils.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/bunny_utils/util/mm_utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3aada9ef083faccd"}},{"code_sha256_prefix":"e8f3a2a1be36a4d7","entry":"process_images","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/bunny_utils/util/mm_utils.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/bunny_utils/util/mm_utils.py","link_basis":"harvester_set","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":"e8f3a2a1be36a4d7"}},{"code_sha256_prefix":"b99eea6376d1e212","entry":"rotate_half","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/modeling_bunny_phi.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/modeling_bunny_phi.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b99eea6376d1e212"}},{"code_sha256_prefix":"fa1225dfac92bc0d","entry":"get_peft_state_maybe_zero_3","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/run_mdpo_bunny.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/run_mdpo_bunny.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":"luka-group/mDPO","repo_kind":"official","path":"bunny/run_mdpo_bunny.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/run_mdpo_bunny.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":"616ffbdc154ed2d8","entry":"maybe_zero_3","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/run_mdpo_bunny.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/run_mdpo_bunny.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":"37899f22fb191b37","entry":"pretty_print_semaphore","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/bunny_utils/util/utils.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/bunny_utils/util/utils.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":"37899f22fb191b37"}},{"code_sha256_prefix":"dc41c694d5337897","entry":"violates_moderation","repo":"luka-group/mDPO","repo_kind":"official","path":"bunny/bunny_utils/util/utils.py","file_url":"https://github.com/luka-group/mDPO/blob/HEAD/bunny/bunny_utils/util/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":"dc41c694d5337897"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}