{"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/filtered-direct-preference-optimization","title":"Filtered Direct Preference Optimization","arxiv_id":"2404.13846","date":"2024-04-22","proceeding":null,"authors":["Tetsuro Morimura","Mitsuki Sakamoto","Yuu Jinnai","Kenshi Abe","Kaito Ariu"],"abstract":"Reinforcement learning from human feedback (RLHF) plays a crucial role in aligning language models with human preferences. While the significance of dataset quality is generally recognized, explicit investigations into its impact within the RLHF framework, to our knowledge, have been limited. This paper addresses the issue of text quality within the preference dataset by focusing on direct preference optimization (DPO), an increasingly adopted reward-model-free RLHF method. We confirm that text quality significantly influences the performance of models optimized with DPO more than those optimized with reward-model-based RLHF. Building on this new insight, we propose an extension of DPO, termed filtered direct preference optimization (fDPO). fDPO uses a trained reward model to monitor the quality of texts within the preference dataset during DPO training. Samples of lower quality are discarded based on comparisons with texts generated by the model being optimized, resulting in a more accurate dataset. Experimental results demonstrate that fDPO enhances the final model performance. Our code is available at https://github.com/CyberAgentAILab/filtered-dpo.","url_abs":"https://arxiv.org/abs/2404.13846v4","url_pdf":"https://arxiv.org/pdf/2404.13846v4.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":"filtered-direct-preference-optimization","repo_url":"https://github.com/cyberagentailab/filtered-dpo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"dpo","method_name":"DPO"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.13846","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.13846"}},"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/huggingface/trl","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cyberagentailab/filtered-dpo","reach":null}],"summary":{"ran":2,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"found_in_text":{"samples":2,"ran":2,"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":"c154445eb4e9944f","entry":"FusedLinearDPOFunction","repo":"huggingface/trl","repo_kind":"found_in_text","path":"trl/losses/dpo_loss.py","file_url":"https://github.com/huggingface/trl/blob/HEAD/trl/losses/dpo_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c154445eb4e9944f"}},{"code_sha256_prefix":"ff41d89b493eeae7","entry":"FusedLinearPreferenceBase","repo":"huggingface/trl","repo_kind":"found_in_text","path":"trl/losses/dpo_loss.py","file_url":"https://github.com/huggingface/trl/blob/HEAD/trl/losses/dpo_loss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ff41d89b493eeae7"}},{"code_sha256_prefix":"450ecd7981c09961","entry":"FilterTrainDatasetCallback","repo":"cyberagentailab/filtered-dpo","repo_kind":"official","path":"src/filtered_dpo/callbacks.py","file_url":"https://github.com/cyberagentailab/filtered-dpo/blob/HEAD/src/filtered_dpo/callbacks.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":"450ecd7981c09961"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}