SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.13611 · NeurIPS · 2022

Understanding the Evolution of Linear Regions in Deep Reinforcement Learning

Nam Kim, David Rolnick, Michiel Van De Panne, Setareh Cohan

arXiv · PDF · Open in the Atlas

Code that ran

7 of 12 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, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 5 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.13611.json · badge: /api/ran/2210.13611.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
setarehc/deep_rl_regions canonical (classifier label)
classifier basis not recorded on the link
7 ran · 5 no recorded run
FunctionStatusWhere it lives
count_regions_2d Ran
ran on a synthesized input
setarehc/deep_rl_regions/regions_counting_2d.py
code served (permissive licence) · get_code("e4ee9b08a1095a86")
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 int, ndim 0, dtype family int, 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 numpy as np

# Set random seeds for reproducibility
np.random.seed(0)

# Define small weight and bias matrices for the network
# the_weights: list of weight matrices, one per layer
# the_biases: list of bias vectors, one per layer
# For a 2-layer network with 3 neurons in first layer, 2 in second layer:
the_weights = [
    np.array([[0.5, 0.3], [0.2, 0.4], [0.1, 0.6]]),  # shape (3, 2): 3 neurons, 2 inputs
    np.array([[0.7, 0.2, 0.5], [0.3, 0.4, 0.1]])     # shape (2, 3): 2 neurons, 3 inputs from previous layer
]

the_biases = [
    np.array([0.1, 0.2, 0.3]),                         # shape (3,): bias for 3 neurons
    np.array([0.05, 0.15])                             # shape (2,): bias for 2 neurons
]

# Input function weight and bias (maps 2D input to some space)
input_fn_weight = np.array([[1.0, 0.0], [0.0, 1.0]])  # 2x2 identity-like
input_fn_bias = np.array([0.0, 0.0])                   # 2D zero bias

# Input vertices defining a 2D region (a square)
input_vertices = np.array([[-1.0, -1.0], [1.0, -1.0], [1.0, 1.0], [-1.0, 1.0]])

ARGS = {
    'the_weights': the_weights,
    'the_biases': the_biases,
    'input_fn_weight': input_fn_weight,
    'input_fn_bias': input_fn_bias,
    'input_vertices': input_vertices,
    'return_regions': False,
    'eval_bounded': False,
    'consolidate_dead_regions': False
}
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 int, ndim 0, dtype family int, 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
get_net_params Ran
ran on a synthesized input
setarehc/deep_rl_regions/tools.py
code served (permissive licence) · get_code("dfa76f3af1419b9a")
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)

ARGS = {
    'config_str': [4, 8, 6],
    'input_dims': 3,
    'output_dims': 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
get_sample_plane Ran
ran on a synthesized input
setarehc/deep_rl_regions/regions_counting_2d.py
code served (permissive licence) · get_code("4023d3a4f3b8f46c")
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 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 numpy as np

# The function expects X to be a numpy array where:
# - len(X) works (so it's array-like with a length)
# - X[i, :] works (so it's 2D indexable)
# - Operations like subtraction, dot products, and norms work on rows
# We need at least 3 points to sample 3 distinct indices
# Each point should be a vector (1D after indexing with [i, :])

X = np.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],
    [13.0, 14.0, 15.0, 16.0],
    [17.0, 18.0, 19.0, 20.0]
])

ARGS = {
    "X": X
}
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 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
get_wandbs Ran
ran on a synthesized input
setarehc/deep_rl_regions/regions_counting_1d.py
code served (permissive licence) · get_code("af0a312a2dd6c6e1")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MLPExtractor(nn.Module):
    def __init__(self):
        super().__init__()
        self.policy_net = nn.Sequential(
            nn.Linear(4, 8),
            nn.ReLU(),
            nn.Linear(8, 6),
            nn.ReLU(),
            nn.Linear(6, 3)
        )

class Policy(nn.Module):
    def __init__(self):
        super().__init__()
        self.mlp_extractor = MLPExtractor()

policy = Policy()

ARGS = {
    "policy": policy
}
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 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
intersect_lines_2d Ran
ran on a synthesized input
setarehc/deep_rl_regions/regions_counting_2d.py
code served (permissive licence) · get_code("d1692b6340e756a8")
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, shape (3,) 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

# Analyze the function:
# - line_weight: used in np.dot operations, should be a 1D array
# - line_bias: scalar, added to dot product
# - pt1: used in np.dot and arithmetic operations, should be a 1D array
# - pt2: used in np.dot and arithmetic operations, should be a 1D array
# All arrays should have compatible dimensions for the dot products

# Create arguments for intersect_lines_2d
# The function computes the intersection of a line defined by (line_weight, line_bias)
# with the line segment from pt1 to pt2

# Use dimension 3 for the points and weight vector (arbitrary but consistent)
line_weight = np.array([1.0, 0.5, -0.3])  # 1D array for dot products
line_bias = np.array(2.0)  # scalar bias term

# Two points defining a line segment
pt1 = np.array([1.0, 2.0, 3.0])  # 1D array, same dimension as line_weight
pt2 = np.array([4.0, 5.0, 6.0])  # 1D array, same dimension as line_weight

ARGS = {
    "line_weight": line_weight,
    "line_bias": line_bias,
    "pt1": pt1,
    "pt2": pt2,
}
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, shape (3,) — shape (3,) 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
normalize_line_segment Ran
ran on a synthesized input
setarehc/deep_rl_regions/regions_counting_1d.py
code served (permissive licence) · get_code("d92fa68a8dc4ff3d")
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 tuple, ndim 2, dtype family float; 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

class MockEnv:
    def __init__(self):
        # Store observation bounds for normalization
        self.obs_low = np.array([-1.0, -2.0, -3.0, -4.0])
        self.obs_high = np.array([1.0, 2.0, 3.0, 4.0])
    
    def normalize_obs(self, obs):
        # Linear normalization to [0, 1] range
        normalized = (obs - self.obs_low) / (self.obs_high - self.obs_low)
        return normalized

env = MockEnv()

point1 = np.array([0.0, 0.0, 0.0, 0.0])
point2 = np.array([0.5, 1.0, 1.5, 2.0])

ARGS = {
    "env": env,
    "point1": point1,
    "point2": point2,
}
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 tuple, ndim 2, dtype family float — a tuple 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
set_size Ran
ran on a synthesized input
setarehc/deep_rl_regions/plotting_tools.py
code served (permissive licence) · get_code("d50512979500e4d6")
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 tuple, ndim 1, dtype family float; 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.

ARGS = {
    'width': 'thesis',
    'fraction': 0.8,
    'subplots': (2, 3)
}
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 tuple, ndim 1, dtype family float — a tuple 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
count_regions_1d Not yet run
unverified (harvested, no recorded run)
setarehc/deep_rl_regions/regions_counting_1d.py
code served (permissive licence) · get_code("55de3e6b27b86008")
How it ran

no invocation recorded.

load_random_lines Not yet run
unverified (harvested, no recorded run)
setarehc/deep_rl_regions/randomized_metric_helper.py
code served (permissive licence) · get_code("bbe5652f465c0408")
How it ran

no invocation recorded.

load_random_trajectories Not yet run
unverified (harvested, no recorded run)
setarehc/deep_rl_regions/randomized_metric_helper.py
code served (permissive licence) · get_code("073ba5fa29647db0")
How it ran

no invocation recorded.

parse_str_arg Not yet run
unverified (harvested, no recorded run)
setarehc/deep_rl_regions/tools.py
code served (permissive licence) · get_code("a5930fd288b467be")
How it ran

no invocation recorded.

sample_states Not yet run
unverified (harvested, no recorded run)
setarehc/deep_rl_regions/visualize_2d.py
code served (permissive licence) · get_code("03c16c714767b339")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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 12 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

Policies produced by deep reinforcement learning are typically characterised by their learning curves, but they remain poorly understood in many other respects. ReLU-based policies result in a partitioning of the input space into piecewise linear regions. We seek to understand how observed region counts and their densities evolve during deep reinforcement learning using empirical results that span a range of continuous control tasks and policy network dimensions. Intuitively, we may expect that during training, the region density increases in the areas that are frequently visited by the policy, thereby affording fine-grained control. We use recent theoretical and empirical results for the linear regions induced by neural networks in supervised learning settings for grounding and comparison of our results. Empirically, we find that the region density increases only moderately throughout training, as measured along fixed trajectories coming from the final policy. However, the trajectories themselves also increase in length during training, and thus the region densities decrease as seen from the perspective of the current trajectory. Our findings suggest that the complexity of deep reinforcement learning policies does not principally emerge from a significant growth in the complexity of functions observed on-and-around trajectories of the policy.

For agents

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

get_harvested_code_for_paper("2210.13611")
get_code_for_paper("2210.13611")
have("2210.13611")

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

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

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

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

Connect an agent — have() is free.