SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.07007 · ICLR · 2025

Non-Adversarial Inverse Reinforcement Learning via Successor Feature Matching

Irina Rish, Glen Berseth, Jesse Farebrother, Harley Wiltzer, Arnav Jain, Sanjiban Choudhury

arXiv · PDF · Open in the Atlas

Code that ran

19 of 24 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (14 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 14 have no contract verdict; 4 failures of our instrument; 5 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/2411.07007.json · badge: /api/ran/2411.07007.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
arnavkj1995/sfm canonical (classifier label)
classifier basis: classifier_2025
19 ran · 5 no recorded run
FunctionStatusWhere it lives
FDM Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("9e907e282a2641f1")
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, FDM: 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 jax
import jax.numpy as jnp
import optax
import flax.linen as nn
from flax.training import train_state
import flax

# Provide minimal stand-in implementations for any missing pieces
# The code snippet is incomplete (ends with "def "), so we just need to construct valid __init__ args

ARGS = {
    'rng_key': jax.random.PRNGKey(0),
    'obs_shape': (4,),
    'action_dim': 3,
    'z_dim': 5,
    'hidden_dim': 6,
    'learning_rate': 0.0001,
    'polyak_factor': 0.995,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax, optax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FDM — 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 FDM 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
FDMNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("0cb9401c40c21b9d")
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, FDMNetwork: 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 jax
import jax.numpy as jnp
import flax.linen as nn

# Set seed for reproducibility
jax.config.update('jax_default_prng_impl', 'threefry2x32')

ARGS = {
    "obs_shape": (4,),
    "action_dim": 3,
    "hidden_dim": 8,
    "z_dim": 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type FDMNetwork — 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 FDMNetwork 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
HILPNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("f02b8230f446eb06")
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, HILPNetwork: 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 jax
import jax.numpy as jnp
import flax.linen as nn

ARGS = {
    'layers': (8, 'relu', 6, 'tanh', 4),
    'momentum': 0.995,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type HILPNetwork — 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 HILPNetwork 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
IDF Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("847217e6e12730b0")
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, IDF: 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 jax
import jax.numpy as jnp
import flax
import optax

ARGS = {
    'rng_key': jax.random.PRNGKey(0),
    'obs_shape': (4,),
    'action_dim': 3,
    'z_dim': 5,
    'hidden_dim': 6,
    'learning_rate': 0.0001,
    'polyak_factor': 0.995,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax, optax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IDF — 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 IDF 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
IDFNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("8bafbcb60e55b84b")
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, IDFNetwork: 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 jax
import jax.numpy as jnp
import flax.linen as nn

# Construct arguments for IDFNetwork
ARGS = {
    'obs_shape': (4,),      # observation dimension
    'action_dim': 3,        # action dimension
    'hidden_dim': 8,        # hidden layer dimension
    'z_dim': 6,             # latent dimension
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type IDFNetwork — 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 IDFNetwork 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("c40a2f4a2d892827")
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, MLP: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import typing as tp

ARGS = {
    "layers": (8, 16, "relu", 32, "tanh", 4)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MLP — 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 MLP 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
PsiNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("25f3d4763b663d09")
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, PsiNetwork: 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 jax
import jax.numpy as jnp
import flax.linen as nn

class PsiNetwork(nn.Module):
    hdim: int
    output_size: int

    @nn.compact
    def __call__(self, s: jnp.ndarray, a: jnp.ndarray):
        sa = jnp.concatenate([s, a], -1)
        x = nn.Dense(self.hdim, kernel_init=nn.initializers.orthogonal())(sa)
        x = nn.relu(x)
        x = nn.Dense(self.hdim, kernel_init=nn.initializers.orthogonal())(x)
        x = nn.relu(x)
        x = nn.Dense(self.output_size + 1, kernel_init=nn.initializers.orthogonal())(x)
        return x

ARGS = {
    "hdim": 8,
    "output_size": 3,
}
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 PsiNetwork — 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 PsiNetwork 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
Random Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("5ca5cb5012818a3f")
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, Random: 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 jax
import jax.numpy as jnp
import jax.random as jrandom

# Set seed for reproducibility
key = jrandom.PRNGKey(0)

# Define the arguments for the Random class
ARGS = {
    'rng_key': key,
    'obs_shape': (4,),
    'action_dim': 3,
    'z_dim': 5,
    'hidden_dim': 6,
    'learning_rate': 0.0001,
    'polyak_factor': 0.995,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax, optax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Random — 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 Random 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
RandomNetwork Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("687919961b5cdf4d")
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, RandomNetwork: 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 jax
import jax.numpy as jnp
import flax.linen as nn

ARGS = {
    'obs_shape': (4,),
    'action_dim': 3,
    'hidden_dim': 8,
    'z_dim': 6,
    'im_input': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RandomNetwork — 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 RandomNetwork 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
Simnorm Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("7d8bb229c8a55d3f")
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, Simnorm: 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 jax
import jax.numpy as jnp
import flax.linen as nn
from einops import rearrange

# The Simnorm class takes x as input and uses simplex_dim parameter
# The function reshapes input using einops, applies softmax, and reshapes back
# Input should have a last dimension divisible by simplex_dim

simplex_dim_value = 8
# Create input with shape compatible with simplex_dim
# We need the last dimension to be divisible by simplex_dim
# Let's use batch_size=2, sequence_length=4, feature_dim=simplex_dim*3=24
batch_size = 2
sequence_length = 4
num_simplexes = 3
total_last_dim = simplex_dim_value * num_simplexes

# Create a JAX array as input
x_input = jnp.ones((batch_size, sequence_length, total_last_dim))

ARGS = {
    'simplex_dim': simplex_dim_value,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Simnorm — 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 Simnorm 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
Temperature Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("9e34fecadba7e9ac")
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, Temperature: 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 jax
import jax.numpy as jnp
import flax.linen as nn

# The Temperature class is a Flax module with one parameter:
# - initial_temperature: float = 0.2

# This is the only parameter that needs to be passed to the constructor.
# The __call__ method doesn't take any arguments (beyond self).

ARGS = {
    'initial_temperature': 0.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 Temperature — 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 Temperature 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
TrainState Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("f1b12a121cc9ff6e")
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, TrainState: 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 flax
from flax.training import train_state
import optax
import jax
import jax.numpy as jnp

# Create minimal parameters as FrozenDict
params = flax.core.FrozenDict({
    'dense': {'kernel': jnp.ones((4, 3)), 'bias': jnp.zeros(3)}
})

target_params = flax.core.FrozenDict({
    'dense': {'kernel': jnp.ones((4, 3)), 'bias': jnp.zeros(3)}
})

target_params2 = flax.core.FrozenDict({
    'dense': {'kernel': jnp.ones((4, 3)), 'bias': jnp.zeros(3)}
})

checkpoint = flax.core.FrozenDict({
    'step': jnp.array(0),
    'state': jnp.ones((2, 4))
})

batch_stats = flax.core.FrozenDict({
    'mean': jnp.zeros((3,)),
    'var': jnp.ones((3,))
})

# Create optimizer and optimizer state
optimizer = optax.adam(learning_rate=0.001)
opt_state = optimizer.init(params)

# Create base TrainState using the parent class
base_state = train_state.TrainState.create(
    apply_fn=lambda x: x,
    params=params,
    tx=optimizer
)

ARGS = {
    'step': base_state.step,
    'apply_fn': base_state.apply_fn,
    'params': params,
    'tx': optimizer,
    'opt_state': opt_state,
    'target_params': target_params,
    'target_params2': target_params2,
    'checkpoint': checkpoint,
    'batch_stats': batch_stats
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
flax, jax, optax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TrainState — 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 TrainState 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
TwinMLPNetworks Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("9ee3649e80d44e6b")
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, TwinMLPNetworks: 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 jax
import jax.numpy as jnp
import flax.linen as nn
import typing as tp

# Setup arguments for TwinMLPNetworks
# The class takes a 'layers' parameter which is a Sequence of Union[int, str]
# representing the layer architecture

ARGS = {
    "layers": (4, "relu", 8, "tanh", 3)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TwinMLPNetworks — 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 TwinMLPNetworks 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
_L2 Ran
ran on a synthesized input · constructed an object; no result was computed
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("aee169a5c1aefb38")
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, _L2: 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 jax.numpy as jnp
import flax.linen as nn

# The _L2 module takes:
# - dim: int parameter specifying the dimension
# - x: input array in __call__ method

# Create a small input tensor for testing
# Using shape (2, 4) - batch size 2, feature dimension 4
x = jnp.ones((2, 4), dtype=jnp.float32)

# The dim parameter should match the last dimension of x
dim = 4

ARGS = {
    "dim": dim,
}
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 _L2 — 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 _L2 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
_nl Ran
ran; our contract draft was wrong, not the code
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("bfcf6c97c05f2e2c")
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 1, 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 jax
import jax.numpy as jnp
import flax.linen as nn

ARGS = {
    'name': 'relu',
    'dim': 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
default_init Ran
ran; our contract draft was wrong, not the code
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("c5e2d65ae4ba9bc6")
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.numpy as jnp
import flax.linen as nn

ARGS = {
    "scale": jnp.sqrt(2)
}
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_agent Ran
ran; our contract draft was wrong, not the code
arnavkj1995/sfm/agents/sfm_td3.py
code served (permissive licence) · get_code("f0372bdb4c43d222")
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) and returned list, ndim 1, 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 jax
import jax.numpy as jnp
import numpy as np


class SimpleAgent:
    """Minimal agent that implements get_action method."""
    def __init__(self):
        self.checkpoint_state = None
    
    def get_action(self, state, use_checkpoint=False, rng_key=None):
        """Returns a simple action based on state."""
        # Return a simple action (e.g., index 0, 1, 2, or 3 for 4 possible actions)
        if rng_key is not None:
            action = int(jax.random.randint(rng_key, (), 0, 4))
        else:
            action = 0
        return action


class SimpleEnv:
    """Minimal environment that implements reset and step methods."""
    def __init__(self):
        self.state_dim = 5
        self.step_count = 0
        self.max_steps = 3
    
    def reset(self):
        """Reset environment and return initial state."""
        self.step_count = 0
        return np.random.randn(self.state_dim).astype(np.float32)
    
    def step(self, action):
        """Execute one step in the environment."""
        self.step_count += 1
        next_state = np.random.randn(self.state_dim).astype(np.float32)
        reward = float(np.random.randn())
        terminal = False
        truncation = self.step_count >= self.max_steps
        return next_state, reward, terminal, truncation


# Create instances
agent = SimpleAgent()
env = SimpleEnv()
num_episodes = 2
use_chkpt = False
rng_key = jax.random.PRNGKey(0)

ARGS = {
    "agent": agent,
    "env": env,
    "num_episodes": num_episodes,
    "use_chkpt": use_chkpt,
    "rng_key": rng_key,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
get_discounted_sum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("b7f63876d7bd89cd")
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; 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 jax
import jax.numpy as jnp
import chex

# Construct tiny tensors for the function
# get_discounted_sum uses einsum 'ijk,j->ik' where:
# - x has shape (i, j, k)
# - gamma has shape (j,)
# - result has shape (i, k)

# Let's use distinct dimensions: i=2, j=4, k=3
x = jnp.ones((2, 4, 3), dtype=jnp.float32)
gamma = jnp.array([0.9, 0.95, 0.99, 0.999], dtype=jnp.float32)

ARGS = {
    "x": x,
    "gamma": gamma,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, 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 — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
update_ema Ran
ran, violated the contract we drafted
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("523179247a3ff659")
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, 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 jax
import jax.numpy as jnp

# Set random seed for reproducibility
jax.config.update("jax_platform_name", "cpu")

# Create small test tensors for the function parameters
value = jnp.array([0.1, 0.2, 0.3, 0.4], dtype=jnp.float32)
ema = jnp.array([0.05, 0.1, 0.15, 0.2], dtype=jnp.float32)
decay = jnp.float32(0.99)
step = jnp.int32(1)

ARGS = {
    "value": value,
    "ema": ema,
    "decay": decay,
    "step": step,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
chex, jax — 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: none by the harness; any seed is in the setup block
ActorNetwork Not yet run
unverified (harvested, no recorded run)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("a82ce9839262727a")
How it ran

no invocation recorded.

AvgL1Norm Not yet run
unverified (harvested, no recorded run)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("b821d8f39dbe176b")
How it ran

no invocation recorded.

HILP Not yet run
unverified (harvested, no recorded run)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("de8f06f126e8dfd7")
How it ran

no invocation recorded.

Mish Not yet run
unverified (harvested, no recorded run)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("1c07263892a8db35")
How it ran

no invocation recorded.

SFM_SAC Not yet run
unverified (harvested, no recorded run)
arnavkj1995/sfm/agents/sfm_sac.py
code served (permissive licence) · get_code("3d92e87926c814d7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 23 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
default_init
brick of this paper's assembly: helper
8 other papers
8 dated earlier
1812.05905 (2018-12)
Soft Actor-Critic Algorithms and Applications
2106.03273 (2021-06)
Control-Oriented Model-Based Reinforcement Learning with Implicit Differentiation
2206.01079 (2022-06)
When does return-conditioned supervised learning work for offline reinforcement learning?
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-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

In inverse reinforcement learning (IRL), an agent seeks to replicate expert demonstrations through interactions with the environment. Traditionally, IRL is treated as an adversarial game, where an adversary searches over reward models, and a learner optimizes the reward through repeated RL procedures. This game-solving approach is both computationally expensive and difficult to stabilize. In this work, we propose a novel approach to IRL by direct policy search: by exploiting a linear factorization of the return as the inner product of successor features and a reward vector, we design an IRL algorithm by policy gradient descent on the gap between the learner and expert features. Our non-adversarial method does not require learning an explicit reward function and can be solved seamlessly with existing RL algorithms. Remarkably, our approach works in state-only settings without expert action labels, a setting which behavior cloning (BC) cannot solve. Empirical results demonstrate that our method learns from as few as a single expert demonstration and achieves improved performance on various control tasks.

For agents

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

get_harvested_code_for_paper("2411.07007")
get_code_for_paper("2411.07007")
have("2411.07007")

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

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

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

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

Connect an agent — have() is free.