SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.04745 · NeurIPS · 2022

Mildly Conservative Q-Learning for Offline Reinforcement Learning

Zongqing Lu, Xiu Li, Xiaoteng Ma, Jiafei Lyu, Regularization Policy, Conservatism

arXiv · PDF · Open in the Atlas

Code that ran

13 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 8 have no contract verdict; 3 failures of our instrument; 3 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/2206.04745.json · badge: /api/ran/2206.04745.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
vitchyr/rlkit canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
zzmtsvv/ORL community
Papers with Code archive
5 ran · 1 no recorded run
yihaosun1124/OfflineRL-Kit community
Papers with Code archive
2 ran · 1 no recorded run
sfujim/TD3_BC community
Papers with Code archive
1 ran · 0 no recorded run
ikostrikov/implicit_q_learning unrelated (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
Actor Ran
ran on a synthesized input · constructed an object; no result was computed
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("55a4cdf8fa60dd90")
How it ran

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

BasePolicy Ran
ran on a synthesized input · constructed an object; no result was computed
yihaosun1124/OfflineRL-Kit/offlinerlkit/policy/model_free/mcq.py
code served (permissive licence) · get_code("663ed93e901a35d7")
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, BasePolicy: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np
from typing import Dict

torch.manual_seed(0)

# Since BasePolicy is an abstract base class with no __init__ parameters,
# we need to create a concrete implementation to test it
class ConcretePolicy(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 2)
    
    def train(self, mode=True):
        super().train(mode)
    
    def eval(self):
        super().eval()
    
    def select_action(self, obs: np.ndarray, deterministic: bool = False) -> np.ndarray:
        # Convert obs to tensor, pass through network, return as numpy
        obs_tensor = torch.from_numpy(obs).float()
        if obs_tensor.dim() == 1:
            obs_tensor = obs_tensor.unsqueeze(0)
        with torch.no_grad():
            action = self.fc(obs_tensor)
        return action.numpy()
    
    def learn(self, batch: Dict) -> Dict[str, float]:
        # Simple learning step
        obs = torch.from_numpy(batch['obs']).float()
        actions = torch.from_numpy(batch['actions']).float()
        pred = self.fc(obs)
        loss = ((pred - actions) ** 2).mean()
        return {'loss': loss.item()}

# Construct arguments for BasePolicy (which is abstract, so we use ConcretePolicy)
policy = ConcretePolicy()

# Create sample observation and batch data
sample_obs = np.random.randn(4).astype(np.float32)
sample_batch = {
    'obs': np.random.randn(2, 4).astype(np.float32),
    'actions': np.random.randn(2, 2).astype(np.float32)
}

ARGS = {}
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 BasePolicy — 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 BasePolicy 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
ConditionalVAE Ran
ran on a synthesized input · constructed an object; no result was computed
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("3e918e2e02356ef9")
How it ran

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

EnsembledCritic Ran
ran on a synthesized input · constructed an object; no result was computed
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("3bc3e8876aab07e5")
How it ran

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

EnsembledLinear Ran
ran on a synthesized input · constructed an object; no result was computed
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("5e14d0cf57ccbeb6")
How it ran

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

SACPolicy Ran
ran on a synthesized input
yihaosun1124/OfflineRL-Kit/offlinerlkit/policy/model_free/mcq.py
code served (permissive licence) · get_code("a48659302894ea24")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned 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 torch.nn as nn
import numpy as np

# Define dimensions
obs_dim = 5
action_dim = 3
hidden_dim = 8
batch_size = 2

# Simple actor network that outputs a distribution
class TanhGaussianDistribution:
    def __init__(self, mean, log_std):
        self.mean = mean
        self.log_std = torch.clamp(log_std, -20, 2)
        self.std = torch.exp(self.log_std)
        
    def mode(self):
        raw_action = self.mean
        squashed_action = torch.tanh(raw_action)
        return squashed_action, raw_action
    
    def rsample(self):
        eps = torch.randn_like(self.mean)
        raw_action = self.mean + self.std * eps
        squashed_action = torch.tanh(raw_action)
        return squashed_action, raw_action
    
    def log_prob(self, squashed_action, raw_action):
        log_prob = -0.5 * ((raw_action - self.mean) / self.std).pow(2) - self.log_std - 0.5 * np.log(2 * np.pi)
        log_prob = log_prob.sum(dim=-1, keepdim=True)
        # Correction for tanh squashing
        log_prob = log_prob - torch.log(1 - squashed_action.pow(2) + 1e-6).sum(dim=-1, keepdim=True)
        return log_prob

class Actor(nn.Module):
    def __init__(self, obs_dim, action_dim, hidden_dim):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(obs_dim, hidden_dim),
            nn.ReLU(),
            nn.Linear(hidden_dim, hidden_dim),
            nn.ReLU()
        )
        self.mean_head = nn.Linear(hidden_dim, action_dim)
        self.log_std_head = nn.Linear(hidden_dim, action_dim)
    
    def forward(self, obs):
        features = self.net(obs)
        mean = self.mean_head(features)
        log_std = self.log_std_head(features)
        return TanhGaussianDistribution(mean, log_std)

class Critic(nn.Module):
    def __init__(self, obs_dim, action_dim, hidden_dim):
        super().__init__()
        self.net = nn.Sequential(
            nn.Linear(obs_dim + action_dim, hidden_dim),
            nn.ReLU(),
            nn.Linear(hidden_dim, hidden_dim),
            nn.ReLU(),
            nn.Linear(hidden_dim, 1)
        )
    
    def forward(self, obs, action):
        x = torch.cat([obs, action], dim=-1)
        return self.net(x)

# Create networks
actor = Actor(obs_dim, action_dim, hidden_dim)
critic1 = Critic(obs_dim, action_dim, hidden_dim)
critic2 = Critic(obs_dim, action_dim, hidden_dim)

# Create optimizers
actor_optim = torch.optim.Adam(actor.parameters(), lr=3e-4)
critic1_optim = torch.optim.Adam(critic1.parameters(), lr=3e-4)
critic2_optim = torch.optim.Adam(critic2.parameters(), lr=3e-4)

# Auto alpha setup
target_entropy = -action_dim
log_alpha = torch.zeros(1, requires_grad=True)
alpha_optim = torch.optim.Adam([log_alpha], lr=3e-4)

INIT_ARGS = {
    'actor': actor,
    'critic1': critic1,
    'critic2': critic2,
    'actor_optim': actor_optim,
    'critic1_optim': critic1_optim,
    'critic2_optim': critic2_optim,
    'tau': 0.005,
    'gamma': 0.99,
    'alpha': (target_entropy, log_alpha, alpha_optim)
}

# Create batch data for learn method
batch = {
    'observations': torch.randn(batch_size, obs_dim),
    'actions': torch.randn(batch_size, action_dim),
    'next_observations': torch.randn(batch_size, obs_dim),
    'rewards': torch.randn(batch_size, 1),
    'terminals': torch.zeros(batch_size, 1)
}

ARGS = {
    'batch': batch
}

METHOD = 'learn'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
TD3_BC Ran
ran on a synthesized input
sfujim/TD3_BC/TD3_BC.py
code served (permissive licence) · get_code("6cb4331339777e6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Mock replay buffer for the train method
class MockReplayBuffer:
    def __init__(self, state_dim, action_dim, max_action):
        self.state_dim = state_dim
        self.action_dim = action_dim
        self.max_action = max_action
        
    def sample(self, batch_size):
        device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
        state = torch.randn(batch_size, self.state_dim).to(device)
        action = torch.randn(batch_size, self.action_dim).clamp(-self.max_action, self.max_action).to(device)
        next_state = torch.randn(batch_size, self.state_dim).to(device)
        reward = torch.randn(batch_size, 1).to(device)
        not_done = torch.ones(batch_size, 1).to(device)
        return state, action, next_state, reward, not_done

state_dim = 5
action_dim = 3
max_action = 1.0

INIT_ARGS = {
    'state_dim': state_dim,
    'action_dim': action_dim,
    'max_action': max_action,
    'discount': 0.99,
    'tau': 0.005,
    'policy_noise': 0.2,
    'noise_clip': 0.5,
    'policy_freq': 2,
    'alpha': 2.5
}

replay_buffer = MockReplayBuffer(state_dim, action_dim, max_action)

ARGS = {
    'replay_buffer': replay_buffer,
    'batch_size': 2
}

METHOD = 'train'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
add_prefix Ran
ran; our contract draft was wrong, not the code
vitchyr/rlkit/rlkit/core/logging.py
pointer only (licence: MIT); the stored copy get_code serves, from shlee94/Off2OnRL, is pointer only (licence: NONE) · get_code("6dc14f1205c31904")
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 shlee94/Off2OnRL, 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.

create_stats_ordered_dict Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vitchyr/rlkit/rlkit/core/eval_util.py
pointer only (licence: MIT); the stored copy get_code serves, from aviralkumar2907/CQL, is pointer only (licence: NONE) · get_code("fadf5f762ff04cd6")
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 aviralkumar2907/CQL, 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.

get_average_returns Ran
ran, honoured the contract we drafted
vitchyr/rlkit/rlkit/core/eval_util.py
pointer only (licence: MIT); the stored copy get_code serves, from aviralkumar2907/CQL, is pointer only (licence: NONE) · get_code("a5d10a0b704c8db7")
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 aviralkumar2907/CQL, 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.

loss Ran
ran, violated the contract we drafted
ikostrikov/implicit_q_learning/critic.py
code served (permissive licence) · get_code("13df74f8d96dca61")
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 1, dtype family float, shape (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

# The loss function takes a diff array and an expectile parameter
# diff should be a JAX array (or numpy array that can be converted)
# expectile is a float between 0 and 1

# Create a small diff array
diff = jnp.array([0.5, -0.3, 0.1, -0.2, 0.8, -0.5])

# Set expectile parameter
expectile = 0.8

ARGS = {
    "diff": diff,
    "expectile": expectile,
}
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 1, dtype family float, shape (6,) — shape (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
mcq_config Ran
ran on a synthesized input · constructed an object; no result was computed
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("64e2c29dbb3226d9")
How it ran

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

simple_separated_format Ran
ran; our contract draft was wrong, not the code
vitchyr/rlkit/rlkit/core/tabulate.py
pointer only (licence: MIT); the stored copy get_code serves, from aviralkumar2907/CQL, is pointer only (licence: NONE) · get_code("5cb0c55f58279f59")
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 aviralkumar2907/CQL, 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.

MCQ Not yet run
unverified (harvested, no recorded run)
zzmtsvv/ORL/mcq/mcq.py
pointer only (licence: NONE) · get_code("99e3be0ffb010eef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zzmtsvv/ORL when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

MCQPolicy Not yet run
unverified (harvested, no recorded run)
yihaosun1124/OfflineRL-Kit/offlinerlkit/policy/model_free/mcq.py
code served (permissive licence) · get_code("dc68158024e10b9e")
How it ran

no invocation recorded.

append_log Not yet run
unverified (harvested, no recorded run)
vitchyr/rlkit/rlkit/core/logging.py
pointer only (licence: MIT); the stored copy get_code serves, from shlee94/Off2OnRL, is pointer only (licence: NONE) · get_code("46e6d80fdfab6884")
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 shlee94/Off2OnRL, 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. No invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 9 later) and 7 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
12 dated earlier, 15 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
get_average_returns 24 other papers
10 dated earlier, 1 the same month, 13 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
1912.11032 (2019-12)
Towards Practical Multi-Object Manipulation using Relational Reinforcement Learning
and 21 more not named here
create_stats_ordered_dict 18 other papers
7 dated earlier, 11 later
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2006.13916 (2020-06)
Off-Dynamics Reinforcement Learning: Training for Transfer with Domain Classifiers
and 15 more not named here
add_prefix 10 other papers
3 dated earlier, 7 later
1910.11670 (2019-10)
Contextual Imagined Goals for Self-Supervised Robotic Learning
2106.00671 (2021-06)
What Can I Do Here? Learning New Skills by Imagining Visual Affordances
2110.03655 (2021-10)
Augmenting Reinforcement Learning with Behavior Primitives for Diverse Manipulation Tasks
and 7 more not named here
BasePolicy
brick of this paper's assembly: helper
9 other papers
6 dated earlier, 3 later · 6 only as an assembly brick
2005.13239 (2020-05)
MOPO: Model-based Offline Policy Optimization
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2102.08363 (2021-02)
COMBO: Conservative Offline Model-Based Policy Optimization
and 6 more not named here
append_log 9 other papers
3 dated earlier, 6 later
1910.12827 (2019-10)
Entity Abstraction in Visual Model-Based Reinforcement Learning
2006.07034 (2020-06)
Benchmarking Unsupervised Object Representations for Video Sequences
2110.03655 (2021-10)
Augmenting Reinforcement Learning with Behavior Primitives for Diverse Manipulation Tasks
and 6 more not named here
SACPolicy
brick of this paper's assembly: helper
5 other papers
4 dated earlier, 1 later · 3 only as an assembly brick
2005.13239 (2020-05)
MOPO: Model-based Offline Policy Optimization
2006.04779 (2020-06)
Conservative Q-Learning for Offline Reinforcement Learning
2102.08363 (2021-02)
COMBO: Conservative Offline Model-Based Policy Optimization
and 2 more not named here
EnsembledLinear
brick of this paper's assembly: helper
4 other papers
1 dated earlier, 3 later · 2 only as an assembly brick
2110.06169 (2021-10)
Offline Reinforcement Learning with Implicit Q-Learning
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2301.02328 (2023-01)
Extreme Q-Learning: MaxEnt RL without Entropy
and 1 more not named here
loss
brick of this paper's assembly: entry
3 other papers
3 later · 2 only as an assembly brick
2210.04251 (2022-10)
State Advantage Weighting for Offline RL
2303.00957 (2023-03)
Preference Transformer: Modeling Human Preferences using Transformers for RL
2310.17966 (2023-10)
Train Once, Get a Family: State-Adaptive Balances for Offline-to-Online 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

Offline reinforcement learning (RL) defines the task of learning from a static logged dataset without continually interacting with the environment. The distribution shift between the learned policy and the behavior policy makes it necessary for the value function to stay conservative such that out-of-distribution (OOD) actions will not be severely overestimated. However, existing approaches, penalizing the unseen actions or regularizing with the behavior policy, are too pessimistic, which suppresses the generalization of the value function and hinders the performance improvement. This paper explores mild but enough conservatism for offline learning while not harming generalization. We propose Mildly Conservative Q-learning (MCQ), where OOD actions are actively trained by assigning them proper pseudo Q values. We theoretically show that MCQ induces a policy that behaves at least as well as the behavior policy and no erroneous overestimation will occur for OOD actions. Experimental results on the D4RL benchmarks demonstrate that MCQ achieves remarkable performance compared with prior work. Furthermore, MCQ shows superior generalization ability when transferring from offline to online, and significantly outperforms baselines. Our code is publicly available at https://github.com/dmksjfl/MCQ.

For agents

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

get_harvested_code_for_paper("2206.04745")
get_code_for_paper("2206.04745")
have("2206.04745")

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

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

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

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

Connect an agent — have() is free.