SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.01079 · 2022

When does return-conditioned supervised learning work for offline reinforcement learning?

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 5 have no contract verdict; 2 failures 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/2206.01079.json · badge: /api/ran/2206.01079.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
davidbrandfonbrener/rcsl-paper 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)
davidbrandfonbrener/rcsl-paper/decision-transformer/gym/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.

collect_traj Ran
ran on a synthesized input
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/jaxrl/rvs_evaluation.py
code served (permissive licence) · get_code("fcd39de94f7cd1ea")
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 numpy as np

class SimpleEnv:
    """Minimal environment for testing collect_traj"""
    def __init__(self):
        self.obs_shape = (4,)
        self.step_count = 0
    
    def reset(self):
        self.step_count = 0
        return np.random.randn(*self.obs_shape).astype(np.float32)
    
    def step(self, action):
        self.step_count += 1
        observation = np.random.randn(*self.obs_shape).astype(np.float32)
        reward = float(np.random.randn())
        done = self.step_count >= 3
        info = {}
        return observation, reward, done, info


class SimpleAgent:
    """Minimal agent for testing collect_traj"""
    def sample_actions(self, observation, eval_return=None):
        # observation has shape (batch_size, obs_dim)
        # Return action with shape (batch_size, action_dim)
        batch_size = observation.shape[0]
        action_dim = 2
        return np.random.randn(batch_size, action_dim).astype(np.float32)


env = SimpleEnv()
agent = SimpleAgent()
eval_ret = 10.5
subtract_return = False

ARGS = {
    "env": env,
    "agent": agent,
    "eval_ret": eval_ret,
    "subtract_return": subtract_return
}
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 — 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
default_init Ran
ran; our contract draft was wrong, not the code
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/jaxrl/networks/common.py
code served (permissive licence) · get_code("facdc73f9b000275")
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 jax
import jax.numpy as jnp
import flax.linen as nn

# The function default_init takes one parameter: scale
# It returns an initializer function from flax.linen.initializers.orthogonal
# The scale parameter is optional and defaults to jnp.sqrt(2)

# We need to provide a value for scale
# Valid options include:
# 1. None (to use the default jnp.sqrt(2))
# 2. A float value
# 3. A jnp array scalar

ARGS = {
    "scale": 1.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax — 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
evaluate Ran
ran on a synthesized input
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/jaxrl/evaluation.py
code served (permissive licence) · get_code("79152be87460ca81")
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 gym
import numpy as np

# Create a minimal agent that has a sample_actions method
class MinimalAgent:
    def sample_actions(self, observation, temperature=0.0):
        # Return a single action (could be int or array depending on env)
        # For CartPole, action is an int
        return 0

# Create a minimal environment
class MinimalEnv(gym.Env):
    def __init__(self):
        self.observation_space = gym.spaces.Box(low=-1, high=1, shape=(4,), dtype=np.float32)
        self.action_space = gym.spaces.Discrete(2)
        self.step_count = 0
    
    def reset(self):
        self.step_count = 0
        return np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
    
    def step(self, action):
        self.step_count += 1
        observation = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
        reward = 1.0
        done = self.step_count >= 5
        info = {
            'episode': {
                'return': 5.0,
                'length': 5
            },
            'is_success': 1.0
        }
        return observation, reward, done, info

agent = MinimalAgent()
env = MinimalEnv()
num_episodes = 2

ARGS = {
    'agent': agent,
    'env': env,
    'num_episodes': num_episodes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, 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
evaluate Ran
ran on a synthesized input
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/jaxrl/rvs_evaluation.py
code served (permissive licence) · get_code("95424c4d978c1af3")
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 gym
import numpy as np
from time import time

class SimpleAgent:
    """Minimal agent that implements sample_actions method"""
    def sample_actions(self, observation, eval_return):
        # observation shape: (batch_size, obs_dim)
        # eval_return shape: (1, 1)
        # return action of shape (batch_size,) or similar
        batch_size = observation.shape[0]
        return np.array([0] * batch_size)

class SimpleEnv(gym.Env):
    """Minimal gym environment for testing"""
    def __init__(self):
        self.observation_space = gym.spaces.Box(low=-1, high=1, shape=(4,), dtype=np.float32)
        self.action_space = gym.spaces.Discrete(2)
        self.step_count = 0
        self.max_steps = 5
    
    def reset(self):
        self.step_count = 0
        return np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
    
    def step(self, action):
        self.step_count += 1
        observation = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float32)
        reward = 1.0
        done = self.step_count >= self.max_steps
        info = {
            'episode': {
                'return': float(self.step_count),
                'length': self.step_count
            }
        }
        return observation, reward, done, info

agent = SimpleAgent()
env = SimpleEnv()
eval_outcome = 10.0
num_episodes = 2
subtract_return = False

ARGS = {
    'agent': agent,
    'env': env,
    'eval_outcome': eval_outcome,
    'num_episodes': num_episodes,
    'subtract_return': subtract_return
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, 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
generate_name Ran
ran on a synthesized input
davidbrandfonbrener/rcsl-paper/decision-transformer/gym/utils.py
code served (permissive licence) · get_code("7aa880299f960110")
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

torch.manual_seed(0)

# The function generate_name takes a config parameter and uses:
# - config.keys() method
# - dictionary access with 'dataset' key
# - config[k] to retrieve values

# Construct a valid config dict
config = {
    'dataset': 'cifar10'
}

ARGS = {
    'config': config
}
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_values Ran
ran on a synthesized input
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/jaxrl/networks/rvs_critics.py
code served (permissive licence) · get_code("37e948f523448090")
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 ArrayImpl, ndim 2, dtype family float, shape (2, 4) 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 functools
import jax
import jax.numpy as jnp

# Create a simple apply function that works with JAX
def dummy_apply_fn(params_dict, observations):
    """Simple apply function that takes params dict and observations."""
    params = params_dict['params']
    # Simple linear transformation: observations @ params
    return jnp.dot(observations, params)

# Create dummy parameters
params = jnp.array([[1.0, 2.0, 3.0, 4.0],
                     [5.0, 6.0, 7.0, 8.0],
                     [9.0, 10.0, 11.0, 12.0]])

# Create dummy observations (batch_size=2, input_dim=3)
observations = jnp.array([[1.0, 2.0, 3.0],
                           [4.0, 5.0, 6.0]])

ARGS = {
    'apply_fn': dummy_apply_fn,
    'params': params,
    'observations': observations,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
generate_name Not yet run
unverified (harvested, no recorded run)
davidbrandfonbrener/rcsl-paper/jax_continuous_rl/experiments/utils.py
code served (permissive licence) · get_code("92258e3c17078ed0")
How it ran

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, 1 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
4 dated earlier, 1 the same month, 12 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
default_init 8 other papers
2 dated earlier, 6 later
1812.05905 (2018-12)
Soft Actor-Critic Algorithms and Applications
2106.03273 (2021-06)
Control-Oriented Model-Based Reinforcement Learning with Implicit Differentiation
2301.12842 (2023-01)
Direct Preference-based Policy Optimization without Reward Modeling
and 5 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

Several recent works have proposed a class of algorithms for the offline reinforcement learning (RL) problem that we will refer to as return-conditioned supervised learning (RCSL). RCSL algorithms learn the distribution of actions conditioned on both the state and the return of the trajectory. Then they define a policy by conditioning on achieving high return. In this paper, we provide a rigorous study of the capabilities and limitations of RCSL, something which is crucially missing in previous work. We find that RCSL returns the optimal policy under a set of assumptions that are stronger than those needed for the more traditional dynamic programming-based algorithms. We provide specific examples of MDPs and datasets that illustrate the necessity of these assumptions and the limits of RCSL. Finally, we present empirical evidence that these limitations will also cause issues in practice by providing illustrative experiments in simple point-mass environments and on datasets from the D4RL benchmark.

For agents

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

get_harvested_code_for_paper("2206.01079")
get_code_for_paper("2206.01079")
have("2206.01079")

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

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

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

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

Connect an agent — have() is free.