SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.00999 · ICLR · 2023

Latent State Marginalization as a Low-cost Approach for Improving Exploration

Yoshua Bengio, Dinghuai Zhang, Amy Zhang, Ricky Chen, Qinqing Zheng, Aaron Courville

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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; 0 no recorded run), measured 2026-11-23; 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/2210.00999.json · badge: /api/ran/2210.00999.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
zdhnarsil/stochastic-marginal-actor-critic canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
devindeng94/smac-hard extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
count_parameters Ran
ran on a synthesized input
zdhnarsil/stochastic-marginal-actor-critic/lib/utils.py
code served (permissive licence) · get_code("0c9ebac8c4ff8e79")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

model = SimpleModel()

ARGS = {
    "model": model,
    "requires_grad": False
}
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 int, ndim 0, dtype family int, 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
dreamer_cal_mlmc Ran
ran on a synthesized input
zdhnarsil/stochastic-marginal-actor-critic/visual_control/network.py
code served (permissive licence) · get_code("32699f094e88ca63")
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 3, 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
import math

torch.manual_seed(0)

# Stand-in masker class that provides the get_mask method
class Masker:
    def __init__(self, base):
        self.base = base
    
    def get_mask(self, num_level):
        # Returns a mask of shape (num_level, num_samples)
        # where num_samples = base^(num_level-1)
        num_samples = self.base ** (num_level - 1)
        mask = torch.ones(num_level, num_samples, dtype=torch.bool)
        return mask

# Create masker with base=2
masker = Masker(base=2)

# Parameters for the function
num_level = 3
base = masker.base
num_samples = base ** (num_level - 1)  # 2^(3-1) = 4

# Test case 1: use_orig=False, ndim=2
log_weights_2d = torch.randn(num_samples, 4)  # shape (4, 4)

# Test case 2: use_orig=False, ndim=3
log_weights_3d = torch.randn(num_samples, 2, 4)  # shape (4, 2, 4)

# Test case 3: use_orig=True, ndim=2
log_weights_with_orig_2d = torch.randn(num_samples + 1, 4)  # shape (5, 4)

# Test case 4: use_orig=True, ndim=3
log_weights_with_orig_3d = torch.randn(num_samples + 1, 2, 4)  # shape (5, 2, 4)

# Build ARGS with the simplest case
ARGS = {
    "log_weights": log_weights_2d,
    "num_level": num_level,
    "masker": masker,
    "use_orig": False
}
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 tuple, ndim 3, 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
make_mlp Ran
ran on a synthesized input
zdhnarsil/stochastic-marginal-actor-critic/lib/network.py
code served (permissive licence) · get_code("29e96c8a8bdeae38")
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 Sequential. 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)

# The function make_mlp takes:
# - l: a list of layer dimensions (integers)
# - act: an activation function (nn.Module)
# - tail: a list of additional modules to append

ARGS = {
    "l": [4, 8, 6, 3],  # Input dim 4, hidden 8, hidden 6, output 3
    "act": nn.LeakyReLU(),
    "tail": []
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
makedirs Ran
ran on a synthesized input
zdhnarsil/stochastic-marginal-actor-critic/lib/utils.py
code served (permissive licence) · get_code("b86ab8fb8c757fcc")
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 str. 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

def makedirs(path):
    if not os.path.exists(path):
        try:
            os.makedirs(path)
            print('creating dir: {}'.format(path))
        except OSError:
            print('Failed to create dir: {}'.format(path))
    else:
        print(path, 'already exist!')
    return path

# Create a temporary directory to serve as base
temp_base = tempfile.gettempdir()
test_path = os.path.join(temp_base, 'test_makedirs_' + str(os.getpid()))

ARGS = {
    'path': test_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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
parse_smacv2_distribution Ran
ran; our contract draft was wrong, not the code
devindeng94/smac-hard/previous-versions/v1/on-policy-smac-hard/onpolicy/scripts/train/train_smac.py
pointer only (licence: NONE) · get_code("43dccae99adf8546")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, devindeng94/smac-hard 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.

safe_log Ran
ran, honoured the contract we drafted
zdhnarsil/stochastic-marginal-actor-critic/lib/utils.py
code served (permissive licence) · get_code("13bc23344ef8bd53")
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 (2, 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

torch.manual_seed(0)

# The function safe_log takes a single parameter x and applies clamp then log
# x should be a tensor
x = torch.randn(2, 4).abs() + 0.1  # Small positive tensor to avoid log issues

ARGS = {
    "x": x
}
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 (2, 4) — shape (2, 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (1 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
make_mlp 1 other paper
1 later
2302.05793 (2023-02)
Distributional GFlowNets with Quantile Flows
safe_log 1 other paper
1 dated earlier
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions

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

While the maximum entropy (MaxEnt) reinforcement learning (RL) frameworkoften touted for its exploration and robustness capabilities-is usually motivated from a probabilistic perspective, the use of deep probabilistic models has not gained much traction in practice due to their inherent complexity. In this work, we propose the adoption of latent variable policies within the MaxEnt framework, which we show can provably approximate any policy distribution, and additionally, naturally emerges under the use of world models with a latent belief state. We discuss why latent variable policies are difficult to train, how naïve approaches can fail, then subsequently introduce a series of improvements centered around low-cost marginalization of the latent state, allowing us to make full use of the latent state at minimal additional cost. We instantiate our method under the actorcritic framework, marginalizing both the actor and critic. The resulting algorithm, referred to as Stochastic Marginal Actor-Critic (SMAC), is simple yet effective. We experimentally validate our method on continuous control tasks, showing that effective marginalization can lead to better exploration and more robust training. Our implementation is open sourced at https://github.com/zdhNarsil/ Stochastic-Marginal-Actor-Critic.

For agents

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

get_harvested_code_for_paper("2210.00999")
get_code_for_paper("2210.00999")
have("2210.00999")

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

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

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

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

Connect an agent — have() is free.