SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.18459 · NeurIPS · 2023

Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning

Weinan Zhang, Zhuoran Yang, Chenjia Bai, Bin Zhao, Dong Wang, Xuelong Li, Haoran He, Kang Xu

arXiv · PDF · Open in the Atlas

Code that ran

19 of 30 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 8 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 5 failures of our instrument; 11 no recorded run), 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/2305.18459.json · badge: /api/ran/2305.18459.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
tinnerhrhe/MTDiff canonical (classifier label)
classifier basis: census
15 ran · 7 no recorded run
jannerm/diffuser unrelated (classifier label)
classifier basis: classifier_2025
4 ran · 4 no recorded run
FunctionStatusWhere it lives
WeightedL1 Ran
ran on a synthesized input · constructed an object; no result was computed
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("bb0b654d7e2f043a")
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, WeightedL1: 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
from torch import nn

torch.manual_seed(0)

# Parameters for WeightedL1
batch_size = 2
horizon = 3
transition_dim = 4
action_dim = 2

# Create weights tensor: [horizon x transition_dim]
weights = torch.ones(horizon, transition_dim)

# ARGS dictionary with all parameters
ARGS = {
    'weights': weights,
    '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 WeightedL1 — 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 WeightedL1 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
WeightedL2 Ran
ran on a synthesized input · constructed an object; no result was computed
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("63bb8b129db38dfb")
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, WeightedL2: 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)

# Parameters for WeightedL2
batch_size = 2
horizon = 3
transition_dim = 4
action_dim = 2

# Create weights tensor: [horizon x transition_dim]
weights = torch.ones(horizon, transition_dim)

# Create pred and targ tensors: [batch_size x horizon x transition_dim]
pred = torch.randn(batch_size, horizon, transition_dim)
targ = torch.randn(batch_size, horizon, transition_dim)

ARGS = {
    'weights': weights,
    '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 WeightedL2 — 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 WeightedL2 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
WeightedLoss Ran
ran on a synthesized input · constructed an object; no result was computed
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("31a6a65466c90f16")
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, WeightedLoss: 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)

# WeightedLoss uses:
# - self.weights: a buffer tensor used in forward pass
# - self.action_dim: an integer used to slice tensors

# For forward(), it expects:
# - pred, targ: tensors of shape [batch_size x horizon x transition_dim]
# - loss computation happens in self._loss() which we don't have, but that's okay
# - weights are indexed as self.weights[0, :self.action_dim]

# Set up dimensions distinctly:
batch_size = 2
horizon = 5
transition_dim = 4
action_dim = 3

# Create weights tensor: [horizon x transition_dim]
weights = torch.ones(horizon, transition_dim)

ARGS = {
    'weights': weights,
    '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 WeightedLoss — 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 WeightedLoss 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
add_deltas Ran
ran; our contract draft was wrong, not the code
tinnerhrhe/MTDiff/diffuser/datasets/preprocessing.py
code served (permissive licence) · get_code("5347209028588046")
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 function. 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 numpy as np

torch.manual_seed(0)

# Create a mock environment (can be None or a minimal object since it's not used in _fn)
class MockEnv:
    pass

env = MockEnv()

# Create a dataset dict with 'observations' and 'next_observations' keys
# The function computes deltas = next_observations - observations
observations = torch.randn(2, 4)  # batch_size=2, dim=4
next_observations = torch.randn(2, 4)  # same shape

dataset = {
    'observations': observations,
    'next_observations': next_observations
}

ARGS = {
    'env': env
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
atleast_2d Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/datasets/buffer.py
code served (permissive licence) · get_code("785632d29b87adad")
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 ndarray, ndim 2, dtype family int, shape (4, 1) 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 numpy as np

# Test case 1: 1D array - should expand to 2D
x_1d = np.array([1, 2, 3, 4])

# Test case 2: 2D array - should remain unchanged
x_2d = np.array([[1, 2, 3], [4, 5, 6]])

# Test case 3: 0D array (scalar) - should expand twice to 2D
x_0d = np.array(42)

# Test case 4: 3D array - should remain unchanged (already >= 2D)
x_3d = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])

# Use the 1D case as the primary test
ARGS = {
    "x": x_1d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 1) — shape (4, 1) 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
atleast_2d Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/datasets/normalization.py
code served (permissive licence) · get_code("3ca83b3e96824f00")
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 Tensor, ndim 2, dtype family float, shape (4, 1) 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)

# The function atleast_2d takes a tensor x and checks its ndim.
# If ndim < 2, it adds a dimension using x[:, None].
# We need to test both cases: 1D and 2D+ tensors.

# Test case: 1D tensor (will be expanded to 2D)
x_1d = torch.randn(4)

ARGS = {
    "x": x_1d
}
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 Tensor, ndim 2, dtype family float, shape (4, 1) — shape (4, 1) 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
cosine_beta_schedule Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/models/helpers.py
code served (permissive licence) · get_code("b6113e0f43155a33")
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 Tensor, ndim 1, dtype family float, shape (10,) 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 numpy as np
import torch

torch.manual_seed(0)

ARGS = {
    "timesteps": 10,
    "s": 0.008,
    "dtype": torch.float32,
}
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 Tensor, ndim 1, dtype family float, shape (10,) — shape (10,) 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
default_sample_fn Ran
ran; our contract draft was wrong, not the code
tinnerhrhe/MTDiff/diffuser/models/diffusion.py
code served (permissive licence) · get_code("8d04d499d75080d0")
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 torch.nn as nn

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def p_mean_variance(self, x, cond, task, value, context_mask, t):
        # Returns (model_mean, model_variance, model_log_variance)
        # model_mean should have same shape as x
        model_mean = self.linear(x)
        model_log_variance = torch.zeros_like(x)
        model_variance = torch.exp(model_log_variance)
        return model_mean, model_variance, model_log_variance

# Create tensors with distinct dimensions
batch_size = 2
feature_dim = 4
cond_dim = 3
context_len = 5

model = MockModel()
x = torch.randn(batch_size, feature_dim)
cond = torch.randn(batch_size, cond_dim)
task = torch.randn(batch_size, 2)
value = torch.randn(batch_size, 1)
context_mask = torch.randn(batch_size, context_len)
t = torch.randint(0, 10, (batch_size,))

ARGS = {
    'model': model,
    'x': x,
    'cond': cond,
    'task': task,
    'value': value,
    'context_mask': context_mask,
    't': t,
    'sample_kwargs': {}
}
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 — 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
empirical_cdf Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/datasets/normalization.py
code served (permissive licence) · get_code("2fd70118265255f8")
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 2, 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 numpy as np

# The function takes a 'sample' parameter which should be a numpy array or array-like object
# It calls np.unique() on it, which requires an array-like input
# It also accesses sample.size, which is a numpy array attribute

# Create a small sample array with some repeated values to make the test meaningful
sample = np.array([1.0, 2.0, 2.0, 3.0, 3.0, 3.0, 4.0])

ARGS = {
    "sample": sample
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
flatten Ran
ran; our contract draft was wrong, not the code
tinnerhrhe/MTDiff/diffuser/datasets/normalization.py
code served (permissive licence) · get_code("505d6b06c543b4fb")
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 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 numpy as np

# Create a small dataset with n_episodes=2, max_path_length=5, dim=4
# The dataset is a dict with keys mapping to arrays of shape [n_episodes, max_path_length, dim]
n_episodes = 2
max_path_length = 5
dim = 4

dataset = {
    "observations": np.random.randn(n_episodes, max_path_length, dim),
    "actions": np.random.randn(n_episodes, max_path_length, dim),
    "rewards": np.random.randn(n_episodes, max_path_length, 3),
}

# path_lengths specifies the actual length of each episode
# Must have length equal to n_episodes
path_lengths = [3, 4]

ARGS = {
    "dataset": dataset,
    "path_lengths": path_lengths,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
get_prompt Ran
ran on a synthesized input
tinnerhrhe/MTDiff/diffuser/models/temporal.py
code served (permissive licence) · get_code("5321d9d86ff019c1")
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 ndarray, ndim 2, dtype family float, shape (20, 7) 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 numpy as np

np.random.seed(0)

# Create mock trajectories
# Each trajectory needs 'observations' and 'actions' keys
# observations shape: (total_steps, obs_dim)
# actions shape: (total_steps, action_dim)

trajectories = []
for _ in range(5):
    trajectory = {
        'observations': np.random.randn(1100, 4),  # 1100 timesteps, 4-dim observations
        'actions': np.random.randn(1100, 3)        # 1100 timesteps, 3-dim actions
    }
    trajectories.append(trajectory)

ARGS = {
    'trajectories': trajectories,
    'num_episodes': 2,
    'num_steps': 10,
    'is_meta': False,
    'is_maze': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (20, 7) — shape (20, 7) 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
get_prompt_batchs Ran
ran on a synthesized input
tinnerhrhe/MTDiff/diffuser/models/temporal.py
code served (permissive licence) · get_code("6c4cc9bc7e5e5859")
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 Tensor, ndim 3, dtype family float, shape (3, 40, 7) 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
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create mock trajectory data
# Each trajectory needs 'observations' and 'actions' keys
# We need enough data to support sampling from T_start to T_end - num_steps

def create_mock_trajectory(obs_dim=4, action_dim=3, length=1010):
    """Create a single mock trajectory with observations and actions"""
    return {
        'observations': np.random.randn(length, obs_dim).astype(np.float32),
        'actions': np.random.randn(length, action_dim).astype(np.float32)
    }

# Create prompt_trajectories - a list of lists of trajectories
# The outer list is indexed by 'ind' in cond
# Each inner list contains multiple trajectories to sample from
num_trajectory_sets = 3
trajectories_per_set = 5

prompt_trajectories = [
    [create_mock_trajectory(obs_dim=4, action_dim=3, length=1010) 
     for _ in range(trajectories_per_set)]
    for _ in range(num_trajectory_sets)
]

# Create condition tensor - indices into prompt_trajectories
cond = torch.tensor([0, 1, 2], dtype=torch.long)

ARGS = {
    'prompt_trajectories': prompt_trajectories,
    'cond': cond,
    'num_episodes': 2,
    'num_steps': 20,
    'is_meta': True
}
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 Tensor, ndim 3, dtype family float, shape (3, 40, 7) — shape (3, 40, 7) 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
load_environment Ran
ran; our contract draft was wrong, not the code
tinnerhrhe/MTDiff/diffuser/datasets/d4rl.py
pointer only (licence: MIT); the stored copy get_code serves, from dbsxodud-11/gtg, is pointer only (licence: NONE) · get_code("69e493e37778664c")
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 dbsxodud-11/gtg, 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.

make_timesteps Ran
ran, honoured the contract we drafted
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("51db163798eb0f5e")
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 Tensor, ndim 1, dtype family int, shape (2,) 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)

ARGS = {
    "batch_size": 2,
    "i": 5,
    "device": torch.device("cpu"),
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) 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
parse_maze Ran
ran on a synthesized input
tinnerhrhe/MTDiff/diffuser/utils/arrays.py
code served (permissive licence) · get_code("80cbf0ec77b1d134")
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 ndarray, ndim 1, dtype family int, shape (5,) 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 numpy as np

def construct_maze_string():
    # The function expects a maze_str with the following format:
    # - Split by '\' to get lines
    # - width = len(lines) - 2
    # - height = len(lines[0]) - 2
    # - Each tile at lines[w+1][h+1] can be '#', 'G', ' ', 'O', or '0'
    
    # Let's create a simple 3x2 maze (width=3, height=2)
    # This means we need 5 lines (3+2), each with 4 characters (2+2)
    lines = [
        "####",
        "#G #",
        "# O#",
        "#  #",
        "####"
    ]
    maze_str = "\\".join(lines)
    return maze_str

ARGS = {
    "maze_str": construct_maze_string()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (5,) — shape (5,) 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
sort_by_values Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/models/diffusion.py
code served (permissive licence) · get_code("c409be426eec3eec")
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

torch.manual_seed(0)

# Create small tensors for testing
x = torch.randn(2, 4)  # batch_size=2, feature_dim=4
values = torch.tensor([3.5, 1.2])  # 2 values corresponding to batch items

ARGS = {
    "x": x,
    "values": values,
}
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 — 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
to_np Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/utils/arrays.py
pointer only (licence: MIT); the stored copy get_code serves, from rlatjddbs/SSD, is pointer only (licence: NONE) · get_code("0e8d8251e66ab160")
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 rlatjddbs/SSD, 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.

to_torch Ran
ran; our contract draft was wrong, not the code
tinnerhrhe/MTDiff/diffuser/utils/arrays.py
code served (permissive licence) · get_code("134173215340e0d1")
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 dict. 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 numpy as np

torch.manual_seed(0)

# Test case 1: Test with a list (will be converted to tensor)
x_list = [1.0, 2.0, 3.0, 4.0]

# Test case 2: Test with a numpy array
x_numpy = np.array([[1.0, 2.0], [3.0, 4.0]])

# Test case 3: Test with a tensor
x_tensor = torch.randn(2, 4)

# Test case 4: Test with a dict containing mixed types
x_dict = {
    'tensor': torch.randn(2, 4),
    'list': [1.0, 2.0, 3.0],
    'nested_dict': {
        'inner_tensor': torch.randn(2, 3)
    }
}

# Use the dict case as primary argument since it exercises the most code paths
ARGS = {
    'x': x_dict,
    'dtype': torch.float32,
    'device': 'cpu'
}
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 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
vp_beta_schedule Ran
ran, honoured the contract we drafted
tinnerhrhe/MTDiff/diffuser/models/helpers.py
code served (permissive licence) · get_code("47c7ce0ace6e7c47")
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 Tensor, ndim 1, dtype family float, shape (10,) 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 numpy as np
import torch

torch.manual_seed(0)

ARGS = {
    "timesteps": 10,
    "dtype": torch.float32,
}
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 Tensor, ndim 1, dtype family float, shape (10,) — shape (10,) 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
GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("b647fa958c28b7a0")
How it ran

no invocation recorded.

ValueL1 Not yet run
unverified (harvested, no recorded run)
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("15f5f25cbe9d72e0")
How it ran

no invocation recorded.

ValueL2 Not yet run
unverified (harvested, no recorded run)
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("4b9ad2741a65b9b0")
How it ran

no invocation recorded.

ValueLoss Not yet run
unverified (harvested, no recorded run)
jannerm/diffuser/diffuser/models/diffusion.py
code served (permissive licence) · get_code("2033d022f4c21dd8")
How it ran

no invocation recorded.

extract Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/models/helpers.py
code served (permissive licence) · get_code("09c8479d9a5b3e06")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/datasets/d4rl.py
pointer only (licence: MIT); the stored copy get_code serves, from dbsxodud-11/gtg, is pointer only (licence: NONE) · get_code("6b688f0cd038f65e")
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 dbsxodud-11/gtg, 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. No invocation recorded.

get_policy_preprocess_fn Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/datasets/preprocessing.py
code served (permissive licence) · get_code("65e5c27060559602")
How it ran

no invocation recorded.

get_preprocess_fn Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/datasets/preprocessing.py
code served (permissive licence) · get_code("54442074c20e0e8f")
How it ran

no invocation recorded.

get_prompt_batch Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/models/temporal.py
code served (permissive licence) · get_code("27c640b42f4e6a73")
How it ran

no invocation recorded.

load_episode Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/datasets/d4rl.py
code served (permissive licence) · get_code("bb6694e97ebbdbb5")
How it ran

no invocation recorded.

load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
tinnerhrhe/MTDiff/diffuser/models/GPT2.py
pointer only (licence: MIT); the stored copy get_code serves, from tencentarc/moto, is pointer only (licence: NOASSERTION) · get_code("00a33466c69c5705")
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 tencentarc/moto, and GitHub could not classify the licence of that repository (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 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 distinct functions with an identity, 24 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 3 the same month, 24 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
extract
brick of this paper's assembly: helper
77 other papers
20 dated earlier, 2 the same month, 55 later · 32 only as an assembly brick
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
and 74 more not named here
load_tf_weights_in_gpt2 22 other papers
7 dated earlier, 2 the same month, 13 later
2106.01345 (2021-06)
Decision Transformer: Reinforcement Learning via Sequence Modeling
2110.06206 (2021-10)
StARformer: Transformer with State-Action-Reward Representations for Visual Reinforcement Learning
2202.11705 (2022-02)
COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics
and 19 more not named here
cosine_beta_schedule
brick of this paper's assembly: helper
20 other papers
3 dated earlier, 1 the same month, 16 later · 8 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2303.14676 (2023-03)
PDPP: Projected Diffusion for Procedure Planning in Instructional Videos
and 17 more not named here
WeightedL1
brick of this paper's assembly: helper
8 other papers
2 dated earlier, 6 later · 2 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2309.16984 (2023-09)
Consistency Models as a Rich and Efficient Policy Class for Reinforcement Learning
and 5 more not named here
WeightedL2
brick of this paper's assembly: helper
8 other papers
2 dated earlier, 6 later · 2 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2309.16984 (2023-09)
Consistency Models as a Rich and Efficient Policy Class for Reinforcement Learning
and 5 more not named here
vp_beta_schedule 6 other papers
1 dated earlier, 5 later · 5 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2310.05333 (2023-10)
DiffCPS: Diffusion-based Constrained Policy Search for Offline Reinforcement Learning
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
and 3 more not named here
sort_by_values
brick of this paper's assembly: helper
4 other papers
4 later · 1 only as an assembly brick
2312.08533 (2023-12)
World Models via Policy-Guided Trajectory Diffusion
2402.14407 (2024-02)
Learning an Actionable Discrete Diffusion Policy via Large-Scale Actionless Video Pre-Training
2405.04235 (2024-05)
LTLDoG: Satisfying Temporally-Extended Symbolic Constraints for Safe Diffusion-based Planning
and 1 more not named here
atleast_2d 3 other papers
3 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2407.01624 (2024-07)
Guided Trajectory Generation with Diffusion Models for Offline Model-based Optimization
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
make_timesteps
brick of this paper's assembly: scheduler
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2312.08533 (2023-12)
World Models via Policy-Guided Trajectory Diffusion
2402.14407 (2024-02)
Learning an Actionable Discrete Diffusion Policy via Large-Scale Actionless Video Pre-Training
ValueL1
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
2402.14407 (2024-02)
Learning an Actionable Discrete Diffusion Policy via Large-Scale Actionless Video Pre-Training
ValueL2
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
2402.14407 (2024-02)
Learning an Actionable Discrete Diffusion Policy via Large-Scale Actionless Video Pre-Training
ValueLoss
brick of this paper's assembly: helper
2 other papers
2 later · 1 only as an assembly brick
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
2402.14407 (2024-02)
Learning an Actionable Discrete Diffusion Policy via Large-Scale Actionless Video Pre-Training
add_deltas 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
atleast_2d 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
empirical_cdf 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
flatten 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
get_dataset 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2407.01624 (2024-07)
Guided Trajectory Generation with Diffusion Models for Offline Model-based Optimization
get_policy_preprocess_fn 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
get_preprocess_fn 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2412.09342 (2024-12)
Diffusion Predictive Control with Constraints
load_environment 2 other papers
2 later
2405.14790 (2024-05)
DIDI: Diffusion-Guided Diversity for Offline Behavioral Generation
2407.01624 (2024-07)
Guided Trajectory Generation with Diffusion Models for Offline Model-based Optimization

Shown: the 20 functions present in the most other papers. 4 more shared functions are not listed here.

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

Diffusion models have demonstrated highly-expressive generative capabilities in vision and NLP. Recent studies in reinforcement learning (RL) have shown that diffusion models are also powerful in modeling complex policies or trajectories in offline datasets. However, these works have been limited to single-task settings where a generalist agent capable of addressing multi-task predicaments is absent. In this paper, we aim to investigate the effectiveness of a single diffusion model in modeling large-scale multi-task offline data, which can be challenging due to diverse and multimodal data distribution. Specifically, we propose Multi-Task Diffusion Model (MTDIFF), a diffusion-based method that incorporates Transformer backbones and prompt learning for generative planning and data synthesis in multitask offline settings. MTDIFF leverages vast amounts of knowledge available in multi-task data and performs implicit knowledge sharing among tasks. For generative planning, we find MTDIFF outperforms state-of-the-art algorithms across 50 tasks on Meta-World and 8 maps on Maze2D. For data synthesis, MTDIFF generates high-quality data for testing tasks given a single demonstration as a prompt, which enhances the low-quality datasets for even unseen tasks.

For agents

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

get_harvested_code_for_paper("2305.18459")
get_code_for_paper("2305.18459")
have("2305.18459")

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

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

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

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

Connect an agent — have() is free.