SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.04253 · 2024

Mastering Memory Tasks with World Models

arXiv · PDF · Open in the Atlas

Code that ran

6 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, 1 violated it and 0 have no contract verdict; 5 failures 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/2403.04253.json · badge: /api/ran/2403.04253.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
chandar-lab/Recall2Imagine canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
FunctionStatusWhere it lives
cast_to_compute Ran
ran; our contract draft was wrong, not the code
chandar-lab/Recall2Imagine/recall2imagine/jaxutils.py
code served (permissive licence) · get_code("ed94f4331173c9bc")
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 jax
import jax.numpy as jnp
import numpy as np

# Create test data with various dtypes to test the casting behavior
float32_array = jnp.array([1.0, 2.0, 3.0, 4.0], dtype=jnp.float32)
float64_array = jnp.array([1.0, 2.0, 3.0, 4.0], dtype=jnp.float64)
int32_array = jnp.array([1, 2, 3, 4], dtype=jnp.int32)
complex64_array = jnp.array([1.0+2.0j, 3.0+4.0j], dtype=jnp.complex64)

# Create nested structure to test tree_map behavior
values = {
    "float32": float32_array,
    "float64": float64_array,
    "int32": int32_array,
    "nested": {
        "complex64": complex64_array,
        "list": [float64_array, int32_array]
    }
}

ARGS = {
    "values": values
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — 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
convert Ran
ran, violated the contract we drafted
chandar-lab/Recall2Imagine/recall2imagine/embodied/core/basics.py
pointer only (licence: MIT); the stored copy get_code serves, from hggforget/PIGDreamer, is pointer only (licence: NONE) · get_code("4b830637b16db4c8")
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. A run is recorded.

get_act Ran
ran; our contract draft was wrong, not the code
chandar-lab/Recall2Imagine/recall2imagine/nets.py
code served (permissive licence) · get_code("03dd934385b4d240")
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 custom_jvp. 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 jax
import jax.numpy as jnp

def get_act(name):
    if callable(name):
        return name
    elif name == 'none':
        return lambda x: x
    elif name == 'mish':
        return lambda x: x * jnp.tanh(jax.nn.softplus(x))
    elif hasattr(jax.nn, name):
        return getattr(jax.nn, name)
    else:
        raise NotImplementedError(name)

# Test with string name 'relu'
ARGS = {
    'name': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type custom_jvp — a custom_jvp output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a custom_jvp 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
pure Ran
ran; our contract draft was wrong, not the code
chandar-lab/Recall2Imagine/recall2imagine/ninjax.py
code served (permissive licence) · get_code("bbd25fa32893729e")
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 function. 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 jax
import jax.numpy as jnp

# Define a simple impure function that uses the global context
def sample_impure_fn(x, y):
    """A simple impure function that accesses and modifies state."""
    ctx = context()
    
    # Access state
    if 'counter' not in ctx:
        ctx['counter'] = jnp.array(0)
    
    # Modify state
    ctx['counter'] = ctx['counter'] + 1
    
    # Use rng
    key = rng()
    noise = jax.random.normal(key, x.shape)
    
    return x + y + noise

# Create tiny example tensors
x = jnp.ones((2, 3))
y = jnp.ones((2, 3))

# Create initial state dict
initial_state = {
    'weight': jnp.array([1.0, 2.0, 3.0]),
    'bias': jnp.array(0.5)
}

# Create an RNG key
rng_key = jax.random.PRNGKey(42)

# Define ARGS mapping all parameters of pure()
ARGS = {
    'fun': sample_impure_fn,
    'nested': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
subsample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chandar-lab/Recall2Imagine/recall2imagine/jaxutils.py
code served (permissive licence) · get_code("e5b1910ea05891b1")
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 ArrayImpl, ndim 1, dtype family float, shape (8,) 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 jax
import jax.numpy as jnp
import numpy as np

# Mock nj module since the function references nj.rng()
class MockNJ:
    @staticmethod
    def rng():
        return jax.random.PRNGKey(0)

nj = MockNJ()

# Create test data
values = jnp.array([[1.0, 2.0, 3.0, 4.0],
                    [5.0, 6.0, 7.0, 8.0]])

ARGS = {
    "values": values,
    "amount": 1024
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ArrayImpl, ndim 1, dtype family float, shape (8,) — shape (8,) 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
tensorstats Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
chandar-lab/Recall2Imagine/recall2imagine/jaxutils.py
code served (permissive licence) · get_code("67c6d2355562342f")
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 jax
import jax.numpy as jnp
import jax.random as jr

# Create a simple RNG key for JAX
key = jr.PRNGKey(0)

# Create a small test tensor (2x4 = 8 elements)
tensor = jnp.array([[1.0, 2.0, 3.0, 4.0],
                     [5.0, 6.0, 7.0, 8.0]])

# Define ARGS with all parameters for tensorstats
ARGS = {
    'tensor': tensor,
    'prefix': 'test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — 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
format_ Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/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.

grad Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/ninjax.py
code served (permissive licence) · get_code("1ad869363216c281")
How it ran

no invocation recorded.

init_mimo_ssm Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/ssm_nets.py
code served (permissive licence) · get_code("ce9e0c5374238d06")
How it ran

no invocation recorded.

init_siso_ssm Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/ssm_nets.py
code served (permissive licence) · get_code("ad8b4b5ddd9df92c")
How it ran

no invocation recorded.

rng Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/ninjax.py
code served (permissive licence) · get_code("45b97b51433849a7")
How it ran

no invocation recorded.

treemap Not yet run
unverified (harvested, no recorded run)
chandar-lab/Recall2Imagine/recall2imagine/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 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, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 9 the same month, 4 later) and 3 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
get_act 9 other papers
5 dated earlier, 3 the same month, 1 later
2303.03226 (2023-03)
Safe Reinforcement Learning via Probabilistic Logic Shields
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
and 6 more not named here
grad 6 other papers
5 dated earlier, 1 the same month
2303.03226 (2023-03)
Safe Reinforcement Learning via Probabilistic Logic Shields
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
and 3 more not named here
pure 6 other papers
5 dated earlier, 1 the same month
2303.03226 (2023-03)
Safe Reinforcement Learning via Probabilistic Logic Shields
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
and 3 more not named here
rng 6 other papers
5 dated earlier, 1 the same month
2303.03226 (2023-03)
Safe Reinforcement Learning via Probabilistic Logic Shields
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
and 3 more not named here
format_ 5 other papers
3 dated earlier, 1 the same month, 1 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
2310.05167 (2023-10)
Hieros: Hierarchical Imagination on Structured State Space Sequence World Models
and 2 more not named here
subsample 5 other papers
4 dated earlier, 1 the same month
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
2307.07176 (2023-07)
SAFEDREAMER: SAFE REINFORCEMENT LEARNING WITH WORLD MODEL
and 2 more not named here
tensorstats 5 other papers
4 dated earlier, 1 the same month
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
2307.07176 (2023-07)
SAFEDREAMER: SAFE REINFORCEMENT LEARNING WITH WORLD MODEL
and 2 more not named here
treemap 5 other papers
3 dated earlier, 1 the same month, 1 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
2310.05167 (2023-10)
Hieros: Hierarchical Imagination on Structured State Space Sequence World Models
and 2 more not named here
convert 4 other papers
2 dated earlier, 1 the same month, 1 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.12309 (2024-03)
Reinforcement Learning from Delayed Observations via World Models
and 1 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-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

Current model-based reinforcement learning (MBRL) agents struggle with long-term dependencies. This limits their ability to effectively solve tasks involving extended time gaps between actions and outcomes, or tasks demanding the recalling of distant observations to inform current actions. To improve temporal coherence, we integrate a new family of state space models (SSMs) in world models of MBRL agents to present a new method, Recall to Imagine (R2I). This integration aims to enhance both long-term memory and long-horizon credit assignment. Through a diverse set of illustrative tasks, we systematically demonstrate that R2I not only establishes a new state-of-the-art for challenging memory and credit assignment RL tasks, such as BSuite and POPGym, but also showcases superhuman performance in the complex memory domain of Memory Maze. At the same time, it upholds comparable performance in classic RL tasks, such as Atari and DMC, suggesting the generality of our method. We also show that R2I is faster than the state-of-the-art MBRL method, DreamerV3, resulting in faster wall-time convergence.

For agents

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

get_harvested_code_for_paper("2403.04253")
get_code_for_paper("2403.04253")
have("2403.04253")

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

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

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

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

Connect an agent — have() is free.