SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.09960 · NeurIPS · 2022

Rethinking Value Function Learning for Generalization in Reinforcement Learning

Hyun Song, Seungyong Moon, Junyeong Lee

arXiv · PDF · Open in the Atlas

Code that ran

2 of 2 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 0 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.09960.json · badge: /api/ran/2210.09960.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
snu-mllab/dcpg canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Buffer Ran
ran on a synthesized input · constructed an object; no result was computed
snu-mllab/dcpg/dcpg/algos/dcpg.py
code served (permissive licence) · get_code("9b26c22d5d39f9a9")
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, Buffer: 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
from collections import deque

torch.manual_seed(0)

# Create sample segments with the expected structure
# Each segment needs 'obs' and 'returns' keys with tensors
# obs shape: (sequence_length, num_processes, obs_dim)
# returns shape: (sequence_length, num_processes)

num_processes = 2
sequence_length = 3
obs_dim = 4

seg1 = {
    'obs': torch.randn(sequence_length, num_processes, obs_dim),
    'returns': torch.randn(sequence_length, num_processes)
}

seg2 = {
    'obs': torch.randn(sequence_length, num_processes, obs_dim),
    'returns': torch.randn(sequence_length, num_processes)
}

ARGS = {
    'buffer_size': 10,
    'device': 'cpu'
}
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 Buffer — 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 Buffer 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
DCPG Ran
ran on a synthesized input · constructed an object; no result was computed
snu-mllab/dcpg/dcpg/algos/dcpg.py
code served (permissive licence) · get_code("412723c0364bebce")
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, DCPG: 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 torch.optim as optim

torch.manual_seed(0)

class SimpleDistribution:
    """Stand-in distribution class with required methods"""
    def __init__(self, logits):
        self.logits = logits
    
    def log_probs(self, actions):
        # Simple mock: return log probabilities based on action indices
        batch_size = actions.shape[0]
        return torch.randn(batch_size, 1)
    
    def entropy(self):
        # Return entropy values
        batch_size = self.logits.shape[0]
        return torch.randn(batch_size)

class SimpleActorCritic(nn.Module):
    """Minimal actor-critic model with required methods"""
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 8)
        self.actor_head = nn.Linear(8, 3)
        self.critic_head = nn.Linear(8, 1)
    
    def forward(self, obs):
        features = torch.relu(self.fc(obs))
        actor_logits = self.actor_head(features)
        critic_value = self.critic_head(features)
        
        return {
            'dist': SimpleDistribution(actor_logits)
        }, {
            'value': critic_value
        }
    
    def forward_critic(self, obs):
        features = torch.relu(self.fc(obs))
        critic_value = self.critic_head(features)
        return {
            'value': critic_value
        }

class SimpleRollouts:
    """Mock rollouts with feed_forward_generator"""
    def __init__(self, num_processes=2, num_steps=3):
        self.num_processes = num_processes
        self.num_steps = num_steps
        self.obs = torch.randn(num_steps + 1, num_processes, 4)
        self.returns = torch.randn(num_steps + 1, num_processes, 1)
    
    def feed_forward_generator(self, num_mini_batch):
        # Generate mini batches for policy updates
        batch_size = self.num_processes * self.num_steps
        mini_batch_size = batch_size // num_mini_batch
        
        for i in range(num_mini_batch):
            start_idx = i * mini_batch_size
            end_idx = start_idx + mini_batch_size
            
            obs_batch = self.obs[:-1].view(-1, 4)[start_idx:end_idx]
            actions_batch = torch.randint(0, 3, (mini_batch_size, 1))
            old_action_log_probs_batch = torch.randn(mini_batch_size, 1)
            adv_targs = torch.randn(mini_batch_size, 1)
            
            yield (
                obs_batch,  # obs_batch
                None,  # masks
                actions_batch,
                old_action_log_probs_batch,
                None,  # value_preds
                None,  # returns
                None,  # old_mu
                None,  # old_sigma
                adv_targs,
                None   # active_masks
            )

actor_critic = SimpleActorCritic()
rollouts = SimpleRollouts(num_processes=2, num_steps=3)

ARGS = {
    'actor_critic': actor_critic,
    'clip_param': 0.2,
    'ppo_epoch': 2,
    'num_mini_batch': 2,
    'entropy_coef': 0.01,
    'lr': 3e-4,
    'eps': 1e-5,
    'max_grad_norm': 0.5,
    'buffer_size': 5,
    'aux_epoch': 1,
    'aux_freq': 2,
    'aux_num_mini_batch': 2,
    'policy_dist_coef': 0.1,
    'value_dist_coef': 0.5,
    'device': torch.device('cpu'),
}
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 DCPG — 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 DCPG 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

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Our work focuses on training RL agents on multiple visually diverse environments to improve observational generalization performance. In prior methods, policy and value networks are separately optimized using a disjoint network architecture to avoid interference and obtain a more accurate value function. We identify that a value network in the multi-environment setting is more challenging to optimize and prone to memorizing the training data than in the conventional single-environment setting. In addition, we find that appropriate regularization on the value network is necessary to improve both training and test performance. To this end, we propose Delayed-Critic Policy Gradient (DCPG), a policy gradient algorithm that implicitly penalizes value estimates by optimizing the value network less frequently with more training data than the policy network. This can be implemented using a single unified network architecture. Furthermore, we introduce a simple self-supervised task that learns the forward and inverse dynamics of environments using a single discriminator, which can be jointly optimized with the value network. Our proposed algorithms significantly improve observational generalization performance and sample efficiency on the Procgen Benchmark.

For agents

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

get_harvested_code_for_paper("2210.09960")
get_code_for_paper("2210.09960")
have("2210.09960")

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

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

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

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

Connect an agent — have() is free.