SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.07484 · NeurIPS · 2023

Mutual Information Regularized Offline Reinforcement Learning

Xiao Ma, Min Lin, Bingyi Kang, Shuicheng Yan, Zhongwen Xu

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 4 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2210.07484.json · badge: /api/ran/2210.07484.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
sail-sg/MISA canonical (classifier label)
classifier basis not recorded on the link
12 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_returns Ran
ran on a synthesized input
sail-sg/MISA/utilities/traj_dataset.py
code served (permissive licence) · get_code("bed19deb2a987950")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects 'traj' which is iterable
# Each element unpacks into 6 values: (_, _, rew, _, _, _)
# The function sums up the 'rew' (reward) values

# Create a trajectory as a list of tuples
# Each tuple has 6 elements: (state, action, reward, next_state, done, info)
traj = [
    (np.array([1, 2]), np.array([0]), 1.0, np.array([1, 2]), False, {}),
    (np.array([2, 3]), np.array([1]), 2.5, np.array([2, 3]), False, {}),
    (np.array([3, 4]), np.array([0]), 1.5, np.array([3, 4]), True, {}),
]

ARGS = {
    "traj": traj
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_exp_name Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/viskit/logging.py
code served (permissive licence) · get_code("db7a0efd9adcf84c")
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 datetime
import dateutil.tz

def create_exp_name(exp_prefix, exp_id=0, seed=0):
    """
  Create a semi-unique experiment name that has a timestamp
  :param exp_prefix:
  :param exp_id:
  :return:
  """
    now = datetime.datetime.now(dateutil.tz.tzlocal())
    timestamp = now.strftime('%Y_%m_%d_%H_%M_%S')
    return '%s_%s-s-%d--%s' % (exp_prefix, timestamp, seed, str(exp_id))

ARGS = {
    'exp_prefix': 'test_experiment',
    'exp_id': 42,
    'seed': 123
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
dateutil — 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
dict_to_safe_json Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/viskit/logging.py
code served (permissive licence) · get_code("8cada88c51a2a6f0")
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 torch
import numpy as np

torch.manual_seed(0)

# Test case 1: Simple dict with safe JSON values
test_dict_1 = {
    "name": "test",
    "count": 42,
    "ratio": 3.14,
    "active": True,
    "data": None,
    "items": [1, 2, 3],
    "nested": {"key": "value", "number": 100}
}

# Test case 2: Dict with unsafe values that need conversion
class CustomObject:
    def __str__(self):
        return "CustomObject_instance"

tensor = torch.tensor([1.0, 2.0, 3.0, 4.0])
numpy_array = np.array([1, 2, 3])

test_dict_2 = {
    "safe_string": "hello",
    "safe_int": 5,
    "safe_bool": False,
    "unsafe_tensor": tensor,
    "unsafe_numpy": numpy_array,
    "unsafe_object": CustomObject(),
    "nested_safe": {
        "inner_str": "world",
        "inner_list": [1, True, 2.5]
    },
    "nested_unsafe": {
        "inner_tensor": torch.randn(2, 3),
        "inner_obj": CustomObject()
    }
}

# Test case 3: Mixed nested structure
test_dict_3 = {
    "level1": {
        "level2": {
            "safe": 123,
            "unsafe": tensor,
            "list": [1, 2, CustomObject()]
        }
    }
}

ARGS = {
    "d": test_dict_2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
extend_and_repeat Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/utilities/jax_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxSobolMark/OOO, is pointer only (licence: NONE) · get_code("d2f199c948f2a9ed")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MaxSobolMark/OOO, and GitHub detected no licence in that repository 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.

index_batch Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/utilities/replay_buffer.py
pointer only (licence: MIT); the stored copy get_code serves, from yassineCh/PGS, is pointer only (licence: NONE) · get_code("c8b2fc80a3fc7424")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yassineCh/PGS, and GitHub detected no licence in that repository 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.

mse_loss Ran
ran, violated the contract we drafted
sail-sg/MISA/utilities/jax_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from MaxSobolMark/OOO, is pointer only (licence: NONE) · get_code("cc35af8b18b7dc58")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from MaxSobolMark/OOO, and GitHub detected no licence in that repository 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.

parition_batch_train_test Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/utilities/replay_buffer.py
pointer only (licence: MIT); the stored copy get_code serves, from yassineCh/PGS, is pointer only (licence: NONE) · get_code("3f55f8769dd45c20")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yassineCh/PGS, and GitHub detected no licence in that repository 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.

prefix_metrics Ran
ran on a synthesized input
sail-sg/MISA/utilities/utils.py
code served (permissive licence) · get_code("d97e89c7f1953b3a")
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 torch

torch.manual_seed(0)

# Simple metrics dict with string keys and numeric values
metrics = {
    'loss': 0.5,
    'accuracy': 0.95,
    'f1_score': 0.88
}

# Prefix string to prepend to each metric key
prefix = 'train'

ARGS = {
    'metrics': metrics,
    'prefix': prefix
}
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 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
safe_json Ran
ran, violated the contract we drafted
sail-sg/MISA/viskit/logging.py
code served (permissive licence) · get_code("07afff96928bd142")
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 bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - It takes one parameter: `data`
# - It recursively checks if data is JSON-safe (None, bool, int, float, tuple, list, or dict with string keys)
# - It returns a boolean

# Test cases for a comprehensive argument:
# We'll create a complex nested structure that is JSON-safe

ARGS = {
    "data": {
        "string_key": "value",
        "number": 42,
        "float_num": 3.14,
        "bool_val": True,
        "none_val": None,
        "list": [1, 2, 3, "four"],
        "tuple": (5, 6, 7),
        "nested_dict": {
            "inner_string": "text",
            "inner_list": [True, False, None],
        },
        "complex_list": [
            {"a": 1, "b": 2},
            [1, 2, [3, 4]],
            "string",
            42,
        ],
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
simple_separated_format Ran
ran; our contract draft was wrong, not the code
sail-sg/MISA/viskit/tabulate.py
code served (permissive licence) · get_code("fd06199912f135e9")
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 TableFormat. 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.

from collections import namedtuple

DataRow = namedtuple('DataRow', ['begin', 'sep', 'end'])
TableFormat = namedtuple('TableFormat', ['lineabove', 'linebelowheader', 'linebetweenrows', 'linebelow', 'headerrow', 'datarow', 'padding', 'with_header_hide'])

ARGS = {
    'separator': '\t'
}
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 TableFormat — a TableFormat 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
split_into_trajectories Ran
ran on a synthesized input
sail-sg/MISA/utilities/traj_dataset.py
code served (permissive licence) · get_code("b5cd4f789150335c")
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. 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 numpy as np

torch.manual_seed(0)

# Create small tensors for observations, actions, rewards, masks, dones_float, next_observations
batch_size = 2
obs_dim = 4
action_dim = 3

observations = torch.randn(batch_size, obs_dim)
actions = torch.randn(batch_size, action_dim)
rewards = torch.randn(batch_size, 1)
masks = torch.ones(batch_size, 1)
dones_float = torch.tensor([[0.0], [1.0]])
next_observations = torch.randn(batch_size, obs_dim)

ARGS = {
    "observations": observations,
    "actions": actions,
    "rewards": rewards,
    "masks": masks,
    "dones_float": dones_float,
    "next_observations": next_observations,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
value_and_multi_grad Ran
ran on a synthesized input
sail-sg/MISA/utilities/jax_utils.py
code served (permissive licence) · get_code("6f4355a6f1314166")
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

# Define a simple function that returns multiple outputs
def multi_output_fun(x, y):
    """A function that returns multiple outputs"""
    output1 = x * 2 + y
    output2 = x * 3 - y
    output3 = x + y * 4
    return jnp.stack([output1, output2, output3])

# Alternative version with auxiliary output
def multi_output_fun_with_aux(x, y):
    """A function that returns multiple outputs plus auxiliary info"""
    output1 = x * 2 + y
    output2 = x * 3 - y
    output3 = x + y * 4
    outputs = jnp.stack([output1, output2, output3])
    aux = {"metadata": "auxiliary_data"}
    return outputs, aux

# Create test input arrays
x_test = jnp.array([1.0, 2.0, 3.0, 4.0])
y_test = jnp.array([0.5, 1.5, 2.5, 3.5])

# Build ARGS for the basic case (no auxiliary output)
ARGS = {
    "fun": multi_output_fun,
    "n_outputs": 3,
    "argnums": 0,
    "has_aux": False
}
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 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
update_target_network Not yet run
unverified (harvested, no recorded run)
sail-sg/MISA/algos/model.py
code served (permissive licence) · get_code("528710698bd3cfc6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 11 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 3 the same month, 8 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
simple_separated_format 27 other papers
13 dated earlier, 14 later
1903.08254 (2019-03)
Efficient Off-Policy Meta-Reinforcement Learning via Probabilistic Context Variables
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
1910.12827 (2019-10)
Entity Abstraction in Visual Model-Based Reinforcement Learning
and 24 more not named here
dict_to_safe_json 6 other papers
2 dated earlier, 4 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2007.09070 (2020-07)
Hybrid Discriminative-Generative Training via Contrastive Learning
2405.17098 (2024-05)
Q-value Regularized Transformer for Offline Reinforcement Learning
and 3 more not named here
safe_json 5 other papers
1 dated earlier, 4 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2405.17098 (2024-05)
Q-value Regularized Transformer for Offline Reinforcement Learning
2405.19690 (2024-05)
Diffusion Policies Creating a Trust Region for Offline Reinforcement Learning
and 2 more not named here
extend_and_repeat 4 other papers
1 dated earlier, 1 the same month, 2 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
2309.10790 (2023-09)
Guide Your Agent with Adaptive Multimodal Rewards
and 1 more not named here
mse_loss 4 other papers
1 dated earlier, 1 the same month, 2 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
2309.10790 (2023-09)
Guide Your Agent with Adaptive Multimodal Rewards
and 1 more not named here
index_batch 2 other papers
1 dated earlier, 1 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2405.05349 (2024-05)
Offline Model-Based Optimization via Policy-Guided Gradient Search
parition_batch_train_test 2 other papers
1 dated earlier, 1 later
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2405.05349 (2024-05)
Offline Model-Based Optimization via Policy-Guided Gradient Search
prefix_metrics 2 other papers
1 dated earlier, 1 the same month
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2210.13431 (2022-10)
Instruction-Following Agents with Multimodal Transformer
create_exp_name 1 other paper
1 dated earlier
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
split_into_trajectories 1 other paper
1 later
2303.15810 (2023-03)
Offline RL with No OOD Actions: In-Sample Learning via Implicit Value Regularization
value_and_multi_grad 1 other paper
1 dated earlier
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning

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

Repositories linked to this paper

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

Abstract

The major challenge of offline RL is the distribution shift that appears when outof-distribution actions are queried, which makes the policy improvement direction biased by extrapolation errors. Most existing methods address this problem by penalizing the policy or value for deviating from the behavior policy during policy improvement or evaluation. In this work, we propose a novel MISA framework to approach offline RL from the perspective of Mutual Information between States and Actions in the dataset by directly constraining the policy improvement direction. MISA constructs lower bounds of mutual information parameterized by the policy and Q-values. We show that optimizing this lower bound is equivalent to maximizing the likelihood of a one-step improved policy on the offline dataset. Hence, we constrain the policy improvement direction to lie in the data manifold. The resulting algorithm simultaneously augments the policy evaluation and improvement by adding mutual information regularizations. MISA is a general framework that unifies conservative Q-learning (CQL) and behavior regularization methods (e.g., TD3+BC) as special cases. We introduce 3 different variants of MISA, and empirically demonstrate that tighter mutual information lower bound gives better offline RL performance. In addition, our extensive experiments show MISA significantly outperforms a wide range of baselines on various tasks of the D4RL benchmark, e.g., achieving 742.9 total points on gym-locomotion tasks. Our code is available at https://github.com/sail-sg/MISA.

For agents

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

get_harvested_code_for_paper("2210.07484")
get_code_for_paper("2210.07484")
have("2210.07484")

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

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

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

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

Connect an agent — have() is free.