---
kind: concept
slug: survival-analysis
title: Survival analysis
summary: >-
  Modelling the time until an event, such as churn, death or machine failure, when some records are censored. Covers the risk-model, loss and time-dependence choices, the sampled-control training trick, and the metrics used to compare models. Three cards so far; all reported results are author-reported, and they are not comparable across papers.
tags: [survival-analysis, time-to-event, censoring, deep-learning]
papers: ["1810.03382", "1907.00825", "2305.14961"]
related: [cox-proportional-hazards, nested-case-control-sampling, denoising-autoencoder]
status: draft
updated_at: 2026-10-19
---

## Overview

Survival analysis predicts when an event will happen for each individual, from
covariates. Some records are censored: observation stopped before the event
happened, so the model only learns that the event came later than the stop
time [arxiv:1907.00825 §3]. The output for one individual is a survival curve
S(t | x) = exp(-H(t | x)), where H is the cumulative hazard
[arxiv:1907.00825 eq. 1].

The classic model is the Cox model. It writes the hazard as a shared baseline
times a relative-risk term that depends only on covariates,
h(t | x) = h0(t) exp[g(x)] [arxiv:1907.00825 eq. 3]. Fitting its exact partial
likelihood sums over risk sets, which can hold almost the whole data set, so
the fit does not batch well [arxiv:1907.00825 §3.2]. Proportional variants keep
the relative-risk form. The time-as-input variant drops it
[arxiv:1907.00825 §3.4].

A 2023 review classifies 61 deep-learning methods for time-to-event data. Its
stated counts put 26 of them in the Cox-based class and 19 in the discrete-time
class [arxiv:2305.14961 §3.3.1]. Use it as a map of the field, not a ranking:
the authors say reported results cannot be compared across papers
[arxiv:2305.14961 §3.6].

## Variants

Three choices define most of the design space. Each has its own page. A fourth
variant learns the input representation as well, for high-dimensional inputs.

1. **Risk term.** Keep a linear g(x), or replace it with a neural network.
   The paper's Cox-MLP (DeepSurv) keeps the proportional form and trains on a
   batched partial likelihood [arxiv:1907.00825 §6.1.1]. See
   [Cox proportional hazards](/concepts/cox-proportional-hazards).
2. **Training loss.** Use the exact partial likelihood, or pair each event with
   one control sampled from its risk set. The sampled loss trains on mini-batches
   [arxiv:1907.00825 §3.2]. See
   [Nested case-control sampling](/concepts/nested-case-control-sampling).
3. **Time dependence.** Keep proportional hazards, or feed time to the network
   as an input (Cox-Time), so the risk can change over time
   [arxiv:1907.00825 §3.4]. See
   [Cox proportional hazards](/concepts/cox-proportional-hazards).
4. **Learned representation.** Compress high-dimensional inputs with a
   denoising autoencoder, and train the code jointly with a Cox partial-likelihood
   term through a weighted sum with the reconstruction loss
   [arxiv:1810.03382 eq. 7]. The input in that paper is cardiac motion: 11,514
   displacement values per patient [arxiv:1810.03382 eq. 2]. Card:
   [Deep learning cardiac motion analysis for human survival prediction](/papers/1810.03382).
   See also [Denoising autoencoder](/concepts/denoising-autoencoder).

The paper also compares against discrete-time networks (DeepHit) and random
survival forests. Neither has a card here, so nothing from them is used on this
page [arxiv:1907.00825 §2] [arxiv:1907.00825 §6.1.1].

## Evaluation

The papers score models with a mix of measures. All reported numbers are
author-reported.

| Measure | What it checks | Where it is defined |
|---|---|---|
| Time-dependent concordance, C^td | Whether higher predicted risk goes with earlier events, over time | [arxiv:1907.00825 §4.1] [eq. 14] |
| Harrell's C-index | Whether higher predicted risk goes with earlier events, for one fixed set of pairs (not time-dependent) | [arxiv:1810.03382 § Predictive performance] |
| Integrated Brier score, IBS | Error of the predicted survival probabilities, averaged over time. Lower is better. | [arxiv:1907.00825 §4.2] [eq. 15] [eq. 16] |
| Integrated binomial log-likelihood, IBLL | Fit of the predicted survival probabilities, averaged over time. Closer to zero is better. | [arxiv:1907.00825 §4.2] [eq. 17] |

IBS and IBLL are weighted by a Kaplan-Meier estimate of the censoring
distribution [arxiv:1907.00825 tab. 3] [arxiv:1907.00825 tab. 4]. Concordance
does not weight by censoring, so it is not a check on the survival curve.

The cardiac-motion paper reports its C-index in two forms. The apparent value
is 0.85 for its model and 0.61 for a Cox benchmark. After bootstrap
optimism correction the values are 0.73 and 0.59
[arxiv:1810.03382 § Predictive performance]. The corrected values are the ones
to compare, and the correction repeats the full training and tuning on each
bootstrap sample [arxiv:1810.03382 § Internal Validation].

## When to use which

The papers' results split by data set and by metric, so choose by constraint
and then check on your own held-out data.

| Situation | Use | Why |
|---|---|---|
| Hazards are plausibly proportional, and you want the smallest change from linear Cox | Proportional neural risk (Cox-MLP, DeepSurv-style) | Best IBLL on FLCHAIN among the compared methods [arxiv:1907.00825 tab. 4] |
| Large data, mini-batch training, a per-event loss | Sampled-control loss | One control per event, no full risk-set sum [arxiv:1907.00825 §3.2] |
| Covariate effects may change over time, or you need curves at many times | Time as input (Cox-Time) | Drops proportional hazards [arxiv:1907.00825 §3.4]; best IBS and IBLL on KKBox [arxiv:1907.00825 tab. 7] |
| Ranking of individuals is the main goal | Compare with DeepHit or RSF | DeepHit has the best KKBox C^td but the worst IBS and IBLL [arxiv:1907.00825 tab. 7] |
| Small data, proportionality unknown | Fit a proportional and a time-as-input model, then compare IBS and IBLL | Cox-Time is best on three of four small sets, but trails the proportional models on FLCHAIN [arxiv:1907.00825 tab. 3] [arxiv:1907.00825 tab. 4] |
| Tight prediction latency, many individuals | Proportional model | Its cumulative hazard factorises into baseline times exp[g(x)] [arxiv:1907.00825 §3.5] |
| Raw, high-dimensional inputs (images, motion tracks) with a modest number of events | Learned representation with a Cox term | Improved over a Cox model on manual volumetric indices in one centre's 302 patients, internal validation only [arxiv:1810.03382 § Predictive performance]; the tuned values are not reported [arxiv:1810.03382 § Hyperparameter Tuning] |
| Choosing among many deep methods before any experiment | Read the review's classification first | It sorts methods by model class, architecture and outcome types [arxiv:2305.14961 §3.3] [arxiv:2305.14961 §3.4] |

The paper reports no wall-clock or memory figures for the first six rows. The
latency row rests on the cost argument alone: Cox-Time needs one network call
per distinct event time up to the horizon [arxiv:1907.00825 §3.5]. The
learned-representation row reports a cost: the full pipeline, including the
search and the bootstrap, took 76 hours on one GPU
[arxiv:1810.03382 § Network Design and Training].

## Implementation sketch

The pseudocode for each variant is on its sub-page: the Cox-Time training loop
and Breslow survival curve are on
[Cox proportional hazards](/concepts/cox-proportional-hazards), and the
sampled-control loss is on
[Nested case-control sampling](/concepts/nested-case-control-sampling). Both
follow the paper's equations [arxiv:1907.00825 §3.2] [arxiv:1907.00825 §3.4].
The hybrid loss of the learned-representation variant is on its
[card](/papers/1810.03382), which gives the forward pass and loss in pseudocode.

## Pitfalls

- **Censoring.** IBS and IBLL assume censoring is independent of the survival
  time [arxiv:1907.00825 §4.2]. The paper does not test this assumption.
- **Duration definition.** On KKBox, time starts at the first subscription or
  earliest transaction record. A customer who churned and came back counts as a
  new customer. This differs from the Kaggle task, which uses calendar dates
  [arxiv:1907.00825 app. B.1] [arxiv:1907.00825 §6.2].
- **Fixed covariates.** All KKBox covariates are fixed at subscription time. The
  authors call this a simplification [arxiv:1907.00825 app. B.1].
- **Data preparation.** The paper replaces the WHAS set with FLCHAIN and drops
  rows with missing values, so its FLCHAIN numbers are not comparable with
  results that keep those rows [arxiv:1907.00825 §6.1].
- **Run-to-run variance.** Proportional neural models were unstable across fits
  on KKBox. The paper reports medians of five fits for that reason
  [arxiv:1907.00825 §6.2.2].
- **Sign convention.** The paper reports IBLL as negative [arxiv:1907.00825
  tab. 7]. The official code returns the negative of it, so its values are
  positive. See the Paper vs code section of the
  [card](/papers/1907.00825) before comparing numbers across the two.
- **Batching the Cox term is approximate.** The full risk set is what the
  partial likelihood needs, so a batch-wise version only approximates it unless
  the batch is large [arxiv:2305.14961 §3.3.1]. The cardiac-motion paper's
  formula uses the whole training sample as the risk set [arxiv:1810.03382 eq. 5].
  Its public code computes risk sets within each mini-batch; the
  [card](/papers/1810.03382) lists the difference.
- **Apparent versus corrected C.** Optimism inflates the apparent C-index. The
  gap in the cardiac-motion paper is 0.85 against 0.73 for its own model
  [arxiv:1810.03382 § Predictive performance].
- **Single centre.** The cardiac-motion paper uses one centre's cohort and
  bootstrap validation only, and its authors list external validation as future
  work [arxiv:1810.03382 § Discussion].
- **Review counts.** The review's stated class counts add to 62, not 61, and
  its discrete-time paragraph names 20 methods, not the stated 19
  [arxiv:2305.14961 §3.3.1]. Cite them as "stated in the review", not as
  verified totals.
- **No ranking.** The review says benchmark results cannot be compared, because
  datasets, preprocessing, missing-value handling, resampling and metric variants
  differ [arxiv:2305.14961 §3.6]. Do not use it to pick a method by performance.

## Contradictions

Each side is cited. None of these are resolved here.

- **Concordance and calibration disagree on KKBox.** DeepHit has the top C^td
  (0.888) and the worst IBS and IBLL [arxiv:1907.00825 tab. 7].
- **No single concordance winner on the small sets.** DeepHit is best on
  SUPPORT and METABRIC, Cox-Time on Rot. & GBSG, and Cox-MLP (CC) on FLCHAIN
  [arxiv:1907.00825 tab. 2].
- **Control set.** The sampled set is said to include the case
  [arxiv:1907.00825 §3.2], but the control loss draws from the risk set without
  it [arxiv:1907.00825 eq. 9]. Details are on the
  [nested case-control sampling](/concepts/nested-case-control-sampling) page.
- **Risk sets in training.** The cardiac-motion paper defines the risk set over
  the training sample [arxiv:1810.03382 eq. 5]. The loss of
  [arxiv:1907.00825 §3.2] samples one control per event instead. The two
  papers' C-index values are on different cohorts, so they are not a direct
  comparison [arxiv:2305.14961 §3.6].

## Papers

- [Time-to-Event Prediction with Neural Networks and Cox Regression](/papers/1907.00825): replaces the Cox risk term with a neural network, trains it on a sampled-control loss, and adds Cox-Time, which takes time as an input.
- [Deep learning cardiac motion analysis for human survival prediction](/papers/1810.03382): learns a latent code from right-ventricle motion with a denoising autoencoder and a Cox term, and reports internal bootstrap C-index results on one centre's cohort.
- [Deep Learning for Survival Analysis: A Review](/papers/2305.14961): a systematic review that classifies 61 deep-learning methods by model class, architecture and outcome types. It ranks nothing.
