SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.12740 · 2022

Masked Autoencoding for Scalable and Generalizable Decision Making

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 5 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2211.12740.json · badge: /api/ran/2211.12740.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
fangchenliu/maskdp_public canonical (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
episode_len Ran
ran, honoured the contract we drafted
fangchenliu/maskdp_public/replay_buffer.py
code served (permissive licence) · get_code("9f840a22d31a89bc")
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 torch

torch.manual_seed(0)

# The function accesses episode.values() and calls .shape[0] on the result
# So episode should be a dict where values are tensors (or array-like with shape)
# The function returns shape[0] - 1, so we need at least 1 element in dimension 0

episode = {
    "observations": torch.randn(5, 4),
    "actions": torch.randn(5, 3),
    "rewards": torch.randn(5, 2),
}

ARGS = {
    "episode": episode
}
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 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_data_seed Ran
ran, honoured the contract we drafted
fangchenliu/maskdp_public/finetune_rl.py
code served (permissive licence) · get_code("70dca85dd02d2ba1")
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 torch

def get_data_seed(seed, num_data_seeds):
    return (seed - 1) % num_data_seeds + 1

ARGS = {
    "seed": 42,
    "num_data_seeds": 10,
}
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 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_dir Ran
ran on a synthesized input
fangchenliu/maskdp_public/finetune_rl.py
code served (permissive licence) · get_code("e66c36c3752c3cc0")
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 PosixPath. 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 pathlib import Path

class MockConfig:
    def __init__(self):
        self.snapshot_base_dir = "/tmp/snapshots"
        self.task = "point_mass_maze_v1"
        self.snapshot_ts = 42

cfg = MockConfig()

ARGS = {
    "cfg": cfg
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_dir Ran
ran on a synthesized input
fangchenliu/maskdp_public/eval_prompt.py
code served (permissive licence) · get_code("0301e8cc4db9d2e6")
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 PosixPath. 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 tempfile
from pathlib import Path

class Config:
    def __init__(self):
        self.snapshot_base_dir = tempfile.gettempdir()
        self.task = 'point_mass_maze_v1'
        self.seed = 42
        self.snapshot_ts = 1000

cfg = Config()

ARGS = {
    'cfg': cfg
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_dir Ran
ran on a synthesized input
fangchenliu/maskdp_public/pretrain.py
code served (permissive licence) · get_code("61b5554cde1da5c2")
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 PosixPath. 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 pathlib import Path

class Config:
    def __init__(self):
        self.resume_dir = "/tmp/checkpoints"
        self.seed = 42
        self.resume_step = 100

cfg = Config()

ARGS = {
    "cfg": cfg
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_domain Ran
ran; our contract draft was wrong, not the code
fangchenliu/maskdp_public/finetune_rl.py
code served (permissive licence) · get_code("41404a565ac3bb46")
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_domain(task):
    if task.startswith('point_mass_maze'):
        return 'point_mass_maze'
    return task.split('_', 1)[0]

# Construct valid arguments for get_domain
ARGS = {
    'task': 'point_mass_maze_v1'
}
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
grad_norm Ran
ran, honoured the contract we drafted
fangchenliu/maskdp_public/utils.py
code served (permissive licence) · get_code("2478bb95b38ef24f")
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 torch.nn as nn

torch.manual_seed(0)

# Create a simple model with parameters that have gradients
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 = SimpleModel()

# Create some dummy input and target
x = torch.randn(2, 4)
target = torch.randn(2, 2)

# Forward pass to generate gradients
output = model(x)
loss = torch.nn.functional.mse_loss(output, target)
loss.backward()

# Extract parameters with gradients
params = [p for p in model.parameters() if p.grad is not None]

ARGS = {
    "params": params,
    "norm_type": 2.0
}
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 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
load_episode Ran
ran on a synthesized input
fangchenliu/maskdp_public/replay_buffer.py
code served (permissive licence) · get_code("d0e5c81d1790377f")
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
from pathlib import Path
import tempfile
import io

# Create a temporary directory and a mock file
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)

# Create a mock .npz file with sample data
mock_file_path = temp_path / "episode.npz"

# Create sample episode data
episode_data = {
    'observations': np.array([1, 2, 3, 4]),
    'actions': np.array([0, 1]),
    'rewards': np.array([0.1, 0.2, 0.3])
}

# Save it as an npz file
np.savez(mock_file_path, **episode_data)

# Define the arguments
ARGS = {
    'fn': mock_file_path,
    'domain': 'test_domain',
    'obs': np.array([1.0, 2.0, 3.0, 4.0])
}
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
relable_episode Ran
ran on a synthesized input
fangchenliu/maskdp_public/replay_buffer.py
code served (permissive licence) · get_code("b5236e0bf3c8cc38")
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

class MockPhysics:
    def __init__(self):
        self.state_data = np.zeros((10, 5), dtype=np.float32)
    
    def set_state(self, state):
        pass
    
    def reset_context(self):
        return MockResetContext()

class MockResetContext:
    def __enter__(self):
        return self
    
    def __exit__(self, exc_type, exc_val, exc_tb):
        pass

class MockTask:
    def get_reward(self, physics):
        return np.float32(0.5)

class MockRewardSpec:
    def __init__(self):
        self.shape = ()
        self.dtype = np.float32

class MockEnv:
    def __init__(self):
        self.physics = MockPhysics()
        self.task = MockTask()
    
    def reward_spec(self):
        return MockRewardSpec()

env = MockEnv()

episode = {
    'physics': np.zeros((3, 5), dtype=np.float32)
}

ARGS = {
    'env': env,
    'episode': episode
}
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
to_torch Ran
ran; our contract draft was wrong, not the code
fangchenliu/maskdp_public/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from premiertaco/premier-taco, is pointer only (licence: NONE) · get_code("6244e9922f4e0610")
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 premiertaco/premier-taco, 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_norm Not yet run
unverified (harvested, no recorded run)
fangchenliu/maskdp_public/utils.py
code served (permissive licence) · get_code("97295335ee3ffb90")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 3 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
to_torch 23 other papers
7 dated earlier, 1 the same month, 15 later · 7 only as an assembly brick
2103.04551 (2021-03)
Behavior From the Void: Unsupervised Active Pre-Training
2107.09645 (2021-07)
Mastering Visual Continuous Control: Improved Data-Augmented Reinforcement Learning
2202.10324 (2022-02)
VRL3: A Data-Driven Framework for Visual Deep Reinforcement Learning
and 20 more not named here
episode_len 12 other papers
1 dated earlier, 11 later
2107.09645 (2021-07)
Mastering Visual Continuous Control: Improved Data-Augmented Reinforcement Learning
2302.00965 (2023-02)
Visual Imitation Learning with Patch Rewards
2303.01497 (2023-03)
Teach a Robot to FISH: Versatile Imitation from One Minute of Demonstrations
and 9 more not named here
grad_norm 4 other papers
4 later
2305.04477 (2023-05)
Behavior Contrastive Learning for Unsupervised Skill Discovery
2405.14073 (2024-05)
PEAC: Unsupervised Pre-training for Cross-Embodiment Reinforcement Learning
2405.16030 (2024-05)
Constrained Ensemble Exploration for Unsupervised Skill Discovery
and 1 more not named here
get_data_seed 1 other paper
1 dated earlier
2201.13425 (2022-01)
Don't Change the Algorithm, Change the Data: Exploratory Data for Offline Reinforcement Learning
get_domain 1 other paper
1 dated earlier
2201.13425 (2022-01)
Don't Change the Algorithm, Change the Data: Exploratory Data for Offline Reinforcement Learning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

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

Abstract

We are interested in learning scalable agents for reinforcement learning that can learn from large-scale, diverse sequential data similar to current large vision and language models. To this end, this paper presents masked decision prediction (MaskDP), a simple and scalable self-supervised pretraining method for reinforcement learning (RL) and behavioral cloning (BC). In our MaskDP approach, we employ a masked autoencoder (MAE) to state-action trajectories, wherein we randomly mask state and action tokens and reconstruct the missing data. By doing so, the model is required to infer masked-out states and actions and extract information about dynamics. We find that masking different proportions of the input sequence significantly helps with learning a better model that generalizes well to multiple downstream tasks. In our empirical study, we find that a MaskDP model gains the capability of zero-shot transfer to new BC tasks, such as single and multiple goal reaching, and it can zero-shot infer skills from a few example transitions. In addition, MaskDP transfers well to offline RL and shows promising scaling behavior w.r.t. to model size. It is amenable to data-efficient finetuning, achieving competitive results with prior methods based on autoregressive pretraining.

For agents

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

get_harvested_code_for_paper("2211.12740")
get_code_for_paper("2211.12740")
have("2211.12740")

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

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

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

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

Connect an agent — have() is free.