S
IAMESE S URVIVAL A NALYSIS
Anonymous authors
Paper under double-blind review
A BSTRACT
Survival Analysis (time-to-event analysis) in the presence of multiple possible adverse events, i.e., competing risks, is a challenging, yet very important problem in medicine, ﬁnance, manufacturing, etc.
Extending classical survival analysis to competing risks is not trivial since only one event (e.g. one cause of death) is observed and hence, the incidence of an event of interest is often obscured by other related competing events.
This leads to the nonidentiﬁability of the event times distribution parameters, which makes the problem signiﬁcantly more challenging.
In this work we introduce a novel Siamese Deep Neural Network architecture that is able to effectively learn from data in the presence of multiple adverse events.
The developed architecture measures the distance between covariates to issue pairwise concordant time-dependent risks, in which longer event times are assigned lower risks.
Furthermore, our architecture is able to directly optimize an approximation to the C-discrimination index, rather than relying on well-known metrics of cross-entropy etc., and which are not able to capture the unique requirements of survival analysis with competing risks.
Our results show consistent performance improvements on a number of publicly available medical datasets over both statistical and deep learning state-of-the-art methods.
I NTRODUCTION 1. M OTIVATION
Survival analysis is a method for analyzing data where the target variable is the time to the occurrence of a certain adverse event.
Competing risks is an extension to the classical survival analysis in which we distinguish between multiple possible adverse events.
The application of survival analysis are numerous and include medicine, ﬁnance, manufacturing etc.
While our work is applicable to all these domains, we will mainly focus on its application to medicine, where competing risk analysis has emerged in recent years as an important analysis and predictive tool in medicine (Glynn & Rosner (2005);
Wolbers et al.
; Satagopan et al.
(2004)), where an increasingly aging population is suffering from multiple comorbidities.
For instance, studies in cardiology often record the time to multiple disease events such as heart attacks, strokes, or hospitalization.
Competing risks methods allow for the analysis of the time to the ﬁrst observed event and the type of the ﬁrst event.
They are also relevant if the time to a speciﬁc event is of primary interest but competing events may preclude its occurrence or greatly alter the chances to observe it.
1. R ELATED WORKS
Previous work on classical survival analysis has demonstrated the advantages of deep learning over statistical methods (Luck et al.
; Katzman et al.
; Youseﬁ et al.
Cox proportional hazards model (Cox (1972)) is the basic statistical model for Survival Analysis.
One limitation of Cox PH model is that its time dependent risk function is the product of a linear covariate function and a time dependent function.
Katzman et al.
(2016) replaced the linear covariate function with a feed-forward neural network and demonstrated performance improvements.
They used a neural network to learn a representation which is then used as the input for the Cox PH model.
However, the problem of competing risks is much less studied, and the literature is based on classical methods based on statistics (the Fine Gray model (Fine & Gray (1999))), classical machine learning (Random
Survival Forest (Ishwaran et al.
; Ishwaran et al.
multi-task learning (Deep Gaussian
Multi-Task Processes (Alaa & van der Schaar (2017))) etc.
The problem of competing risks has not yet been addressed using deep learning because of the challenges associated with optimizing deep learning architectures based on the metrics used for competing risks such as the time-dependent discrimination index.
1. C ONTRIBUTIONS
In both machine learning and statistics it is common to develop predictive models and compare them in terms of the area under the receiver operating characteristic curve or the time-dependent discrimination index (in the survival analysis literature).
Numerous works on supervised learning (Cortes & Mohri (2004); Yan et al.
; Luaces et al.
; Chen et al.
; Agarwal et al.
(2005)) have shown that training the models directly optimizing the AUC can lead to much better out-of-sample (generalization) performance (in terms of AUC) rather than optimizing the error rate (or the accuracy).
In this work, we bring this idea to survival analysis models.
Our goal is to train a neural network with an approximate version of the time-dependent discrimination index (Antolini et al. (which is able to take competing risks into account).
The time-dependent discrimination index requires pairwise comparisons between the subjects.
Hence, the loss function in our case is based on relative comparisons and not absolute comparisons.
We adopt the well-known Siamese Neural Network architecture.
Siamese Networks have been widely used for settings where the loss functions require a relative comparison over two feature points (for instance, training networks for face recognition (Chopra et al.
signature veriﬁcation (Bromley et al.
The time-dependent discrimination index is a discontinuous function.
We propose a continuous approximation of the time-dependent discrimination function to ensure effective training of the model.
The approximated time-dependent discrimination index is only evaluated at the survival times observed in the dataset.
Training a neural network only over the observed survival times can lead to a model that does not generalize well for other times, which can lead to poor out of sample performance (in terms of discrimination index computed at different times).
To overcome this problem, we add a regularization term to the loss function.
It is also that not only does the model discriminate the individuals based on their risks for every event type but also predicts what event will happen.
To address this, we also incorporate an accuracy term in the loss function.
We demonstrate that our method signiﬁcantly outperforms the state-of-the-art survival analysis methods from machine learning and statistics literature.
P ROBLEM F ORMULATION
We consider a dataset H comprising of time-to-event information about N subjects who are followed up for a ﬁnite amount of time.
Each subject (patient) experiences an event D ∈ { 0 , 1 , .., M } , where
D is the event type.
D = 0 means the subject is censored (lost in follow-up or study ended).
If
D ∈ { 1 , .., M } , then the subject experiences one of the events of interest (for instance, subject develops cardiac disease).
We assume that a subject can only experience one of the above events.
T is deﬁned as the time-to-event, where we assume that time is discrete T ∈ { t 1 , ..., t K } and t 1 = 0 .
Let H =
{ T i , D i , x i } N i =1 , where T i is the time-to-event for subject
i , D i is the event experienced by the subject i and x i ∈ R S are the covariates of the subject (the covariates are measured at baseline, which may include age, gender, genetic information etc.).
The Cumulative Incidence Function (CIF) (Fine & Gray (1999)) computed at time t for a certain event D is the probability of occurrence of a particular event D before time t conditioned on the covariates of a subject x , and is given as F ( t, D | x ) =
Pr ( T ≤ t, D | x ) .
The cumulative incidence function evaluated at a certain point can be understood as the risk of experiencing a certain event before a speciﬁed time.
In this work, our goal is to develop a neural network that can learn the complex interactions in the data and is particularly suited to this setting of competing risks survival analysis.
We need to decide the loss function to use and the architecture of the neural network.
Time-dependent discrimination index is the most commonly used metric for evaluating models in survival analysis (Antolini et al.
There are many works in the supervised learning literature that have shown that approximating the area under the curve (AUC) directly and training a classiﬁer leads to better generalization performance in terms of the AUC (see e.g. Cortes & Mohri (2004); Yan et al.
; Luaces et al.
; Chen et al.
; Agarwal et al.
However, these ideas were not explored in the context of survival analysis.
We will follow the same principles to construct an approximation of the time-dependent discrimination index to train our neural network.
We ﬁrst describe the timedependent discrimination index below.
Consider an ordered pair of two subjects ( i, j ) in the dataset.
If the subject i experiences event m , i.e., D i (cid:54) = 0 and if subject j ’s time-to-event exceeds the time-to-event of subject i , i.e., T j > T i , then the pair ( i, j ) is a comparable pair.
The set of all such comparable pairs is deﬁned as the comparable set for event m , and is denoted as X m .
A model outputs the risk of the subject x for experiencing the event m before time t , which is given as R m ( t, x ) .
The time-dependent discrimination index for a certain cause m is the probability that a model accurately orders the risks of the comparable pairs of subjects in the comparable set for event m .
The time-dependent discrimination index for cause m is deﬁned as
[Equation]
where
[Equation]
The discrimination index in (1) cannot be computed exactly since the distribution that generates the data is unknown.
However, the discrimination index can be estimated using the dataset.
The estimator for (1) is deﬁned as
[Equation]
Note that in the above equation (5) only the numerator depends on the model.
Henceforth, we will only consider the quantity in the numerator and we write it as
[Equation]
The above equation can be simpliﬁed as
[Equation]
where 1 ( x ) is the indicator function, X mi ( left ) ( X mi ( right ) ) is the left (right) element of the i th comparable pair in the set X m and T i,left ( T i,right ) is the respective time-to-event.
In the next section, we will use the above simpliﬁcation (6) to construct the loss function for the neural network.
S IAMESE S URVIVAL P ROGNOSIS N ETWORK
In this section, we will describe the architecture of the network and the loss functions that we propose to train the network.
Denote H as a feed-forward neural network.
It is composed of a sequence of L fully connected hidden layers with “scaled exponential linear units” (SELU) activation.
The last hidden layer is fed to M layers of width K .
Each neuron in the latter M layers estimates the probability that a subject x experiences cause m occurs in a time interval t k , which is given as Pr m ( t k , x ) .
For an input covariate x the output from all the neurons is a vector of probabilities given as (cid:110)(cid:2)
Pr m ( t k , x ) (cid:3) K k =1 (cid:111)
M m =1 .
The estimate of cumulative incidence function computed for cause m at time t k is given as ˜ R m ( t k , x ) = (cid:80)
ki
=1 Pr m ( t i , x ) .
The ﬁnal output of the neural network for input x is vector of estimates of the cumulative incidence function given as H ( x ) =
(cid:110)(cid:2)
[Equation]
R m
[Equation] t k , x [Equation] K k =1 (cid:111)
M m =
In this section, we describe the loss functions that are used to train the network.
The loss function is composed of three terms: discrimination, accuracy, and a regularization term.
We cannot use the metric in (6) directly to train the network because it is a discontinuous function (composed of indicators) and this can lead to poor training of the network.
We overcome this problem by approximating the indicator function using a scaled sigmoid function σ ( αx ) = [Equation]
The approximated discrimination index is given as
[Equation]
The scaling parameter α determines the sensitivity of the loss function to discrimination.
A higher value for α will force the network to keep the risks for the left and the right subject in a comparable pair sufﬁciently apart.
The discrimination part deﬁned above captures a model’s ability to discriminate subjects for each cause separately.
We also need to ensure that the model can predict the cause accurately.
We deﬁne the accuracy of a model in terms of a scaled sigmoid function with scaling parameter κ as follows:
[Equation]
The discrimination term penalizes the risk functions only at the event times of the left subjects in comparable pairs.
However, it is important that the neural network is optimized to produce risk values that interpolate well to other time intervals as well.
In order to this, we introduce a regularization term below.
[Equation]
m
[Equation]
(cid:88)
[Equation]
(cid:88)
[Equation]
k
[Equation] i [Equation] left
[Equation]
right
[Equation]
[Equation]
The regularization term ensures that the risk of each right subject is kept to as small a value as possible for all the times before time-to-event of the left subject in the respective comparable pair.
Intuitively, the regularization can be justiﬁed as follows.
The right subjects do not experience an event before the time T i,left , which means that the probability that the experience an event before this time should be kept to a minimum.
The ﬁnal loss function is the sum of the discrimination terms (described above), the accuracy and the regularization terms, and is given as
[Equation]
Finally, we adjust for the event imbalance and the time interval imbalance caused by the unequal number of pairs for each event and time interval with inverse propensity weights on the loss function.
We train the feed-forward network using the above loss function Loss and regularize it using SELU dropout (Klambauer et al.
Since the loss function involves the discrimination term, each term in the loss function involves a pairwise comparison.
This makes the network training similar to a Siamese network (Bromley et al.
The backpropagation terms now depend on each comparable pair.
Figure 1 visualizes the used network architecture.
E XPERIMENTS
This section includes a discussion of hyper-parameter optimization which is followed by competing risk and survival analysis experiments.
For single event problems we compare against Cox
PH model (”survival” R package), (Katzman et al.
(github) and Survival Random Forest (”randomForestSRC” R package).
For competing risk problems we compare against Fine-Gray model (”cmprsk” R package), Competing Random Forest (”randomForestSRC” R package) and the cause-speciﬁc (cs) extension of two single event (non-competing risks) methods, Cox PH model and (Katzman et al.
In cause-speciﬁc extension of single event models, we mark the occurrence of any event apart from the event of interest as censorship and decouple the problem into separate single event problem (one for each cause); this is a standard way of extending single-event models to competing risk models.
In the following results we refer to our method with the acronym SSPN.
[Table] [Table]
H YPER - PARAMETER OPTIMIZATION
Optimization was performed using a 5-fold cross validation with ﬁxed censorship rates in each fold.
We choose 60-20-20 division for training, validation and testing sets.
A standard grid search was used to determine the batch size, the number of hidden layers and the width of the hidden layers and the dropout rate.
The optimal values of α and β were consistently 500 and 0.01 for all datasets.
As previously mentioned, the sets are comprised of patient pairs.
In each training iteration, a batch size of pairs was sampled with replacement from the training set which reduces convergence speed but doesn’t lower performance relative to the standard non replacement sampled batches (Recht &
Re (2012)).
The validation performance was measured every 1000 training iterations during which the stopping criterion conditions were evaluated.
We deﬁned the stopping criterion as the lack of validation improvement in terms of our metric on all of the causes over the last x evaluations.
We note that the training sets are commonly in the tens of million pairs with patients appearing multiple times in both sides of the pair.
A standard deﬁnition of an epoch would compose of a single iteration over all patient.
However, in our case, we not only learn patient speciﬁc characteristics but also patient comparison relationships, which means an epoch with number of iterations equal to the number of patients is not sufﬁcient.
On the other hand, an epoch deﬁnition as an iteration over all pairs is impractical.
Our best empirical results were attained after 100K iterations with
Tensorﬂow on 8-core Xeon E3-1240 with 32GB Ram The usage of SELU activation and dropout followed conﬁrmation of its superiority over ReLU on the tested datasets.
We note that ReLU activation generated similar performance gains over the benchmarks although lesser than SELU.
We used SELU weight initialization, N (0 , input s ize − 1) , Adam optimizer (Kingma & Ba (2014)) and a decaying learning rate, LR − 1 ( i ) =
LR (0) + i , LR (0)
= 0 .
Table 1 summarizes the different optimized hyper-parameters.
4. SEER
The Surveillance, Epidemiology, and End Results Program (SEER)
1 dataset provides information on breast cancer patients during the years 1992-2007.
A total of 72,809 patients, experienced breast cancer, cardiovascular disease (CVD), other diseases, or were right-censored.
The cohort consists of 23 features, including age, race, gender, morphology information, diagnostic information, therapy information, tumor size, tumor type, etc.
Missing values were replaced by mean value for realvalued features and by the mode for categorical features.
1.3% of the patients experienced CVD and 15.6% experienced breast cancer.
Table 2 displays the results for this dataset.
We can notice that for
[Table]
the infrequent adverse event, CVD, the performance gain is negligible while for the frequent breast cancer event, the gain is signiﬁcant.
4. S YNTHETIC DATA
Due to the relative scarcity of competing risks datasets and methods
[Table]
we have created an additional synthetic dataset to further demonstrate the performance of our method.
We have constructed two stochastic processes with parameters and the event times as follows:
[Equation]
[Equation]
where ( x 1 i , x 2 i , x 3 i ) is the vector of features for patient i .
For k = 1 , 2 , the features x k only have an effect on the event time for event k , while x 3 has an effect on the event times of both events.
Note that we assume event times are exponentially distributed with a mean parameter depending on both linear and non-linear (quadratic) function of features.
Given the parameters, we ﬁrst produced 30 , 000 patients; among those, we randomly selected 15 , 000 patients (50%) to be right-censored at a time randomly drawn from the uniform distribution on the interval [0 , min { T 1 i , T 2 i } ] .
(This censoring fraction was chosen to be roughly the same censoring fraction as in the real datasets, and hence to present the same difﬁculty as found in those datasets.)
Table 3 displays the results for the above dataset.
We can notice the same consistent performance gain as in the previous case.
[Table]
4. UNOS
The United Network for Organ Sharing (UNOS) database 2 consists of patients who underwent heart transplantation in the period 1985-2015.
Of the total of 60,400 patients who received heart transplants, 29,436 patients (48.7%) were followed until death; the remaining 30,964 patients (51.3%) were right-censored.
A total of 50 features (30 recipient-relevant, 9 donor-relevant and 11 donorrecipient compatibility) were used.
Table 4 presents the results for the UNOS dataset.
The results show clear performance improvements for the Siamese Survival Network.
[Table]
4. UK B IOBANK
UK Biobank is a comprehensive dataset consisting of health records, diagnoses and treatments of a wide array of diseases, including Cardiovascular disease (CVD) events.
There is a total of 413, patients, followed for 10 years, with no previous history of CVD, out of whom 6,051 (1.5%) developed a CVD.
The records consist of 8 covariates (gender, age, smoking habits, systolic blood pressure, blood pressure treatment, total cholesterol, HDL cholesterol and diabetes).
Similarly to
UNOS, the results in table 4 show clear performance improvements for the Siamese Survival Network.
C ONCLUSION
Competing risks settings are ubiquitous in medicine.
They can be encountered in cardiovascular diseases, in cancer, and in the geriatric population suffering from multiple diseases.
To solve the challenging problem of learning the model parameters from time-to-event data while handling right censoring, we have developed a novel deep learning architecture for estimating personalized risk scores in the presence of competing risks which is based on the well-known Siamese network architecture.
Our method is able to capture complex non-linear representations missed out by classical machine learning and statistical models.
Experimental results show that our method is able to outperform existing competing risk methods by successfully learning representations which can ﬂexibly describe non-proportional hazard rates with complex interactions between covariates and survival times that are common in many diseases with heterogeneous phenotypes.