SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.20639 · 2025

DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2506.20639.json · badge: /api/ran/2506.20639.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
apple/ml-diffucoder canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
format_reward Ran
ran, honoured the contract we drafted
apple/ml-diffucoder/src/open_r1/rewards.py
pointer only (licence: NONE) · get_code("ce353d566f3f2c9f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-diffucoder when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

selective_log_softmax Ran
ran; our contract draft was wrong, not the code
apple/ml-diffucoder/src/open_r1/coupled_grpo.py
pointer only (licence: NOASSERTION) · get_code("e573a98030dedd8d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-diffucoder (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

split_tensor_dict Ran
ran; our contract draft was wrong, not the code
apple/ml-diffucoder/src/open_r1/coupled_grpo.py
pointer only (licence: NOASSERTION) · get_code("0fa983fc585a3b51")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-diffucoder (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tag_count_reward Ran
ran, honoured the contract we drafted
apple/ml-diffucoder/src/open_r1/rewards.py
pointer only (licence: NONE) · get_code("0a5673b11c91e69d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-diffucoder when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

transform_question_format Ran
ran; our contract draft was wrong, not the code
apple/ml-diffucoder/recipes/process_data.py
pointer only (licence: NOASSERTION) · get_code("2efaae630544ffa2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-diffucoder (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_provider Not yet run
unverified (harvested, no recorded run)
apple/ml-diffucoder/src/open_r1/utils/code_providers.py
pointer only (licence: NOASSERTION) · get_code("d345b73199f35a01")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-diffucoder (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
apple/ml-diffucoder/recipes/process_data.py
pointer only (licence: NOASSERTION) · get_code("f32a6b72ed50b5fa")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-diffucoder (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
format_reward 5 other papers
5 later
2507.02834 (2025-07)
ExPO: Unlocking Hard Reasoning with Self-Explanation-Guided Reinforcement Learning
2511.04902 (2025-11)
You Need Reasoning to Learn Reasoning: The Limitations of Label-Free RL in Weak Base Models
2602.02258 (2026-02)
Alignment-Aware Model Adaptation via Feedback-Guided Optimization
and 2 more not named here
tag_count_reward 4 other papers
4 later
2507.02834 (2025-07)
ExPO: Unlocking Hard Reasoning with Self-Explanation-Guided Reinforcement Learning
2602.02258 (2026-02)
Alignment-Aware Model Adaptation via Feedback-Guided Optimization
2602.03876 (2026-02)
GOPO: Policy Optimization using Ranked Rewards
and 1 more not named here
get_provider 3 other papers
3 later
2507.02834 (2025-07)
ExPO: Unlocking Hard Reasoning with Self-Explanation-Guided Reinforcement Learning
2511.04902 (2025-11)
You Need Reasoning to Learn Reasoning: The Limitations of Label-Free RL in Weak Base Models
2606.12900 (2026-06)
Zero-source LLM Hallucination Detection with Human-like Criteria Probing

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Diffusion large language models (dLLMs) are compelling alternatives to autoregressive (AR) models because their denoising models operate over the entire sequence. The global planning and iterative refinement features of dLLMs are particularly useful for code generation. However, current training and inference mechanisms for dLLMs in coding are still under-explored. To demystify the decoding behavior of dLLMs and unlock their potential for coding, we systematically investigate their denoising processes and reinforcement learning (RL) methods. We train a 7B dLLM, \textbf{DiffuCoder}, on 130B tokens of code. Using this model as a testbed, we analyze its decoding behavior, revealing how it differs from that of AR models: (1) dLLMs can decide how causal their generation should be without relying on semi-AR decoding, and (2) increasing the sampling temperature diversifies not only token choices but also their generation order. This diversity creates a rich search space for RL rollouts. For RL training, to reduce the variance of token log-likelihood estimates and maintain training efficiency, we propose \textbf{coupled-GRPO}, a novel sampling scheme that constructs complementary mask noise for completions used in training. In our experiments, coupled-GRPO significantly improves DiffuCoder's performance on code generation benchmarks (+4.4\% on EvalPlus) and reduces reliance on AR bias during decoding. Our work provides deeper insight into the machinery of dLLM generation and offers an effective, diffusion-native RL training framework. https://github.com/apple/ml-diffucoder.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2506.20639")
get_code_for_paper("2506.20639")
have("2506.20639")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2506.20639.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2506.20639.svg)](https://syntology.ai/paper/2506.20639)

Connect an agent — have() is free.