SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.06462 · 2026

Diffusion-State Policy Optimization for Masked Diffusion Language Models

Hiroki Furuta, Naoaki Okazaki, Daisuke Oba

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2602.06462.json · badge: /api/ran/2602.06462.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
dllm-reasoning/d1 canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
add_gumbel_noise Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dllm-reasoning/d1/eval/generate.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("f3233aab1c6c6543")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

boxed_in_answer Ran
ran, honoured the contract we drafted
dllm-reasoning/d1/diffu-grpo/math500_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("767d1c6e07285425")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

correctness_reward_func Ran
ran, honoured the contract we drafted
dllm-reasoning/d1/diffu-grpo/reward_func.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("c7b8593e2846507f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

extract_hash_answer Ran
ran; our contract draft was wrong, not the code
dllm-reasoning/d1/diffu-grpo/reward_func.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("6d5992a248b4c807")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

extract_xml_answer Ran
ran; our contract draft was wrong, not the code
dllm-reasoning/d1/diffu-grpo/reward_func.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("08fcee8ccfd3d4a9")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

get_num_transfer_tokens Ran
ran; our contract draft was wrong, not the code
dllm-reasoning/d1/eval/generate.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("c3a8d456e319a4cd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

is_equiv Ran
ran, violated the contract we drafted
dllm-reasoning/d1/diffu-grpo/math500_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("e88118a107b326d1")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

preprocess_dataset Ran
ran; our contract draft was wrong, not the code
dllm-reasoning/d1/SFT/sft_trainer.py
code served (permissive licence) · get_code("a3e7b9a227925647")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import random
from unittest.mock import Mock

torch.manual_seed(0)

class MockTokenizer:
    def apply_chat_template(self, messages, tokenize=False):
        if tokenize:
            return torch.tensor([[101, 2054, 2003, 102]], dtype=torch.long)
        else:
            return "Mock chat template output"
    
    def __call__(self, text, return_tensors=None, truncation=False, max_length=None, padding=None):
        result = Mock()
        result.input_ids = torch.tensor([[101, 2054, 2003, 102]], dtype=torch.long)
        result.attention_mask = torch.tensor([[1, 1, 1, 1]], dtype=torch.long)
        return result

data = [
    {
        'question': 'What is 2+2?',
        'thinking_trajectories': ['Let me think about basic arithmetic. 2 plus 2 equals 4.'],
        'attempt': '4'
    },
    {
        'question': 'What is the capital of France?',
        'thinking_trajectories': ['France is a country in Europe. The capital is Paris.'],
        'attempt': 'Paris'
    }
]

tokenizer = MockTokenizer()
max_length = 512
test_split = 0.01

ARGS = {
    'data': data,
    'tokenizer': tokenizer,
    'max_length': max_length,
    'test_split': test_split
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
remove_boxed Ran
ran; our contract draft was wrong, not the code
dllm-reasoning/d1/diffu-grpo/math500_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from xingzhejun/d-OPSD, is pointer only (licence: NONE) · get_code("4e621edb2336a842")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from xingzhejun/d-OPSD, and GitHub detected no licence in that repository 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.

generate Not yet run
unverified (harvested, no recorded run)
dllm-reasoning/d1/eval/generate.py
code served (permissive licence) · get_code("e65421243695657c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 8 later) and 2 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
get_num_transfer_tokens 4 other papers
2 dated earlier, 2 later
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
2605.02263 (2026-05)
Break the Block: Dynamic-size Reasoning Blocks for Diffusion Large Language Models via Monotonic Entropy Descent with Reinforcement Learning
and 1 more not named here
is_equiv 4 other papers
2 dated earlier, 2 later
2505.14625 (2025-05)
TinyV: Reducing False Negatives in Verification Improves RL for LLM Reasoning
2511.13223 (2025-11)
TokenSqueeze: Performance-Preserving Compression for Reasoning LLMs
2604.13552 (2026-04)
Training-Free Test-Time Contrastive Learning for Large Language Models
and 1 more not named here
add_gumbel_noise 3 other papers
2 dated earlier, 1 later
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
2601.22527 (2026-01)
ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs
extract_hash_answer 2 other papers
2 later
2606.16517 (2026-06)
How Post-Training Shapes Biological Reasoning Models
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs
extract_xml_answer 2 other papers
1 dated earlier, 1 later
2510.07312 (2025-10)
BOOTSTRAPPING LLMS TO REASON OVER LONGER HORIZONS VIA REINFORCEMENT LEARNING
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs
boxed_in_answer 1 other paper
1 later
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs
correctness_reward_func 1 other paper
1 later
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs
remove_boxed 1 other paper
1 later
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs

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-22.

Repositories linked to this paper

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

Abstract

Masked diffusion language models generate text through iterative masked-token filling, but terminal-only rewards on final completions provide coarse credit assignment for the intermediate filling decisions that shape the generation process. We propose Diffusion-State Policy Optimization (DISPO), a plug-in credit-assignment layer that directly optimizes intermediate filling decisions. At selected intermediate masked states, DISPO branches by resampling the currently masked positions from rollout-cached logits, scores the resulting completions, and updates only the newly filled tokens, requiring no additional multi-step diffusion rollouts or optimizer steps. We formalize a fixed-state objective for branched completions and derive a policy-gradient estimator that reuses the same rollouts as terminal-feedback policy optimization. Experiments on LLaDA-8B-Instruct show that DISPO consistently improves terminal-feedback baselines, including diffu-GRPO and SPG, on math and planning benchmarks under matched rollout compute and optimizer steps, supporting its use as a general plug-in for masked diffusion policy optimization.

For agents

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

get_harvested_code_for_paper("2602.06462")
get_code_for_paper("2602.06462")
have("2602.06462")

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

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

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

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

Connect an agent — have() is free.