SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.07551 · 2023

Merging Decision Transformers: Weight Averaging for Forming Multi-Task Policies

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 1 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/2303.07551.json · badge: /api/ran/2303.07551.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
daniellawson9999/merging-decision-transformers canonical (classifier label)
classifier basis: plan_row
7 ran · 1 no recorded run
FunctionStatusWhere it lives
discount_cumsum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
daniellawson9999/merging-decision-transformers/decision-transformer/experiment.py
pointer only (licence: MIT); the stored copy get_code serves, from bkkgbkjb/oppo, is pointer only (licence: NONE) · get_code("0161b27cbe3cc58d")
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 bkkgbkjb/oppo, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_action Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/dt_utils.py
code served (permissive licence) · get_code("ce4536d70d1e91b4")
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 (3,) 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal config class
class Config:
    def __init__(self):
        self.state_dim = 4
        self.act_dim = 3
        self.max_length = 5

# Create a minimal model that satisfies the function's usage
class MinimalModel(nn.Module):
    def __init__(self, config):
        super().__init__()
        self.config = config
        # Dummy linear layers to process inputs
        self.state_encoder = nn.Linear(config.state_dim, 8)
        self.action_encoder = nn.Linear(config.act_dim, 8)
        self.output_layer = nn.Linear(8, config.act_dim)
    
    def forward(self, states, actions, rewards, returns_to_go, timesteps, attention_mask=None, return_dict=False):
        # Minimal forward pass that returns three values as expected
        batch_size = states.shape[0]
        seq_len = states.shape[1]
        
        # Create dummy outputs matching expected shapes
        state_preds = torch.randn(batch_size, seq_len, self.config.state_dim)
        action_preds = torch.randn(batch_size, seq_len, self.config.act_dim)
        reward_preds = torch.randn(batch_size, seq_len, 1)
        
        return state_preds, action_preds, reward_preds

# Instantiate the model
config = Config()
model = MinimalModel(config)

# Create valid input tensors
# Using seq_len=3 (which is less than max_length=5)
seq_len = 3
states = torch.randn(seq_len, config.state_dim)
actions = torch.randn(seq_len, config.act_dim)
rewards = torch.randn(seq_len, 1)
returns_to_go = torch.randn(seq_len, 1)
timesteps = torch.arange(seq_len, dtype=torch.long)

ARGS = {
    "model": model,
    "states": states,
    "actions": actions,
    "rewards": rewards,
    "returns_to_go": returns_to_go,
    "timesteps": timesteps,
}
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 float, shape (3,) — shape (3,) 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_dataset Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/experiment_multi.py
code served (permissive licence) · get_code("e0ebd221e411b411")
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 str. 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

def get_dataset(model_name):
    split_name = model_name.split('-')
    dataset = split_name[3:-1]
    if len(dataset) > 1:
        dataset = '-'.join(dataset)
    else:
        dataset = dataset[0]
    return dataset

ARGS = {
    'model_name': 'bert-base-uncased-dataset1-extra'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_name_dataset Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/mergeff_tripple.py
code served (permissive licence) · get_code("731fbc6e43e42ea6")
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

ARGS = {
    "model_name": "CartPole-v1-expert"
}
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
get_name_dataset Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/mergeff_tripple_fish.py
code served (permissive licence) · get_code("aea7fd58cf32ead3")
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

# The function get_name_dataset takes a model_name string and splits it
# to extract environment and dataset components.
# It uses: split(), indexing, len(), and join() on strings.

model_name = "CartPole-MuJoCo-v1"

ARGS = {
    "model_name": model_name
}
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
weight_average Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/dt_utils.py
code served (permissive licence) · get_code("287524513504e252")
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 SimpleModel. 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
import copy

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model_1 = SimpleModel()
model_2 = SimpleModel()

# Initialize model_2 with different weights
for param in model_2.parameters():
    param.data = param.data + torch.randn_like(param.data)

p = 0.5
include = None
exclude = None

ARGS = {
    "model_1": model_1,
    "model_2": model_2,
    "p": p,
    "include": include,
    "exclude": exclude
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
weight_average_multi Ran
ran on a synthesized input
daniellawson9999/merging-decision-transformers/decision-transformer/dt_utils.py
code served (permissive licence) · get_code("7e06a1bac726af66")
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 SimpleModel. 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
import copy

torch.manual_seed(0)

# Create two simple neural network models
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create three model instances with different parameters
model1 = SimpleModel()
model2 = SimpleModel()
model3 = SimpleModel()

# Modify model2 and model3 to have different weights so averaging makes sense
with torch.no_grad():
    for param in model2.parameters():
        param.add_(torch.randn_like(param) * 0.1)
    for param in model3.parameters():
        param.add_(torch.randn_like(param) * 0.1)

models = [model1, model2, model3]

# Define ARGS with different parameter combinations
ARGS = {
    "models": models,
    "include": None,
    "exclude": None,
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
load_tf_weights_in_gpt2 Not yet run
unverified (harvested, no recorded run)
daniellawson9999/merging-decision-transformers/decision-transformer/decision_transformer/models/trajectory_gpt2.py
pointer only (licence: MIT); the stored copy get_code serves, from ybseo-academy/TAALM, is pointer only (licence: NONE) · get_code("cb4e99dd4b50f69d")
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 ybseo-academy/TAALM, 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.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 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
discount_cumsum 17 other papers
8 dated earlier, 9 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
2111.10364 (2021-11)
Generalized Decision Transformer for Offline Hindsight Information Matching
and 14 more not named here
load_tf_weights_in_gpt2 11 other papers
4 dated earlier, 6 later, 1 same year, order not determinable
2206.11871 (2022-06)
Offline RL for Natural Language Generation with Implicit Language Q Learning
2211.09817 (2022-11)
On the Effect of Pre-training for Transformer in Different Modality on Offline Reinforcement Learning
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
and 8 more not named 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

Recent work has shown the promise of creating generalist, transformer-based, models for language, vision, and sequential decision-making problems. To create such models, we generally require centralized training objectives, data, and compute. It is of interest if we can more flexibly create generalist policies by merging together multiple, task-specific, individually trained policies. In this work, we take a preliminary step in this direction through merging, or averaging, subsets of Decision Transformers in parameter space trained on different MuJoCo locomotion problems, forming multi-task models without centralized training. We also demonstrate the importance of various methodological choices when merging policies, such as utilizing common pre-trained initializations, increasing model capacity, and utilizing Fisher information for weighting parameter importance. In general, we believe research in this direction could help democratize and distribute the process that forms multi-task robotics policies. Our implementation is available at https://github.com/daniellawson9999/merging-decision-transformers.

For agents

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

get_harvested_code_for_paper("2303.07551")
get_code_for_paper("2303.07551")
have("2303.07551")

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

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

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

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

Connect an agent — have() is free.