# DeepSurv: Personalized Treatment Recommender System Using A Cox Proportional Hazards Deep Neural Network

DeepSurv uses a deep Cox network to recommend personalized treatments

Katzman, Jared, Shaham, Uri, Bates, Jonathan, Cloninger, Alexander, Jiang, Tingting, Kluger, Yuval · arXiv · 2016-6-2

- **Problem** Linear Cox models cannot capture treatment benefits that depend on a patient's features unless interaction terms are added by hand. Adding those terms becomes expensive as the number of features grows.
- **Method** DeepSurv replaces the linear risk term of the Cox model with a deep neural network trained on the negative log partial likelihood. For each patient, it subtracts the predicted risks of two treatments to pick the one with lower risk.
- **Results** On GBSG test data, DeepSurv reached a C-index of 0.668402, against 0.657750 for CPH. Its recommended group had a median survival of 40.099 months, against 31.770 months for the anti-recommended group.

## Why linear hazards fall short for treatment decisions

Survival models let clinicians judge how prognostic variables bear on outcomes such as death or cancer recurrence, and those judgements feed into the treatment options offered to a patient. The standard choice is the Cox proportional hazards model, which treats the risk as a linear combination of covariates. When a treatment's benefit changes with a patient's features, a linear risk cannot express that change, and adding the needed interaction terms by hand becomes expensive as the number of features grows.

Neural networks could learn such interactions without prior feature selection, but the Faraggi-Simon network, the earlier neural risk model, did not clearly beat the linear Cox model in the studies that tried it. Earlier results on neural risk models were therefore mixed, and it was unclear whether neural networks could compete with standard survival methods at all.

The authors argue that modern training practice changes this picture, and they test a Cox-loss network that also drives a treatment recommender.

## Survival data and the hazard framework

Each patient contributes baseline covariates, a failure event time and an event indicator. A patient whose event is not observed by the last contact is right-censored, and the event indicator is set to 0 for that patient. Treating censored patients as missing data and dropping them can bias a model, so right-censored data needs a survival model.

The survival function gives the probability that a patient is still event-free after time t. The hazard is the instantaneous event rate at time t among patients still event-free, defined as a limit over a short interval. \\\[ \\lambda(t)=\\lim\_{\\delta\\to 0}\\frac{\\Pr(t\\le T\<t+\\delta \\mid T\\ge t)}{\\delta} \\\] A proportional hazards model factors the hazard of an individual into a baseline hazard \\(\\lambda\_0(t)\\) shared by everyone and a covariate term \\(e^{h(x)}\\), so that \\\[ \\lambda(t\\mid x)=\\lambda\_0(t)\\,e^{h(x)} \\\]

## Cox partial likelihood as the training signal

In the Cox model the risk is linear, \\(\\hat h\_\\beta(x)=\\beta^Tx\\), and the weights are chosen to maximize the Cox partial likelihood. \\\[ L\_c(\\beta)=\\prod\_{i:E\_i=1}\\frac{\\exp(\\hat h\_\\beta(x\_i))}{\\sum\_{j\\in\\Re(T\_i)}\\exp(\\hat h\_\\beta(x\_j))} \\\] Only patients with an observed event contribute a factor, and each factor compares that patient's exponentiated risk with the sum over the risk set of patients still at risk at that event time.

The Faraggi-Simon network keeps this likelihood but swaps the linear term for the output of a feed-forward network with a single hidden layer of two or three nodes. DeepSurv applies the same substitution with a deeper network and minimizes the negative log partial likelihood, so the loss is \\\[ l(\\theta):=-\\sum\_{i:E\_i=1}\\Big(\\hat h\_\\theta(x\_i)-\\log\\sum\_{j\\in\\Re(T\_i)}e^{\\hat h\_\\theta(x\_j)}\\Big) \\\] Minimizing this loss is equivalent to maximizing the partial likelihood with the network output in place of the linear term.

## DeepSurv network and training choices

DeepSurv is a multi-layer perceptron whose single output node gives the risk \\(\\hat h\_\\theta(x)\\) of a patient with covariates x, where all weights are collected in θ. The architecture allows more than one hidden layer, which the Faraggi-Simon design did not.

Training combines ReLU and SELU activations, batch normalization, dropout, weight decay, Nesterov momentum and gradient clipping, and learning rate scheduling. Stochastic gradient descent or Adam serves as the optimizer, depending on the experiment. The learning rate is decayed by an inverse time schedule at each epoch.

The depth, width, learning rate, \\(\\ell\_2\\) coefficient, dropout rate, decay constant and momentum are chosen by random search with the Sobol solver over predefined ranges. Each configuration is scored by cross validation with k = 3 and the one with the largest validation C-index is kept, which the authors use to avoid overfitting.

## From per-treatment risks to a recommendation

Patients are assigned to one of n treatment groups, and each treatment i gets its own risk function \\(h\_i(x)\\), so that the hazard for a patient in group i is \\\[ \\lambda(t;x\\mid\\tau=i)=\\lambda\_0(t)\\,e^{h\_i(x)} \\\] Every treatment is assumed to share the same baseline hazard \\(\\lambda\_0(t)\\).

Because the baseline hazard cancels when two hazards are divided, the log of the hazard ratio between treatments i and j is the difference of their risk functions. \\\[ rec\_{ij}(x)=\\log\\frac{\\lambda(t;x\\mid\\tau=i)}{\\lambda(t;x\\mid\\tau=j)}=h\_i(x)-h\_j(x) \\\] This difference is the recommender function, and it is the quantity the treatment recommender system uses.

At decision time a patient is passed through the network once for each treatment group, and the two outputs are subtracted. A positive value means treatment i carries the higher risk, so treatment j is preferred; a negative value favors treatment i. The method does not need interaction terms specified in advance, which the authors treat as the cost advantage over the Cox model.

## Why the Cox model gives no personal recommendation

With treatment as one covariate, the linear CPH risk is \\(\\beta\_0\\tau\\) plus terms in the other covariates, and those other terms cancel between the two treatment groups. \\\[ rec\_{ij}(x)=\\beta\_0(i-j) \\\] The result does not depend on the patient's features, so the Cox model recommends the same treatment to everyone, with the sign of \\(\\beta\_0\\) deciding which.

For that reason the authors do not compute a CPH recommendation; the comparison reduces to the survival of the control and experimental groups. DeepSurv and the RSF can give patient-level treatment risks because they capture interaction terms, so only those two are evaluated as recommenders.

## Recovering simulated risk functions

Simulated patients have N = 4000, 1000 and 1000 observations in the training, validation and test sets, with d = 10 covariates drawn uniformly from \[-1, 1). Death times come from an exponential Cox model whose initial exponential time has mean 5, and only two of the ten covariates affect the risk. The censoring time is set so that about 90 percent of patients have an observed event.

In the linear experiment the risk is \\(h(x)=x\_0+2x\_1\\), so the linear proportional hazards assumption holds and CPH is expected to fit well. DeepSurv's C-index is 0.774019 with a 95 percent interval of (0.772, 0.776), compared with 0.773677 for CPH and 0.764925 for RSF. The mean-squared-error against the true risk is 20.197 for CPH and 0.126 for DeepSurv, which the authors read as DeepSurv modeling the risk surface better even though the two C-indices are close.

The nonlinear experiment sets a Gaussian risk with lambda max 5.0 and scale r 0.5, a function that a linear CPH cannot represent without quadratic terms. The CPH reaches a C-index of 0.506951, close to random ranking, while DeepSurv reaches 0.648902 and RSF reaches 0.645540. The authors note that the linear CPH fails to find the first two covariates significant.

## Results on three real survival datasets

WHAS has 1,638 patients with five features, SUPPORT has 9,105 patients with 14 features after dropping patients with missing features, and METABRIC has 1,980 patients. In each dataset 20 percent of patients are held out for testing.

On WHAS, DeepSurv reaches 0.862620, above CPH at 0.817620 but below RSF at 0.893623. In that dataset 42.12 percent of patients died, with a median death time of 516.0 days.

On SUPPORT, DeepSurv reaches 0.618308, above RSF at 0.613022 and CPH at 0.582870, with a death rate of 68.10 percent and a median death time of 58 days. On METABRIC, DeepSurv reaches 0.643374, above CPH at 0.630618 and RSF at 0.624331. The authors frame the METABRIC result as a possible basis for comparison with IHC4+C, a common prognostic test, rather than as a tested comparison with it.

## Recommendations on simulated treatment data

Patients are assigned uniformly to group 0 or group 1; group 0 has a constant risk and group 1 has a Gaussian risk with lambda max 10 and r 0.5. DeepSurv's C-index is 0.582774, compared with 0.569870 for RSF and 0.481540 for CPH.

The Recommendation subset, formed from patients who received the treatment DeepSurv recommended, has a median survival of 4.069 months, against 2.827 months for the Anti-Recommendation subset. The log-rank p-value is below 1 e−5, and the authors reject the null hypothesis that the recommendations do not change survival.

For RSF the order is reversed: its Recommendation subset has a median of 3.116 months, below 3.625 months for its Anti-Recommendation subset, with a log-rank p-value of 0.055360. The authors note that switching RSF's recommendations would raise median survival, but that gain would not be statistically valid.

## Transfer to GBSG treatment recommendations

DeepSurv is trained on Rotterdam tumor bank records of 1,546 node-positive breast cancer patients and then applied to the GBSG test data of 686 patients, 56 percent censored. On this test set DeepSurv's C-index is 0.668402, compared with 0.657750 for CPH and 0.651190 for RSF.

The DeepSurv Recommendation subset has a median survival of 40.099 months, against 31.770 months for the Anti-Recommendation subset, with a log-rank p-value of 0.003427. The authors describe this difference as statistically significant, which they count as evidence that DeepSurv's recommendations raise median survival.

For RSF the Recommendation subset has a median of 36.567 months against 32.394 months, but the log-rank p-value is 0.083338, so the authors report no significant treatment recommendation from RSF. The reported transfer is a single experiment from the Rotterdam data to the GBSG population.

## Limitations

The RSF's accuracy on the simulated true risk function was not measured, because it estimates a cumulative hazard rather than a hazard function. The CPH is not evaluated as a recommender, so the recommendation comparison contains only DeepSurv and RSF. On WHAS, the RSF outperforms DeepSurv.

Real-data recommendation was tested on one transfer, from Rotterdam to GBSG, and RSF's recommendation effect there is not significant. Recommendation and Anti-Recommendation subsets are formed from the treatments patients actually received, and the paper does not test those comparisons under randomized assignment. The simulated treatment effect is a single Gaussian shape with fixed lambda max and r, so the range of nonlinear treatment effects tested is narrow.

## Paper info

- **Authors**: Katzman, Jared, Shaham, Uri, Bates, Jonathan, Cloninger, Alexander, Jiang, Tingting, Kluger, Yuval
- **Venue**: arXiv · Preprint
- **First published**: 2016-6-2
- **Added**: 2026-11-12
- **Updated**: 2017-8-9
- **Version**: v3
- **arXiv**: 1606.00931
- **DOI**: 10.1186/s12874-018-0482-1
- **Category**: stat.ML · cs.NE
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1606.00931v3) · [PDF ↗](https://arxiv.org/pdf/1606.00931v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Katzman, Jared, Shaham, Uri, Bates, Jonathan, Cloninger, Alexander, Jiang, Tingting, Kluger, Yuval (2016). DeepSurv: Personalized Treatment Recommender System Using A Cox Proportional Hazards Deep Neural Network. arXiv:1606.00931v3. https://doi.org/10.1186/s12874-018-0482-1

**BibTeX**

```
@article{jared2016deepsurv,
  title = {{DeepSurv: Personalized Treatment Recommender System Using A Cox Proportional Hazards Deep Neural Network}},
  author = {Katzman, Jared and Shaham, Uri and Bates, Jonathan and Cloninger, Alexander and Jiang, Tingting and Kluger, Yuval},
  year = {2016},
  eprint = {1606.00931},
  archivePrefix = {arXiv},
  doi = {10.1186/s12874-018-0482-1},
  url = {https://arxiv.org/abs/1606.00931v3}
}
```

## Other paper commentary

- [BinaryConnect: Training Deep Neural Networks with binary weights during propagations](https://refivu.com/en/papers/50c59bf6-7b51-443a-b99a-d2bbc087f3e9-binaryconnect-training-deep-neural-networks-with-binary.md)
- [Deep Networks with Stochastic Depth](https://refivu.com/en/papers/a740a8af-8c09-4c4a-92ca-ab98a84c56cf-deep-networks-with-stochastic-depth.md)
- [Deep Transfer Learning with Joint Adaptation Networks](https://refivu.com/en/papers/a47a8c83-de4b-469b-a9c2-9df2e72bbd27-deep-transfer-learning-with-joint-adaptation-networks.md)
- [A Structured Self-attentive Sentence Embedding](https://refivu.com/en/papers/a8cbdabb-c63d-415b-8edf-e85be94428b8-a-structured-self-attentive-sentence-embedding.md)
- [Meta-Learning in Neural Networks: A Survey](https://refivu.com/en/papers/c729f50c-a819-4d71-934d-d46e25ac8859-meta-learning-in-neural-networks-a-survey.md)
- [YOLOv12: Attention-Centric Real-Time Object Detectors](https://refivu.com/en/papers/1b328616-dcc0-4c66-b27e-453b2482a00d-yolov12-attention-centric-real-time-object-detectors.md)
- [Targeted Backdoor Attacks on Deep Learning Systems Using Data Poisoning](https://refivu.com/en/papers/4dc3fc3a-5207-430d-b5ed-3cc95d077c11-targeted-backdoor-attacks-on-deep-learning-systems-using.md)
- [M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation](https://refivu.com/en/papers/c3b40084-e91f-4769-ab5c-b3256a5b92f7-m3-embedding-multi-linguality-multi-functionality-multi.md)
- [Graph Convolutional Networks for Text Classification](https://refivu.com/en/papers/3f1e8027-a608-4e71-87f0-2bdbf0fd5a7f-graph-convolutional-networks-for-text-classification.md)
- [Open3D: A Modern Library for 3D Data Processing](https://refivu.com/en/papers/d0e7cf62-d439-416d-a785-974f817c8a48-open3d-a-modern-library-for-3d-data-processing.md)
- [PCT: Point cloud transformer](https://refivu.com/en/papers/54b01448-d153-4635-92bf-22ab3866d1ae-pct-point-cloud-transformer.md)
- [Learning Deep CNN Denoiser Prior for Image Restoration](https://refivu.com/en/papers/e6af5c0e-57ae-4b96-acf1-3a40058beb53-learning-deep-cnn-denoiser-prior-for-image-restoration.md)

## Terms in this paper

- [dropout](https://refivu.com/en/terms/db73f75bbdd3-dropout)
- [Batch Normalization](https://refivu.com/en/terms/2b3e5f8509f6-batch-normalization)
- [ReLU](https://refivu.com/en/terms/7b22f5612f6c-relu)
- [bootstrapping](https://refivu.com/en/terms/1b26e51a5096-bootstrapping)
- [Adaptive Moment Estimation (Adam)](https://refivu.com/en/terms/efcb57380c07-adaptive-moment-estimation-adam)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/e56bf111-97b6-4d99-b702-a3e324f609b2-deepsurv-personalized-treatment-recommender-system-using-a)
