{"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/a-reparameterized-discrete-diffusion-model","title":"A Reparameterized Discrete Diffusion Model for Text Generation","arxiv_id":"2302.05737","date":"2023-02-11","proceeding":null,"authors":["Lin Zheng","Jianbo Yuan","Lei Yu","Lingpeng Kong"],"abstract":"This work studies discrete diffusion probabilistic models with applications to natural language generation. We derive an alternative yet equivalent formulation of the sampling from discrete diffusion processes and leverage this insight to develop a family of reparameterized discrete diffusion models. The derived generic framework is highly flexible, offers a fresh perspective of the generation process in discrete diffusion models, and features more effective training and decoding techniques. We conduct extensive experiments to evaluate the text generation capability of our model, demonstrating significant improvements over existing diffusion models.","url_abs":"https://arxiv.org/abs/2302.05737v3","url_pdf":"https://arxiv.org/pdf/2302.05737v3.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":"a-reparameterized-discrete-diffusion-model","repo_url":"https://github.com/hkunlp/reparam-discrete-diffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"text-generation","task_name":"Text Generation"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.05737","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.05737"}},"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/hkunlp/reparam-discrete-diffusion","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"ran_violates":2,"ran":4,"unverified":5},"by_repo_kind":{"official":{"samples":12,"ran":7,"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":"8cd8cb0d1e9e63e4","entry":"Linear","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/models/diffusion_transformer_decoder.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/models/diffusion_transformer_decoder.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8cd8cb0d1e9e63e4"}},{"code_sha256_prefix":"fbf9ec7be545688e","entry":"default","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fbf9ec7be545688e"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"23bb0e51d20c1303","entry":"mean_ds","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/criterions/diffusion_loss.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/criterions/diffusion_loss.py","link_basis":"harvester_set","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":"23bb0e51d20c1303"}},{"code_sha256_prefix":"e63f8c52be2a8547","entry":"module_name_fordropout","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/models/diffusion_transformer_decoder.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/models/diffusion_transformer_decoder.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e63f8c52be2a8547"}},{"code_sha256_prefix":"da869491359e17b9","entry":"sample_bernoulli","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/utils.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/utils.py","link_basis":"harvester_set","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":"da869491359e17b9"}},{"code_sha256_prefix":"bf17fab5a9f64577","entry":"topk_masking","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/utils.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/utils.py","link_basis":"harvester_set","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":"bf17fab5a9f64577"}},{"code_sha256_prefix":"4f626e9b2e9f395e","entry":"compute_rpe_bias","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/models/utils.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/models/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4f626e9b2e9f395e"}},{"code_sha256_prefix":"09c8479d9a5b3e06","entry":"extract","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/reparam_multinomial_diffusion.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09c8479d9a5b3e06"}},{"code_sha256_prefix":"4687731e24b24418","entry":"generate_scaled_attn_mask","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/models/diffusion_transformer_decoder.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/models/diffusion_transformer_decoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4687731e24b24418"}},{"code_sha256_prefix":"090e30ed6f0ab09b","entry":"module_name_fordropout","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"fairseq/diffusion_mt/models/diffusion_transformer_encoder.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/fairseq/diffusion_mt/models/diffusion_transformer_encoder.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"090e30ed6f0ab09b"}},{"code_sha256_prefix":"5e40de0eec5388cd","entry":"new_arange","repo":"hkunlp/reparam-discrete-diffusion","repo_kind":"official","path":"discrete_diffusion/discrete_diffusions/utils.py","file_url":"https://github.com/hkunlp/reparam-discrete-diffusion/blob/HEAD/discrete_diffusion/discrete_diffusions/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5e40de0eec5388cd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}