SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.06854 · ICML · 2021

A Deep Reinforcement Learning Approach to Marginalized Importance Sampling with the Successor Representation

Doina Precup, David Meger, Scott Fujimoto

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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.06854.json · badge: /api/ran/2106.06854.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
sfujim/SR-DICE marked official in Papers with Code
Papers with Code archive
4 ran · 0 no recorded run
FunctionStatusWhere it lives
Conv_Q Ran
ran on a synthesized input · constructed an object; no result was computed
sfujim/SR-DICE/atari/SR_DICE.py
code served (permissive licence) · get_code("ca3a9e681e56851d")
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 an instance of its own class, Conv_Q: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# Parameters for Conv_Q.__init__
frames = 4
num_actions = 18

ARGS = {
    "frames": frames,
    "num_actions": num_actions,
}
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 Conv_Q — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Conv_Q 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
Encoder_Decoder Ran
ran on a synthesized input · constructed an object; no result was computed
sfujim/SR-DICE/atari/SR_DICE.py
code served (permissive licence) · get_code("16482b78b4ef7766")
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 an instance of its own class, Encoder_Decoder: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'frames': 1,
    'num_actions': 4,
    'device': 'cpu'
}
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 Encoder_Decoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Encoder_Decoder 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
FC_Q Ran
ran on a synthesized input · constructed an object; no result was computed
sfujim/SR-DICE/atari/SR_DICE.py
code served (permissive licence) · get_code("509590834c75bc2c")
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 an instance of its own class, FC_Q: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# FC_Q takes state_dim and num_actions as parameters
state_dim = 4
num_actions = 3

ARGS = {
    "state_dim": state_dim,
    "num_actions": num_actions,
}
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 FC_Q — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FC_Q 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
SR_DICE Ran
ran on a synthesized input · constructed an object; no result was computed
sfujim/SR-DICE/atari/SR_DICE.py
code served (permissive licence) · get_code("0ed5a19040a5655f")
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 an instance of its own class, SR_DICE: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import torch.nn.functional as F
import copy

torch.manual_seed(0)

class SimpleReplayBuffer:
    def __init__(self, device):
        self.device = device
    
    def sample(self):
        batch_size = 2
        state = torch.randn(batch_size, 4, 84, 84, device=self.device)
        action = torch.randint(0, 4, (batch_size,), device=self.device)
        next_state = torch.randn(batch_size, 1, 84, 84, device=self.device)
        reward = torch.randn(batch_size, 1, device=self.device)
        not_done = torch.ones(batch_size, 1, device=self.device)
        return state, action, next_state, reward, not_done

class SimplePolicy(nn.Module):
    def __init__(self, num_actions):
        super().__init__()
        self.linear = nn.Linear(3136, num_actions)
    
    def forward(self, state):
        batch_size = state.shape[0]
        flat = state.reshape(batch_size, -1)
        return self.linear(flat)

device = torch.device('cpu')
num_actions = 4
state_dim = 3136

ARGS = {
    'is_atari': True,
    'num_actions': num_actions,
    'state_dim': state_dim,
    'device': device,
    'discount': 0.99,
    'optimizer': 'Adam',
    'optimizer_parameters': {'lr': 0.0001},
    'polyak_target_update': False,
    'target_update_frequency': 8000.0,
    'tau': 0.005,
    'initial_eps': 1.0,
    'end_eps': 0.001,
    'eps_decay_period': 250000.0,
    'eval_eps': 0.001,
}
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 SR_DICE — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SR_DICE 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

Also present in other papers' code

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

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

Marginalized importance sampling (MIS), which measures the density ratio between the stateaction occupancy of a target policy and that of a sampling distribution, is a promising approach for off-policy evaluation. However, current stateof-the-art MIS methods rely on complex optimization tricks and succeed mostly on simple toy problems. We bridge the gap between MIS and deep reinforcement learning by observing that the density ratio can be computed from the successor representation of the target policy. The successor representation can be trained through deep reinforcement learning methodology and decouples the reward optimization from the dynamics of the environment, making the resulting algorithm stable and applicable to high-dimensional domains. We evaluate the empirical performance of our approach on a variety of challenging Atari and MuJoCo environments.

For agents

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

get_harvested_code_for_paper("2106.06854")
get_code_for_paper("2106.06854")
have("2106.06854")

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

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

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

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

Connect an agent — have() is free.