SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.02332 · 2026

Diffusion Policy with Behavioral Advantage Correction for Offline Reinforcement Learning

Botao Dong, Longyang Huang, Ning Pang, Hongtian Chen

arXiv · PDF · Open in the Atlas

Code that ran

18 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 6 honoured the contract we drafted, 1 violated it and 5 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2608.02332.json · badge: /api/ran/2608.02332.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
aviralkumar2907/CQL canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
thu-ml/SRPO canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
sfujim/BCQ canonical (classifier label)
classifier basis: census
0 ran · 2 no recorded run
familyld/SCORE community
Papers with Code archive
5 ran · 0 no recorded run
MAOYIXIU/SVR community
Papers with Code archive
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Actor Ran
ran on a synthesized input
familyld/SCORE/score/SCORE.py
pointer only (licence: NONE) · get_code("e2c86f02b964230e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, familyld/SCORE 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 · constructed an object; no result was computed
MAOYIXIU/SVR/SVR.py
code served (permissive licence) · get_code("f3d57c097cbcf790")
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 an instance of its own class, Critic: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# The Critic class takes state_dim and action_dim as parameters
# These define the input dimensions for the neural networks

state_dim = 4
action_dim = 3

ARGS = {
    "state_dim": state_dim,
    "action_dim": action_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Critic — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Critic 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
Critic Ran
ran on a synthesized input
familyld/SCORE/score/SCORE.py
pointer only (licence: NONE) · get_code("678058ab16de3c25")
How it ran

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

SCORE Ran
ran on a synthesized input
familyld/SCORE/score/SCORE.py
pointer only (licence: NONE) · get_code("4a3898ce05b5f591")
How it ran

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

SVR Ran
ran on a synthesized input · constructed an object; no result was computed
MAOYIXIU/SVR/SVR.py
code served (permissive licence) · get_code("c1d26f3100123e3c")
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 an instance of its own class, SVR: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
import copy

torch.manual_seed(0)

# Define a minimal replay buffer that implements the sample method
class MinimalReplayBuffer:
    def __init__(self, state_dim, action_dim):
        self.state_dim = state_dim
        self.action_dim = action_dim
    
    def sample(self, batch_size):
        state = torch.randn(batch_size, self.state_dim)
        action = torch.randn(batch_size, self.action_dim)
        next_state = torch.randn(batch_size, self.state_dim)
        reward = torch.randn(batch_size, 1)
        not_done = torch.ones(batch_size, 1)
        return state, action, next_state, reward, not_done

# Define a minimal behavior policy that has __call__ method
class MinimalBehaviorPolicy(nn.Module):
    def __init__(self, state_dim, action_dim):
        super(MinimalBehaviorPolicy, self).__init__()
        self.net = nn.Linear(state_dim, action_dim)
    
    def forward(self, state):
        return self.net(state)
    
    def __call__(self, state):
        return self.forward(state)

# Set up parameters
state_dim = 4
action_dim = 3
max_action = 1.0
batch_size = 2

# Create instances
replay_buffer = MinimalReplayBuffer(state_dim, action_dim)
behav = MinimalBehaviorPolicy(state_dim, action_dim)
Q_min = 0.0

# Build ARGS dictionary with all parameters for SVR.__init__
ARGS = {
    'state_dim': state_dim,
    'action_dim': action_dim,
    'max_action': max_action,
    'replay_buffer': replay_buffer,
    'behav': behav,
    'Q_min': Q_min,
    'discount': 0.99,
    'tau': 0.005,
    'policy_freq': 2,
    'schedule': True,
    'snis': False,
    'num_sample': 1,
    'alpha': 0.1,
    'sample_std': 0.2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SVR — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SVR 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
asymmetric_l2_loss Ran
ran; our contract draft was wrong, not the code
thu-ml/SRPO/SRPO.py
code served (permissive licence) · get_code("579d77f78c03773e")
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)

# u: a tensor that will be compared element-wise and squared
# tau: a scalar or tensor representing the threshold parameter
u = torch.randn(2, 4)
tau = 0.5

ARGS = {
    "u": u,
    "tau": tau,
}
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
clip_magnitude Ran
ran, honoured the contract we drafted
aviralkumar2907/CQL/d4rl/rlkit/pythonplusplus.py
pointer only (licence: NONE) · get_code("93d28ca67303e04b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aviralkumar2907/CQL 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_stats_ordered_dict Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
familyld/SCORE/score/SCORE.py
pointer only (licence: NONE) · get_code("32636b59623728e6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, familyld/SCORE 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_stats_ordered_dict Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
aviralkumar2907/CQL/d4rl/rlkit/core/eval_util.py
pointer only (licence: NONE) · get_code("fadf5f762ff04cd6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aviralkumar2907/CQL 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_average_returns Ran
ran, honoured the contract we drafted
aviralkumar2907/CQL/d4rl/rlkit/core/eval_util.py
pointer only (licence: NONE) · get_code("a5d10a0b704c8db7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aviralkumar2907/CQL 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_flat_params Ran
ran, honoured the contract we drafted
aviralkumar2907/CQL/d4rl/rlkit/core/batch_rl_algorithm.py
pointer only (licence: NONE) · get_code("9b9a51e3e3be7a6e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aviralkumar2907/CQL 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_numpy Ran
ran; our contract draft was wrong, not the code
familyld/SCORE/score/SCORE.py
pointer only (licence: NONE) · get_code("bcb643b95b42e8ab")
How it ran

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

identity Ran
ran, honoured the contract we drafted
aviralkumar2907/CQL/d4rl/rlkit/pythonplusplus.py
pointer only (licence: NONE); the stored copy get_code serves, from dholzmueller/universal_double_descent, is pointer only (licence: NONE) · get_code("9910e2fc297f8665")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, aviralkumar2907/CQL 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_numeric Ran
ran, violated the contract we drafted
aviralkumar2907/CQL/d4rl/rlkit/pythonplusplus.py
pointer only (licence: NONE) · get_code("4138766e854db009")
How it ran

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

marginal_prob_std Ran
ran, honoured the contract we drafted
thu-ml/SRPO/utils.py
code served (permissive licence) · get_code("057c095634d04249")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

ARGS = {
    "t": 0.5,
    "device": "cpu",
    "beta_1": 20.0,
    "beta_0": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
mlp Ran
ran; our contract draft was wrong, not the code
thu-ml/SRPO/model.py
pointer only (licence: MIT); the stored copy get_code serves, from liamyzq/Doob_training_free_adaptation, is pointer only (licence: NONE) · get_code("d466e7f1c4364a0b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from liamyzq/Doob_training_free_adaptation, 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.

return_range Ran
ran, honoured the contract we drafted
thu-ml/SRPO/dataset.py
code served (permissive licence) · get_code("732209d369d824c0")
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, 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
import numpy as np

torch.manual_seed(0)

# Construct a minimal dataset dict that satisfies the function's needs
# The function iterates over dataset['rewards'] and dataset['terminals']
dataset = {
    'rewards': [1.0, 0.5, 2.0, 1.5, 0.0, 3.0],
    'terminals': [False, False, True, False, False, True]
}

# max_episode_steps limits the maximum length of an episode
max_episode_steps = 10

ARGS = {
    'dataset': dataset,
    'max_episode_steps': max_episode_steps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
simple_separated_format Ran
ran; our contract draft was wrong, not the code
aviralkumar2907/CQL/d4rl/rlkit/core/tabulate.py
pointer only (licence: NONE) · get_code("5cb0c55f58279f59")
How it ran

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

ReplayBuffer Not yet run
unverified (harvested, no recorded run)
sfujim/BCQ/discrete_BCQ/utils.py
code served (permissive licence) · get_code("2a282db4ff509a1c")
How it ran

no invocation recorded.

make_env Not yet run
unverified (harvested, no recorded run)
sfujim/BCQ/discrete_BCQ/utils.py
code served (permissive licence) · get_code("4410a954fa46ebfb")
How it ran

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, 14 are also present in other papers whose code we hold (14 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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
identity 69 other papers
69 dated earlier · 5 only as an assembly brick
1706.07296 (2017-06)
A Minimal Developmental Model Can Increase Evolvability in Soft Robots
1802.09419 (2018-02)
Stochastic Hyperparameter Optimization through Hypernetworks
1804.06055 (2018-04)
Co-occurrence Feature Learning from Skeleton Data for Action Recognition and Detection with Hierarchical Aggregation
and 66 more not named here
simple_separated_format 27 other papers
27 dated earlier
1903.08254 (2019-03)
Efficient Off-Policy Meta-Reinforcement Learning via Probabilistic Context Variables
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
1910.12827 (2019-10)
Entity Abstraction in Visual Model-Based Reinforcement Learning
and 24 more not named here
get_average_returns 24 other papers
24 dated earlier
1903.08254 (2019-03)
Efficient Off-Policy Meta-Reinforcement Learning via Probabilistic Context Variables
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
1912.11032 (2019-12)
Towards Practical Multi-Object Manipulation using Relational Reinforcement Learning
and 21 more not named here
create_stats_ordered_dict
brick of this paper's assembly: helper
18 other papers
18 dated earlier
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2006.13916 (2020-06)
Off-Dynamics Reinforcement Learning: Training for Transfer with Domain Classifiers
and 15 more not named here
clip_magnitude 15 other papers
15 dated earlier
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
1910.12827 (2019-10)
Entity Abstraction in Visual Model-Based Reinforcement Learning
1911.08453 (2019-11)
Planning with Goal-Conditioned Policies
and 12 more not named here
is_numeric 14 other papers
14 dated earlier
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
1910.12827 (2019-10)
Entity Abstraction in Visual Model-Based Reinforcement Learning
1911.08453 (2019-11)
Planning with Goal-Conditioned Policies
and 11 more not named here
asymmetric_l2_loss 6 other papers
6 dated earlier · 2 only as an assembly brick
2110.06169 (2021-10)
Offline Reinforcement Learning with Implicit Q-Learning
2210.08323 (2022-10)
A Policy-Guided Imitation Approach for Offline Reinforcement Learning
2310.07297 (2023-10)
Score Regularized Policy Optimization through Diffusion Behavior
and 3 more not named here
get_flat_params 3 other papers
3 dated earlier
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2311.05067 (2023-11)
Accelerating Exploration with Unlabeled Prior Data
2605.14779 (2026-05)
PENG'S Q(λ) FOR CONSERVATIVE VALUE ESTIMATION IN OFFLINE REINFORCEMENT LEARNING
Critic
brick of this paper's assembly: model
2 other papers
2 dated earlier · 2 only as an assembly brick
2410.19400 (2024-10)
Offline Reinforcement Learning with OOD State Correction and OOD Action Suppression
2511.02567 (2025-11)
Adaptive Neighborhood-Constrained Q Learning for Offline Reinforcement Learning
get_numpy
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
1705.05363 (2017-05)
Curiosity-driven Exploration by Self-supervised Prediction
2111.02056 (2021-11)
Curriculum Offline Imitating Learning
mlp 2 other papers
2 dated earlier
2407.09024 (2024-07)
Aligning Diffusion Behaviors with Q-functions for Efficient Continuous Control
2602.16198 (2026-02)
Training-Free Adaptation of Diffusion Models via Doob's h-Transform
make_env 1 other paper
1 dated earlier
2007.06049 (2020-07)
An Equivalence between Loss Functions and Non-Uniform Sampling in Experience Replay
marginal_prob_std 1 other paper
1 dated earlier
2407.09024 (2024-07)
Aligning Diffusion Behaviors with Q-functions for Efficient Continuous Control
return_range 1 other paper
1 dated earlier
2407.09024 (2024-07)
Aligning Diffusion Behaviors with Q-functions for Efficient Continuous Control

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

In offline reinforcement learning (RL), the distribution shift between behavioral data and the learned policy can lead to erroneous Q-value estimation, thereby misguiding the direction of policy optimization. To address this issue, we develop a behavioral advantage corrected policy evaluation (BAC-PE) approach, which utilizes the Q-function of the behavior policy to correct the learned policy's Q-function, thus mitigating pessimistic conservatism and overestimation bias. Furthermore, the convergence of BAC-PE is analyzed theoretically, and an upper bound on the difference between the learned Q-function and the true Q-function is derived. To alleviate distribution shift, this work employs diffusion models to represent both the behavior policy and the learned policy, performing distribution matching for accurate policy regularization. Additionally, Qvalue guidance is incorporated into the training process to achieve effective policy improvement. By combining BAC-PE with diffusion policy modeling, we propose the diffusion policy with behavioral advantage correction (DPBAC) algorithm. Compared to existing offline methods, DPBAC demonstrates stronger policy representation capabilities and effectively mitigates the bias in Q-value estimation. Experimental results on multiple domains of D4RL tasks show that DPBAC achieves superior performance, with notable advantages over state-of-the-art (SOTA) algorithms.

For agents

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

get_harvested_code_for_paper("2608.02332")
get_code_for_paper("2608.02332")
have("2608.02332")

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

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

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

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

Connect an agent — have() is free.