SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.02433 · ICML · 2022

Versatile Offline Imitation from Observations and Examples via Regularized State-Occupancy Matching

Dinesh Jayaraman, Osbert Bastani, Yecheng Ma, Andrew Shen

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 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; 1 failure of our instrument; 1 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/2202.02433.json · badge: /api/ran/2202.02433.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
jasonma2016/smodice marked official in Papers with Code
Papers with Code archive
3 ran · 1 no recorded run
ryanxhr/dwbc community
Papers with Code archive
3 ran · 0 no recorded run
FunctionStatusWhere it lives
Actor Ran
ran on a synthesized input · constructed an object; no result was computed
ryanxhr/dwbc/algos/DWBC.py
code served (permissive licence) · get_code("da00c16c9fad3d61")
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 an instance of its own class, Actor: the run constructed the object and did not call it, so no result was computed. 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 the Actor model with small dimensions
state_dim = 4
action_dim = 3

actor = nn.Module()
actor = nn.Sequential(
    nn.Linear(state_dim, 256),
    nn.ReLU(),
    nn.Linear(256, 256),
    nn.ReLU(),
)

# Build the Actor instance
from torch.nn import Linear
class SimpleActor(nn.Module):
    def __init__(self, state_dim, action_dim):
        super(SimpleActor, self).__init__()
        self.fc1 = Linear(state_dim, 256)
        self.fc2 = Linear(256, 256)
        self.mu_head = Linear(256, action_dim)
        self.sigma_head = Linear(256, action_dim)
    
    def forward(self, state):
        pass

actor_instance = SimpleActor(state_dim=4, action_dim=3)

ARGS = {
    "state_dim": 4,
    "action_dim": 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 Actor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Actor 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
DWBC Ran
ran on a synthesized input · constructed an object; no result was computed
ryanxhr/dwbc/algos/DWBC.py
code served (permissive licence) · get_code("280d78a2e0434d54")
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 an instance of its own class, DWBC: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn.functional as F
from torch.distributions import Normal
from torch.distributions.transformed_distribution import TransformedDistribution
from torch.distributions.transforms import TanhTransform

torch.manual_seed(0)

# Constants from the code
EPS = 1e-07
LOG_PI_NORM_MAX = 10
LOG_PI_NORM_MIN = -20
LOG_STD_MAX = 2
LOG_STD_MIN = -5
MEAN_MAX = 9.0
MEAN_MIN = -9.0

# Simple replay buffer stand-in
class ReplayBuffer:
    def __init__(self, state_dim, action_dim, batch_size=2):
        self.state_dim = state_dim
        self.action_dim = action_dim
        self.batch_size = batch_size
    
    def sample(self, batch_size):
        state = torch.randn(batch_size, self.state_dim)
        action = torch.randn(batch_size, self.action_dim)
        reward = torch.randn(batch_size, 1)
        next_state = torch.randn(batch_size, self.state_dim)
        done = torch.randint(0, 2, (batch_size, 1))
        flag = torch.randint(0, 2, (batch_size, 1))
        return state, action, reward, next_state, done, flag

# Build replay buffers
state_dim = 4
action_dim = 3
replay_buffer_e = ReplayBuffer(state_dim, action_dim)
replay_buffer_o = ReplayBuffer(state_dim, action_dim)

ARGS = {
    "state_dim": state_dim,
    "action_dim": action_dim,
    "alpha": 7.5,
    "no_pu": False,
    "eta": 0.5,
    "d_update_num": 100
}
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 DWBC — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a DWBC 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
Discriminator Ran
ran on a synthesized input
ryanxhr/dwbc/algos/DWBC.py
code served (permissive licence) · get_code("f1271b9b38c74edc")
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 Tensor, 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 torch.nn as nn

# INIT_ARGS: parameters for Discriminator.__init__
INIT_ARGS = {
    'state_dim': 5,
    'action_dim': 3
}

# ARGS: parameters for Discriminator.forward
ARGS = {
    'state': torch.randn(2, 5),      # batch_size=2, state_dim=5
    'action': torch.randn(2, 3),     # batch_size=2, action_dim=3
    'log_pi': torch.randn(2, 3)      # batch_size=2, action_dim=3 (used as input to fc1_2)
}
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 Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
TanhNormalPolicy Ran
ran on a synthesized input · constructed an object; no result was computed
jasonma2016/smodice/smodice_pytorch.py
pointer only (licence: NONE) · get_code("0ee52552f509f51e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jasonma2016/smodice 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.

ValueNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
jasonma2016/smodice/smodice_pytorch.py
pointer only (licence: NONE) · get_code("31d4e795094a91a5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jasonma2016/smodice 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.

atanh Ran
ran; our contract draft was wrong, not the code
jasonma2016/smodice/smodice_pytorch.py
pointer only (licence: NONE) · get_code("cf5ce98955ab4534")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jasonma2016/smodice 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.

SMODICE Not yet run
unverified (harvested, no recorded run)
jasonma2016/smodice/smodice_pytorch.py
pointer only (licence: NONE) · get_code("21461a428fc6c423")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, jasonma2016/smodice 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. 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, 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 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
atanh
brick of this paper's assembly: helper
4 other papers
4 later
2206.03023 (2022-06)
Offline Goal-Conditioned Reinforcement Learning via f -Advantage Regression
2311.01331 (2023-11)
Offline Imitation from Observation via Primal Wasserstein State Occupancy Matching
2403.01734 (2024-03)
Offline Goal-Conditioned Reinforcement Learning for Safety-Critical Tasks with Recovery Policy
and 1 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 propose State Matching Offline DIstribution Correction Estimation (SMODICE), a novel and versatile regression-based offline imitation learning (IL) algorithm derived via state-occupancy matching. We show that the SMODICE objective admits a simple optimization procedure through an application of Fenchel duality and an analytic solution in tabular MDPs. Without requiring access to expert actions, SMODICE can be effectively applied to three offline IL settings: (i) imitation from observations (IfO), (ii) IfO with dynamics or morphologically mismatched expert, and (iii) example-based reinforcement learning, which we show can be formulated as a state-occupancy matching problem. We extensively evaluate SMODICE on both gridworld environments as well as on high-dimensional offline benchmarks. Our results demonstrate that SMODICE is effective for all three problem settings and significantly outperforms prior state-of-art.

For agents

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

get_harvested_code_for_paper("2202.02433")
get_code_for_paper("2202.02433")
have("2202.02433")

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

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

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

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

Connect an agent — have() is free.