SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2001.04032 · 2020

POPCORN: Partially Observed Prediction COnstrained ReiNforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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 8 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2001.04032.json · badge: /api/ran/2001.04032.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
dtak/POPCORN-POMDP canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
adam Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/util.py
code served (permissive licence) · get_code("3f4c74055a033cb3")
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 2, 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 autograd.numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Define parameters for the adam function
x = np.array([0.5, -0.3, 0.2, 0.1])  # Parameter vector
g = np.array([0.01, -0.02, 0.015, -0.01])  # Gradient vector
iter_num = 5  # Current iteration number (0-indexed)
step_size = 0.001  # Learning rate
m = np.array([0.0, 0.0, 0.0, 0.0])  # First moment estimate (momentum)
v = np.array([0.0, 0.0, 0.0, 0.0])  # Second moment estimate (velocity)
b1 = 0.9  # Exponential decay rate for first moment
b2 = 0.999  # Exponential decay rate for second moment
eps = 1e-8  # Small constant for numerical stability

ARGS = {
    "x": x,
    "g": g,
    "iter_num": iter_num,
    "step_size": step_size,
    "m": m,
    "v": v,
    "b1": b1,
    "b2": b2,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
create_single_tiger_env Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/envs_cts.py
code served (permissive licence) · get_code("90d6acc349d5d069")
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 autograd.numpy as np

ARGS = {
    "n_S": 3,
    "sigma": 0.5,
    "R_listen": -0.1,
    "R_good": 1,
    "R_bad": -5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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
create_tiger_env Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/envs_cts.py
code served (permissive licence) · get_code("c00386e85af0f104")
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 autograd.numpy as np

ARGS = {
    "n_S": 3,
    "n_dim": 2,
    "sig_good": 0.5,
    "sig_other": 1.0,
    "R_listen": -0.1,
    "R_good": 1,
    "R_bad": -5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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
create_tiger_witness Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/envs_cts.py
code served (permissive licence) · get_code("230b81c32b380299")
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 autograd.numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define parameters for create_tiger_witness
n_S = 4  # number of states
n_A = 3  # number of actions
d = 2    # number of models

# Create pis: list of initial state distributions
pis = [
    np.array([0.25, 0.25, 0.25, 0.25]),  # first model's pi
    np.array([0.2, 0.3, 0.3, 0.2])       # second model's pi
]

# Create Ts: list of transition matrices (n_S x n_S x n_A)
Ts = [
    np.random.rand(n_S, n_S, n_A),  # first model's T
    np.random.rand(n_S, n_S, n_A)   # second model's T
]

# Create Os: list of observation models (not directly used in function body)
Os = [
    np.random.rand(n_S, n_A),
    np.random.rand(n_S, n_A)
]

# Create Rs: list of reward matrices (n_S x n_A)
Rs = [
    np.random.rand(n_S, n_A),
    np.random.rand(n_S, n_A)
]

# Variance parameters
sig_good = 0.1
sig_other = 0.5

ARGS = {
    "pis": pis,
    "Ts": Ts,
    "Os": Os,
    "Rs": Rs,
    "sig_good": sig_good,
    "sig_other": sig_other
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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
gd_nag Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/util.py
code served (permissive licence) · get_code("071e3368add1eecb")
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

torch.manual_seed(0)

# For gd_nag function, we need:
# x: a tensor (current position)
# g: a tensor (gradient at x - mom_decay*v)
# step_size: a float (learning rate)
# v: a tensor (velocity/momentum, same shape as x)
# mom_decay: a float (momentum decay, default 0.9)

# Create small tensors with distinct shapes to probe dimensions
x = torch.randn(2, 4)  # batch=2, dim=4
g = torch.randn(2, 4)  # same shape as x
v = torch.randn(2, 4)  # same shape as x
step_size = 0.01
mom_decay = 0.9

ARGS = {
    "x": x,
    "g": g,
    "step_size": step_size,
    "v": v,
    "mom_decay": mom_decay
}
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
get_padded_beh_probs_from_IDs Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/util_hypotension.py
code served (permissive licence) · get_code("c559371632c6a9fe")
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 float, shape (3, 7, 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 autograd.numpy as np

# Create sample behavior probability data for different IDs
# Each ID maps to an array of shape (sequence_length, n_actions)
all_beh_probs = {
    'ID_0': np.random.rand(5, 3),  # sequence length 5, 3 actions
    'ID_1': np.random.rand(7, 3),  # sequence length 7, 3 actions
    'ID_2': np.random.rand(3, 3),  # sequence length 3, 3 actions
}

# Create list of IDs to process
IDs = ['ID_0', 'ID_1', 'ID_2']

ARGS = {
    'IDs': IDs,
    'all_beh_probs': all_beh_probs,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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 float, shape (3, 7, 3) — shape (3, 7, 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
lighten_color Ran
ran, honoured the contract we drafted
dtak/POPCORN-POMDP/src/tiger_gmm_results.py
code served (permissive licence) · get_code("79562521f7728505")
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 matplotlib.colors as mc
import colorsys

# Test case 1: matplotlib color string
color_1 = 'g'
amount_1 = 0.3

# Test case 2: hex string
color_2 = '#F034A3'
amount_2 = 0.6

# Test case 3: RGB tuple
color_3 = (0.3, 0.55, 0.1)
amount_3 = 0.5

# We need to provide one set of arguments for the function
# Using the first example from the docstring
ARGS = {
    'color': 'g',
    'amount': 0.3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib — 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
random_MLP_param_inits Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/util_hypotension.py
code served (permissive licence) · get_code("dac6be100b0250f0")
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. 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 autograd.numpy as np

# Define parameters for random_MLP_param_inits
scale = 0.01
layer_sizes = [4, 8, 6, 3]
rs = np.random.RandomState(42)

ARGS = {
    "scale": scale,
    "layer_sizes": layer_sizes,
    "rs": rs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
rprop Ran
ran on a synthesized input
dtak/POPCORN-POMDP/src/util.py
code served (permissive licence) · get_code("b8ed706b3e8f98d4")
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 2, 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 autograd.numpy as np

# Create small test arrays for rprop function
n_params = 4

# Current parameter vector
x = np.array([0.5, -0.3, 0.2, -0.1])

# Current gradient
g = np.array([0.1, -0.05, 0.02, 0.03])

# Last gradient from previous step
last_g = np.array([0.08, -0.04, 0.01, 0.025])

# Current step sizes
step_sizes = np.array([0.01, 0.01, 0.01, 0.01])

# Last parameter update that was applied
last_steps = np.array([0.001, -0.0005, 0.0002, 0.0003])

# Current objective value
obj = 0.5

# Previous objective value
last_obj = 0.52

# Optional hyperparameters with default values
upper_mult = 1.2
lower_mult = 0.5
upper_cap = 0.1
lower_cap = 1e-08

ARGS = {
    'x': x,
    'g': g,
    'last_g': last_g,
    'step_sizes': step_sizes,
    'last_steps': last_steps,
    'obj': obj,
    'last_obj': last_obj,
    'upper_mult': upper_mult,
    'lower_mult': lower_mult,
    'upper_cap': upper_cap,
    'lower_cap': lower_cap,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
get_padded_databatch_from_IDs Not yet run
unverified (harvested, no recorded run)
dtak/POPCORN-POMDP/src/util_hypotension.py
code served (permissive licence) · get_code("3fa8b94273bbed0b")
How it ran

no invocation recorded.

params_init Not yet run
unverified (harvested, no recorded run)
dtak/POPCORN-POMDP/src/param_inits.py
code served (permissive licence) · get_code("1b85f7b4f3581d2a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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.

FunctionAlso present inEarliest-datedOthers named
lighten_color 6 other papers
6 later
2210.01240 (2022-10)
Language Models Are Greedy Reasoners: A Systematic Formal Analysis of Chain-of-Thought
2301.08517 (2023-01)
Cohere: Managing Differential Privacy in Large Scale Systems
2305.15269 (2023-05)
Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examples
and 3 more not named here

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-21.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many medical decision-making tasks can be framed as partially observed Markov decision processes (POMDPs). However, prevailing two-stage approaches that first learn a POMDP and then solve it often fail because the model that best fits the data may not be well suited for planning. We introduce a new optimization objective that (a) produces both high-performing policies and high-quality generative models, even when some observations are irrelevant for planning, and (b) does so in batch off-policy settings that are typical in healthcare, when only retrospective data is available. We demonstrate our approach on synthetic examples and a challenging medical decision-making problem.

For agents

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

get_harvested_code_for_paper("2001.04032")
get_code_for_paper("2001.04032")
have("2001.04032")

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

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

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

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

Connect an agent — have() is free.