SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.02098 · 2022

A Machine with Short-Term, Episodic, and Semantic Memory Systems

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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 6 have no contract verdict; 0 failures of our instrument; 4 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/2212.02098.json · badge: /api/ran/2212.02098.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
humemai/agent-room-env-v1 canonical (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
FunctionStatusWhere it lives
compute_gae Ran
ran on a synthesized input
humemai/agent-room-env-v1/agent/ppo/utils.py
code served (permissive licence) · get_code("095f68d3628f0df1")
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 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
import numpy as np
from collections import deque

torch.manual_seed(0)

# Create simple list-based arguments for compute_gae
# The function expects lists of scalars/numbers, not tensors

# Sequence length
seq_len = 5

# next_value: a single scalar value for the next state
next_value = 0.5

# rewards: list of rewards for each timestep
rewards = [1.0, 0.5, 2.0, 1.5, 0.8]

# masks: list of masks (1.0 for continuing, 0.0 for terminal states)
masks = [1.0, 1.0, 1.0, 1.0, 0.0]

# values: list of state values for each timestep
values = [0.2, 0.4, 0.6, 0.8, 1.0]

# gamma: discount factor
gamma = 0.99

# tau: GAE parameter (lambda in original paper)
tau = 0.95

ARGS = {
    "next_value": next_value,
    "rewards": rewards,
    "masks": masks,
    "values": values,
    "gamma": gamma,
    "tau": tau,
}
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 list, ndim 1, dtype family float — 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
compute_loss Ran
ran on a synthesized input
humemai/agent-room-env-v1/agent/dqn/utils.py
code served (permissive licence) · get_code("16559d8f2cc916ae")
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 0, dtype family float, 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 torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a simple DQN network that takes state and outputs Q-values
class SimpleDQN(nn.Module):
    def __init__(self, state_dim=4, action_dim=3):
        super(SimpleDQN, self).__init__()
        self.fc1 = nn.Linear(state_dim, 8)
        self.fc2 = nn.Linear(8, action_dim)
    
    def forward(self, x):
        # Handle both numpy arrays and tensors
        if isinstance(x, np.ndarray):
            x = torch.FloatTensor(x)
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create DQN and target DQN
dqn = SimpleDQN(state_dim=4, action_dim=3)
dqn_target = SimpleDQN(state_dim=4, action_dim=3)

# Create sample batch data
batch_size = 2
state_dim = 4
action_dim = 3

samples = {
    'obs': np.random.randn(batch_size, state_dim).astype(np.float32),
    'next_obs': np.random.randn(batch_size, state_dim).astype(np.float32),
    'acts': np.array([0, 1], dtype=np.int64),  # Action indices
    'rews': np.array([[1.0], [0.5]], dtype=np.float32),  # Rewards
    'done': np.array([[0.0], [1.0]], dtype=np.float32),  # Done flags
}

ARGS = {
    'samples': samples,
    'device': 'cpu',
    'dqn': dqn,
    'dqn_target': dqn_target,
    'ddqn': True,
    'gamma': 0.99,
}
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 0, dtype family float, 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
load_training_val_test_results Ran
ran on a synthesized input
humemai/agent-room-env-v1/plotting.py
code served (permissive licence) · get_code("231b2904c290d630")
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 os
import tempfile
import numpy as np
import pandas as pd

# Create a temporary directory structure with mock CSV files
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data', 'v1-question_prob=1.0')

# Create subdirectories for different kinds
for kind in ['train_loss', 'train_total_reward', 'val_total_reward_mean', 'test_total_reward_mean']:
    kind_dir = os.path.join(data_dir, kind)
    os.makedirs(kind_dir, exist_ok=True)

# Helper function to create CSV files
def create_csv_files(data_dir, kind, capacity, pretrain, des_size):
    kind_dir = os.path.join(data_dir, kind)
    
    # Determine number of rows based on kind
    if 'train' in kind or 'val' in kind:
        if 'reward' in kind:
            num_rows = 16
        else:
            num_rows = 1000
    elif 'test' in kind:
        num_rows = 1
    else:
        num_rows = 1
    
    # Create 5 CSV files for 5 runs
    for run_id in range(5):
        filename = os.path.join(
            kind_dir,
            f'run_{run_id}_capacity={capacity}_pretrain={pretrain}_des_size={des_size}.csv'
        )
        df = pd.DataFrame({
            'Step': np.arange(num_rows),
            'Value': np.random.rand(num_rows)
        })
        df.to_csv(filename, index=False)

# Create CSV files for train_total_reward (the default kind)
create_csv_files(data_dir, 'train_total_reward', capacity=32, pretrain=False, des_size='l')

# Setup arguments
ARGS = {
    'data_dir': data_dir,
    'kind': 'train_total_reward',
    'capacity': 32,
    'pretrain': False,
    'des_size': 'l'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
read_json Ran
ran on a synthesized input
humemai/agent-room-env-v1/agent/utils.py
code served (permissive licence) · get_code("60c58b20152f06b8")
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 json
import tempfile
import os

# Create a temporary JSON file for testing
temp_dir = tempfile.mkdtemp()
test_json_path = os.path.join(temp_dir, "test.json")

# Write a sample JSON file
test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "data"}
}

with open(test_json_path, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    "fname": test_json_path
}
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 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
read_yaml Ran
ran on a synthesized input
humemai/agent-room-env-v1/agent/utils.py
code served (permissive licence) · get_code("a6496700c0e2a21b")
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 logging
import yaml
import tempfile
import os

# Create a temporary YAML file with valid content
temp_dir = tempfile.mkdtemp()
yaml_file = os.path.join(temp_dir, "test.yaml")

yaml_content = {
    "model": "test_model",
    "batch_size": 32,
    "learning_rate": 0.001,
    "layers": [1, 2, 3]
}

with open(yaml_file, 'w') as f:
    yaml.dump(yaml_content, f)

ARGS = {
    "fname": yaml_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
split_by_possessive Ran
ran on a synthesized input
humemai/agent-room-env-v1/agent/utils.py
code served (permissive licence) · get_code("d9cf8ca093d58d34")
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.

import logging

def split_by_possessive(name_entity: str) -> tuple[str, str]:
    """Separate name and entity from the given string.

    Args:
        name_entity: e.g., "tae's laptop"

    Returns:
        name: e.g., tae
        entity: e.g., laptop

    """
    logging.debug(f'spliting name and entity from {name_entity}')
    if "'s " in name_entity:
        name, entity = name_entity.split("'s ")
    else:
        name, entity = (None, None)
    return (name, entity)


ARGS = {
    "name_entity": "tae's laptop"
}
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
select_action Not yet run
unverified (harvested, no recorded run)
humemai/agent-room-env-v1/agent/dqn/utils.py
code served (permissive licence) · get_code("750debd5365bc34e")
How it ran

no invocation recorded.

select_action Not yet run
unverified (harvested, no recorded run)
humemai/agent-room-env-v1/agent/ppo/utils.py
code served (permissive licence) · get_code("8ee60ab856ea7100")
How it ran

no invocation recorded.

update_model Not yet run
unverified (harvested, no recorded run)
humemai/agent-room-env-v1/agent/dqn/utils.py
code served (permissive licence) · get_code("83251feeaee5549b")
How it ran

no invocation recorded.

update_model Not yet run
unverified (harvested, no recorded run)
humemai/agent-room-env-v1/agent/ppo/utils.py
code served (permissive licence) · get_code("f152566ebadd51ec")
How it ran

no invocation recorded.

Also present in other papers' code

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

Inspired by the cognitive science theory of the explicit human memory systems, we have modeled an agent with short-term, episodic, and semantic memory systems, each of which is modeled with a knowledge graph. To evaluate this system and analyze the behavior of this agent, we designed and released our own reinforcement learning agent environment, "the Room", where an agent has to learn how to encode, store, and retrieve memories to maximize its return by answering questions. We show that our deep Q-learning based agent successfully learns whether a short-term memory should be forgotten, or rather be stored in the episodic or semantic memory systems. Our experiments indicate that an agent with human-like memory systems can outperform an agent without this memory structure in the environment.

For agents

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

get_harvested_code_for_paper("2212.02098")
get_code_for_paper("2212.02098")
have("2212.02098")

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

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

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

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

Connect an agent — have() is free.