SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.17966 · NeurIPS · 2023

Train Once, Get a Family: State-Adaptive Balances for Offline-to-Online Reinforcement Learning

Gao Huang, Shiji Song, Hao Chen, Liwei Wu, Matthieu Lin, Shenzhi Wang, Qisen Yang, Jiawei Gao, Ning Jia

arXiv · PDF · Open in the Atlas

Code that ran

17 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 11 failures of our instrument; 8 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-24; 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/2310.17966.json · badge: /api/ran/2310.17966.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
LeapLabTHU/FamO2O canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
leaplabthu/famo2o community
Papers with Code archive
9 ran · 8 no recorded run
FunctionStatusWhere it lives
flatten Ran
ran, honoured the contract we drafted
LeapLabTHU/FamO2O/jax_cql/viskit/core.py
code served (permissive licence) · get_code("20922c79a0929bbf")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:50:02Z). 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

torch.manual_seed(0)

# The function flatten takes a list of lists and flattens it into a single list
# It iterates through sublists and extracts items from each

# Create a simple nested list structure
nested_list = [
    [1, 2, 3],
    [4, 5],
    [6, 7, 8, 9]
]

ARGS = {
    "l": nested_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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 int — 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
Critic Ran
ran on a synthesized input · constructed an object; no result was computed
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("099783f7940c8b90")
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, Critic: 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
from flax import linen as nn
from typing import Callable, Sequence

def default_init(scale=jnp.sqrt(2)):
    return nn.initializers.orthogonal(scale)

class MLP(nn.Module):
    hidden_dims: Sequence[int]
    activations: Callable[[jnp.ndarray], jnp.ndarray] = nn.relu
    activate_final: int = False
    dropout_rate = None

    @nn.compact
    def __call__(self, x: jnp.ndarray, training: bool=False) -> jnp.ndarray:
        for i, size in enumerate(self.hidden_dims):
            x = nn.Dense(size, kernel_init=default_init())(x)
            if i + 1 < len(self.hidden_dims) or self.activate_final:
                x = self.activations(x)
                if self.dropout_rate is not None:
                    x = nn.Dropout(rate=self.dropout_rate)(x, deterministic=not training)
        return x

class Critic(nn.Module):
    hidden_dims: Sequence[int]
    activations: Callable[[jnp.ndarray], jnp.ndarray] = nn.relu

    @nn.compact
    def __call__(self, observations: jnp.ndarray, actions: jnp.ndarray) -> jnp.ndarray:
        inputs = jnp.concatenate([observations, actions], -1)
        critic = MLP((*self.hidden_dims, 1), activations=self.activations)(inputs)
        return jnp.squeeze(critic, -1)

observations = jnp.ones((2, 4))
actions = jnp.ones((2, 3))

ARGS = {
    'hidden_dims': (8, 6),
    'activations': nn.relu
}
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 Critic — 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 Critic 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
DoubleCritic Ran
ran on a synthesized input · constructed an object; no result was computed
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("da28baee3154ec4c")
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, DoubleCritic: 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
from flax import linen as nn

# Define helper function needed by the classes
def default_init(scale=jnp.sqrt(2)):
    return nn.initializers.orthogonal(scale)

# Define the MLP class
class MLP(nn.Module):
    hidden_dims: tuple
    activations: callable = nn.relu
    activate_final: int = False
    dropout_rate: float = None

    @nn.compact
    def __call__(self, x: jnp.ndarray, training: bool=False) -> jnp.ndarray:
        for i, size in enumerate(self.hidden_dims):
            x = nn.Dense(size, kernel_init=default_init())(x)
            if i + 1 < len(self.hidden_dims) or self.activate_final:
                x = self.activations(x)
                if self.dropout_rate is not None:
                    x = nn.Dropout(rate=self.dropout_rate)(x, deterministic=not training)
        return x

# Define the Critic class
class Critic(nn.Module):
    hidden_dims: tuple
    activations: callable = nn.relu

    @nn.compact
    def __call__(self, observations: jnp.ndarray, actions: jnp.ndarray) -> jnp.ndarray:
        inputs = jnp.concatenate([observations, actions], -1)
        critic = MLP((*self.hidden_dims, 1), activations=self.activations)(inputs)
        return jnp.squeeze(critic, -1)

# Define the DoubleCritic class
class DoubleCritic(nn.Module):
    hidden_dims: tuple
    activations: callable = nn.relu

    @nn.compact
    def __call__(self, observations: jnp.ndarray, actions: jnp.ndarray) -> tuple:
        critic1 = Critic(self.hidden_dims, activations=self.activations)(observations, actions)
        critic2 = Critic(self.hidden_dims, activations=self.activations)(observations, actions)
        return (critic1, critic2)

# Create arguments for DoubleCritic
ARGS = {
    "hidden_dims": (8, 6),
    "activations": nn.relu,
}
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 DoubleCritic — 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 DoubleCritic 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
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("9d501615317e5db0")
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.numpy as jnp
from flax import linen as nn

ARGS = {
    'hidden_dims': (8, 16, 32),
    'activations': nn.relu,
    'activate_final': False,
    'dropout_rate': 0.1,
}
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 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
Temperature Ran
ran on a synthesized input · constructed an object; no result was computed
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("ed3cce240e728d5a")
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
from flax import linen as nn

# The Temperature module takes only one parameter: initial_temperature
# which is a float. Looking at the __call__ method, it:
# 1. Creates a parameter 'log_temp' initialized with log of initial_temperature
# 2. Returns exp of that log_temp
# 
# So we just need to provide a float value for initial_temperature

ARGS = {
    'initial_temperature': 1.0
}
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
ValueCritic Ran
ran on a synthesized input · constructed an object; no result was computed
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("c12affb13cb328e9")
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, ValueCritic: 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
from flax import linen as nn

# Set up a random seed for reproducibility
key = jax.random.PRNGKey(0)

# Create a small batch of observations
# Using shape (batch_size=2, observation_dim=4)
observations = jnp.ones((2, 4), dtype=jnp.float32)

# Define the hidden dimensions for the ValueCritic
# Using small distinct sizes: 8 and 6
hidden_dims = (8, 6)

# Create the ARGS dictionary with all parameters for ValueCritic
ARGS = {
    "hidden_dims": hidden_dims,
}
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 ValueCritic — 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 ValueCritic 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
_sample_actions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("92a63ba161798ebe")
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 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 jax
import jax.numpy as jnp
import numpy as np
from flax import linen as nn
import flax
from tensorflow_probability.substrates import jax as tfp

tfd = tfp.distributions

# Create a minimal actor module that returns a distribution
class SimpleActor(nn.Module):
    """Minimal actor that outputs a MultivariateNormalDiag distribution"""
    
    @nn.compact
    def __call__(self, observations, temperature):
        # Simple dense layer to get mean and log_scale
        x = nn.Dense(8)(observations)
        x = nn.relu(x)
        mean = nn.Dense(4)(x)
        log_scale = nn.Dense(4)(x)
        scale = jnp.exp(log_scale)
        # Return a MultivariateNormalDiag distribution
        return tfd.MultivariateNormalDiag(loc=mean, scale_diag=scale)

# Initialize the actor model
actor_def = SimpleActor()

# Create dummy observations (batch_size=2, obs_dim=5)
observations = np.random.randn(2, 5).astype(np.float32)

# Initialize actor parameters
rng = jax.random.PRNGKey(0)
actor_params = actor_def.init(rng, observations, temperature=1.0)['params']

# Wrap params in FrozenDict as expected
actor_params = flax.core.FrozenDict(actor_params)

# Create RNG key
rng_key = jax.random.PRNGKey(42)

# Build ARGS dictionary
ARGS = {
    'rng': rng_key,
    'actor_def': actor_def,
    'actor_params': actor_params,
    'observations': observations,
    'temperature': 1.0,
    'deterministic': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
flax, jax, numpy, tensorflow_probability — 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
default_init Ran
ran; our contract draft was wrong, not the code
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("29e1a06c6560973e")
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
from flax import 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
default_init Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_iql/common.py
code served (permissive licence) · get_code("718462716d78ea99")
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
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
encode Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_cql/cql_finetune/conservative_sac_finetune_main.py
code served (permissive licence) · get_code("1689a9bc9e862217")
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 hashlib

ARGS = {
    "name": "example_string",
    "length": 64
}
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 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
load_progress Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_cql/viskit/core.py
code served (permissive licence) · get_code("965e75a1245dd833")
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 csv
import tempfile
import os

# Create a temporary CSV file with some test data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "progress.csv")

with open(csv_path, 'w', newline='') as f:
    writer = csv.writer(f)
    writer.writerow(['epoch', 'loss', 'accuracy'])
    writer.writerow(['1', '0.5', '0.8'])
    writer.writerow(['2', '0.3', '0.9'])
    writer.writerow(['3', '0.2', '0.95'])

ARGS = {
    'progress_csv_path': csv_path
}
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
multiple_action_q_function Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_cql/JaxCQL/model.py
code served (permissive licence) · get_code("18c566cc009ddb07")
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 torch
import torch.nn as nn

torch.manual_seed(0)

def extend_and_repeat(tensor, axis, repeats):
    """Helper function that mimics extend_and_repeat behavior"""
    shape = list(tensor.shape)
    shape.insert(axis, repeats)
    return tensor.unsqueeze(axis).expand(shape)

class SimpleQNetwork(nn.Module):
    """Minimal Q-network that takes observations and actions"""
    def __init__(self, obs_dim=4, action_dim=3):
        super().__init__()
        self.linear = nn.Linear(obs_dim + action_dim, 1)
    
    def forward(self, observations, actions, **kwargs):
        """Compute Q-values from observations and actions"""
        combined = torch.cat([observations, actions], dim=-1)
        q_values = self.linear(combined).squeeze(-1)
        return q_values

# Create decorator function
def multiple_action_q_function(forward):
    def wrapped(self, observations, actions, **kwargs):
        multiple_actions = False
        batch_size = observations.shape[0]
        if actions.ndim == 3 and observations.ndim == 2:
            multiple_actions = True
            observations = extend_and_repeat(observations, 1, actions.shape[1]).reshape(-1, observations.shape[-1])
            actions = actions.reshape(-1, actions.shape[-1])
        q_values = forward(self, observations, actions, **kwargs)
        if multiple_actions:
            q_values = q_values.reshape(batch_size, -1)
        return q_values
    return wrapped

# Create a decorated Q-network
class DecoratedQNetwork(SimpleQNetwork):
    @multiple_action_q_function
    def forward(self, observations, actions, **kwargs):
        combined = torch.cat([observations, actions], dim=-1)
        q_values = self.linear(combined).squeeze(-1)
        return q_values

# Build test arguments
model = DecoratedQNetwork(obs_dim=4, action_dim=3)
observations = torch.randn(2, 4)
actions = torch.randn(2, 5, 3)

ARGS = {
    "forward": model.forward
}
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 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
sample_actions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("b846a1c39ddf42fe")
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 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 jax
import jax.numpy as jnp
import numpy as np
from flax import linen as nn
import flax
from tensorflow_probability.substrates import jax as tfp

tfd = tfp.distributions

# Create a minimal actor module that returns a distribution
class SimpleActor(nn.Module):
    """Minimal actor that returns a MultivariateNormalDiag distribution"""
    
    @nn.compact
    def __call__(self, observations, temperature):
        # observations shape: (batch, obs_dim)
        batch_size = observations.shape[0]
        action_dim = 3
        
        # Simple dense layer
        x = nn.Dense(8)(observations)
        x = nn.relu(x)
        
        # Output mean and log_scale
        mean = nn.Dense(action_dim)(x)
        log_scale = nn.Dense(action_dim)(x)
        
        # Create distribution
        scale = jnp.exp(log_scale)
        dist = tfd.MultivariateNormalDiag(loc=mean, scale_diag=scale)
        
        return dist

# Initialize the actor
rng = jax.random.PRNGKey(0)
actor_def = SimpleActor()

# Create dummy observations for initialization
dummy_obs = np.random.randn(2, 4).astype(np.float32)

# Initialize actor parameters
rng, init_rng = jax.random.split(rng)
actor_params = actor_def.init(init_rng, dummy_obs, temperature=1.0)['params']

# Create actual observations for the function call
observations = np.random.randn(2, 4).astype(np.float32)

# Create a fresh RNG for sampling
rng = jax.random.PRNGKey(42)

ARGS = {
    'rng': rng,
    'actor_def': actor_def,
    'actor_params': actor_params,
    'observations': observations,
    'temperature': 1.0,
    'deterministic': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
flax, jax, numpy, tensorflow_probability — 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
sin_cos_skill_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("e471b8d548b33cb3")
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, shape (2, 6) 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 jax.numpy as jnp
import numpy as np

# Create a small beta_array for testing
# Using a numpy array with shape (2,) - 2 samples
beta_array_np = np.array([1.0, 2.0])

# Parameters for the function
n = 10000.0
d = 6

# Construct the ARGS dictionary with all parameters
ARGS = {
    'beta_array': beta_array_np,
    'n': n,
    'd': d
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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, shape (2, 6) — shape (2, 6) 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
sin_cos_skill_func Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
LeapLabTHU/FamO2O/jax_cql/cql_finetune/family_utils.py
code served (permissive licence) · get_code("a81da1617be5131d")
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 ndarray, ndim 2, dtype family float, shape (5, 6) 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 numpy as np
import jax.numpy as jnp

# Test with numpy array
beta_array_np = np.array([1.0, 2.0, 3.0, 4.0, 5.0])

ARGS = {
    "beta_array": beta_array_np,
    "n": 10000.0,
    "d": 6
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (5, 6) — shape (5, 6) 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
unique Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_cql/viskit/core.py
code served (permissive licence) · get_code("6c7a4a9349a395e9")
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 int; 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

torch.manual_seed(0)

# The function `unique(l)` takes a list and returns unique elements
# It converts the list to a set and back to a list
# So we need to pass a list with some duplicate elements

ARGS = {
    "l": [1, 2, 3, 2, 1, 4, 3, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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 int — 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
update_target_network Ran
ran; our contract draft was wrong, not the code
LeapLabTHU/FamO2O/jax_cql/JaxCQL/model.py
code served (permissive licence) · get_code("f23c0c9faf00d830")
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 jax
import jax.numpy as jnp

# Create nested parameter structures using JAX arrays
# These will simulate main_params and target_params in a neural network context

# Create a simple nested structure of parameters (like what a neural network might have)
main_params = {
    'layer1': {
        'w': jnp.array([[1.0, 2.0, 3.0, 4.0],
                        [5.0, 6.0, 7.0, 8.0],
                        [9.0, 10.0, 11.0, 12.0]]),
        'b': jnp.array([0.1, 0.2, 0.3, 0.4])
    },
    'layer2': {
        'w': jnp.array([[1.5, 2.5],
                        [3.5, 4.5],
                        [5.5, 6.5],
                        [7.5, 8.5]]),
        'b': jnp.array([0.5, 0.6])
    }
}

target_params = {
    'layer1': {
        'w': jnp.array([[0.5, 1.0, 1.5, 2.0],
                        [2.5, 3.0, 3.5, 4.0],
                        [4.5, 5.0, 5.5, 6.0]]),
        'b': jnp.array([0.01, 0.02, 0.03, 0.04])
    },
    'layer2': {
        'w': jnp.array([[0.75, 1.25],
                        [1.75, 2.25],
                        [2.75, 3.25],
                        [3.75, 4.25]]),
        'b': jnp.array([0.25, 0.35])
    }
}

tau = 0.01

ARGS = {
    'main_params': main_params,
    'target_params': target_params,
    'tau': tau
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
FamilyLearner Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("be0aac11e3445957")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("bde48e098e1d0bb3")
How it ran

no invocation recorded.

NormalTanhPolicy Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("a441b8020777a636")
How it ran

no invocation recorded.

_family_update_jit Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("9fee1b402cdb18a3")
How it ran

no invocation recorded.

target_update Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("958fa187e9bfa7b1")
How it ran

no invocation recorded.

update Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("9645d2497b243871")
How it ran

no invocation recorded.

update_q Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("5739da32d5d6bf96")
How it ran

no invocation recorded.

update_v Not yet run
unverified (harvested, no recorded run)
leaplabthu/famo2o/jax_iql/family_learner.py
code served (permissive licence) · get_code("3ba42b0ed87afaa0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 1 the same month, 6 later) and 13 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
flatten 21 other papers
16 dated earlier, 5 later
1609.08675 (2016-09)
YouTube-8M: A Large-Scale Video Classification Benchmark
1802.04821 (2018-02)
Evolved Policy Gradients
1811.05014 (2018-11)
NeXtVLAD: An Efficient Neural Network to Aggregate Frame-level Features for Large-scale Video Classification
and 18 more not named here
default_init
brick of this paper's assembly: helper
8 other papers
7 dated earlier, 1 later
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
unique 5 other papers
5 dated earlier
1802.04821 (2018-02)
Evolved Policy Gradients
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2007.09070 (2020-07)
Hybrid Discriminative-Generative Training via Contrastive Learning
and 2 more not named here
load_progress 4 other papers
4 dated earlier
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2007.09070 (2020-07)
Hybrid Discriminative-Generative Training via Contrastive Learning
2210.06518 (2022-10)
Semi-Supervised Offline Reinforcement Learning with Action-Free Trajectories
and 1 more not named here
multiple_action_q_function 4 other papers
3 dated earlier, 1 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2301.12842 (2023-01)
Direct Preference-based Policy Optimization without Reward Modeling
2303.00957 (2023-03)
Preference Transformer: Modeling Human Preferences using Transformers for RL
and 1 more not named here
target_update
brick of this paper's assembly: helper
3 other papers
3 later
2405.04342 (2024-05)
The Curse of Diversity in Ensemble-Based Exploration
2405.16158 (2024-05)
Bigger, Regularized, Optimistic: scaling for compute and sample-efficient continuous control
2605.11711 (2026-05)
Debiased Model-based Representations for Sample-efficient Continuous Control
update_target_network 3 other papers
1 dated earlier, 1 the same month, 1 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2310.08558 (2023-10)
Offline Retraining for Online RL: Decoupled Policy Learning to Mitigate Exploration Bias
2410.18076 (2024-10)
Leveraging Skills from Unlabeled Prior Data for Efficient Online Exploration
Temperature
brick of this paper's assembly: helper
1 other paper
1 later
2603.05066 (2026-03)
Reward-Conditioned Reinforcement Learning
update
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2110.01528 (2021-10)
Large Batch Experience Replay
update_q
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2210.04251 (2022-10)
State Advantage Weighting for Offline RL
update_v
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2210.04251 (2022-10)
State Advantage Weighting for Offline RL

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-24.

Repositories linked to this paper

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

Abstract

Offline-to-online reinforcement learning (RL) is a training paradigm that combines pre-training on a pre-collected dataset with fine-tuning in an online environment. However, the incorporation of online fine-tuning can intensify the well-known distributional shift problem. Existing solutions tackle this problem by imposing a policy constraint on the policy improvement objective in both offline and online learning. They typically advocate a single balance between policy improvement and constraints across diverse data collections. This one-size-fits-all manner may not optimally leverage each collected sample due to the significant variation in data quality across different states. To this end, we introduce Family Offline-to-Online RL (FamO2O), a simple yet effective framework that empowers existing algorithms to determine state-adaptive improvement-constraint balances. FamO2O utilizes a universal model to train a family of policies with different improvement/constraint intensities, and a balance model to select a suitable policy for each state. Theoretically, we prove that state-adaptive balances are necessary for achieving a higher policy performance upper bound. Empirically, extensive experiments show that FamO2O offers a statistically significant improvement over various existing methods, achieving state-of-the-art performance on the D4RL benchmark. Codes are available at https://github.com/LeapLabTHU/FamO2O.

For agents

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

get_harvested_code_for_paper("2310.17966")
get_code_for_paper("2310.17966")
have("2310.17966")

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

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

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

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

Connect an agent — have() is free.