SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.08226 · 2019

Unsupervised State Representation Learning in Atari

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 2 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 2 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/1906.08226.json · badge: /api/ran/1906.08226.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
mila-iqia/atari-representation-learning canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
mengli11235/mst_dim community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
mengli11235/dim-ua extension (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
ankeshanand/atari-representation-learning community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_accuracy Ran
ran, honoured the contract we drafted
mengli11235/dim-ua/atariari/methods/utils.py
code served (permissive licence) · get_code("33a582f5c65e69d0")
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 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

torch.manual_seed(0)

# Create small tensors for predictions and labels
# preds should be float values (probabilities or logits)
# y should be float values (binary labels or probabilities)
preds = torch.tensor([[0.2, 0.8, 0.3, 0.9],
                      [0.1, 0.6, 0.7, 0.4]], dtype=torch.float32)

y = torch.tensor([[0.0, 1.0, 0.0, 1.0],
                  [0.0, 1.0, 1.0, 0.0]], dtype=torch.float32)

ARGS = {
    "preds": preds,
    "y": y
}
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 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
calculate_multiclass_accuracy Ran
ran, honoured the contract we drafted
mengli11235/dim-ua/atariari/methods/utils.py
code served (permissive licence) · get_code("ac47f2a9466c063d")
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 float, 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

torch.manual_seed(0)

# Create small tensors for multiclass classification
# preds: logits with shape (batch_size=2, num_classes=4)
# labels: class indices with shape (batch_size=2,)
preds = torch.randn(2, 4)
labels = torch.tensor([0, 2])

ARGS = {
    "preds": preds,
    "labels": labels,
}
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 float, 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
calculate_multiclass_f1_score Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mengli11235/dim-ua/atariari/methods/utils.py
code served (permissive licence) · get_code("729c53ca6081bb07")
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 float, 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
from sklearn.metrics import f1_score as compute_f1_score

torch.manual_seed(0)

# Create small tensors for testing
# preds: logits tensor with shape (batch_size=2, num_classes=4)
# After argmax(dim=1), will produce class indices
preds = torch.randn(2, 4)

# labels: ground truth class indices with shape (batch_size=2,)
labels = torch.tensor([0, 2])

ARGS = {
    "preds": preds,
    "labels": labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
compute_cov_a Ran
ran on a synthesized input
mengli11235/mst_dim/a2c_ppo_acktr/algo/kfac.py
code served (permissive licence) · get_code("6aff48ec0d1463e1")
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 (27, 27) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# For Conv2d case: a should be a 4D tensor (batch, channels, height, width)
# layer_info should be (kernel_size, stride, padding)
# fast_cnn is a boolean

# Construct a small Conv2d input tensor
# batch_size=2, channels=3, height=5, width=5
a_conv2d = torch.randn(2, 3, 5, 5)

# layer_info for Conv2d: (kernel_size, stride, padding)
# kernel_size is a tuple (h, w)
# stride is a tuple (h, w)
# padding is a tuple (h, w)
layer_info_conv2d = ((3, 3), (1, 1), (1, 1))

# For AddBias case: a should be a tensor with size(0) as batch dimension
a_addbias = torch.randn(2, 4)

# Test parameters for Conv2d with fast_cnn=True
ARGS_conv2d_fast = {
    'a': a_conv2d,
    'classname': 'Conv2d',
    'layer_info': layer_info_conv2d,
    'fast_cnn': True
}

# Test parameters for Conv2d with fast_cnn=False
ARGS_conv2d_slow = {
    'a': a_conv2d,
    'classname': 'Conv2d',
    'layer_info': layer_info_conv2d,
    'fast_cnn': False
}

# Test parameters for AddBias
ARGS_addbias = {
    'a': a_addbias,
    'classname': 'AddBias',
    'layer_info': None,
    'fast_cnn': False
}

# Use the Conv2d fast case as the primary test
ARGS = ARGS_conv2d_fast
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 (27, 27) — shape (27, 27) 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
compute_cov_g Ran
ran on a synthesized input
mengli11235/mst_dim/a2c_ppo_acktr/algo/kfac.py
code served (permissive licence) · get_code("d9fd61d47e236b09")
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 (4, 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
import torch.nn as nn

torch.manual_seed(0)

# For Conv2d case: g needs shape (batch_size, channels, height, width)
# For AddBias case: g needs shape (batch_size, features, spatial_dims)
# For fast_cnn=True: g.view(batch, channels, -1) then sum(-1) -> (batch, channels)
# For fast_cnn=False: transpose and view operations

# Create a small gradient tensor for Conv2d
batch_size = 2
channels = 4
height = 3
width = 3

# Test with Conv2d classname and fast_cnn=True
g_conv2d_fast = torch.randn(batch_size, channels, height, width)

# For AddBias, need (batch_size, features, spatial_dims)
g_addbias = torch.randn(batch_size, 5, 6)

# layer_info is accessed but not used in the function body
layer_info = {}

ARGS = {
    "g": g_conv2d_fast,
    "classname": "Conv2d",
    "layer_info": layer_info,
    "fast_cnn": True,
}
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 (4, 4) — shape (4, 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
find_checkpoint Ran
ran on a synthesized input
mengli11235/mst_dim/visualize.py
code served (permissive licence) · get_code("7c1ee3a75ad60f87")
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. 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 glob
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create game directories with log files
game1_dir = os.path.join(temp_dir, 'game1')
game2_dir = os.path.join(temp_dir, 'game2')
os.makedirs(game1_dir)
os.makedirs(game2_dir)

# Create log files with test content
log_file1 = os.path.join(game1_dir, '_e.log')
log_file2 = os.path.join(game2_dir, '_e.log')

with open(log_file1, 'w') as f:
    f.write('test log content 1')

with open(log_file2, 'w') as f:
    f.write('test log content 2')

# Create another set with different postfix
game3_dir = os.path.join(temp_dir, 'game3')
os.makedirs(game3_dir)
log_file3 = os.path.join(game3_dir, 'custom_e.log')
with open(log_file3, 'w') as f:
    f.write('test log content 3')

ARGS = {
    'base_path': temp_dir,
    'postfix': ''
}
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 — a tuple 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
summarize Ran
ran on a synthesized input
mengli11235/mst_dim/visualize.py
code served (permissive licence) · get_code("8c0759e56e428dd0")
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 re

def summarize_by_cat(dict, subcat='across_categories_avg_acc'):
    summarized = {}
    mean_cat = 0
    num_games = len(dict.keys())
    for key in dict.keys():
        files = dict[key]
        categories = 0
        for f in files:
            x = re.search(subcat + '\\s0.*', f)
            if x is not None:
                categories += float(x.group(0).split()[1])
            else:
                print(key + ' has no ' + subcat)
                categories = 0
                num_games -= 1
                break
        categories /= len(files)
        mean_cat += categories
        summarized[key] = categories
    print(str(num_games) + ' out of ' + str(len(dict.keys())))
    summarized['mean'] = mean_cat / num_games
    return summarized

def summarize(dict, cat_list):
    dict_list = {}
    for c in cat_list:
        dict_list[c] = summarize_by_cat(dict, c)
    return dict_list


# Construct valid arguments for summarize()
# The function expects:
# - dict: a dictionary where keys are game names and values are lists of strings
#         containing results with patterns like "across_categories_avg_acc 0 0.85"
# - cat_list: a list of category strings to search for

input_dict = {
    'game1': [
        'across_categories_avg_acc 0 0.85 extra_info',
        'across_categories_avg_acc 0 0.90 extra_info',
    ],
    'game2': [
        'across_categories_avg_acc 0 0.75 extra_info',
        'across_categories_avg_acc 0 0.80 extra_info',
        'across_categories_avg_acc 0 0.78 extra_info',
    ],
}

category_list = ['across_categories_avg_acc']

ARGS = {
    'dict': input_dict,
    'cat_list': category_list,
}
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
summarize_by_cat Ran
ran on a synthesized input
mengli11235/mst_dim/visualize.py
code served (permissive licence) · get_code("eb759f58e5c72c18")
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 re

def summarize_by_cat(dict, subcat='across_categories_avg_acc'):
    summarized = {}
    mean_cat = 0
    num_games = len(dict.keys())
    for key in dict.keys():
        files = dict[key]
        categories = 0
        for f in files:
            x = re.search(subcat + '\\s0.*', f)
            if x is not None:
                categories += float(x.group(0).split()[1])
            else:
                print(key + ' has no ' + subcat)
                categories = 0
                num_games -= 1
                break
        categories /= len(files)
        mean_cat += categories
        summarized[key] = categories
    print(str(num_games) + ' out of ' + str(len(dict.keys())))
    summarized['mean'] = mean_cat / num_games
    return summarized


# Construct test data
# The function expects a dict where:
# - keys are game names (strings)
# - values are lists of files (strings) containing text with the subcat pattern
# 
# The regex pattern looks for: subcat + '\s0.*' and extracts a float from split()[1]
# Example: "across_categories_avg_acc 0.85 other_data"

test_dict = {
    'game1': [
        'across_categories_avg_acc 0.75 extra_info',
        'across_categories_avg_acc 0.85 extra_info',
        'across_categories_avg_acc 0.80 extra_info'
    ],
    'game2': [
        'across_categories_avg_acc 0.90 extra_info',
        'across_categories_avg_acc 0.92 extra_info'
    ],
    'game3': [
        'across_categories_avg_acc 0.65 extra_info',
        'across_categories_avg_acc 0.70 extra_info',
        'across_categories_avg_acc 0.68 extra_info'
    ]
}

ARGS = {
    'dict': test_dict,
    'subcat': 'across_categories_avg_acc'
}
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
majority_baseline Not yet run
unverified (harvested, no recorded run)
ankeshanand/atari-representation-learning/atariari/methods/majority.py
code served (permissive licence) · get_code("78832d905c5c1834")
How it ran

no invocation recorded.

ram2label Not yet run
unverified (harvested, no recorded run)
mila-iqia/atari-representation-learning/atariari/benchmark/wrapper.py
code served (permissive licence) · get_code("030e6f81007d1713")
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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 7 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
compute_cov_a 8 other papers
4 dated earlier, 4 later
1803.01273 (2018-03)
Accelerating Natural Gradient with Higher-Order Invariance
1806.05635 (2018-06)
Self-Imitation Learning
1903.04110 (2019-03)
Hybrid Reinforcement Learning with Expert State Sequences
and 5 more not named here
compute_cov_g 8 other papers
4 dated earlier, 4 later
1803.01273 (2018-03)
Accelerating Natural Gradient with Higher-Order Invariance
1806.05635 (2018-06)
Self-Imitation Learning
1903.04110 (2019-03)
Hybrid Reinforcement Learning with Expert State Sequences
and 5 more not named here
calculate_accuracy 2 other papers
2 later
2007.05929 (2020-07)
Data-Efficient Reinforcement Learning with Self-Predictive Representations
2007.16041 (2020-07)
Whole MILC: generalizing learned dynamics across tasks, datasets, and populations

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

State representation learning, or the ability to capture latent generative factors of an environment, is crucial for building intelligent agents that can perform a wide variety of tasks. Learning such representations without supervision from rewards is a challenging open problem. We introduce a method that learns state representations by maximizing mutual information across spatially and temporally distinct features of a neural encoder of the observations. We also introduce a new benchmark based on Atari 2600 games where we evaluate representations based on how well they capture the ground truth state variables. We believe this new framework for evaluating representation learning models will be crucial for future representation learning research. Finally, we compare our technique with other state-of-the-art generative and contrastive representation learning methods. The code associated with this work is available at https://github.com/mila-iqia/atari-representation-learning

For agents

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

get_harvested_code_for_paper("1906.08226")
get_code_for_paper("1906.08226")
have("1906.08226")

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

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

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

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

Connect an agent — have() is free.