SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.01954 · 2018

Behavioral Cloning from Observation

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/1805.01954.json · badge: /api/ran/1805.01954.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
NathanGavenski/IUPE reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
greerviau/GlorifiedCruiseControl community (classifier label)
classifier basis not recorded on the link
1 ran · 2 no recorded run
FunctionStatusWhere it lives
average_gradients Ran
ran; our contract draft was wrong, not the code
greerviau/GlorifiedCruiseControl/SCNN_lanenet/train_lanenet.py
code served (permissive licence) · get_code("10e8814dfd1ac64c")
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 list, ndim 4, 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 tensorflow as tf

# Create a simple variable for testing
var1 = tf.Variable([[1.0, 2.0, 3.0, 4.0]], name="var1")
var2 = tf.Variable([[5.0, 6.0, 7.0, 8.0]], name="var2")

# Create gradient tensors (small, 1x4 shape)
grad1_tower1 = tf.constant([[0.1, 0.2, 0.3, 0.4]])
grad1_tower2 = tf.constant([[0.5, 0.6, 0.7, 0.8]])

grad2_tower1 = tf.constant([[0.9, 1.0, 1.1, 1.2]])
grad2_tower2 = tf.constant([[1.3, 1.4, 1.5, 1.6]])

# Construct tower_grads: List of lists of (gradient, variable) tuples
# Outer list is over individual gradients (2 gradients: one for var1, one for var2)
# Inner list is over towers (2 towers)
tower_grads = [
    [(grad1_tower1, var1), (grad1_tower2, var1)],
    [(grad2_tower1, var2), (grad2_tower2, var2)]
]

ARGS = {
    "tower_grads": tower_grads
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 4, dtype family float — a list 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
train Ran
ran; our contract draft was wrong, not the code
NathanGavenski/IUPE/models/policy.py
code served (permissive licence) · get_code("65faa99ef0c486da")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define minimal models
class IDMModel(nn.Module):
    """Inverse Dynamics Model - takes state and next state, outputs action logits"""
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(8, 3)  # 4 + 4 input dims, 3 action classes
    
    def forward(self, s, nS):
        combined = torch.cat([s, nS], dim=1)
        return self.fc(combined)

class ForwardModel(nn.Module):
    """Forward model - takes state, outputs action logits"""
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)  # 4 input dims, 3 action classes
    
    def forward(self, s):
        return self.fc(s)

# Create model instances
model = ForwardModel()
idm_model = IDMModel()

# Create data: (state, next_state, action_gt)
batch_size = 2
state_dim = 4
num_actions = 3

s = torch.randn(batch_size, state_dim)
nS = torch.randn(batch_size, state_dim)
a_gt = torch.randint(0, num_actions, (batch_size,))

data = (s, nS, a_gt)

# Create criterion and optimizer
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Device
device = 'cpu'

# Tensorboard - mock object with required methods
class MockTensorBoard:
    def add_grid(self, train, state, nState):
        pass
    
    def add_histogram(self, name, values):
        pass

tensorboard = MockTensorBoard()

ARGS = {
    'model': model,
    'idm_model': idm_model,
    'data': data,
    'criterion': criterion,
    'optimizer': optimizer,
    'device': device,
    'tensorboard': tensorboard
}
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 — 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
train Ran
ran; our contract draft was wrong, not the code
NathanGavenski/IUPE/models/idm.py
code served (permissive licence) · get_code("6cb5bfd9f6b92a48")
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 torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, s, nS):
        return self.linear(s)

class SimpleLogger:
    def add_grid(self, train, state, nState):
        pass

model = SimpleModel()
model.train()

s = torch.randn(2, 4)
nS = torch.randn(2, 4)
a = torch.randint(0, 3, (2,))
data = (s, nS, a)

criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)
device = 'cpu'
tensorboard = SimpleLogger()

ARGS = {
    'model': model,
    'data': data,
    'criterion': criterion,
    'optimizer': optimizer,
    'device': device,
    'tensorboard': tensorboard
}
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 — 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
validation Ran
ran, honoured the contract we drafted
NathanGavenski/IUPE/models/policy.py
code served (permissive licence) · get_code("5c68d61a253a334d")
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)

# Define minimal models
class IDMModel(nn.Module):
    """Inverse Dynamics Model: takes state and next_state, outputs action logits"""
    def __init__(self, state_dim=4, num_actions=3):
        super().__init__()
        self.fc = nn.Linear(state_dim * 2, num_actions)
    
    def forward(self, s, nS):
        combined = torch.cat([s, nS], dim=1)
        return self.fc(combined)

class ForwardModel(nn.Module):
    """Forward model: takes state, outputs action logits"""
    def __init__(self, state_dim=4, num_actions=3):
        super().__init__()
        self.fc = nn.Linear(state_dim, num_actions)
    
    def forward(self, s):
        return self.fc(s)

class MinimalTensorBoard:
    """Minimal tensorboard stand-in with required methods"""
    def add_grid(self, train=False, state=None, nState=None):
        pass
    
    def add_histogram(self, name, values):
        pass

# Create instances
model = ForwardModel(state_dim=4, num_actions=3)
model.eval()

idm_model = IDMModel(state_dim=4, num_actions=3)
idm_model.eval()

# Create data tuple: (s, nS, a_gt)
batch_size = 2
s = torch.randn(batch_size, 4)
nS = torch.randn(batch_size, 4)
a_gt = torch.randint(0, 3, (batch_size,))
data = (s, nS, a_gt)

device = torch.device('cpu')

tensorboard = MinimalTensorBoard()

ARGS = {
    'model': model,
    'idm_model': idm_model,
    'data': data,
    'device': device,
    'tensorboard': tensorboard
}
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
validation Ran
ran, honoured the contract we drafted
NathanGavenski/IUPE/models/idm.py
code served (permissive licence) · get_code("a90673e1d18b15a3")
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)

# Build a minimal model that satisfies the function's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)  # input_dim=4, num_classes=3
    
    def forward(self, s, nS):
        # Function calls model(s, nS) and expects output suitable for argmax
        # Returns logits for 3 classes
        return self.linear(s)

# Create model instance
model = SimpleModel()

# Create tiny tensors for data
# s: state tensor (batch=2, features=4)
# nS: next state tensor (batch=2, features=4)
# a: action/label tensor (batch=2, with class indices 0-2)
s = torch.randn(2, 4)
nS = torch.randn(2, 4)
a = torch.tensor([0, 1], dtype=torch.long)

data = (s, nS, a)

# Set device to CPU
device = 'cpu'

# Optional tensorboard - can be None or a mock object
class MockTensorboard:
    def add_grid(self, train=False, state=None, nState=None):
        pass

tensorboard = MockTensorboard()

ARGS = {
    'model': model,
    'data': data,
    'device': device,
    'tensorboard': tensorboard
}
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
clipper Not yet run
unverified (harvested, no recorded run)
greerviau/GlorifiedCruiseControl/data_collection/clip_videos.py
code served (permissive licence) · get_code("a4a0b8d9a39afc8c")
How it ran

no invocation recorded.

forward Not yet run
unverified (harvested, no recorded run)
greerviau/GlorifiedCruiseControl/SCNN_lanenet/train_lanenet.py
code served (permissive licence) · get_code("569798d0afd5c026")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 5 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 5 later) and 2 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
average_gradients 3 other papers
1 dated earlier, 2 later
1803.03764 (2018-03)
Variance Networks: When Expectation Does Not Meet Your Expectations
1807.09190 (2018-07)
PReMVOS: Proposal-generation, Refinement and Merging for Video Object Segmentation
2003.03030 (2020-03)
Clean-Label Backdoor Attacks on Video Recognition Models
train 1 other paper
1 later
2008.05660 (2020-08)
Imitating Unknown Policies via Exploration
train 1 other paper
1 later
2008.05660 (2020-08)
Imitating Unknown Policies via Exploration
validation 1 other paper
1 later
2008.05660 (2020-08)
Imitating Unknown Policies via Exploration
validation 1 other paper
1 later
2008.05660 (2020-08)
Imitating Unknown Policies via Exploration

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

Humans often learn how to perform tasks via imitation: they observe others perform a task, and then very quickly infer the appropriate actions to take based on their observations. While extending this paradigm to autonomous agents is a well-studied problem in general, there are two particular aspects that have largely been overlooked: (1) that the learning is done from observation only (i.e., without explicit action information), and (2) that the learning is typically done very quickly. In this work, we propose a two-phase, autonomous imitation learning technique called behavioral cloning from observation (BCO), that aims to provide improved performance with respect to both of these aspects. First, we allow the agent to acquire experience in a self-supervised fashion. This experience is used to develop a model which is then utilized to learn a particular task by observing an expert perform that task without the knowledge of the specific actions taken. We experimentally compare BCO to imitation learning methods, including the state-of-the-art, generative adversarial imitation learning (GAIL) technique, and we show comparable task performance in several different simulation domains while exhibiting increased learning speed after expert trajectories become available.

For agents

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

get_harvested_code_for_paper("1805.01954")
get_code_for_paper("1805.01954")
have("1805.01954")

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

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

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

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

Connect an agent — have() is free.