SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.09817 · 2023

Interpretable machine learning for time-to-event prediction in medicine and healthcare

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 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/2303.09817.json · badge: /api/ran/2303.09817.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
mi2datalab/interpret-time-to-event canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
load_dataset Ran
ran; our contract draft was wrong, not the code
mi2datalab/interpret-time-to-event/src/main_pdp.py
code served (permissive licence) · get_code("3e769d0a774c22ca")
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
import tempfile
import json
import os
from collections import OrderedDict

# Create temporary CSV files for training and validation data
def create_temp_csv():
    # Create a temporary directory
    temp_dir = tempfile.mkdtemp()
    
    # Create training data CSV
    train_data = {
        'Status': [1, 0, 1, 0],
        'Survival_in_days': [100.5, 200.3, 150.7, 250.2],
        'feature_group1': [1.0, 2.0, 3.0, 4.0],
        'feature_group1': [1.1, 2.1, 3.1, 4.1],
        'feature_group2': [5.0, 6.0, 7.0, 8.0],
        'feature_group2': [5.1, 6.1, 7.1, 8.1],
    }
    # Recreate with proper column names (no duplicate keys)
    train_df = pd.DataFrame({
        'Status': [1, 0, 1, 0],
        'Survival_in_days': [100.5, 200.3, 150.7, 250.2],
        'col_feature_group1_a': [1.0, 2.0, 3.0, 4.0],
        'col_feature_group1_b': [1.1, 2.1, 3.1, 4.1],
        'col_feature_group2_a': [5.0, 6.0, 7.0, 8.0],
        'col_feature_group2_b': [5.1, 6.1, 7.1, 8.1],
    })
    
    # Create validation data CSV
    val_df = pd.DataFrame({
        'Status': [1, 1],
        'Survival_in_days': [120.5, 180.3],
        'col_feature_group1_a': [1.5, 2.5],
        'col_feature_group1_b': [1.6, 2.6],
        'col_feature_group2_a': [5.5, 6.5],
        'col_feature_group2_b': [5.6, 6.6],
    })
    
    train_path = os.path.join(temp_dir, 'train.csv')
    val_path = os.path.join(temp_dir, 'val.csv')
    
    train_df.to_csv(train_path, index=False)
    val_df.to_csv(val_path, index=False)
    
    return temp_dir, train_path, val_path

# Create a temporary JSON file for splits
def create_temp_json(temp_dir):
    splits = {
        'Fold01': [1, 2],  # indices (1-based)
        'Fold02': [2, 3],
        'Fold03': [3, 4],
    }
    json_path = os.path.join(temp_dir, 'splits.json')
    with open(json_path, 'w') as f:
        json.dump(splits, f)
    return json_path

temp_dir, train_path, val_path = create_temp_csv()
json_path = create_temp_json(temp_dir)

# Create a simple args class
class Args:
    def __init__(self, path_train_data, path_val_data, merge=False, path_json=None, split_id=None):
        self.path_train_data = path_train_data
        self.path_val_data = path_val_data
        self.merge = merge
        self.path_json = path_json
        self.split_id = split_id

# Define ARGS for the basic case (no merging, no JSON)
ARGS = {
    'args': Args(
        path_train_data=train_path,
        path_val_data=val_path,
        merge=False,
        path_json=None,
        split_id=None
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
load_dataset Ran
ran; our contract draft was wrong, not the code
mi2datalab/interpret-time-to-event/src/main_pfi.py
code served (permissive licence) · get_code("25c0ec4152d241ca")
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 json
import numpy as np
import pandas as pd
from collections import OrderedDict
import tempfile
import os

# Create temporary CSV files for training and validation data
def create_temp_csv(num_rows=10, num_features=5):
    """Create a temporary CSV file with the expected structure"""
    data = {
        'col_0': np.random.rand(num_rows),
        'col_1': np.random.rand(num_rows),
    }
    for i in range(num_features):
        data[f'feature_group1_{i}'] = np.random.rand(num_rows)
    for i in range(num_features):
        data[f'feature_group2_{i}'] = np.random.rand(num_rows)
    
    df = pd.DataFrame(data)
    temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.csv')
    df.to_csv(temp_file.name, index=False)
    temp_file.close()
    return temp_file.name

# Create temporary JSON file for splits
def create_temp_json():
    """Create a temporary JSON file with fold information"""
    splits = {
        'Fold01': [1, 3, 5, 7],
        'Fold02': [2, 4, 6, 8],
        'Fold10': [1, 2, 3],
    }
    temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.json')
    json.dump(splits, temp_file)
    temp_file.close()
    return temp_file.name

# Create test data files
path_train = create_temp_csv(num_rows=10, num_features=3)
path_val = create_temp_csv(num_rows=8, num_features=3)
path_json = create_temp_json()

# Create args object as a simple class
class Args:
    def __init__(self, path_train_data, path_val_data, path_json=None, split_id=None):
        self.path_train_data = path_train_data
        self.path_val_data = path_val_data
        self.path_json = path_json
        self.split_id = split_id

# Define ARGS dictionary with both scenarios
ARGS = {
    'args': Args(
        path_train_data=path_train,
        path_val_data=path_val,
        path_json=path_json,
        split_id=1
    )
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
make_splits_from_path Ran
ran; our contract draft was wrong, not the code
mi2datalab/interpret-time-to-event/src/main_pdp.py
code served (permissive licence) · get_code("377de5780bd3c412")
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
import tempfile
import os

# Create a temporary CSV file with the expected structure
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "test_data.csv")

# Create a simple CSV with 2 columns for data_y (Status, Survival_in_days)
# and 3 columns for data_x (features)
csv_data = pd.DataFrame({
    'Status': [1, 0, 1, 0],
    'Survival_in_days': [100.5, 200.3, 150.7, 250.2],
    'feature1': [1.0, 2.0, 3.0, 4.0],
    'feature2': [5.0, 6.0, 7.0, 8.0],
    'feature3': [9.0, 10.0, 11.0, 12.0]
})
csv_data.to_csv(csv_path, index=False)

ARGS = {
    'path': csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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

Also present in other papers' code

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

Time-to-event prediction, e.g. cancer survival analysis or hospital length of stay, is a highly prominent machine learning task in medical and healthcare applications. However, only a few interpretable machine learning methods comply with its challenges. To facilitate a comprehensive explanatory analysis of survival models, we formally introduce time-dependent feature effects and global feature importance explanations. We show how post-hoc interpretation methods allow for finding biases in AI systems predicting length of stay using a novel multi-modal dataset created from 1235 X-ray images with textual radiology reports annotated by human experts. Moreover, we evaluate cancer survival models beyond predictive performance to include the importance of multi-omics feature groups based on a large-scale benchmark comprising 11 datasets from The Cancer Genome Atlas (TCGA). Model developers can use the proposed methods to debug and improve machine learning algorithms, while physicians can discover disease biomarkers and assess their significance. We hope the contributed open data and code resources facilitate future work in the emerging research direction of explainable survival analysis.

For agents

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

get_harvested_code_for_paper("2303.09817")
get_code_for_paper("2303.09817")
have("2303.09817")

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

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

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

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

Connect an agent — have() is free.