SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1805.00917 · 2018

A Scalable Discrete-Time Survival Model for Neural Networks

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-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/1805.00917.json · badge: /api/ran/1805.00917.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
MGensheimer/nnet-survival canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
make_surv_array Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MGensheimer/nnet-survival/nnet_survival.py
code served (permissive licence) · get_code("27e6ade33cb88dbb")
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 2, dtype family float, shape (2, 8) 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 arguments for make_surv_array

# t: Array of failure/censoring times
# Create a small array of 2 survival times
t = np.array([5.2, 8.7], dtype=np.float32)

# f: Censoring indicator (1 if failed, 0 if censored)
# 2 individuals, first one failed, second one censored
f = np.array([1, 0], dtype=np.int32)

# breaks: Locations of breaks between time intervals
# Must include 0 and be monotonically increasing
# Create 5 break points defining 4 time intervals
breaks = np.array([0.0, 2.0, 4.0, 6.0, 10.0], dtype=np.float32)

ARGS = {
    't': t,
    'f': f,
    'breaks': breaks
}
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 2, dtype family float, shape (2, 8) — shape (2, 8) 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
nnet_pred_surv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
MGensheimer/nnet-survival/nnet_survival_pytorch.py
code served (permissive licence) · get_code("475069c5f048ae26")
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 (2,) 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 arguments for nnet_pred_surv

# y_pred: Rectangular array of conditional survival probabilities
# Shape: (n_individuals, n_intervals)
# Values should be between 0 and 1 (probabilities)
y_pred = np.array([
    [0.95, 0.90, 0.85, 0.80],
    [0.92, 0.87, 0.82, 0.75]
])

# breaks: Break-points for time intervals, starting with 0
# Should have length = n_intervals + 1
breaks = np.array([0, 30, 60, 90, 120])

# fu_time: Follow-up time point at which predictions are needed
# Should be a scalar value within the range of breaks
fu_time = 75

ARGS = {
    "y_pred": y_pred,
    "breaks": breaks,
    "fu_time": fu_time
}
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 (2,) — shape (2,) 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
surv_likelihood Ran
ran; our contract draft was wrong, not the code
MGensheimer/nnet-survival/nnet_survival_pytorch.py
code served (permissive licence) · get_code("26cf222acf363623")
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 function. 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

torch.manual_seed(0)

# n_intervals: the number of survival time intervals
# The loss function expects y_true to have shape (batch_size, 2 * n_intervals)
# and y_pred to have shape (batch_size, n_intervals)

n_intervals = 4
batch_size = 2

# Create y_true: shape (2, 8) where 8 = 2 * n_intervals
# First half (columns 0:4): survival indicators for each interval
# Second half (columns 4:8): failure indicators for each interval
y_true = torch.tensor([
    [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0],  # survived first 2 intervals, failed in interval 3
    [1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]   # survived first 3 intervals, failed in interval 4
], dtype=torch.float32)

# Create y_pred: predicted survival probabilities, shape (2, 4)
# Values should be between 0 and 1 (they represent probabilities)
y_pred = torch.tensor([
    [0.9, 0.85, 0.7, 0.5],
    [0.95, 0.88, 0.75, 0.6]
], dtype=torch.float32)

ARGS = {
    "n_intervals": n_intervals
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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 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-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

There is currently great interest in applying neural networks to prediction tasks in medicine. It is important for predictive models to be able to use survival data, where each patient has a known follow-up time and event/censoring indicator. This avoids information loss when training the model and enables generation of predicted survival curves. In this paper, we describe a discrete-time survival model that is designed to be used with neural networks, which we refer to as Nnet-survival. The model is trained with the maximum likelihood method using minibatch stochastic gradient descent (SGD). The use of SGD enables rapid convergence and application to large datasets that do not fit in memory. The model is flexible, so that the baseline hazard rate and the effect of the input data on hazard probability can vary with follow-up time. It has been implemented in the Keras deep learning framework, and source code for the model and several examples is available online. We demonstrate the performance of the model on both simulated and real data and compare it to existing models Cox-nnet and Deepsurv.

For agents

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

get_harvested_code_for_paper("1805.00917")
get_code_for_paper("1805.00917")
have("1805.00917")

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

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

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

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

Connect an agent — have() is free.