SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.10897 · 2020

Revisiting Design Choices in Proximal Policy Optimization

arXiv · PDF · Open in the Atlas

Code that ran

5 of 11 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure of our instrument; 6 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/2009.10897.json · badge: /api/ran/2009.10897.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
chloechsu/revisiting-ppo canonical (classifier label)
classifier basis: census
5 ran · 6 no recorded run
FunctionStatusWhere it lives
adv_normalize Ran
ran on a synthesized input
chloechsu/revisiting-ppo/src/policy_gradients/steps.py
code served (permissive licence) · get_code("eaeeadc8a29240c5")
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 Tensor, ndim 2, dtype family float, shape (2, 4) 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 as ch

ch.manual_seed(0)

# The function takes a single parameter 'adv' which must be a tensor
# It calls: .std(), .mean(), .std() again
# These are standard tensor operations that work on any tensor
# We need a tensor with nonzero std to pass the assertion

# Create a small tensor with distinct values to ensure nonzero std
adv = ch.tensor([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]], dtype=ch.float32)

ARGS = {
    'adv': adv
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) 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
convert_state_to_array Ran
ran on a synthesized input
chloechsu/revisiting-ppo/src/policy_gradients/custom_env.py
code served (permissive licence) · get_code("86d6ffcd9660e36f")
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 1, dtype family float; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T00:55:33Z. 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.

from collections import OrderedDict
import numpy as np

# Create test observations as OrderedDict with multiple array values
obs = OrderedDict([
    ('position', np.array([1.0, 2.0, 3.0])),
    ('velocity', np.array([0.5, 1.5])),
    ('force', np.array([[4.0, 5.0], [6.0, 7.0]]))
])

ARGS = {
    'obs': obs
}
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 ndarray, ndim 1, dtype family float — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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_product Ran
ran; our contract draft was wrong, not the code
chloechsu/revisiting-ppo/src/utils.py
code served (permissive licence) · get_code("35b6f17122388f57")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned map. 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 itertools

# The function expects a dictionary where each value is a list of possible values
# It will create all combinations using itertools.product

d = {
    "learning_rate": [0.001, 0.01, 0.1],
    "batch_size": [16, 32],
    "optimizer": ["adam", "sgd"],
    "num_layers": [2, 3, 4]
}

ARGS = {"d": d}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 map — a map output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a map 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
iwt Ran
ran, honoured the contract we drafted
chloechsu/revisiting-ppo/src/utils.py
code served (permissive licence) · get_code("942706632c22fc44")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family 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 numpy as np

ARGS = {
    "start": 0,
    "end": 10,
    "interval": 2,
    "trials": 3
}
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 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
value_net_with_name Ran
ran on a synthesized input
chloechsu/revisiting-ppo/src/policy_gradients/models.py
code served (permissive licence) · get_code("3c6c94ffde62b548")
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 type. 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 orthogonal_init(tensor, gain=1.0):
    """Stand-in orthogonal initialization function"""
    if len(tensor.shape) >= 2:
        nn.init.orthogonal_(tensor, gain=gain)
    else:
        tensor.zero_()

ACTIVATION = nn.Tanh
STD = 2 ** 0.5

def initialize_weights(mod, initialization_type, scale=STD):
    """
    Weight initializer for the models.
    Inputs: A model, Returns: none, initializes the parameters
    """
    for p in mod.parameters():
        if initialization_type == 'normal':
            p.data.normal_(0.01)
        elif initialization_type == 'xavier':
            if len(p.data.shape) >= 2:
                nn.init.xavier_uniform_(p.data)
            else:
                p.data.zero_()
        elif initialization_type == 'orthogonal':
            if len(p.data.shape) >= 2:
                orthogonal_init(p.data, gain=scale)
            else:
                p.data.zero_()
        else:
            raise ValueError('Need a valid initialization key')

class ValueDenseNet(nn.Module):
    """
    An example value network, with support for arbitrarily many
    fully connected hidden layers (by default 2 * 128-neuron layers),
    maps a state of size (state_dim) -> a scalar value.
    """

    def __init__(self, state_dim, init, init_scale=1.0, hidden_sizes=(64, 64)):
        """
        Initializes the value network.
        Inputs:
        - state_dim, the input dimension of the network (i.e dimension of state)
        - hidden_sizes, an iterable of integers, each of which represents the size
        of a hidden layer in the neural network.
        Returns: Initialized Value network
        """
        super().__init__()
        self.activation = ACTIVATION()
        self.affine_layers = nn.ModuleList()
        prev = state_dim
        for h in hidden_sizes:
            l = nn.Linear(prev, h)
            initialize_weights(l, init, scale=STD)
            self.affine_layers.append(l)
            prev = h
        self.final = nn.Linear(prev, 1)
        initialize_weights(self.final, init, scale=init_scale)

    def forward(self, x):
        """
        Performs inference using the value network.
        Inputs:
        - x, the state passed in from the agent
        Returns:
        - The scalar (float) value of that state, as estimated by the net
        """
        for affine in self.affine_layers:
            x = self.activation(affine(x))
        value = self.final(x)
        return value

    def get_value(self, x):
        return self(x)

VALUE_NETS = {'ValueNet': ValueDenseNet}

def value_net_with_name(name):
    return VALUE_NETS[name]

ARGS = {
    'name': 'ValueNet'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
policy_net_with_name Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/src/policy_gradients/models.py
code served (permissive licence) · get_code("cd439e2c501ea7a5")
How it ran

no invocation recorded.

sample_trajectories_by_batch_size Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/analysis/utils.py
code served (permissive licence) · get_code("ee77439efb0d4f71")
How it ran

no invocation recorded.

sample_trajectory Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/analysis/utils.py
code served (permissive licence) · get_code("0e8c5c11186486e3")
How it ran

no invocation recorded.

surrogate_reward Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/src/policy_gradients/steps.py
code served (permissive licence) · get_code("0a15f52f6ac1bd1d")
How it ran

no invocation recorded.

value_loss_gae Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/src/policy_gradients/steps.py
code served (permissive licence) · get_code("6127f168dca8f7b8")
How it ran

no invocation recorded.

wrap_trajectory Not yet run
unverified (harvested, no recorded run)
chloechsu/revisiting-ppo/analysis/utils.py
code served (permissive licence) · get_code("d82574cbb58c7fb6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 9 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
dict_product 4 other papers
1 dated earlier, 3 later
2005.12729 (2020-05)
Implementation Matters in Deep Policy Gradients: A Case Study on PPO and TRPO
2302.06912 (2023-02)
Regret-Based Defense in Adversarial Reinforcement Learning
2406.04724 (2024-06)
ON MINIMIZING ADVERSARIAL COUNTERFACTUAL ER-ROR IN ADVERSARIAL RL
and 1 more not named here
iwt 3 other papers
1 dated earlier, 2 later
2005.12729 (2020-05)
Implementation Matters in Deep Policy Gradients: A Case Study on PPO and TRPO
2302.06912 (2023-02)
Regret-Based Defense in Adversarial Reinforcement Learning
2406.04724 (2024-06)
ON MINIMIZING ADVERSARIAL COUNTERFACTUAL ER-ROR IN ADVERSARIAL 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-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

Proximal Policy Optimization (PPO) is a popular deep policy gradient algorithm. In standard implementations, PPO regularizes policy updates with clipped probability ratios, and parameterizes policies with either continuous Gaussian distributions or discrete Softmax distributions. These design choices are widely accepted, and motivated by empirical performance comparisons on MuJoCo and Atari benchmarks. We revisit these practices outside the regime of current benchmarks, and expose three failure modes of standard PPO. We explain why standard design choices are problematic in these cases, and show that alternative choices of surrogate objectives and policy parameterizations can prevent the failure modes. We hope that our work serves as a reminder that many algorithmic design choices in reinforcement learning are tied to specific simulation environments. We should not implicitly accept these choices as a standard part of a more general algorithm.

For agents

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

get_harvested_code_for_paper("2009.10897")
get_code_for_paper("2009.10897")
have("2009.10897")

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

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

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

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

Connect an agent — have() is free.