{"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/fine-tuning-discrete-diffusion-models-with","title":"Fine-Tuning Discrete Diffusion Models with Policy Gradient Methods","arxiv_id":"2502.01384","date":"2025-02-03","proceeding":null,"authors":["Oussama Zekri","Nicolas Boullé"],"abstract":"Discrete diffusion models have recently gained significant attention due to their ability to process complex discrete structures for language modeling. However, fine-tuning these models with policy gradient methods, as is commonly done in Reinforcement Learning from Human Feedback (RLHF), remains a challenging task. We propose an efficient, broadly applicable, and theoretically justified policy gradient algorithm, called Score Entropy Policy Optimization (SEPO), for fine-tuning discrete diffusion models over non-differentiable rewards. Our numerical experiments across several discrete generative tasks demonstrate the scalability and efficiency of our method. Our code is available at https://github.com/ozekri/SEPO.","url_abs":"https://arxiv.org/abs/2502.01384v2","url_pdf":"https://arxiv.org/pdf/2502.01384v2.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":"fine-tuning-discrete-diffusion-models-with","repo_url":"https://github.com/ozekri/SEPO","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"policy-gradient-methods","task_name":"Policy Gradient Methods"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2502.01384","atlas_url":"https://app.syntology.ai/?focus=2502.01384","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.01384"}},"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/ozekri/SEPO","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":7},"by_repo_kind":{"official":{"samples":8,"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":0,"samples":[{"code_sha256_prefix":"dec1de00023a923b","entry":"fsspec_exists","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/utils.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dec1de00023a923b"}},{"code_sha256_prefix":"4ec57ee85c940684","entry":"batch_dna_detokenize","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/dataloader_gosai.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/dataloader_gosai.py","link_basis":"harvester_set","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":"4ec57ee85c940684"}},{"code_sha256_prefix":"9b9814cca50339d7","entry":"binary_discretization","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/noise_schedule.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/noise_schedule.py","link_basis":"harvester_set","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":"9b9814cca50339d7"}},{"code_sha256_prefix":"b988ba95b058558a","entry":"dna_detokenize","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/dataloader_gosai.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/dataloader_gosai.py","link_basis":"harvester_set","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":"b988ba95b058558a"}},{"code_sha256_prefix":"733f359f0f876fb7","entry":"dna_tokenize","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/dataloader_gosai.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/dataloader_gosai.py","link_basis":"harvester_set","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":"733f359f0f876fb7"}},{"code_sha256_prefix":"db0136eb80a50383","entry":"fsspec_listdir","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/utils.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/utils.py","link_basis":"harvester_set","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":"db0136eb80a50383"}},{"code_sha256_prefix":"60dbd956810fafb6","entry":"get_logger","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/utils.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/utils.py","link_basis":"harvester_set","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":"60dbd956810fafb6"}},{"code_sha256_prefix":"fe6314378d2def00","entry":"get_noise","repo":"ozekri/SEPO","repo_kind":"official","path":"GRPO_MDLM_DNA/noise_schedule.py","file_url":"https://github.com/ozekri/SEPO/blob/HEAD/GRPO_MDLM_DNA/noise_schedule.py","link_basis":"harvester_set","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":"fe6314378d2def00"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}