SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.20587 · 2023

Unleashing the Power of Pre-trained Language Models for Offline Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 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-21; 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/2310.20587.json · badge: /api/ran/2310.20587.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
srzer/LaMo-2023 canonical (classifier label)
classifier basis: census
7 ran · 2 no recorded run
FunctionStatusWhere it lives
discount_cumsum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
srzer/LaMo-2023/experiment-d4rl/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.

cnn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
srzer/LaMo-2023/experiment-atari/model.py
code served (permissive licence) · get_code("a7275f13d13af4f4")
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 Sequential. 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 math

torch.manual_seed(0)

ARGS = {
    "input_shape": (8, 8),
    "input_channel": 3,
    "hidden_channels": [16, 32],
    "kernel_sizes": [3, 3],
    "strides": [1, 1],
    "paddings": [1, 1],
    "hidden_dim": 64,
    "output_activation": nn.Identity()
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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_cnn_output_dim Ran
ran, honoured the contract we drafted
srzer/LaMo-2023/experiment-atari/model.py
code served (permissive licence) · get_code("46b2ccb71f183c99")
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 int, ndim 0, dtype family int, 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 math

def get_cnn_output_dim(input_size, kernel_size, stride, padding):
    return math.floor((input_size - kernel_size + 2 * padding) / stride + 1)

ARGS = {
    "input_size": 28,
    "kernel_size": 5,
    "stride": 1,
    "padding": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_log_dict Ran
ran; our contract draft was wrong, not the code
srzer/LaMo-2023/experiment-atari/utils.py
code served (permissive licence) · get_code("c2615640a56197af")
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 DictProxy. 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
from multiprocessing import Manager

torch.manual_seed(0)

# Create a multiprocessing manager for the case when manager is not None
mp_manager = Manager()

# Build arguments for get_log_dict
ARGS = {
    "manager": mp_manager,
    "num_seeds": 3
}
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 DictProxy — a DictProxy output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DictProxy output the recorded ndim 1 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_normalized_score Ran
ran, honoured the contract we drafted
srzer/LaMo-2023/experiment-atari/get_hns.py
code served (permissive licence) · get_code("14c863708fff6f5b")
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 float, 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
import numpy as np

game_list = ['alien', 'amidar', 'assault', 'asterix', 'asteroids', 'atlantis', 'bank_heist', 'battle_zone', 'beam_rider', 'bowling', 'boxing', 'breakout', 'centipede', 'chopper_command', 'crazy_climber', 'demon_attack', 'double_dunk', 'enduro', 'fishing_derby', 'freeway', 'frostbite', 'gopher', 'gravitar', 'hero', 'ice_hockey', 'james_bond', 'kangaroo', 'krull', 'kung_fu_master', 'montezuma_revenge', 'ms_pacman', 'name_this_game', 'pong', 'private_eye', 'qbert', 'river_raid', 'road_runner', 'robotank', 'seaquest', 'space_invaders', 'star_gunner', 'tennis', 'time_pilot', 'tutankham', 'up_n_down', 'venture', 'video_pinball', 'wizard_of_wor', 'zaxxon']

random_score_list = [227.8, 5.8, 222.4, 210.0, 719.1, 12850.0, 14.2, 2360.0, 363.9, 23.1, 0.1, 1.7, 2090.9, 811.0, 10780.5, 152.1, -18.6, 0.0, -91.7, 0.0, 65.2, 257.6, 173.0, 1027.0, -11.2, 29.0, 52.0, 1598.0, 258.5, 0.0, 307.3, 2292.3, -20.7, 24.9, 163.9, 1338.5, 11.5, 2.2, 68.4, 148.0, 664.0, -23.8, 3568.0, 11.4, 533.4, 0.0, 16256.9, 563.5, 32.5]

human_score_list = [6875.4, 1675.8, 1496.4, 8503.3, 13156.7, 29028.1, 734.4, 37800.0, 5774.7, 154.8, 4.3, 31.8, 11963.2, 9881.8, 35410.5, 3401.3, -15.5, 309.6, 5.5, 29.6, 4334.7, 2321.0, 2672.0, 25762.5, 0.9, 406.7, 3035.0, 2394.6, 22736.2, 4366.7, 15693.4, 4076.2, 9.3, 69571.3, 13455.0, 13513.3, 7845.0, 11.9, 20181.8, 1652.3, 10250.0, -8.9, 5925.0, 167.6, 9082.0, 1187.5, 17297.6, 4756.5, 9173.3]

def get_normalized_score(env_name, returns):
    random_score = random_score_list[game_list.index(env_name)]
    human_score = human_score_list[game_list.index(env_name)]
    return (returns - random_score) / (human_score - random_score)

ARGS = {
    'env_name': 'breakout',
    'returns': 1000.0
}
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 float, 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
get_optimizer Ran
ran; our contract draft was wrong, not the code
srzer/LaMo-2023/experiment-d4rl/utils.py
code served (permissive licence) · get_code("d2a121da9fc696b6")
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 AdamW. 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
from torch import optim
from itertools import chain

torch.manual_seed(0)

class DummyTransformer(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class DummyOtherModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear(x)

class DummyModel(nn.Module):
    def __init__(self, pretrained=True):
        super().__init__()
        if pretrained:
            self.transformer = DummyTransformer()
        self.other = DummyOtherModule()
    
    def forward(self, x):
        if hasattr(self, 'transformer'):
            x = self.transformer(x)
        x = self.other(x)
        return x

model_with_pretrained = DummyModel(pretrained=True)
model_without_pretrained = DummyModel(pretrained=False)

ARGS = {
    'args': {
        'pretrained_lm': True,
        'lm_learning_rate': 1e-5,
        'learning_rate': 1e-4,
        'weight_decay': 0.01
    },
    'model': model_with_pretrained
}
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 AdamW — a AdamW output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AdamW 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_space_shape Ran
ran, honoured the contract we drafted
srzer/LaMo-2023/experiment-atari/utils.py
code served (permissive licence) · get_code("c89110bdadd7372d")
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 int, ndim 0, dtype family int, 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 gym
from gym.spaces import MultiDiscrete, Discrete, Box, Tuple

# Test case 1: Discrete space
space_discrete = Discrete(n=5)

# Test case 2: MultiDiscrete space
space_multidiscrete = MultiDiscrete(nvec=[3, 4, 5])

# Test case 3: Box space (1D)
space_box_1d = Box(low=0, high=1, shape=(10,), dtype='float32')

# Test case 4: Box space (2D)
space_box_2d = Box(low=0, high=1, shape=(4, 3), dtype='float32')

# Test case 5: Box space with vector env (batch dimension)
space_box_vector = Box(low=0, high=1, shape=(2, 4, 3), dtype='float32')

# Test case 6: Tuple space
space_tuple = Tuple((
    Box(low=0, high=1, shape=(5,), dtype='float32'),
    Box(low=0, high=1, shape=(3,), dtype='float32')
))

# Create ARGS dict with different test cases
ARGS = {
    "space": space_discrete,
    "is_vector_env": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_custom_gpt2_model Not yet run
unverified (harvested, no recorded run)
srzer/LaMo-2023/experiment-atari/get_custom_gpt2.py
code served (permissive licence) · get_code("08d865dc3288a3fc")
How it ran

no invocation recorded.

get_dataset Not yet run
unverified (harvested, no recorded run)
srzer/LaMo-2023/experiment-atari/get_nlp_datasets.py
code served (permissive licence) · get_code("a42366e534210e01")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 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
11 dated earlier, 6 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
cnn 1 other paper
1 dated earlier
2303.03391 (2023-03)
Decision Transformer under Random Frame Dropping
get_cnn_output_dim 1 other paper
1 dated earlier
2303.03391 (2023-03)
Decision Transformer under Random Frame Dropping

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

Repositories linked to this paper

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

Abstract

Offline reinforcement learning (RL) aims to find a near-optimal policy using pre-collected datasets. In real-world scenarios, data collection could be costly and risky; therefore, offline RL becomes particularly challenging when the in-domain data is limited. Given recent advances in Large Language Models (LLMs) and their few-shot learning prowess, this paper introduces $\textbf{La}$nguage Models for $\textbf{Mo}$tion Control ($\textbf{LaMo}$), a general framework based on Decision Transformers to effectively use pre-trained Language Models (LMs) for offline RL. Our framework highlights four crucial components: (1) Initializing Decision Transformers with sequentially pre-trained LMs, (2) employing the LoRA fine-tuning method, in contrast to full-weight fine-tuning, to combine the pre-trained knowledge from LMs and in-domain knowledge effectively, (3) using the non-linear MLP transformation instead of linear projections, to generate embeddings, and (4) integrating an auxiliary language prediction loss during fine-tuning to stabilize the LMs and retain their original abilities on languages. Empirical results indicate $\textbf{LaMo}$ achieves excellent performance in sparse-reward tasks and closes the gap between value-based offline RL methods and decision transformers in dense-reward tasks. In particular, our method demonstrates superior performance in scenarios with limited data samples.

For agents

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

get_harvested_code_for_paper("2310.20587")
get_code_for_paper("2310.20587")
have("2310.20587")

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

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

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

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

Connect an agent — have() is free.