SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.05646 · 2024

ICU-Sepsis: A Benchmark MDP Built from Real Medical Data

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 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, 1 violated it and 0 have no contract verdict; 7 failures 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/2406.05646.json · badge: /api/ran/2406.05646.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
icu-sepsis/icu-sepsis canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
aggregate_results Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/policy_examination/baselines_with_perturb.py
code served (permissive licence) · get_code("ae498a45c4495a8d")
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 json
import numpy as np
import tempfile
import os

# Create temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create sample JSON files that the function will read
param_dirname = "test_params"
sigma_vals = [0.1, 0.5]

# Create mock result files for each sigma value
for sigma in sigma_vals:
    res = {
        'pi_star': {
            'j_mean': [100.5, 101.2, 99.8],
            'ep_len': [50, 52, 48]
        },
        'rand_policy': {
            'j_mean': [20.3, 21.1, 19.9],
            'ep_len': [100, 102, 98]
        },
        'expert_policy': {
            'j_mean': [95.1, 96.2, 94.5],
            'ep_len': [45, 47, 43]
        }
    }
    
    filename = f'perturbed_results_{param_dirname}_sigma_{sigma}.json'
    filepath = os.path.join(temp_dir, filename)
    with open(filepath, 'w') as f:
        json.dump(res, f)

# Change to temp directory so the function can find the files
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    'param_dirname': param_dirname,
    'sigma_vals': sigma_vals
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
check_convergence Ran
ran; our contract draft was wrong, not the code
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/lc_analysis.py
code served (permissive licence) · get_code("c84de84681a7e787")
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 numpy as np

# Construct valid arguments for check_convergence
# The function expects:
# - vals: list of numeric values (convergence metrics)
# - steps: list of step counts
# - delta: float threshold for convergence (default 0.01)

# Create a realistic convergence scenario where values stabilize
# We need len(vals) > 10000 to properly test the loop
np.random.seed(0)

# Create vals that converge: start with high variance, then stabilize
vals = []
# First part: high variance
for i in range(5000):
    vals.append(0.5 + np.random.normal(0, 0.1))

# Second part: converge to ~0.5 with very small variance
for i in range(6000):
    vals.append(0.5 + np.random.normal(0, 0.002))

vals = list(vals)

# Create steps list with same length as vals
# Each entry represents steps taken in that trial
steps = [10 + np.random.randint(0, 5) for _ in range(len(vals))]

# Delta threshold for convergence
delta = 0.01

ARGS = {
    "vals": vals,
    "steps": steps,
    "delta": delta,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tqdm — 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
create_mapping_order Ran
ran, honoured the contract we drafted
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/parse_matrices.py
code served (permissive licence) · get_code("ffb8e0cf947c870e")
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 2, dtype family int; 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.

# Analyzing the function create_mapping_order:
# - n: integer, used in range(n) and arithmetic - represents grid size
# - x: integer, used as starting x coordinate
# - y: integer, used as starting y coordinate

# The function creates a spiral mapping order through an n×n grid
# starting at position (x, y)

ARGS = {
    "n": 4,
    "x": 0,
    "y": 0,
}
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 2, dtype family int — 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
get_action_nums Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_rl_table.py
code served (permissive licence) · get_code("5b61b2112fc9cbeb")
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 Series. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with an action column
# The function filters for values > 0, ranks them, and converts to action numbers
data = {
    'action': [0, 5.2, 3.1, 0, 8.7, 2.4, 0, 6.5],
    'other_col': [1, 2, 3, 4, 5, 6, 7, 8]
}
dataset = pd.DataFrame(data)

ARGS = {
    'Dataset': dataset,
    'action_name': 'action',
    'num_actions': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 and dtype family int 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
get_num_steps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/parse_matrices.py
code served (permissive licence) · get_code("43df7fefce0febfc")
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 int; 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

torch.manual_seed(0)

ARGS = {
    "t": (5, 0)
}
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 tuple, ndim 1, dtype family int — 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
load_pcsd_dict Ran
ran; our contract draft was wrong, not the code
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/lc_analysis.py
code served (permissive licence) · get_code("e570292398b2d734")
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 pickle
import tempfile
import os

# Create a temporary pickle file with sample data
temp_dir = tempfile.mkdtemp()
temp_filename = os.path.join(temp_dir, "test_pcsd.pkl")

# Create sample data to pickle
sample_data = {
    "weights": [1.0, 2.0, 3.0],
    "config": {"learning_rate": 0.001, "batch_size": 32},
    "metadata": "test_metadata"
}

# Write the pickle file
with open(temp_filename, 'wb') as f:
    pickle.dump(sample_data, f)

ARGS = {
    "filename": temp_filename
}
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
load_vals Ran
ran, honoured the contract we drafted
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/lc_analysis.py
code served (permissive licence) · get_code("0c39d7755b7465fd")
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 tempfile
import os

# Create a temporary file with float values
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("1.5\n")
temp_file.write("2.7\n")
temp_file.write("3.14\n")
temp_file.close()

ARGS = {
    "filename": temp_file.name
}
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
normalize_d_0 Ran
ran, violated the contract we drafted
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_matrices.py
code served (permissive licence) · get_code("92fc61f9d64302c3")
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 1, dtype family float, shape (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 numpy as np

# Create a simple normalized distribution array
d_0 = np.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "d_0": d_0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
normalize_tx_mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_matrices.py
code served (permissive licence) · get_code("1c6e6664b9c549ea")
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, 4, 5) 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 numpy as np

# Construct a 3D transition matrix
# Shape: (num_states, num_actions, num_next_states)
# Using distinct dimensions: 3 states, 4 actions, 5 next states
tx_mat = np.random.rand(3, 4, 5) * 100

# Set some rows to have low sums to test the threshold logic
tx_mat[0, 0, :] = np.array([0.1, 0.2, 0.15, 0.05, 0.1])  # sum ~0.6, below threshold
tx_mat[1, 1, :] = np.array([5, 10, 15, 20, 25])  # sum = 75

ARGS = {
    "tx_mat": tx_mat,
    "transition_threshold": 50
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
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 float, shape (3, 4, 5) — shape (3, 4, 5) 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
rl_table_to_unnormalized_matrices Ran
ran; our contract draft was wrong, not the code
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_matrices.py
code served (permissive licence) · get_code("86f5d8790750e5d1")
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 numpy as np
import pandas as pd

# Create a minimal RL table with the required columns
# The function expects: 'bloc', 'state', 'action', 'icustayid', 'outcome_y'
data = {
    'bloc': [1, 2, 3, 4, 5],
    'state': [0, 1, 2, 1, 0],
    'action': [0, 1, 2, 3, 1],
    'icustayid': [1, 1, 1, 1, 1],
    'outcome_y': [0, 0, 0, 0, 1]
}
rl_table = pd.DataFrame(data)

n_states = 3
n_action_levels = 2

ARGS = {
    'rl_table': rl_table,
    'n_states': n_states,
    'n_action_levels': n_action_levels,
    'r_death': -1.0,
    'r_survive': 1.0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, tqdm — 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_features Not yet run
unverified (harvested, no recorded run)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_rl_table.py
code served (permissive licence) · get_code("90d7c880f2588e44")
How it ran

no invocation recorded.

create_valid_dynamics Not yet run
unverified (harvested, no recorded run)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/parse_matrices.py
code served (permissive licence) · get_code("846e3813436d8555")
How it ran

no invocation recorded.

normalize_dataset Not yet run
unverified (harvested, no recorded run)
icu-sepsis/icu-sepsis/packages/icu_sepsis_helpers/icu_sepsis_helpers/mdp_creation/create_rl_table.py
code served (permissive licence) · get_code("527fb598f63946be")
How it ran

no invocation recorded.

Also present in other papers' code

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

We present ICU-Sepsis, an environment that can be used in benchmarks for evaluating reinforcement learning (RL) algorithms. Sepsis management is a complex task that has been an important topic in applied RL research in recent years. Therefore, MDPs that model sepsis management can serve as part of a benchmark to evaluate RL algorithms on a challenging real-world problem. However, creating usable MDPs that simulate sepsis care in the ICU remains a challenge due to the complexities involved in acquiring and processing patient data. ICU-Sepsis is a lightweight environment that models personalized care of sepsis patients in the ICU. The environment is a tabular MDP that is widely compatible and is challenging even for state-of-the-art RL algorithms, making it a valuable tool for benchmarking their performance. However, we emphasize that while ICU-Sepsis provides a standardized environment for evaluating RL algorithms, it should not be used to draw conclusions that guide medical practice.

For agents

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

get_harvested_code_for_paper("2406.05646")
get_code_for_paper("2406.05646")
have("2406.05646")

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

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

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

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

Connect an agent — have() is free.