SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.04551 · NeurIPS · 2021

Behavior From the Void: Unsupervised Active Pre-Training

U Berkeley, Pieter Abbeel, Hao Liu

arXiv · PDF · Open in the Atlas

Code that ran

2 of 6 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 2 have no contract verdict; 0 failures of our instrument; 4 no recorded run), 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/2103.04551.json · badge: /api/ran/2103.04551.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
rll-research/url_benchmark canonical (classifier label)
classifier basis: classifier_2025
2 ran · 4 no recorded run
FunctionStatusWhere it lives
ICM Ran
ran on a synthesized input
rll-research/url_benchmark/agent/icm_apt.py
code served (permissive licence) · get_code("c5f58e3d61777f53")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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
import types as _types

def weight_init(m):
    """Custom weight init for Conv2D and Linear layers."""
    if isinstance(m, nn.Linear):
        nn.init.orthogonal_(m.weight.data)
        if hasattr(m.bias, 'data'):
            m.bias.data.fill_(0.0)
    elif isinstance(m, nn.Conv2d) or isinstance(m, nn.ConvTranspose2d):
        gain = nn.init.calculate_gain('relu')
        nn.init.orthogonal_(m.weight.data, gain)
        if hasattr(m.bias, 'data'):
            m.bias.data.fill_(0.0)

class ICM(nn.Module):
    """
    Same as ICM, with a trunk to save memory for KNN
    """

    def __init__(self, obs_dim, action_dim, hidden_dim, icm_rep_dim):
        super().__init__()
        self.trunk = nn.Sequential(nn.Linear(obs_dim, icm_rep_dim), nn.LayerNorm(icm_rep_dim), nn.Tanh())
        self.forward_net = nn.Sequential(nn.Linear(icm_rep_dim + action_dim, hidden_dim), nn.ReLU(), nn.Linear(hidden_dim, icm_rep_dim))
        self.backward_net = nn.Sequential(nn.Linear(2 * icm_rep_dim, hidden_dim), nn.ReLU(), nn.Linear(hidden_dim, action_dim), nn.Tanh())
        self.apply(weight_init)

    def forward(self, obs, action, next_obs):
        assert obs.shape[0] == next_obs.shape[0]
        assert obs.shape[0] == action.shape[0]
        obs = self.trunk(obs)
        next_obs = self.trunk(next_obs)
        next_obs_hat = self.forward_net(torch.cat([obs, action], dim=-1))
        action_hat = self.backward_net(torch.cat([obs, next_obs], dim=-1))
        forward_error = torch.norm(next_obs - next_obs_hat, dim=-1, p=2, keepdim=True)
        backward_error = torch.norm(action - action_hat, dim=-1, p=2, keepdim=True)
        return (forward_error, backward_error)

    def get_rep(self, obs, action):
        rep = self.trunk(obs)
        return rep


INIT_ARGS = {
    'obs_dim': 4,
    'action_dim': 3,
    'hidden_dim': 8,
    'icm_rep_dim': 6,
}

ARGS = {
    'obs': torch.randn(2, 4),
    'action': torch.randn(2, 3),
    'next_obs': torch.randn(2, 4),
}

if __name__ == '__main__':
    model = ICM(**INIT_ARGS)
    forward_error, backward_error = model(**ARGS)
    print(f"Forward error shape: {forward_error.shape}")
    print(f"Backward error shape: {backward_error.shape}")
    print(f"Forward error: {forward_error}")
    print(f"Backward error: {backward_error}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RMS Ran
ran on a synthesized input
rll-research/url_benchmark/agent/icm_apt.py
code served (permissive licence) · get_code("520703bc6d295272")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch
import numpy as np

INIT_ARGS = {
    "device": "cpu",
    "epsilon": 1e-4,
    "shape": (4,)
}

# Create input tensor with batch_size=2 and feature_dim=4 (matching INIT_ARGS shape)
ARGS = {
    "x": torch.randn(2, 4)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
DDPGAgent Not yet run
unverified (harvested, no recorded run)
rll-research/url_benchmark/agent/icm_apt.py
code served (permissive licence) · get_code("875a14ea71682fe8")
How it ran

no invocation recorded.

ICMAPTAgent Not yet run
unverified (harvested, no recorded run)
rll-research/url_benchmark/agent/icm_apt.py
code served (permissive licence) · get_code("bf8b1f936aa93dd1")
How it ran

no invocation recorded.

PBE Not yet run
unverified (harvested, no recorded run)
rll-research/url_benchmark/agent/icm_apt.py
code served (permissive licence) · get_code("4ed18414f8adbb71")
How it ran

no invocation recorded.

make_agent Not yet run
unverified (harvested, no recorded run)
rll-research/url_benchmark/pretrain.py
code served (permissive licence) · get_code("2a76dfe317adeb03")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 5 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
make_agent 9 other papers
9 later
2110.15191 (2021-10)
URLB: Unsupervised Reinforcement Learning Benchmark
2202.00161 (2022-02)
CIC: Contrastive Intrinsic Control for Unsupervised Skill Discovery
2211.13350 (2022-11)
Choreographer: Learning and Adapting Skills in Imagination
and 6 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-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

We introduce a new unsupervised pre-training method for reinforcement learning called APT, which stands for Active Pre-Training. APT learns behaviors and representations by actively searching for novel states in reward-free environments. The key novel idea is to explore the environment by maximizing a non-parametric entropy computed in an abstract representation space, which avoids challenging density modeling and consequently allows our approach to scale much better in environments that have high-dimensional observations (e.g., image observations). We empirically evaluate APT by exposing task-specific reward after a long unsupervised pre-training phase. In Atari games, APT achieves human-level performance on 12 games and obtains highly competitive performance compared to canonical fully supervised RL algorithms. On DMControl suite, APT beats all baselines in terms of asymptotic performance and data efficiency and dramatically improves performance on tasks that are extremely difficult to train from scratch. Unsupervised Pre-Training RL In pretrained RL, the agent is trained in a reward-free MDP S, S 0 , A, T, G for a long period followed by a short testing period with environment rewards R provided. The goal is to learn a pretrained agent that can quickly adapt to testing tasks defined

For agents

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

get_harvested_code_for_paper("2103.04551")
get_code_for_paper("2103.04551")
have("2103.04551")

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

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

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

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

Connect an agent — have() is free.