SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.20579 · NeurIPS · 2024

Toward Conditional Distribution Calibration in Survival Prediction

Russell Greiner, Shi-Ang Qi, Yakun Yu

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 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/2410.20579.json · badge: /api/ran/2410.20579.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
shi-ang/makesurvivalcalibratedagain canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
crossing_loss Ran
ran; our contract draft was wrong, not the code
shi-ang/makesurvivalcalibratedagain/model/loss.py
code served (permissive licence) · get_code("705ae22a02cca8ab")
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 0, dtype family float, 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

torch.manual_seed(0)

# The function expects y_pred to be a tensor with shape (batch_size, sequence_length)
# It computes differences between consecutive elements along dimension 1
# and applies a crossing loss function
y_pred = torch.randn(2, 4)

ARGS = {
    "y_pred": y_pred
}
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 0, dtype family float, 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
format_pred_sksurv Ran
ran; our contract draft was wrong, not the code
shi-ang/makesurvivalcalibratedagain/utils/util_survival.py
code served (permissive licence) · get_code("20a1d97e44e97ba0")
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

class SurvivalFunction:
    """Stand-in class for sklearn-surv style survival function objects."""
    def __init__(self, x, y):
        self.x = x
        self.y = y

# Create time coordinates
time_coords = np.array([1.0, 2.5, 4.0, 6.5])

# Create survival probability curves for 2 samples
surv_prob_1 = np.array([0.95, 0.87, 0.72, 0.58])
surv_prob_2 = np.array([0.92, 0.81, 0.65, 0.48])

# Create survival function objects
pred_surv_obj_1 = SurvivalFunction(x=time_coords, y=surv_prob_1)
pred_surv_obj_2 = SurvivalFunction(x=time_coords, y=surv_prob_2)

# Create list of survival function objects
pred_surv = [pred_surv_obj_1, pred_surv_obj_2]

ARGS = {
    'pred_surv': pred_surv
}
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 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
lognormal_pdf Ran
ran, violated the contract we drafted
shi-ang/makesurvivalcalibratedagain/illustr_plot.py
code served (permissive licence) · get_code("a656747687f551ad")
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

# Construct valid arguments for lognormal_pdf
# The function computes the probability density function of a lognormal distribution
# Parameters:
# - x: values at which to evaluate the PDF (must be positive)
# - mu: mean of the underlying normal distribution
# - sigma: standard deviation of the underlying normal distribution (must be positive)

x = np.array([0.5, 1.0, 2.0, 5.0])
mu = np.array([0.0, 0.5, 1.0, 1.5])
sigma = np.array([0.5, 0.8, 1.0, 1.2])

ARGS = {
    "x": x,
    "mu": mu,
    "sigma": sigma
}
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
make_mono_quantiles Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shi-ang/makesurvivalcalibratedagain/utils/util_survival.py
code served (permissive licence) · get_code("be17ac3543a47a44")
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

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

# Create small test data
num_samples = 2
num_quantiles = 4

# quantiles: must be monotonically increasing, in range [0, 1]
quantiles = np.array([0.1, 0.3, 0.5, 0.9])

# quan_preds: shape (num_samples, num_quantiles)
# These are quantile predictions, should be non-negative and ideally monotonic
quan_preds = np.array([
    [0.5, 1.2, 2.0, 3.5],
    [0.3, 0.8, 1.5, 2.8]
])

# method: one of 'ceil', 'floor', 'bootstrap'
method = 'ceil'

# seed: optional random seed
seed = 42

# num_bs: number of bootstrap samples (only used with method='bootstrap')
num_bs = 1000

ARGS = {
    'quantiles': quantiles,
    'quan_preds': quan_preds,
    'method': method,
    'seed': seed,
    'num_bs': num_bs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
quantile_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shi-ang/makesurvivalcalibratedagain/model/loss.py
code served (permissive licence) · get_code("eaa9dce19df6fc3d")
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 0, dtype family float, 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

torch.manual_seed(0)

# Construct arguments for quantile_loss function
batch_size = 2
num_quantiles = 4

# y_pred: predicted values, shape (batch_size, num_quantiles)
y_pred = torch.randn(batch_size, num_quantiles)

# y_true: true values, shape (batch_size, num_quantiles)
y_true = torch.randn(batch_size, num_quantiles)

# cen_indicator: censoring indicator, shape (batch_size, num_quantiles)
# Values should be 0 or 1 to indicate censored (1) or uncensored (0)
cen_indicator = torch.randint(0, 2, (batch_size, num_quantiles)).float()

# taus_torch: quantile levels, shape (num_quantiles,)
# Values should be between 0 and 1
taus_torch = torch.linspace(0.1, 0.9, num_quantiles)

ARGS = {
    'y_pred': y_pred,
    'y_true': y_true,
    'cen_indicator': cen_indicator,
    'taus_torch': taus_torch
}
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 0, dtype family float, 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
weibull_pdf Ran
ran, violated the contract we drafted
shi-ang/makesurvivalcalibratedagain/illustr_plot.py
code served (permissive licence) · get_code("a26be32a7c728edc")
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

# The function weibull_pdf computes the Weibull probability density function
# It takes three parameters: x (the input values), scale, and shape (both scalars or arrays)

# Create small numpy arrays for testing
x = np.array([0.5, 1.0, 1.5, 2.0])
scale = 1.0
shape = 2.0

ARGS = {
    "x": x,
    "scale": scale,
    "shape": shape
}
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
gamma_pdf Not yet run
unverified (harvested, no recorded run)
shi-ang/makesurvivalcalibratedagain/illustr_plot.py
code served (permissive licence) · get_code("55824a65f3915637")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
crossing_loss 1 other paper
1 dated earlier
2405.07374 (2024-05)
Conformalized Survival Distributions: A Generic Post-Process to Increase Calibration
format_pred_sksurv 1 other paper
1 dated earlier
2405.07374 (2024-05)
Conformalized Survival Distributions: A Generic Post-Process to Increase Calibration
make_mono_quantiles 1 other paper
1 dated earlier
2405.07374 (2024-05)
Conformalized Survival Distributions: A Generic Post-Process to Increase Calibration
quantile_loss 1 other paper
1 dated earlier
2405.07374 (2024-05)
Conformalized Survival Distributions: A Generic Post-Process to Increase Calibration

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

Survival prediction often involves estimating the time-to-event distribution from censored datasets. Previous approaches have focused on enhancing discrimination and marginal calibration. In this paper, we highlight the significance of conditional calibration for real-world applications -especially its role in individual decision-making. We propose a method based on conformal prediction that uses the model's predicted individual survival probability at that instance's observed time. This method effectively improves the model's marginal and conditional calibration, without compromising discrimination. We provide asymptotic theoretical guarantees for both marginal and conditional calibration and test it extensively across 15 diverse real-world datasets, demonstrating the method's practical effectiveness and versatility in various settings.

For agents

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

get_harvested_code_for_paper("2410.20579")
get_code_for_paper("2410.20579")
have("2410.20579")

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

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

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

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

Connect an agent — have() is free.