SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.07156 · 2021

Temporal Predictive Coding For Model-Based Planning In Latent Space

arXiv · PDF · Open in the Atlas

Code that ran

6 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 4 have no contract verdict; 1 failure of our instrument; 3 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/2106.07156.json · badge: /api/ran/2106.07156.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
tung-nd/TPC-tensorflow canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
VinAIResearch/TPC-tensorflow canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
generate_rain Ran
ran on a synthesized input
tung-nd/TPC-tensorflow/gen_rain.py
code served (permissive licence) · get_code("2889a9d79fbadaca")
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 3, dtype family int, shape (64, 64, 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 cv2
import numpy as np

# Generate a list of rain drop positions
# Each drop is [x, y] coordinate
drops = [
    [10, 5],
    [20, 15],
    [30, 25],
    [45, 40],
    [55, 50]
]

ARGS = {
    "drops": drops,
    "imshape": (64, 64, 3),
    "slant": 1,
    "drop_length": 2,
    "drop_width": 1,
    "drop_color": (255, 255, 255),
    "blur": True,
    "shady": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (64, 64, 3) — shape (64, 64, 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
get_url Ran
ran on a synthesized input
tung-nd/TPC-tensorflow/download_videos.py
code served (permissive licence) · get_code("7cfa9dd88da0b290")
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 json
import tempfile
import os

# Create a temporary JSON file with the expected structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_data.json")

test_data = {
    "item1": {
        "url": "https://example.com/car1.jpg",
        "annotations": {
            "label": "driving car"
        }
    },
    "item2": {
        "url": "https://example.com/person.jpg",
        "annotations": {
            "label": "person"
        }
    },
    "item3": {
        "url": "https://example.com/car2.jpg",
        "annotations": {
            "label": "driving car"
        }
    },
    "item4": {
        "url": "https://example.com/truck.jpg",
        "annotations": {
            "label": "truck"
        }
    }
}

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

ARGS = {
    "path": temp_file
}
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 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
iid_nce_seq Ran
ran on a synthesized input
tung-nd/TPC-tensorflow/losses.py
code served (permissive licence) · get_code("51b280d33686df20")
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 EagerTensor, 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 tensorflow as tf

# Set random seed for reproducibility
tf.random.set_seed(0)

# Create a small batch of sequence embeddings
# Shape: (batch_size, seq_length, state_dim)
batch_size = 2
seq_length = 3
state_dim = 4

seq_embed = tf.random.normal(
    shape=(batch_size, seq_length, state_dim),
    dtype=tf.float32
)

ARGS = {
    "seq_embed": seq_embed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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_baselines Ran
ran, honoured the contract we drafted
VinAIResearch/TPC-tensorflow/plotting.py
code served (permissive licence) · get_code("2f2cf1bbab74e2d7")
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 collections
import json
import pathlib
import re
import tempfile
import os

Run = collections.namedtuple('Run', 'task method seed xs ys color')

# Create a temporary directory with baseline JSON files
temp_dir = tempfile.mkdtemp()
baselines_dir = os.path.join(temp_dir, 'baselines')
os.makedirs(baselines_dir, exist_ok=True)

# Write sample baseline JSON files
baseline_data_1 = {
    "task_a": {
        "method_x": 0.85,
        "method_y": 0.90
    }
}
baseline_data_2 = {
    "task_b": {
        "method_x": 0.75,
        "method_z": 0.88
    }
}

with open(os.path.join(baselines_dir, 'baseline1.json'), 'w') as f:
    json.dump(baseline_data_1, f)

with open(os.path.join(baselines_dir, 'baseline2.json'), 'w') as f:
    json.dump(baseline_data_2, f)

# Create a mock args object with required attributes
class MockArgs:
    def __init__(self):
        self.baselines = [re.compile(r'method_x'), re.compile(r'method_z')]
        self.colors = {}
        self.palette = ['red', 'blue', 'green', 'yellow', 'purple']

args_obj = MockArgs()

# Monkey patch __file__ for the module context
import sys
mock_module = type(sys)('mock_module')
mock_module.__file__ = os.path.join(baselines_dir, '..', 'dummy.py')
sys.modules['mock_module'] = mock_module

ARGS = {
    'args': args_obj
}
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 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
load_run Ran
ran; our contract draft was wrong, not the code
VinAIResearch/TPC-tensorflow/plotting.py
code served (permissive licence) · get_code("91b1494075fd845f")
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 Run. 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 collections
import json
import pandas as pd
from pathlib import Path
import tempfile

Run = collections.namedtuple('Run', 'task method seed xs ys color')

# Create a temporary directory and file structure for testing
temp_dir = tempfile.TemporaryDirectory()
indir = Path(temp_dir.name)

# Create subdirectories: task/method/seed/
task_dir = indir / "task1" / "method_a" / "seed_42"
task_dir.mkdir(parents=True, exist_ok=True)

# Create a test JSON lines file with data
filename = task_dir / "data.jsonl"
test_data = [
    {"step": 100, "loss": 0.5, "accuracy": 0.8},
    {"step": 200, "loss": 0.3, "accuracy": 0.85},
    {"step": 300, "loss": 0.2, "accuracy": 0.9},
]
with filename.open('w') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

# Create args object with required attributes
class Args:
    def __init__(self):
        self.xaxis = "step"
        self.yaxis = "loss"
        self.colors = {
            "method_a": "#FF0000",
            "method_b": "#00FF00",
            "method_c": "#0000FF"
        }

args = Args()

ARGS = {
    "filename": filename,
    "indir": indir,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Run — a Run 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
nest_summary Ran
ran on a synthesized input
tung-nd/TPC-tensorflow/tools.py
code served (permissive licence) · get_code("0ff405af2200f366")
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)

# The function recursively processes nested structures (dicts, lists)
# and converts objects with 'shape' attribute to string representations
# Test with a nested structure containing tensors and arrays

tensor_2d = torch.randn(2, 4)
tensor_3d = torch.randn(3, 5, 6)
array_1d = np.array([1, 2, 3])
array_2d = np.array([[1, 2], [3, 4], [5, 6]])

structure = {
    'tensors': [tensor_2d, tensor_3d],
    'arrays': {
        'arr1d': array_1d,
        'arr2d': array_2d
    },
    'scalar': 42,
    'nested_list': [
        {'deep_tensor': torch.randn(7, 8, 9)},
        [array_1d, tensor_2d]
    ],
    'string': 'test'
}

ARGS = {
    'structure': structure
}
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
encode_gif Not yet run
unverified (harvested, no recorded run)
tung-nd/TPC-tensorflow/tools.py
code served (permissive licence) · get_code("f30faaa0a3610e6d")
How it ran

no invocation recorded.

graph_summary Not yet run
unverified (harvested, no recorded run)
tung-nd/TPC-tensorflow/tools.py
code served (permissive licence) · get_code("1a89b7d1602aedb6")
How it ran

no invocation recorded.

load_runs Not yet run
unverified (harvested, no recorded run)
VinAIResearch/TPC-tensorflow/plotting.py
code served (permissive licence) · get_code("e6df7a3762e59661")
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, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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_url 1 other paper
1 later
2110.14565 (2021-10)
DreamerPro: Reconstruction-Free Model-Based Reinforcement Learning with Prototypical Representations
graph_summary 1 other paper
1 dated earlier
1912.01603 (2019-12)
Dream to Control: Learning Behaviors by Latent Imagination
load_baselines 1 other paper
1 dated earlier
1912.01603 (2019-12)
Dream to Control: Learning Behaviors by Latent Imagination
load_runs 1 other paper
1 dated earlier
1912.01603 (2019-12)
Dream to Control: Learning Behaviors by Latent Imagination
nest_summary 1 other paper
1 dated earlier
1912.01603 (2019-12)
Dream to Control: Learning Behaviors by Latent Imagination

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

High-dimensional observations are a major challenge in the application of model-based reinforcement learning (MBRL) to real-world environments. To handle high-dimensional sensory inputs, existing approaches use representation learning to map high-dimensional observations into a lower-dimensional latent space that is more amenable to dynamics estimation and planning. In this work, we present an information-theoretic approach that employs temporal predictive coding to encode elements in the environment that can be predicted across time. Since this approach focuses on encoding temporally-predictable information, we implicitly prioritize the encoding of task-relevant components over nuisance information within the environment that are provably task-irrelevant. By learning this representation in conjunction with a recurrent state space model, we can then perform planning in latent space. We evaluate our model on a challenging modification of standard DMControl tasks where the background is replaced with natural videos that contain complex but irrelevant information to the planning task. Our experiments show that our model is superior to existing methods in the challenging complex-background setting while remaining competitive with current state-of-the-art models in the standard setting.

For agents

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

get_harvested_code_for_paper("2106.07156")
get_code_for_paper("2106.07156")
have("2106.07156")

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

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

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

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

Connect an agent — have() is free.