SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.05167 · ICML · 2024

Hieros: Hierarchical Imagination on Structured State Space Sequence World Models

Ralf Herbrich, Paul Mattes, Rainer Schlosser

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2310.05167.json · badge: /api/ran/2310.05167.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
Snagnar/Hieros canonical (classifier label)
classifier basis: census
8 ran · 3 no recorded run
FunctionStatusWhere it lives
binary_operator Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Snagnar/Hieros/resettable_s5/s5_model.py
code served (permissive licence) · get_code("a044c344102c93c6")
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 torch

torch.manual_seed(0)

# Create two tuples of tensors representing (A, Bu) pairs
# Each tensor has shape (P,) where P=4
P = 4

# q_i: tuple of (A_i, Bu_i)
A_i = torch.randn(P)
bu_i = torch.randn(P)
q_i = (A_i, bu_i)

# q_j: tuple of (A_j, Bu_j)
A_j = torch.randn(P)
bu_j = torch.randn(P)
q_j = (A_j, bu_j)

ARGS = {
    "q_i": q_i,
    "q_j": q_j,
}
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, 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
convert Ran
ran, honoured the contract we drafted
Snagnar/Hieros/embodied/core/basics.py
code served (permissive licence) · get_code("adab19312b0e91d3")
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 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 numpy as np
import torch

torch.manual_seed(0)

# Test case 1: torch.Tensor input
test_tensor = torch.randn(2, 4)

# Test case 2: list of torch.Tensor
test_list_of_tensors = [torch.randn(2, 4), torch.randn(2, 4)]

# Test case 3: numpy array with float64 (should convert to float32)
test_numpy_float64 = np.array([[1.5, 2.5], [3.5, 4.5]], dtype=np.float64)

# Test case 4: numpy array with int32 (should convert to int64)
test_numpy_int32 = np.array([[1, 2], [3, 4]], dtype=np.int32)

# Test case 5: numpy array with uint8 (already supported, no conversion)
test_numpy_uint8 = np.array([[1, 2], [3, 4]], dtype=np.uint8)

# Test case 6: bool array
test_bool = np.array([[True, False], [True, False]], dtype=bool)

# Test case 7: plain Python list
test_plain_list = [[1, 2, 3], [4, 5, 6]]

# Test case 8: scalar value
test_scalar = 42

# Use the first test case as the main argument
ARGS = {
    "value": test_tensor
}
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 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
count_steps Ran
ran, honoured the contract we drafted
Snagnar/Hieros/hieros/dreamer.py
pointer only (licence: MIT); the stored copy get_code serves, from nicolinho/dutd, is pointer only (licence: NONE) · get_code("b7ff9ef9697d35f1")
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 nicolinho/dutd, 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.

expand Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Snagnar/Hieros/hieros/dreamer.py
code served (permissive licence) · get_code("0443d69d357e19c2")
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 4, dtype family float, shape (2, 4, 1, 1) 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 numpy as np

torch.manual_seed(0)

# The expand function takes a value (tensor) and expands its dimensions
# by adding None dimensions at the end until it reaches the target number of dims
value = torch.randn(2, 4)  # 2D tensor with shape (2, 4)
dims = 4  # target number of dimensions

ARGS = {
    "value": value,
    "dims": dims,
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) — shape (2, 4, 1, 1) 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
resettable_binary_operator Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Snagnar/Hieros/resettable_s5/s5_model.py
code served (permissive licence) · get_code("0efcf0eccfce4e62")
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 torch

torch.manual_seed(0)

# Create small tensors with distinct dimensions for P
P = 4

# q_i: tuple of (A_i, b_i, d_i)
# A_i: diagonal matrix elements, shape (P,)
# b_i: vector, shape (P,)
# d_i: reset indicator, shape (P,)
A_i = torch.randn(P)
b_i = torch.randn(P)
d_i = torch.randint(0, 2, (P,), dtype=torch.long)

q_i = (A_i, b_i, d_i)

# q_j: tuple of (A_j, b_j, d_j)
# A_j: diagonal matrix elements, shape (P,)
# b_j: vector, shape (P,)
# d_j: reset indicator, shape (P,)
A_j = torch.randn(P)
b_j = torch.randn(P)
d_j = torch.randint(0, 2, (P,), dtype=torch.long)

q_j = (A_j, b_j, d_j)

ARGS = {
    "q_i": q_i,
    "q_j": q_j,
}
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, 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
smooth_values Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Snagnar/Hieros/sampler_visualization.py
code served (permissive licence) · get_code("96c396be6ac95ca0")
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 (10,) 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 1D array for testing
arr = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], dtype=np.float32)

ARGS = {
    "arr": arr,
    "window": 100
}
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 (10,) — shape (10,) 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
symexp Ran
ran; our contract draft was wrong, not the code
Snagnar/Hieros/hieros/tools.py
code served (permissive licence) · get_code("fd421307a7e4cede")
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) 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)

# The function symexp takes a single parameter x and applies:
# torch.sign(x) * (torch.exp(torch.abs(x)) - 1.0)
# So x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
symlog Ran
ran; our contract draft was wrong, not the code
Snagnar/Hieros/hieros/tools.py
code served (permissive licence) · get_code("3e346b9b00ea8169")
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) 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)

# The function symlog takes a single parameter x and applies:
# torch.sign(x), torch.log(torch.abs(x) + 1.0)
# So x should be a tensor that supports these operations

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
apply_resettable_ssm Not yet run
unverified (harvested, no recorded run)
Snagnar/Hieros/resettable_s5/s5_model.py
code served (permissive licence) · get_code("f1bc3f3f582c039d")
How it ran

no invocation recorded.

format_ Not yet run
unverified (harvested, no recorded run)
Snagnar/Hieros/embodied/core/basics.py
pointer only (licence: MIT); the stored copy get_code serves, from hggforget/PIGDreamer, is pointer only (licence: NONE) · get_code("3360b32511bc42d4")
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 hggforget/PIGDreamer, 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.

treemap Not yet run
unverified (harvested, no recorded run)
Snagnar/Hieros/embodied/core/basics.py
pointer only (licence: MIT); the stored copy get_code serves, from hggforget/PIGDreamer, is pointer only (licence: NONE) · get_code("5ba274a4e18b46f3")
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 hggforget/PIGDreamer, 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 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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 6 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
count_steps 8 other papers
6 dated earlier, 2 later
2110.09514 (2021-10)
Discovering and Achieving Goals via World Models
2205.13817 (2022-05)
Iso-Dream: Isolating and Leveraging Noncontrollable Visual Dynamics in World Models
2210.11698 (2022-10)
Learning Robust Dynamics through Variational Sparse Gating
and 5 more not named here
format_ 5 other papers
2 dated earlier, 3 later
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
2307.07176 (2023-07)
SAFEDREAMER: SAFE REINFORCEMENT LEARNING WITH WORLD MODEL
2403.04253 (2024-03)
Mastering Memory Tasks with World Models
and 2 more not named here
symexp 5 other papers
2 dated earlier, 3 later
2210.13702 (2022-10)
DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality
2301.04104 (2023-01)
Mastering Diverse Domains through World Models
2403.09859 (2024-03)
MAMBA: an Effective World Model Approach for Meta-Reinforcement Learning
and 2 more not named here
symlog 5 other papers
2 dated earlier, 3 later
2210.13702 (2022-10)
DeXtreme: Transfer of Agile In-hand Manipulation from Simulation to Reality
2301.04104 (2023-01)
Mastering Diverse Domains through World Models
2403.09859 (2024-03)
MAMBA: an Effective World Model Approach for Meta-Reinforcement Learning
and 2 more not named here
treemap 5 other papers
2 dated earlier, 3 later
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
2307.07176 (2023-07)
SAFEDREAMER: SAFE REINFORCEMENT LEARNING WITH WORLD MODEL
2403.04253 (2024-03)
Mastering Memory Tasks with World Models
and 2 more not named here

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

One of the biggest challenges to modern deep reinforcement learning (DRL) algorithms is sample efficiency. Many approaches learn a world model in order to train an agent entirely in imagination, eliminating the need for direct environment interaction during training. However, these methods often suffer from either a lack of imagination accuracy, exploration capabilities, or runtime efficiency. We propose HIEROS, a hierarchical policy that learns time abstracted world representations and imagines trajectories at multiple time scales in latent space. HIEROS uses an S5 layer-based world model, which predicts next world states in parallel during training and iteratively during environment interaction. Due to the special properties of S5 layers, our method can train in parallel and predict next world states iteratively during imagination. This allows for more efficient training than RNN-based world models and more efficient imagination than Transformerbased world models. We show that our approach outperforms the state of the art in terms of mean and median normalized human score on the Atari 100k benchmark, and that our proposed world model is able to predict complex dynamics very accurately. We also show that HIEROS displays superior exploration capabilities compared to existing approaches.

For agents

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

get_harvested_code_for_paper("2310.05167")
get_code_for_paper("2310.05167")
have("2310.05167")

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

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

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

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

Connect an agent — have() is free.