SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.07897 · ICML · 2024

When Do Skills Help Reinforcement Learning? A Theoretical Analysis of Temporal Abstractions

Armando Solar-Lezama, Gabriel Poesia, Zhening Li

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 0 have no contract verdict; 7 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/2406.07897.json · badge: /api/ran/2406.07897.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
uranium11010/rl-skill-theory canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
bfs Ran
ran; our contract draft was wrong, not the code
uranium11010/rl-skill-theory/rldiff_envs.py
code served (permissive licence) · get_code("66e887f6d6eb02c2")
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 StateValue. 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
from queue import Queue
from typing import Callable, Optional, Union, TypeVar

T = TypeVar('T')

# Define a simple state-value wrapper class
class StateValue:
    def __init__(self, value):
        self.value = value
    
    def __repr__(self):
        return f"StateValue({self.value})"

# Define the value update function
def simple_value_update(current_value: StateValue, state: Union[np.int64, int], action: int, next_state: Union[np.int64, int]) -> StateValue:
    """Update value based on transition"""
    new_value = current_value.value + action + int(next_state)
    return StateValue(new_value)

# Create a transition table as a list of lists
# Format: transition_table[state][action] = [next_states]
# We'll create a simple 4-state, 2-action environment
transition_table = [
    [[1], [2]],      # state 0: action 0 -> state 1, action 1 -> state 2
    [[2], [3]],      # state 1: action 0 -> state 2, action 1 -> state 3
    [[3], [0]],      # state 2: action 0 -> state 3, action 1 -> state 0
    [[0], [1]],      # state 3: action 0 -> state 0, action 1 -> state 1
]

# Define arguments
ARGS = {
    "start_state": 0,
    "goal_state": 3,
    "transition_table": transition_table,
    "start_value": StateValue(0),
    "value_update": simple_value_update,
    "default_value": StateValue(-1),
}
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 StateValue — a StateValue output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a StateValue 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_cell_string Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
uranium11010/rl-skill-theory/compile_env.py
code served (permissive licence) · get_code("a6bbd0eff88e552d")
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 torch

torch.manual_seed(0)

# The function expects cell_state to be something that can be converted to a list
# It checks cell_state[10] for agent presence
# It searches for 1.0 in the list and checks if index == 11
# So we need a cell_state with at least 12 elements (indices 0-11)

cell_state = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]

ARGS = {
    'cell_state': cell_state
}
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 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
get_distances Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
uranium11010/rl-skill-theory/rldiff_envs.py
code served (permissive licence) · get_code("0ce8a3a924c022d6")
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 (5,) 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

# Create a simple transition table
# Shape: (num_states, num_actions) where each entry is the next state
# Using 5 states and 2 actions
num_states = 5
num_actions = 2

transition_table = np.array([
    [1, 2],  # state 0: action 0 -> state 1, action 1 -> state 2
    [2, 3],  # state 1: action 0 -> state 2, action 1 -> state 3
    [3, 4],  # state 2: action 0 -> state 3, action 1 -> state 4
    [4, 0],  # state 3: action 0 -> state 4, action 1 -> state 0
    [0, 1],  # state 4: action 0 -> state 0, action 1 -> state 1
], dtype=np.int64)

goal_state_index = 3
inverted_transitions = False

ARGS = {
    "goal_state_index": goal_state_index,
    "transition_table": transition_table,
    "inverted_transitions": inverted_transitions,
}
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 (5,) — shape (5,) 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_prob_table Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
uranium11010/rl-skill-theory/rldiff_envs.py
code served (permissive licence) · get_code("1f3624c0da3eab43")
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 (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 numpy as np
import torch

torch.manual_seed(0)

# Create a small transition table
# obs_space_size = 4, action_space_size = 3
# Each row represents possible next states for each action
transition_table = np.array([
    [0, 1, 2],
    [1, 2, 3],
    [2, 3, 0],
    [3, 0, 1]
], dtype=np.int64)

goal_state_index = 3
eps = 0.1
iterate = False
rtol = 1e-5
use_torch = False

ARGS = {
    "transition_table": transition_table,
    "goal_state_index": goal_state_index,
    "eps": eps,
    "iterate": iterate,
    "rtol": rtol,
    "use_torch": use_torch
}
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 ndarray, ndim 1, dtype family float, shape (4,) — shape (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
gumbel_sampling Ran
ran; our contract draft was wrong, not the code
uranium11010/rl-skill-theory/love_utils.py
code served (permissive licence) · get_code("5ee81adf13a9e80d")
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

torch.manual_seed(0)

# log_alpha: a tensor with log probabilities
# temp: a scalar temperature value
# margin: a small epsilon value (has default, but we'll specify it)

log_alpha = torch.randn(2, 4)
temp = 0.5
margin = 0.0001

ARGS = {
    "log_alpha": log_alpha,
    "temp": temp,
    "margin": margin,
}
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
kl_categorical Ran
ran, honoured the contract we drafted
uranium11010/rl-skill-theory/love.py
code served (permissive licence) · get_code("fdb6debd6ac8a53a")
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 1, dtype family float, shape (2,) 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 torch.nn as nn

torch.manual_seed(0)

class STCategorical:
    """Stand-in class for a categorical distribution with log_p attribute."""
    def __init__(self, log_p):
        self.log_p = log_p

# Create small tensors with distinct dimensions
# batch_size=2, num_categories=4
batch_size = 2
num_categories = 4

log_p_a = torch.randn(batch_size, num_categories)
log_p_b = torch.randn(batch_size, num_categories)

# Create distribution objects
a = STCategorical(log_p_a)
b = STCategorical(log_p_b)

ARGS = {
    'a': a,
    'b': b,
    'mask_a': False,
    'mask_b': False,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
log_density_concrete Ran
ran; our contract draft was wrong, not the code
uranium11010/rl-skill-theory/love_utils.py
code served (permissive licence) · get_code("5037bca6007ce621")
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 1, dtype family float, shape (2,) 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

torch.manual_seed(0)

# Construct small tensors for the function parameters
# The function expects:
# - log_alpha: tensor of log probabilities
# - log_sample: tensor of log samples
# - temp: temperature scalar (float or 0-d tensor)

batch_size = 2
dim = 4

log_alpha = torch.randn(batch_size, dim)
log_sample = torch.randn(batch_size, dim)
temp = torch.tensor(0.5)

ARGS = {
    "log_alpha": log_alpha,
    "log_sample": log_sample,
    "temp": temp,
}
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 1, dtype family float, shape (2,) — shape (2,) 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
pretty_print_state Ran
ran; our contract draft was wrong, not the code
uranium11010/rl-skill-theory/compile_env.py
code served (permissive licence) · get_code("60ea0e69a339e79f")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - pretty_print_state(state) iterates over state with reversed()
# - For each row in state, it iterates over cells
# - Each cell is passed to get_cell_string(cell_state)
# - get_cell_string converts cell_state to a list and accesses indices 10 and 11
# - It looks for index 1.0 in the cell_state list
# 
# So state should be a 2D structure where each cell is a list-like with at least 12 elements
# Using numpy array with shape (rows, cols, features) where features = 12

# Create a small 3D state: (height=2, width=3, features=12)
# Each cell is a feature vector of length 12
state = np.zeros((2, 3, 12), dtype=np.float32)

# Add some variation:
# Row 0, Col 0: agent present (index 10 = 1)
state[0, 0, 10] = 1.0

# Row 0, Col 1: object at index 5
state[0, 1, 5] = 1.0

# Row 0, Col 2: wall (index 11)
state[0, 2, 11] = 1.0

# Row 1, Col 0: object at index 3
state[1, 0, 3] = 1.0

# Row 1, Col 1: agent and object at index 7
state[1, 1, 10] = 1.0
state[1, 1, 7] = 1.0

# Row 1, Col 2: empty cell
# (all zeros)

ARGS = {
    "state": state
}
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 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
generate_abstractions Not yet run
unverified (harvested, no recorded run)
uranium11010/rl-skill-theory/compute_envinfo.py
code served (permissive licence) · get_code("49c0d6460cad62f8")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Skills are temporal abstractions that are intended to improve reinforcement learning (RL) performance through hierarchical RL. Despite our intuition about the properties of an environment that make skills useful, a precise characterization has been absent. We provide the first such characterization, focusing on the utility of deterministic skills in deterministic sparse-reward environments with finite action spaces. We show theoretically and empirically that RL performance gain from skills is worse in environments where solutions to states are less compressible. Additional theoretical results suggest that skills benefit exploration more than they benefit learning from existing experience, and that using unexpressive skills such as macroactions may worsen RL performance. We hope our findings can guide research on automatic skill discovery and help RL practitioners better decide when and how to use skills.

For agents

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

get_harvested_code_for_paper("2406.07897")
get_code_for_paper("2406.07897")
have("2406.07897")

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

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

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

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

Connect an agent — have() is free.