SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.19690 · NeurIPS · 2024

Diffusion Policies Creating a Trust Region for Offline Reinforcement Learning

Mingyuan Zhou, Zhendong Wang, Tianyu Chen

arXiv · PDF · Open in the Atlas

Code that ran

17 of 20 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, 1 violated it and 5 have no contract verdict; 11 failures of our instrument; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2405.19690.json · badge: /api/ran/2405.19690.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
TianyuCodings/Diffusion_Trusted_Q_Learning canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
tianyucodings/diffusion_trusted_q_learning community
Papers with Code archive
6 ran · 3 no recorded run
FunctionStatusWhere it lives
append_dims Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TianyuCodings/Diffusion_Trusted_Q_Learning/diffusion/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from layer6ai-labs/direct-cms, is pointer only (licence: NONE) · get_code("30befb7e4327e615")
How it ran

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

Critic Ran
ran on a synthesized input
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("59d5a0d1c043921d")
How it ran

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

DiagGaussianActorTanhAction Ran
ran on a synthesized input
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("2b19235526d53532")
How it ran

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

MLPNetwork Ran
ran on a synthesized input
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("b4d20c11cf5cfc46")
How it ran

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

ScoreNetwork Ran
ran on a synthesized input
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("5b576f691b552a0e")
How it ran

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

SinusoidalPosEmb Ran
ran on a synthesized input
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("23a2a4fd719c5e35")
How it ran

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

append_zero Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TianyuCodings/Diffusion_Trusted_Q_Learning/diffusion/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from tianyucodings/cdiff, is pointer only (licence: NONE) · get_code("43f2167b019a5fb7")
How it ran

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

create_exp_name Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/utils/logger.py
pointer only (licence: NONE) · get_code("5e687d63bb9beb4a")
How it ran

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

dict_to_safe_json Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/utils/logger.py
pointer only (licence: NONE) · get_code("41279dfcda8b39e4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, TianyuCodings/Diffusion_Trusted_Q_Learning 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_dmd_loss Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/agents/helpers.py
pointer only (licence: NONE) · get_code("fceadce152b8ff0e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, TianyuCodings/Diffusion_Trusted_Q_Learning 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_dmd_loss Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/toy_tasks/toy_main.py
pointer only (licence: NONE) · get_code("c99851217830b079")
How it ran

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

iql_normalize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TianyuCodings/Diffusion_Trusted_Q_Learning/utils/data_sampler.py
pointer only (licence: NONE); the stored copy get_code serves, from cccedric/cpql, is pointer only (licence: GPL-3.0) · get_code("d9e80fbdea32802d")
How it ran

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

mlp Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/agents/model.py
pointer only (licence: NONE); the stored copy get_code serves, from xingyu-lin/softagent, is pointer only (licence: NONE) · get_code("bdef24507a4ccfa7")
How it ran

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

mlp Ran
ran; our contract draft was wrong, not the code
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("db00dda8b96201d3")
How it ran

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

q_v_critic_loss Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/toy_tasks/toy_main.py
pointer only (licence: NONE) · get_code("c7662f1e7a145184")
How it ran

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

rand_log_normal Ran
ran; our contract draft was wrong, not the code
TianyuCodings/Diffusion_Trusted_Q_Learning/diffusion/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from tianyucodings/cdiff, is pointer only (licence: NONE) · get_code("ec8364ee198f15b3")
How it ran

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

safe_json Ran
ran, violated the contract we drafted
TianyuCodings/Diffusion_Trusted_Q_Learning/utils/logger.py
pointer only (licence: NONE) · get_code("07afff96928bd142")
How it ran

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

DTQL Not yet run
unverified (harvested, no recorded run)
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("454a6e7377da6557")
How it ran

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

DiffusionModel Not yet run
unverified (harvested, no recorded run)
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("e9334a508a34ace3")
How it ran

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

weight_init Not yet run
unverified (harvested, no recorded run)
tianyucodings/diffusion_trusted_q_learning/agents/dtql.py
pointer only (licence: NONE) · get_code("e16f745c22233bb1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tianyucodings/diffusion_trusted_q_learning 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 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 10 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 5 the same month, 9 later) and 9 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
append_dims 27 other papers
13 dated earlier, 3 the same month, 9 later, 2 same year, order not determinable · 2 only as an assembly brick
2204.06125 (2022-04)
Hierarchical Text-Conditional Image Generation with CLIP Latents
2304.09787 (2023-04)
NeuralField-LDM: Scene Generation with Hierarchical Latent Diffusion Models
2307.12493 (2023-07)
TF-ICON: Diffusion-Based Training-Free Cross-Domain Image Composition
and 24 more not named here
SinusoidalPosEmb
brick of this paper's assembly: helper
19 other papers
6 dated earlier, 13 later · 13 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2309.03729 (2023-09)
Phasic Content Fusing Diffusion Model with Directional Distribution Consistency for Few-Shot Model Adaption
2310.05333 (2023-10)
DiffCPS: Diffusion-based Constrained Policy Search for Offline Reinforcement Learning
and 16 more not named here
mlp
brick of this paper's assembly: helper
11 other papers
9 dated earlier, 1 the same month, 1 later · 2 only as an assembly brick
1812.05905 (2018-12)
Soft Actor-Critic Algorithms and Applications
2004.13649 (2020-04)
Image Augmentation Is All You Need: Regularizing Deep Reinforcement Learning from Pixels
2110.04935 (2021-10)
Learning Temporally-Consistent Representations for Data-Efficient Reinforcement Learning
and 8 more not named here
dict_to_safe_json 6 other papers
3 dated earlier, 1 the same month, 2 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2007.09070 (2020-07)
Hybrid Discriminative-Generative Training via Contrastive Learning
2210.07484 (2022-10)
Mutual Information Regularized Offline Reinforcement Learning
and 3 more not named here
safe_json 5 other papers
2 dated earlier, 1 the same month, 2 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2210.07484 (2022-10)
Mutual Information Regularized Offline Reinforcement Learning
2405.17098 (2024-05)
Q-value Regularized Transformer for Offline Reinforcement Learning
and 2 more not named here
append_zero 3 other papers
3 later
2407.05996 (2024-07)
Multimodal Diffusion Transformer: Learning Versatile Behavior from Multimodal Goals
2410.19105 (2024-10)
Conditional diffusions for amortized neural posterior estimation
2412.12953 (2024-12)
Efficient Diffusion Transformer Policies with Mixture of Expert Denoisers for Multitask Learning
create_exp_name 3 other papers
1 the same month, 2 later
2405.17098 (2024-05)
Q-value Regularized Transformer for Offline Reinforcement Learning
2411.01146 (2024-11)
Task-Aware Harmony Multi-Task Decision Transformer for Offline Reinforcement Learning
2411.11364 (2024-11)
Continual Task Learning through Adaptive Policy Self-Composition
rand_log_normal 2 other papers
2 later
2410.19105 (2024-10)
Conditional diffusions for amortized neural posterior estimation
2412.12953 (2024-12)
Efficient Diffusion Transformer Policies with Mixture of Expert Denoisers for Multitask Learning
iql_normalize 1 other paper
1 dated earlier
2310.06343 (2023-10)
Boosting Continuous Control with Consistency Policy
weight_init
brick of this paper's assembly: helper
1 other paper
1 later
2605.01242 (2026-05)
Breaking the Computational Barrier: Provably Efficient Actor-Critic for Low-Rank MDPs

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

Offline reinforcement learning (RL) leverages pre-collected datasets to train optimal policies. Diffusion Q-Learning (DQL), introducing diffusion models as a powerful and expressive policy class, significantly boosts the performance of offline RL. However, its reliance on iterative denoising sampling to generate actions slows down both training and inference. While several recent attempts have tried to accelerate diffusion-QL, the improvement in training and/or inference speed often results in degraded performance. In this paper, we introduce a dual policy approach, Diffusion Trusted Q-Learning (DTQL), which comprises a diffusion policy for pure behavior cloning and a practical one-step policy. We bridge the two polices by a newly introduced diffusion trust region loss. The diffusion policy maintains expressiveness, while the trust region loss directs the one-step policy to explore freely and seek modes within the region defined by the diffusion policy. DTQL eliminates the need for iterative denoising sampling during both training and inference, making it remarkably computationally efficient. We evaluate its effectiveness and algorithmic characteristics against popular Kullback-Leibler divergence-based distillation methods in 2D bandit scenarios and gym tasks. We then show that DTQL could not only outperform other methods on the majority of the D4RL benchmark tasks but also demonstrate efficiency in training and inference speeds. The PyTorch implementation is available at https: //github.com/TianyuCodings/Diffusion_Trusted_Q_Learning.

For agents

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

get_harvested_code_for_paper("2405.19690")
get_code_for_paper("2405.19690")
have("2405.19690")

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

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

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

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

Connect an agent — have() is free.