SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.07374 · ICML · 2024

Conformalized Survival Distributions: A Generic Post-Process to Increase Calibration

Russell Greiner, Shi-Ang Qi, Yakun Yu

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 4 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/2405.07374.json · badge: /api/ran/2405.07374.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/CSD canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
crossing_loss Ran
ran; our contract draft was wrong, not the code
shi-ang/CSD/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/CSD/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
make_mono_quantiles Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
shi-ang/CSD/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/CSD/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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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 later
2410.20579 (2024-10)
Toward Conditional Distribution Calibration in Survival Prediction
format_pred_sksurv 1 other paper
1 later
2410.20579 (2024-10)
Toward Conditional Distribution Calibration in Survival Prediction
make_mono_quantiles 1 other paper
1 later
2410.20579 (2024-10)
Toward Conditional Distribution Calibration in Survival Prediction
quantile_loss 1 other paper
1 later
2410.20579 (2024-10)
Toward Conditional Distribution Calibration in Survival Prediction

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

Discrimination and calibration represent two important properties of survival analysis, with the former assessing the model's ability to accurately rank subjects and the latter evaluating the alignment of predicted outcomes with actual events. With their distinct nature, it is hard for survival models to simultaneously optimize both of them especially as many previous results found improving calibration tends to diminish discrimination performance. This paper introduces a novel approach utilizing conformal regression that can improve a model's calibration without degrading discrimination. We provide theoretical guarantees for the above claim, and rigorously validate the efficiency of our approach across 11 real-world datasets, showcasing its practical applicability and robustness in diverse scenarios.

For agents

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

get_harvested_code_for_paper("2405.07374")
get_code_for_paper("2405.07374")
have("2405.07374")

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

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

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

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

Connect an agent — have() is free.