SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.16302 · NeurIPS · 2024

Graph Diffusion Policy Optimization

Tianyu Pang, Wei Chen, Min Lin, Chongxuan Li, Chao Du, Yijing Liu

arXiv · PDF · Open in the Atlas

Code that ran

7 of 13 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2402.16302.json · badge: /api/ran/2402.16302.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
sail-sg/gdpo canonical (classifier label)
classifier basis: census
4 ran · 5 no recorded run
NVlabs/GDPO canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
sail-sg/GDPO canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
get_positive_expectation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/gdpo/model/infomax.py
pointer only (licence: NONE) · get_code("a17d699ffe7e149f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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.

nanstd Ran
ran; our contract draft was wrong, not the code
NVlabs/GDPO/trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py
code served (permissive licence) · get_code("a6cece2ffebe0f9c")
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) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

# Create a 1D tensor with some NaN values
tensor = torch.tensor([1.0, 2.0, float('nan'), 4.0, 5.0, float('nan'), 7.0])

ARGS = {
    "tensor": tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
random_permute Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sail-sg/gdpo/model/infomax.py
pointer only (licence: NONE) · get_code("b58843c8f0e6cce0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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.

setup_wandb Ran
ran; our contract draft was wrong, not the code
sail-sg/gdpo/main_ppo.py
pointer only (licence: NONE) · get_code("cb06d97097718c4f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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.

shuffle_tensor_dict Ran
ran; our contract draft was wrong, not the code
NVlabs/GDPO/trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py
code served (permissive licence) · get_code("4f7f0f20f97f300e")
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) and returned dict. 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

torch.manual_seed(0)

# Construct a dictionary of tensors with different shapes
# The function shuffles along the first dimension (batch dimension)
tensor_dict = {
    "x": torch.arange(8).reshape(2, 4),  # batch_size=2, features=4
    "y": torch.arange(6).reshape(2, 3),  # batch_size=2, features=3
    "z": None,  # Test that None values are handled
}

ARGS = {
    "tensor_dict": tensor_dict,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
split_tensor_dict Ran
ran; our contract draft was wrong, not the code
NVlabs/GDPO/trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py
code served (permissive licence) · get_code("efd67e2adf6b1ba5")
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) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# Create small tensors with distinct dimensions
x = torch.arange(8).reshape(4, 2)  # 4 samples, 2 features
y = torch.arange(4).reshape(4, 1)  # 4 samples, 1 feature
z = None  # Test optional tensor

tensor_dict = {
    "x": x,
    "y": y,
    "z": z
}

num_chunks = 2

ARGS = {
    "tensor_dict": tensor_dict,
    "num_chunks": num_chunks
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
to_dense Ran
ran; our contract draft was wrong, not the code
sail-sg/gdpo/process.py
pointer only (licence: NONE) · get_code("44c3cf76becae1f4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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.

compress Not yet run
unverified (harvested, no recorded run)
sail-sg/gdpo/model/diffusion_discrete.py
pointer only (licence: NONE) · get_code("4d13d6ce3ccd0cc1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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. No invocation recorded.

encode_no_edge Not yet run
unverified (harvested, no recorded run)
sail-sg/gdpo/process.py
pointer only (licence: NONE) · get_code("86b15e5a9c92ef51")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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. No invocation recorded.

generate_random_letter Not yet run
unverified (harvested, no recorded run)
sail-sg/GDPO/main_generate.py
pointer only (licence: NONE) · get_code("fc28afeec6883d4e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/GDPO 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. No invocation recorded.

log_sum_exp Not yet run
unverified (harvested, no recorded run)
sail-sg/gdpo/model/infomax.py
pointer only (licence: NONE) · get_code("c03feba6bc4986f6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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. No invocation recorded.

masked_softmax Not yet run
unverified (harvested, no recorded run)
sail-sg/gdpo/model/layers.py
pointer only (licence: NONE) · get_code("1717b7476aced94e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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. No invocation recorded.

to_sparse_batch Not yet run
unverified (harvested, no recorded run)
sail-sg/gdpo/model/diffusion_discrete.py
pointer only (licence: NONE) · get_code("7c6f8ff8273c13ec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sail-sg/gdpo 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. No invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 7 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 6 later) and 6 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
nanstd 7 other papers
7 later
2505.17534 (2025-05)
Co-Reinforcement Learning for Unified Multimodal Understanding and Generation
2506.14755 (2025-06)
Optimizing Length Compression in Large Reasoning Models
2511.04902 (2025-11)
You Need Reasoning to Learn Reasoning: The Limitations of Label-Free RL in Weak Base Models
and 4 more not named here
split_tensor_dict 7 other papers
7 later
2505.17534 (2025-05)
Co-Reinforcement Learning for Unified Multimodal Understanding and Generation
2506.14755 (2025-06)
Optimizing Length Compression in Large Reasoning Models
2511.04902 (2025-11)
You Need Reasoning to Learn Reasoning: The Limitations of Label-Free RL in Weak Base Models
and 4 more not named here
masked_softmax 3 other papers
1 dated earlier, 2 later
2209.14734 (2022-09)
DiGress: Discrete Denoising diffusion for graph generation
2405.11416 (2024-05)
Discrete-state Continuous-time Diffusion for Graph Generation
2406.17341 (2024-06)
Generative Modelling of Structurally Constrained Graphs
shuffle_tensor_dict 3 other papers
3 later
2505.17534 (2025-05)
Co-Reinforcement Learning for Unified Multimodal Understanding and Generation
2602.03876 (2026-02)
GOPO: Policy Optimization using Ranked Rewards
2605.11974 (2026-05)
Towards Order Fairness: Mitigating LLMs Order Sensitivity through Dual Group Advantage Optimization
log_sum_exp 2 other papers
2 dated earlier
2010.04592 (2020-10)
Contrastive Learning with Hard Negative Samples
2105.06247 (2021-05)
Video Corpus Moment Retrieval with Contrastive Learning
get_positive_expectation 1 other paper
1 later
2406.14929 (2024-06)
Efficient Graph Similarity Computation with Alignment Regularization
setup_wandb 1 other paper
1 later
2403.06020 (2024-03)
Multi-conditioned Graph Diffusion for Neural Architecture Search

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

Repositories linked to this paper

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

Abstract

Recent research has made significant progress in optimizing diffusion models for downstream objectives, which is an important pursuit in fields such as graph generation for drug design. However, directly applying these models to graph presents challenges, resulting in suboptimal performance. This paper introduces graph diffusion policy optimization (GDPO), a novel approach to optimize graph diffusion models for arbitrary (e.g., non-differentiable) objectives using reinforcement learning. GDPO is based on an eager policy gradient tailored for graph diffusion models, developed through meticulous analysis and promising improved performance. Experimental results show that GDPO achieves state-of-the-art performance in various graph generation tasks with complex and diverse objectives. Code is available at https://github.com/sail-sg/GDPO.

For agents

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

get_harvested_code_for_paper("2402.16302")
get_code_for_paper("2402.16302")
have("2402.16302")

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

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

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

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

Connect an agent — have() is free.