SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2504.17568 · 2025

Beyond Cox Models: Assessing the Performance of Machine-Learning Methods in Non-Proportional Hazards and Non-Linear Survival Analysis

arXiv · PDF · Open in the Atlas

Code that ran

5 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, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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/2504.17568.json · badge: /api/ran/2504.17568.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
compbiomed-unito/survhive canonical (classifier label)
classifier basis not recorded on the link
5 ran · 2 no recorded run
FunctionStatusWhere it lives
generate_topology_grid Ran
ran on a synthesized input
compbiomed-unito/survhive/survhive/optimization.py
code served (permissive licence) · get_code("cfe81e2e242d42e4")
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. 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
import numpy as np
from math import log

# Set random seed for reproducibility
torch.manual_seed(0)

# The function generate_topology_grid takes:
# - max_width: int, controls the number of elements in the mono list
# - max_layers: int, controls the number of layers to generate (default 3)

# Looking at the function body:
# - max_width is used in range and log calculations
# - max_layers is used in range(1, max_layers + 1)
# Both are simple integers with no special requirements

ARGS = {
    "max_width": 10,
    "max_layers": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
get_grid_size Ran
ran on a synthesized input
compbiomed-unito/survhive/survhive/optimization.py
code served (permissive licence) · get_code("c37834227cbc4c2d")
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 int, ndim 0, dtype family int, 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
import numpy as np
from math import prod

torch.manual_seed(0)

# The function get_grid_size takes a 'grid' parameter
# It iterates over grid.values() and gets len(_) for each value
# So grid should be a dict where values are sequences (lists, arrays, etc.)

ARGS = {
    "grid": {
        "x": [1, 2, 3],
        "y": [4, 5],
        "z": [6, 7, 8, 9]
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_indicator Ran
ran on a synthesized input
compbiomed-unito/survhive/survhive/util.py
code served (permissive licence) · get_code("48d3b393fb5d7a99")
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

# Create a structured numpy array with a dtype that has named fields
# The function accesses y[y.dtype.names[0]], so we need at least one named field
data = np.array([(True,), (False,)], dtype=[('censoring_indicator', bool)])

ARGS = {
    'y': data
}
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
get_time Ran
ran on a synthesized input
compbiomed-unito/survhive/survhive/util.py
code served (permissive licence) · get_code("3002db785bb548c1")
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

# Create a structured numpy array with named fields
# The function accesses y.dtype.names[1], so we need at least 2 fields
# It then returns y[y.dtype.names[1]], which accesses the second field
y = np.array(
    [(1, 10.5, 'a'), (2, 20.3, 'b')],
    dtype=[('id', 'i4'), ('time', 'f8'), ('label', 'U1')]
)

ARGS = {
    'y': y
}
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
make_survival_scorer Ran
ran on a synthesized input
compbiomed-unito/survhive/survhive/metrics.py
code served (permissive licence) · get_code("6489bbb466df745e")
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 numpy
import torch
import torch.nn as nn


# Helper functions that the scorer uses
def get_time(y):
    """Extract time values from structured array"""
    return y['time']

def get_indicator(y):
    """Extract event indicator from structured array"""
    return y['event'].astype(bool)


# Mock estimator with predict_survival method
class MockSurvivalEstimator:
    def predict_survival(self, X, times):
        """
        Return survival probabilities.
        X: (n_samples, n_features)
        times: array of time points
        Returns: (n_samples, n_times) array of survival probabilities
        """
        n_samples = X.shape[0]
        n_times = len(times) if hasattr(times, '__len__') else 1
        # Simple mock: return decreasing survival probabilities over time
        times_arr = numpy.atleast_1d(times)
        survival_probs = numpy.zeros((n_samples, len(times_arr)))
        for i, t in enumerate(times_arr):
            survival_probs[:, i] = numpy.exp(-t / 10.0)
        return survival_probs


# Simple score function
def mock_score_func(y_true, y_pred):
    """Mock scoring function that returns a float"""
    # Handle both boolean arrays and continuous predictions
    if len(y_true) == 0:
        return 0.0
    y_true = numpy.atleast_1d(y_true).astype(float)
    y_pred = numpy.atleast_1d(y_pred).astype(float)
    # Return simple correlation-like score
    if numpy.std(y_pred) > 0:
        return numpy.corrcoef(y_true, y_pred)[0, 1]
    return 0.5


# Create structured array for y with 'time' and 'event' fields
y_dtype = numpy.dtype([('time', float), ('event', int)])
y = numpy.array([(5.0, 1), (10.0, 0), (8.0, 1)], dtype=y_dtype)

# Create dummy X data
X = numpy.array([[1.0, 2.0, 3.0, 4.0],
                  [2.0, 3.0, 4.0, 5.0],
                  [3.0, 4.0, 5.0, 6.0]])

ARGS = {
    'score_func': mock_score_func,
    'needs': 'failure',
    'classification': False,
    'aggregate': 'mean',
    'time_mode': 'quantiles',
    'time_values': numpy.array([0.25, 0.5, 0.75]),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
load_test_data Not yet run
unverified (harvested, no recorded run)
compbiomed-unito/survhive/survhive/util.py
code served (permissive licence) · get_code("179a976dea96da76")
How it ran

no invocation recorded.

optimize Not yet run
unverified (harvested, no recorded run)
compbiomed-unito/survhive/survhive/optimization.py
code served (permissive licence) · get_code("f8307c44b9a2a34b")
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, 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 7 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-24.

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 analysis often relies on Cox models, assuming both linearity and proportional hazards (PH). This study evaluates machine and deep learning methods that relax these constraints, comparing their performance with penalized Cox models on a benchmark of three synthetic and three real datasets. In total, eight different models were tested, including six non-linear models of which four were also non-PH. Although Cox regression often yielded satisfactory performance, we showed the conditions under which machine and deep learning models can perform better. Indeed, the performance of these methods has often been underestimated due to the improper use of Harrell's concordance index (C-index) instead of more appropriate scores such as Antolini's concordance index, which generalizes C-index in cases where the PH assumption does not hold. In addition, since occasionally high C-index models happen to be badly calibrated, combining Antolini's C-index with Brier's score is useful to assess the overall performance of a survival method. Results on our benchmark data showed that survival prediction should be approached by testing different methods to select the most appropriate one according to sample size, non-linearity and non-PH conditions. To allow an easy reproducibility of these tests on our benchmark data, code and documentation are freely available at https://github.com/compbiomed-unito/survhive.

For agents

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

get_harvested_code_for_paper("2504.17568")
get_code_for_paper("2504.17568")
have("2504.17568")

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

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

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

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

Connect an agent — have() is free.