D EEP L IFETIME C LUSTERING
Anonymous authors
Paper under double-blind review
A BSTRACT
The goal of lifetime clustering is to develop an inductive model that maps subjects into K clusters according to their underlying (unobserved) lifetime distribution.
We introduce a neural-network based lifetime clustering model that can ﬁnd cluster assignments by directly maximizing the divergence between the empirical lifetime distributions of the clusters.
Accordingly, we deﬁne a novel clustering loss function over the lifetime distributions (of entire clusters) based on a tight upper bound of the two-sample Kuiper test p-value.
The resultant model is robust to the modeling issues associated with the unobservability of termination signals, and does not assume proportional hazards.
Our results in real and synthetic datasets show signiﬁcantly better lifetime clusters (as evaluated by C-index, Brier Score, Logrank score and adjusted Rand index) as compared to competing approaches.
I NTRODUCTION
Survival analysis is widely used to model the relationship between subject covariates and the time until a particular terminal event of interest (e.g., death, or quitting of social media) that marks the end of all activities (or measurements) of that subject (known as the lifetime of the subject).
For instance, a subject’s logins to a social network are her activities and the time until she quits the social network permanently is her lifetime.
The lifetime of a subject can be unobserved for two possible reasons: (a) the terminal event was right-censored, i.e., the subject did not have a terminal event within the ﬁnite data-collection period, or (b) the terminal events are inherently unobservable.
Right-censoring happens for instance when a patient is still alive at the time of data-collection.
Unobservability happens for instance, in social networks, when a subject simply stops using the service but does not provide a clear termination signal by deleting her account.
In such a scenario, the terminal events remain unobserved for most if not all subjects, even if the subjects quit the service within the data-collection period.
Numerous survival methods have been proposed (Witten and Tibshirani, 2010a;
Hothorn et al., 2006; Ishwaran et al., 2008) to predict the lifetime of a subject given her covariates and her activities/measurements for a brief initial period of time, while also accounting for right-censoring.
More recent deep learning models for lifetime prediction (Lee et al., 2018;
Ren et al., 2018; Chapfuwa et al., 2018) have achieved much success due to their ﬂexibility to model complex relationships, and by avoiding limiting assumptions like parametric lifetime distributions (Ranganath et al., 2016) and proportional hazards (Katzman et al., 2018).
In scenarios where terminal events are never observed (unobservability), it is a standard practice to introduce artiﬁcial termination signals through a predeﬁned “timeout” for the period of inactivity, i.e., a social network user inactive for m months has her last observed activity declared a terminal event.
Such a speciﬁcation is typically arbitrary and can adversely affect the analysis depending on the “timeout” value used.
Notwithstanding the fact that lifetimes are hard to predict without termination signals in the training data, we are generally interested in clustering subjects based on their underlying lifetime distribution to improve decision-making.
Applications include identifying disease subtypes (Gan et al., 2018), understanding the implications of distinct manufacturing processes on machine parts, and qualitatively analyzing different survival groups in a social network.
Although accurately predicting time-toterminal-event for an individual is important in a variety of applications, lifetime clustering plays a complementary role and provides a more holistic picture.
Lifetime clustering remains a relatively unexplored topic despite being an important tool.
Although traditional unsupervised clustering methods such as k -means and hierarchical clustering are popular for this task (Bhattacharjee et al., 2001; Sørlie et al., 2001; Bullinger et al., 2004), they may produce clusters that are entirely uncorrelated with lifetimes (Gaynor and Bair, 2013).
Semi-supervised clustering (Bair and Tibshirani, 2004) and supervised sparse clustering (Witten and Tibshirani, 2010b) employ a two-stage lifetime clustering process: (i) identify covariates associated with lifetime using
Cox scores (Cox, 1992), and (ii) treat these covariates differently while performing k -means clustering.
They assume proportional hazards (i.e., constant hazard ratios over time) and require the presence of termination signals.
Furthermore, a decoupled two-stage process such as the above is not guaranteed to obtain clusters with maximally distinct lifetime distributions; rather, we require an end-to-end learning framework that prescribes a loss function speciﬁcally over the lifetime distributions of different clusters.
In this work we tackle the important task of inductive lifetime clustering without assuming proportional hazards, while also smoothly handling the unobservability of termination signals.
Contributions.
(i)
We introduce DeepCLife , an inductive neural-network based lifetime clustering model that ﬁnds cluster assignments by maximizing the divergence between empirical (nonparametric) lifetime distributions of different clusters.
Whereas the subjects of different clusters have distinct lifetime distributions, within a cluster all subjects share the same lifetime distribution even if they have different lifetimes.
Our model is robust to the modeling issues associated with the unobservability of termination signals and does not assume proportional hazards.
(ii) We deﬁne a novel clustering loss function over empirical lifetime distributions (of entire clusters) based on the Kuiper two-sample test.
We provide a tight upper bound of the Kuiper p-value with easy-to-compute gradients facilitating its use as a loss function, which until now was prohibitively expensive due to the test’s inﬁnite sum.
(iii) Finally, our results on real and synthetic datasets show that the proposed lifetime clustering approach produces signiﬁcantly better clusters with distinct lifetime distributions (as evaluated by
Logrank score, C-index, Brier Score and Rand index) as compared to competing approaches.
F ORMAL F RAMEWORK
In this section, we formally deﬁne the statistical framework underlying the clustering approach introduced later in the paper.
Notation remark : We use superscript ( u ) to refer to variables indexed by a subject u and use subscript k to refer to random variables indexed by a random subject of cluster k .
See Table 1 for a complete list of all the variables and their meanings.
We assume that there are distinct underlying clusters with different event processes describing the activity events of a random subject (e.g., logins to a social network, measurements of a patient) in the respective clusters.
To make these notions more formal, we introduce our event process.
Deﬁnition 1 (Abstract Event Process) .
Consider the k -th cluster.
The Random Marked Point
Process (RMPP) for the activity events is Φ k = { X k , { ( A k,i , M k,i , Y k,i ) } i ∈ N , Θ k } over discrete times t = 0 , 1 , . . .
, where X k is the random variable representing the covariates of a random subject in cluster k , Θ k is the time to the zeroth activity event (joining), M k,i represent covariates of event i , Y k,i is the inter-event time between the i -th and the ( i − 1) -st activity events (e.g., logins), and
A k,i = 1 indicates an event with a termination signal (death), otherwise A k,i = 0 .
All these variables may be arbitrarily dependent.
This deﬁnition is model-free, i.e., we will not prescribe a model for Φ k .
We observe the RMPP over a time window [0 , t m ] .
Using the above formalism, we deﬁne the true lifetime of a subject in cluster k as the sum of all inter-event times until termination signal A k,i =is observed.
Deﬁnition 2 (True lifetime) .
The random variable that deﬁnes the true lifetime until the terminal event of a subject in cluster k is T k := max
[Table]
The true lifetime T k is unobserved if: (a) the terminal event
A k,i = 1 does not occur within the observation time period [0 , t m ] , or (b) the termination signals are inherently unobservable.
Now, the true lifetime distribution of a subject in cluster k is deﬁned as the probability that the subject has at least one more activity event after time t , and is given by S k ( t ) :
= P [ T k > t ] = 1 − F k ( t ) , t ∈ N ∪ { 0 } , where F k ( t ) is the underlying cumulative distribution function (CDF) of T k .
Note again that all the subjects of a cluster share the same lifetime distribution.
[Table]
Training data.
Our training data D consists of subjects from K underlying (hidden) clusters with distinct lifetime distributions S k for k ∈ { 1 , . .
. , K } .
For a subject u ∈ D , we observe the following quantities { X ( u ) , { ( M ( u ) i , Y ( u ) i
[Equation] , Θ ( u ) } , where X ( u ) , Y ( u ) i , M ( u ) i and Θ ( u ) are analogously deﬁned as in Deﬁnition 1, but for a given subject u .
Q ( u ) ( t ) is the number of observed activity events of u after her joining and before time t .
The training data may or may not contain the termination signals, { A ( u ) i } Q ( u ) ( t m )
i = , where A ( u ) i
= 1 indicates that event i was a terminal event for subject u (e.g., death).
Termination signals are typically available in healthcare applications, whereas in the case of social networks, we usually do not observe the termination signal (i.e., account deletion) for any subject.
We deﬁne the observed lifetime of a subject u as H ( u ) :
= (cid:80) Q ( u ) ( t m ) i =
Y ( u ) i , i.e., the sum of all the inter-event times within the observation period [0 , t m ] .
In the absence of termination signals, we additionally deﬁne inactive period as the time elapsed since the last observed event of subject u , given by χ ( u ) :
=
t m − Θ ( u ) − H ( u ) .
We use H ( u ) and χ ( u ) only during training.
Figure 1 shows the true lifetime, the observed lifetime, and the inactive period for four users of two different clusters in the training data.
The events are observed (denoted by solid circles) only till the time of measurement t m , whereas the rest of the events are right-censored (denoted by solid diamonds).
The termination signal (denoted by dotted diamonds) may be unobserved even if it occurs before t m (eg., u 3 ).
Test data.
For a new test subject, we can only observe her covariates and her activity events for a brief initial period of time τ since her joining.
Formally, we observe the following quantities {
[Equation]
, Θ ( u ) } .
The goal of inductive lifetime clustering is to be able to assign a cluster for a new unseen subject within τ time of her joining.
Note that since H ( u ) and χ ( u ) are tied to t m , they cannot be computed for test subjects.
Lastly, we formally deﬁne our clustering problem.
Deﬁnition 3 (Clustering problem) .
Consider a dataset D with N subjects.
Our goal is to ﬁnd a mapping
[Equation]
[Equation]
→ { 1 , . . .
, K } , that inductively maps subject covariates and observed activity events for a brief initial period of time τ into clusters, such that the divergence ∆ between the empirical lifetime distributions of these clusters is maximized, i.e.,
[Equation]
where K is a set of all mappings, ˆ S k ( κ ) is the empirical lifetime distribution of subjects in D mapped to cluster k through κ , and ∆ is an empirical distribution divergence measure.
κ ∗ optimized in this fashion guarantees that subjects in different clusters have different lifetime distributions 1 .
[Figure]
( >  )  (  )  ( >  )  (  )
[Figure]
T HE D EEP CL IFE MODEL
In this section, we propose a practical lifetime clustering approach using neural networks that optimizes Equation (1).
Let D be the training data as deﬁned in Section 2.
Since we want to maximize divergence between empirical lifetime distributions, we assume discrete times (relative to subject joining), t ∈ { 0 , 1 , . .
, t max } , where t max = max u ∈D H ( u ) is the maximum observed lifetime of any subject u ∈ D .
Note that it is sufﬁcient to deﬁne the empirical distribution till t max , since we have not observed any subject with lifetime greater than t max .
3. C LUSTER ASSIGNMENTS : α ( u ) k ( W 1 )
We deﬁne a neural network g that takes user covariates and the event data for a subject u during a brief initial period τ after her joining as input, and outputs her cluster assignment probabilities, α ( u ) k
( W 1 ) for all k ∈ { 1 , . . .
[Equation] [Equation]
where W 1 are the weights of the neural network.
The ﬁnal layer of g is a softmax layer with K units.
Figure 2a depicts g as a feedforward neural network with L − 1 hidden layers, although our model is not restricted to a feedforward architecture.
In our experiments, we compute summary statistics over the observed events { M ( u ) i , Y ( u ) i } i in order to make it compatible with the feedforward architecture.
3. P ROBABILITY OF TERMINATION : β ( u ) ( W 2 )
During the training of our model, we require termination signals or a probabilistic estimation of the termination signals in order to write the likelihood of the model.
Given the model parameter W 2 , we deﬁne β ( u ) ( W 2 ) as the probability that the last observed event of u was terminal, i.e., u will have no future activity events after the last observed event.
If the termination signals A ( u ) i are observed in the training data D (e.g., healthcare), clearly β ( u ) ( W 2 ) :
= A ( u ) Q ( u ) ( t m ) (i.e., W 2 is ignored).
When such termination signals are unobservable (e.g., social network), existing survival methods commonly use a timeout window of predeﬁned size W ﬁxed over the inactive period χ ( u ) to specify the probability of termination as β ( u ) ( W ﬁxed ) :
= 1 [ χ ( u ) >W ﬁxed ] .
However, such speciﬁcation is arbitrary and precludes any learning of the window size parameter W ﬁxed .
Instead, we model the latent termination probabilities β ( u ) ( W 2 ) using a smooth non-decreasing function of χ ( u ) , i.e., higher the period of inactivity, higher the probability that the last observed event was terminal.
[Figure]
F C
[Figure]
y e r
[Figure]
( ) { ,  ( )  1   ( )  1  }   ( )  ( )   1,  1,    ...
[Figure]
[Figure]
( ⋅ , )
[Figure] [Figure]
y
[Figure] [Figure]
[Figure] [Figure]
[Figure]
If the termination signals A ( u ) i are unobservable in the training data D (e.g., social network), we use β ( u ) ( W 2 ) :
= 1 − e − W 2 · χ ( u ) where W 2 ≥ 0 .
3. E MPIRICAL LIFETIME DISTRIBUTION OF CLUSTER k : ˆ S k ( W 1 , W 2 ; D )
Given the training data D and model parameters W 1 and W 2 , we can obtain the soft cluster assignments α ( u )
k
( W 1 ) and the probability of termination β ( u ) ( W 2 ) for all subjects u ∈ D and clusters k ∈ { 1 . . .
K } as shown in Section 3.1 and Section 3.2.
In this subsection, we obtain the empirical lifetime distribution of all the clusters k = 1 . . .
K , using the Kaplan-Meier estimates (Kaplan and
Meier, 1958).
We do not assume a parametric form for the lifetime distribution, and rather use empirical distributions in our optimization to allow lifetime curves of any shape (Figure 2b).
Kaplan-Meier estimates are a maximum likelihood estimate of the lifetime distribution of a set of subjects assuming (a) hard memberships (each subject entirely belongs to the set) and (b) the presence of termination signals.
We modify the estimates to account for partial memberships and probability of termination instead.
Proposition 1.
Given the training data D , a cluster k , the cluster assignment probabilities { α ( u ) k
( W 1 ) } u ∈D , and the probabilities of termination { β ( u ) ( W 2 ) } u ∈D , the maximum likelihood estimate of the empirical lifetime distribution of cluster k is given by,
[Equation]
for all t ∈ { 0 , 1 , . . .
, t max } , where, s k ( W 1 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u ) ≥ j ] · α ( u ) k
( W 1 ) , is the expected number of subjects in cluster k who are at risk (of termination) at time j , and, d k ( W 1 , W 2 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u )
=
j ] · β ( u ) ( W 2 ) · α ( u ) k
( W 1 ) , is the expected number of subjects that are predicted to have had a terminal event at time j .
The proof is presented in the supplementary material.
3. E MPIRICAL DISTRIBUTION DIVERGENCE LOSS : ∆( ˆ S a , ˆ S b )
We rewrite the objective function of lifetime clustering from Deﬁnition 3 with respect to the model parameters W 1 and W 2 as follows,
[Equation]
where ˆ S
i is the empirical distribution, a shorthand for the vector
ˆ S
i ( W 1 , W 2 ; D ) , and ∆ is a divergence measure between two empirical distributions.
We note the following essential requirements for the divergence measure ∆ : (a) ∆ deﬁned over empirical distributions must take into account sample sizes, (b) ∆ should have easy-to-compute gradients since it is used as an objective function to train neural networks, and (c) ∆ should not assume proportional hazards, and should allow for crossing lifetime curves (see Figure 2b).
Divergence measures such as Kullback-Leibler (Kullback and Leibler, 1951) and MMD (Gretton et al., 2012) fulﬁll (b, c) but not (a) , and will result in sample anomalies as depicted in Figure 2c (also seen in our experiments: Figure 3d).
Logrank test (Mantel, 1966), commonly used for comparing lifetime distributions, fulﬁlls (a, b) , but has low statistical power when the proportional hazards assumption is not met (Peto and Peto, 1972; Bland and Altman, 2004)
(e.g., Figure 2b).
Finally, p-value from two-sample tests such as the Kolmogorov-Smirnov (K-S) test (Massey Jr, 1951) fulﬁll (a, c) , but not (b) as they require the computation of an inﬁnite sum, resulting in an impractical objective function unless heuristic approximations are made.
We propose to use the Kuiper test (Kuiper, 1960), a two-sample test closely related to the K-S test with increased statistical power in distinguishing distribution tails (Tygert, 2010).
Speciﬁcally, we deﬁne ∆( ˆ S a , ˆ S b ):= − log( KD ( ˆ S a , ˆ S b )) , where KD is the p-value from the Kuiper test between ˆ S a and ˆ S b .
Our choice of the Kuiper test is because it is amenable to upper and lower bounds as shown next, thus avoiding the prohibitive heuristic approximations of inﬁnite sums.
Proposition 2.
(Bounds for Kuiper p-value.)
Given two empirical lifetime distributions ˆ S a
and ˆ S b with discrete support and sample sizes n a and n b respectively, deﬁne the maximum positive and negative separations between them, ˆ
[Equation]
The Kuiper test p -value Kuiper (1960) gives the probability that Λ , the empirical deviation for n a and n b observations under the null hypothesis S a = S b 2 , exceeds the observed value V = ˆ D + a,b
+ ˆ D − a,b :
[Equation]
λ a,b = ( (cid:112) M a,b + 0 .
155 +
[Equation]
24 √ M a,b ) V and M a,b = n a n b n a + n b is the effective sample size.
Then, the upper bound 3 for the Kuiper p-value is,
[Equation]
b ) − w (1 , λ a,b ) + v ( r ( lo
[Equation]
a,b , λ a,b ) (cid:1)
[Equation]
(6) where v ( r, λ )=(4 r 2 λ 2 − 1)
e − 2 r 2 λ 2 , w ( r, λ )= − re − 2 r 2 λ 2 , r ( lo ) a,b = (cid:98) 1 √ 2 λ a,b (cid:99) , and, r ( up ) a,b = (cid:100) 1 √ 2 λ a,b (cid:101) .
The proof is presented in the supplementary material.
Figures 2d and 2e show empirical results of the upper and lower bounds as a function of V =
D + + D − against the expensive heuristic computation where the inﬁnite sum in Equation (5) is approximated with 10 4 terms (Press et al., 1996).
We optimize Equation (4) with ∆( ˆ S a , ˆ S b ) := − log( KD (up) ( ˆ S a , ˆ S b )) where KD (up) denotes the Kuiper p-value upper bound in Equation (6).
∆ deﬁned this way satisﬁes all three requirements we described in the beginning of Section 3.4: takes sample sizes into account, has closed form expression with easy-to-compute gradients, and does not assume proportional hazards.
Implementation.
We implement our clustering procedure as a feedforward neural network in
Pytorch (Paszke et al., 2017) and use ADAM (Kingma and Ba, 2014) to optimize Equation (4).
Each iteration of the optimization takes as input a batch of subjects, generates a single value for the set loss, calculates the gradients, and updates the parameters W 1 and W 2 .
We show in the supplementary material that the time and space complexity per iteration of the proposed approach are
O ( KB + K 2 t max ) and O ( Kt max ) respectively, where K is the number of clusters and B is the batch size.
For large values of K , we achieve tractability by sampling K random pairs of clusters every iteration instead of all (cid:0) K 2 (cid:1) possible pairs.
R ELATED W ORK
Majority of the work in survival analysis has dealt with the task of predicting the time to an observable terminal event (e.g., death), especially when the number of features is much larger than the number of subjects (Witten and Tibshirani, 2010a; pre; Hothorn et al., 2006; Shivaswamy et al., 2007).
Recently, many deep learning approaches (Luck et al., 2017; Katzman et al., 2018; Lee et al., 2018; Ren et al., 2018) have been proposed for predicting the lifetime distribution of a subject given her covariates, while effectively handling censored data that typically arise in survival tasks.
DeepHit (Lee et al., 2018) introduced a novel architecture and a ranking loss function in addition to the log-likelihood loss for lifetime prediction in the presence of multiple competing risks.
Using a log-likelihood loss similar to DeepHit, Ren et al.
(2018) propose a recurrent architecture to predict the survival distribution that captures sequential dependencies between neighbouring time points.
Finally, Chapfuwa et al.
(2018) introduce an adversarial learning framework to model the lifetime given the subject covariates.
In contrast to these works on predicting lifetimes, our task is to cluster the subjects based on their underlying lifetime distributions.
There are relatively fewer works that perform lifetime clustering.
Many unsupervised approaches have been proposed to identify cancer subtypes in gene expression data but do not consider the lifetime (Eisen et al., 1998; Alizadeh et al., 2000; Bhattacharjee et al., 2001; Sørlie et al., 2001;
Bullinger et al., 2004), and may produce clusters that are entirely independent of the lifetimes.
Semi-supervised clustering (Bair and Tibshirani, 2004) and supervised sparse clustering (Witten and Tibshirani, 2010b) use Cox scores (Cox, 1992) to identify features associated with the lifetime and treat these features differently while using k-means to perform the ﬁnal clustering.
Unlike these lifetime clustering methods, DeepCLife does not assume proportional hazards, and can smoothly handle the absence of termination signals.
Our supplementary material has a more in-depth discussion of related work.
R ESULTS
Baselines.
We perform experiments on one synthetic dataset and two real-world datasets – Friendster social network and MIMIC III healthcare dataset (Johnson et al., 2016).
We compare the following lifetime clustering approaches: (a) SSC-Bair , a semi-supervised clustering method (Bair and Tibshirani, 2004) that performs k-means clustering on selected covariates that have high Cox scores (Cox, 1992); (b) SSC-Gaynor or supervised sparse clustering (Gaynor and Bair, 2013), a modiﬁcation of sparse clustering (Witten and Tibshirani, 2010b) that weights the covariates based on their Cox scores; (c) DeepHit+GMM , a Gaussian mixture model applied over last layer embeddings learnt by DeepHit (Lee et al., 2018); (d) DeepCLife-MMD , the DeepCLife model with Maximum Mean Discrepancy (Gretton et al., 2012) as the divergence measure; (e) DeepCLifeKuiperUB , the DeepCLife model with the proposed divergence measure based on the Kuiper p-value upper bound (Equation (6)).
Termination signals for evaluation and baselines.
(Timeout.)
The competing methods and most evaluation metrics for survival applications require clear termination signals.
In scenarios where we do not observe termination signals (e.g., Friendster experiments), we specify termination signals artiﬁcially when training the baselines using a pre-deﬁned “timeout”, i.e., β ( u ) ( W ﬁxed ) =
1 [ χ ( u ) >
W ﬁxed ] .
During evaluation, we use the same W ﬁxed to specify the termination signals and compute the metrics.
This helps the competing methods since they are trained and evaluated using termination signals with the same W ﬁxed , whereas our approach is not trained with these termination signals.
[Table] [Table]
Metrics.
Given the cluster assignments κ ( u (cid:48) ) ∈ { 1 , . . .
, K } and the termination signals (possibly using a “timeout” window) for all the users u (cid:48) in the test data, we can obtain the empirical lifetime distribution of all the clusters ˆ S k , ∀ k ∈ { 1 , . . .
, K } using the Kaplan-Meier estimates (over the test data alone).
Then, the empirical lifetime distribution of a user u (cid:48) is given by that of her assigned cluster, i.e., ˆ S ( u (cid:48) ) :
= ˆ S κ ( u (cid:48) ) .
We use the following metrics 4 for evaluating the clusters obtained from the methods.
• Logrank Score ↑ .
Logrank test (Mantel, 1966) statistic is a non-parametric test that outputs high values when it is unlikely for the K groups to have the same lifetime distribution.
• Adjusted Rand index ↑ .
The Adjusted Rand index (Hubert and Arabie, 1985) is a measurement of cluster agreement, compared to the ground truth clustering (if available).
ARI is 0.0 for random cluster assignments and 1.0 for perfect assignments.
• C-Index ↑ .
Concordance index (Harrell et al., 1982) is a commonly used metric that calculates the fraction of pairs of subjects for which the model predicts the correct order of survival while also incorporating censoring.
We use the expected lifetime obtained from the lifetime distribution ˆ S ( u (cid:48) ) as the predicted lifetime of user u (cid:48) .
C-index is 1.0 for perfect predictions and 0.5 for random predictions.
• Integrated Brier Score ↓ .
Integrated Brier score (Brier, 1950; Graf et al., 1999) computes mean squared difference between the survival probabilities and the actual outcome over [0 , t max ] .
It ranges from 0.25 for random predictions to 0 for perfect predictions.
Although cluster evaluation metrics like Logrank score are more suitable for the lifetime clustering task, we also use predictive measures like C-index and Brier Score to further validate the clusters.
Evaluation.
We evaluate the models using 5-fold cross validation.
We use the i th fold for testing and sample N (tr) subjects from the remaining 4 folds for training.
We use 20% of the N (tr) subjects as validation for early stopping and hyperparameter tuning for the different approaches.
5. E XPERIMENTS
Synthetic experiment.
We test our method with a synthetic dataset 6 for which we have the true clusters as ground truth.
We generate 3 clusters C 1 , C 2 and C 3 with different lifetime distributions such that C 2 and C 3 have proportional hazards, but lifetime distribution of C 1 crosses the other two curves (shown in Figure 2b).
We choose an arbitrary time of measurement, t m =150 , to imitate right censoring.
We sample 10 4 subjects for each cluster, their features drawn from mixture of Gaussians.
The lifetime T ( u ) of a subject u is randomly sampled from the lifetime distribution of her ground truth cluster.
Table 2 shows performance of the methods on three synthetic datasets: D { C 1 ,C 2 } , D { C 1 ,C 3 } ,
[Table]
[Table] [Figure] [Figure] [Table]
[Figure]
[Table]
[Figure]
[Table] [Figure] [Table] [Figure]
[Table]
[Figure] [Table] [Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
D { C 1 ,C 2 ,C 3 } .
DeepCLife-KuiperUB and DeepCLife-MMD were able to recover perfect ground truth cluster assignments on
D { C 1 ,C 2 } and D { C 1 ,C 3 } , whereas the baseline methods performed invariably worse.
On the harder dataset
D { C 1 ,C 2 ,C 3 } , DeepCLife-KuiperUB recovered the ground truth clusters almost twice as better than any other method.
Friendster experiment.
Friendster dataset 5 consists of 15 million users in the Friendster online social network along with the comments sent and received by the users.
We consider a subset with 1. million users who had participated in at least one comment.
We use each user’s proﬁle information (like age, gender, location, etc.) as covariates, and deﬁne activity events as the comments sent or received by the user.
We compute summary statistics of the activity events within τ = 5 months from joining such as number of comments sent/received, number of people interacted with, mean inter-event times, etc.
The task is to cluster new test users using their covariates and the summary statistics computed over initial τ = 5 months of activity.
Note that we do not observe termination signals (i.e., account deletion) for any subject in the data.
We use an arbitrary window of W ﬁxed =
months over the inactivity period to obtain termination signals ( ≈ 65% assumed to have quit) for the competing methods and for computing the evaluation metrics; DeepCLife does not require such arbitrary speciﬁcation but learns a smooth timeout window during training.
Table 3 shows results for K =2 , 4 clusters.
We note that the proposed method obtains higher C-index values and Brier scores compared to the baselines even without termination signals.
DeepCLife- KuiperUB achieves a signiﬁcant improvement in Logrank scores compared to the baselines because its loss speciﬁcally maximizes for differences in empirical distributions, while also taking sample sizes into account.
DeepCLife-MMD on the other hand does not account for sample sizes, and hence performs worse.
The empirical lifetime distributions of the clusters obtained from different methods for K =3 are shown in Figure 3.
The clusters obtained from the baselines (a-c) are not substantially different from each other.
Although DeepCLife-MMD obtains clusters with distinct lifetime distributions, it suffers from sample anomalies i.e., outputs clusters with very few or no subjects (e.g., ˆ S 2 in Figure 3d).
DeepCLife-KuiperUB outputs clusters that have signiﬁcantly different lifetime distributions with the best Logrank scores.
Corresponding plots of empirical lifetime distributions for K =2 , 4 , 5 are presented in the supplementary material.
For K =4 , we observe that DeepCLife-KuiperUB ﬁnds crossing yet distinct lifetime distributions (see Figure 7e in the supplementary material).
We present a heuristic to select optimal K based on the validation performance of the clusters in Appendix A.4.
Qualitative Analysis : In the clusters found by DeepCLife-KuiperUB in Friendster, we see that a user in a low-risk cluster has on average 7.76 friends, sends 5.06 comments with an average response time of 20 days.
On the other hand, a user in a high-risk cluster has just 1.56 friends on average and sends far fewer comments, around 1.07, but with a fast response time of 1.32 days.
Interestingly, users that stayed longer in the system had lower activity rate in the beginning.
MIMIC III experiment.
MIMIC III dataset 5 (Johnson et al., 2016) consists of aroundpatients admitted to the Intensive Care Unit (ICU).
The task is to cluster the patients based on their mortality within 30 days of admission to the ICU (Purushotham et al., 2017).
Unlike Friendster experiments, we can observe terminal events.
Lifetime of a patient is right-censored if she was discharged within the 30-day period ( ≈ 84% right-censored).
We use only the initial τ =24 hours of patient measurements (e g. heart rate, respiratory rate, etc.) to perform the clustering.
We compute summary statistics for each type of measurement, for example, number of heart rate measurements taken, mean heart rate, etc. to make the inputs compatible with the feedforward architecture in
Figure 2a. Results for K =2 in Table 4b show that DeepCLife-KuiperUB achieves signiﬁcantly better
C-index and Logrank scores, followed by DeepHit+GMM.
The corresponding empirical lifetime distributions of the clusters are shown in Figure 4a.
C ONCLUSION
In this work we introduced Kuiper-based nonparametric loss function to maximize the divergence between empirical distributions, and a corresponding upper bound with easy-to-compute gradients.
The loss function is then used to train a feedforward neural network to inductively map subjects into K lifetime-based clusters without requiring termination signals.
We show that this approach produces clusters with better C-index values and Logrank scores than competing methods.
A A PPENDIX A. P ROOF OF P ROPOSITION
Proposition (Proposition 1) .
Given the training data D , a cluster k , the cluster assignment probabilities { α ( u ) k
( W 1 ) } u ∈D , and the probabilities of termination { β ( u ) ( W 2 ) } u ∈D , the maximum likelihood estimate of the empirical lifetime distribution of cluster k is given by,
[Equation]
for all t ∈ { 0 , 1 , . . .
, t max } , where, s k ( W 1 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u ) ≥ j ] · α ( u ) k
( W 1 ) , is the expected number of subjects in cluster k who are at risk (of termination) at time j , and, d k ( W 1 , W 2 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u )
=
j ] · β ( u ) ( W 2 ) · α ( u ) k
( W 1 ) , is the expected number of subjects that are predicted to have had a termination event at time j .
Proof.
For a subject u , let e ( u ) ∼ Bernoulli
( β ( u ) ( W 2 )) be the sampled termination signal, i.e., e ( u ) =
1 indicates that the subject’s observed lifetime is her true lifetime, H ( u )
=
T ( u ) .
Let (cid:126)κ ( u ) ∼ Categorical ( α ( u ) 1 ( W 1 ) , . . .
, α ( u ) K ( W 1 )) be the sampled cluster assignment of the subject.
Finally, let the empirical lifetime PMF of a cluster k ∈ { 1 , 2 , . . .
K } be deﬁned as P ( T k = t ) :=
λ k,t for t ∈ { 0 , 1 , . . .
t max } , where T k is the true lifetime of a random subject in cluster k .
The likelihood of the training data D for a particular cluster k given the sampled termination signal { e ( u ) } u ∈D and the sampled cluster assignments { (cid:126)κ ( u ) } u ∈D can be written using Kaplan and Meier (1958) as,
[Equation]
Next, we take expectation over the cluster assignments and termination signals to get,
[Equation]
Using mean-ﬁeld approximation and proceeding as Kaplan and Meier (1958) to write Equation (7) as a product over time instead of subjects, we get,
[Equation]
where, we have used P ( T k = j )
=
λ k,j , s k
[ j ] is a shorthand for s k
( W 1 , W 2 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u ) ≥ j ] · α ( u ) k
( W 1 ) , the expected number of subjects at risk at time j , and, d k [ j ] is a shorthand for d k ( W 1 , W 2 ; D )
[ j ] = (cid:80) u ∈D 1 [ H ( u )
=
j ] · β ( u ) ( W 2 ) · α ( u ) k
( W 1 ) , the expected number of subjects that are predicted to have had a termination event at time j .
Finally, maximizing the likelihood in Equation (8) with respect to λ k,t for all k ∈ { 1 , . . .
K } and t ∈ { 0 , 1 , . . .
t max } , and computing the lifetime distributions (CCDF)
ˆ S k from the corresponding lifetime PMFs ﬁnishes the proof.
A. P ROOF OF P ROPOSITION
Proposition (Proposition 2) .
Given two empirical lifetime distributions ˆ S a
and ˆ S b with discrete support and sample sizes n a and n b respectively, deﬁne the maximum positive and negative separations between them as,
[Equation]
The Kuiper test p -value Kuiper (1960) gives the probability that Λ , the empirical deviation for n a and n b observations under the null hypothesis S a = S b , exceeds the observed value V = ˆ D + a,b + ˆ D
[Equation]
a,b :
[Equation]
where λ a,b = (cid:18)(cid:112)
[Equation] [Equation]
(cid:19)
V and M a,b = n a n b n a + n b is the effective sample size.
Then, the lower and upper bounds for the Kuiper p-value are,
[Equation]
and
KD
[Equation]
) where v ( r, λ ) = (4 r 2 λ 2 − 1) e − 2 r 2 λ 2 , with w ( r, λ ) = − re − 2 r 2 λ 2 , and r ( lo ) a,
[Equation]
[Table]
[Equation]
[Table]
[Equation]
Proof.
To prove these bounds, we ﬁrst regard that the indeﬁnite integral w ( r, λ ) =
(cid:82) v ( r, λ )
dr = − re − 2 r 2 λ 2 + C .
Then, for a given λ , v ( r, λ ) is monotonically increasing w.r.t r in the interval (0 , 1 √ 2 λ ) and monotonically decreasing w.r.t r in the interval ( 1 √ 2 λ , ∞ ) .
Let r ( lo )
=
(cid:98) 1 √ 2 λ
(cid:99) , r ( up ) =
(cid:100) 1 √ 2 λ (cid:101) and J [ l,m ] ( λ ) =
(cid:80)
mr = l v ( r, λ ) .
Here, we assume that r ( lo ) (cid:54) =
r ( up ) , i.e., 1 √ 2 λ is not an integer.
The bounds can be easily modiﬁed for when r ( lo ) =
r ( up ) .
Now, v ( r, λ ) is decreasing w.r.t r in ( r ( up ) , ∞ ) , and we have, (cid:90) ∞
[Equation]
and adding v ( r ( up ) , λ ) throughout we get,
[Equation]
Similarly, since v ( r, λ ) is increasing in (0 , r ( lo ) ) , we have,
[Equation]
and adding v ( r ( lo ) , λ ) throughout we get,
[Equation]
where we assume that r ( lo ) ≥ 1 , otherwise, J [1 ,r ( lo ) ]
( λ ) is trivially zero.
Combining equations equation 11 and equation 12, we get,
[Equation]
We use the fact that KD ( ˆ S a , ˆ S b ) = 2 · J [1 , ∞ ] ( λ a
[Equation]
b ) , J [1 , ∞ ] ( λ ) =
1 [ r ( lo ) ≥ 1] · J [1 ,r
[Equation]
lo ) ] ( λ ) +
J [ r ( up ) , ∞ ] ( λ )
[Equation]
and w ( r, λ ) =
(cid:82) v ( r, λ )
dr
[Equation]
and that KD ( ˆ S a , ˆ S b ) ≤ 1 to complete the proof
[Equation]
A. A DDITIONAL R ESULTS A.3. F RIENDSTER E XPERIMENT
Results on the Friendster experiments for K = 3 , 5 are shown in Table 4.
We observe that DeepCLife outperforms all baselines by large margins, particularly in the Logrank score.
Figures 5 to 8 show empirical lifetime distributions of the clusters found by the methods on the Friendster dataset for
K = 2 , 3 , 4 , 5 respectively.
Baseline methods SSC-Bair, SSC-Gaynor and DeepHit+GMM employ a two-stage clustering process and do not guarantee clusters with maximally different lifetime distributions.
DeepCLife-MMD does not account for sample sizes of empirical distributions and suffers from sample anomalies,
i
[Figure]
e., outputs clusters containing almost no subjects.
DeepCLifeKuiperUB obtains clusters with the best Logrank scores.
Interestingly, DeepCLife ﬁnds clusters with crossing yet distinct lifetime distributions for K = 4 (see Figure 7e)
[Figure] [Figure]
cluster sizes n 1 , n 2 , n 3 )
[Figure]
y ( CC
D F )
[Figure]
P r o b a b ili t y
( CC
D F )
[Figure]
A.3. MIMIC III E XPERIMENT
Figure 9 shows the empirical lifetime distributions of the clusters found by DeepCLife-KuiperUB in
MIMIC III dataset for K = 2 . . .
A. O PTIMAL NUMBER OF CLUSTERS : K
Similar to standard clustering algorithms, choice of K is subjective and depends on the downstream application of the clusters.
Here we discuss a heuristic to use Logrank scores as a useful guide to choose the optimal number of clusters.
For the Friendster experiments, Figure 10 shows the Logrank
[Table] [Table]
[Figure]
r o b a b ili t y ( CC
D F )
[Figure]
[Figure]
scores on a held-out validation set for clusters obtained from DeepCLife-KuiperUB with K = 2 . . .
We observe that K = 4 gives the best mean Logrank score and K = 5 is close behind.
However, for K > 5 , the Logrank scores drop drastically indicating that there are no more clusters that have distinct lifetime distributions from the ones already found.
Similarly for the MIMIC III experiments, Figure 11 shows the Logrank scores on a held-out validation set for clusters obtained from DeepCLife-KuiperUB with K = 2 . . .
We see that choosing K =gives the highest Logrank score.
However, we also observe that from K = 2 to K = 5 the scores do not increase signiﬁcantly; a practitioner might decide to use K = 2 for this reason.
A. C HOICE OF MINIMUM VS SUM IN E QUATIONS (1) AND (4)
We deﬁne the clustering problem in Deﬁnition 3 as ﬁnding a mapping κ such that, [Equation] where K is a set of all mappings, ˆ S k ( κ ) is the empirical lifetime distribution of subjects in the training data D mapped to cluster k through κ , and ∆ is an empirical distribution divergence measure.
In this section, we discuss the issues that arise when one chooses to optimize the sum of divergences over all pairs of clusters rather than the minimum.
[Figure]
[Figure]
Let K = 4 and consider balanced clusters with lifetime distributions ˆ S 1 = ˆ S 2 (cid:54)
=
ˆ S 3 =
ˆ S 4 .
Note that such a clustering is not desirable since there are virtually only 2 clusters found (as ˆ Sand ˆ S 2 are the same, etc).
But for such an assignment, the sum of divergences is relatively high (cid:80) i (cid:54) =
j ∆( ˆ S i , ˆ S j ) = 4 · ∆( ˆ S 1 , ˆ S 3 ) .
The sum could be further maximized by simply increasing
[Figure]
[Figure]
divergence between ˆ S 1 and ˆ S 3 while keeping ˆ S 2 = ˆ S 1 and ˆ S 3 =
ˆ S 4 .
On the other hand, since min i (cid:54) =
j ∆( ˆ S i , ˆ S j ) = 0 , the model should maximize the divergence between ˆ S 1 and ˆ S 2 ﬁrst.
Figure 12 shows the clusters found by the proposed approach while maximizing the minimum divergence vs maximizing the sum of divergences in the Friendster dataset with K = 4 .
We observe that the clusters obtained using the sum of divergences as the loss exhibit the property discussed above (i.e., clusters 2 and 3 in Figure 12 are almost the same).
A. A LGORITHM
For ease of use, we present Algorithm 1 to compute the proposed divergence measure log( KD (up) ( ˆ S a , ˆ S b )) .
A. T IME /S PACE COMPLEXITY OF D EEP CL IFE -K UIPER UB
Here we discuss the time and space complexity of the proposed algorithm.
We only discuss the complexity of computation of the proposed loss function for one iteration assuming a minibatch of size
B , number of clusters K and discrete times with 0 , 1 , . . .
t max .
First, we can compute the empirical lifetime distributions of all the K clusters in O ( KB ) time using O ( Kt max ) space.
Computing upper bound of the Kuiper p-value for two lifetime distributions using Algorithm 1 requires O ( t max ) time and O ( t max ) space.
Since we compute the upper bound for all (cid:0) K 2 (cid:1) pairs, the time complexity then becomes O
( K 2 t max ) whereas the space complexity remains O ( t max ) .
The total time and space complexity of the proposed algorithm are O
( KB + K 2 t max ) and O ( Kt max ) respectively.
Require: Two empirical lifetime distributions ˆ S a
and ˆ S b with sample sizes n a and n b respectively 1: function K UIPER UB( ˆ S a , ˆ S b , n a , n b ) 2:
D + ← max ( ˆ S a − ˆ S b ) (cid:46) ˆ S a , ˆ S b are vectors of length t max + 3:
D − ← max ( ˆ S b − ˆ S a ) 4:
V ← D + + D − (cid:46) Kuiper statistic 5:
M ← n a n b n a + n b (cid:46) Effective sample size 6: λ ← ( √ M + 0 .
155 + 0 .
24 √ M ) V 7: r ( lo ) ← (cid:98) 1 √ 2 λ (cid:99) 8: r ( up ) ← (cid:100) 1 √ 2 λ (cid:101) 9: if r ( lo ) ≥ 1 then 10:
KD-UB ← W ( r (lo) , λ ) − W (1 , λ ) + V ( r (lo) , λ ) + V ( r (up) , λ ) − W ( r (up) , λ ) 11: else 12:
KD-UB ← V ( r (up) , λ ) − W ( r (up) , λ ) 13: return log KD-UB 14: function V( r, λ ) 15: return (4 r 2 λ 2 − 1)
e − 2 r 2 λ16: function W( r, λ ) 17: return − re − 2 r 2 λ
A.7. T RACTABILITY THROUGH SAMPLING
Each iteration of optimization involves computing the Kuiper upper bound for all (cid:0) K 2 (cid:1) pairs of clusters, hence can be prohibitively expensive for large values of K .
Rather, we propose to sample randomly p =
O ( K ) pairs without replacement from the (cid:0) K 2 (cid:1) possible pairs of clusters.
The time and space complexity reduces to O ( KB + Kt max ) and O ( Kt max ) respectively.
A. A DDITIONAL DETAILS ABOUT DATASETS
[Figure]
Synthetic dataset.
We also test our method with a synthetic dataset for which we have the true clustering as ground truth.
We generate 3 clusters C 1 , C 2 and C 3 with different lifetime distributions, as depicted in Figure 13.
Note that while the lifetime distributions C 2 and C 3 follow proportional hazards assumption, the lifetime distribution of C 1 violates this assumption by crossing the other survival curves.
We simulate 10 4 subjects for each cluster k , and generate 20 random features for each sampled subject.
The lifetime T ( u ) of a subject u in a cluster was randomly sampled from the corresponding lifetime distribution of the cluster.
We also choose an arbitrary time of measurement, t m = 150 , to imitate right censoring.
We generate covariates X ( u ) of each subject u as two sets of 10 attributes.
Each attribute is simulated from a mixture of three Gaussians with means µ (1) k,i , µ (2) k,i , and µ (3) k,i , for i = 1 . . .
20 and k = 1 , 2 , 3 .
For the ﬁrst set of 10 features, these means are uniformly selected from the range [0 , 30] and a variance of 1 is used.
For the second set of features, the three means are uniformly selected from the range [0 , 30] and a variance of 10 is used.
Now that the modes of each Gaussian of each feature are deﬁned, we generate the features as follows: for each feature i of user u of cluster k , we uniformly choose one of the three modes m ∈ { 1 , 2 , 3 } .
Once the mode is selected, we generate a value from
N ( µ ( m ) k,i , σ 2 ) (where σ 2 is 1 for i ∈ [1 , 10] and 10 for i ∈
We decided to have these two sets of features as the ﬁrst one (with lower variance) represents more relevant features which can help identify the clusters, while the second set (with higher variance) represents less meaningful features that may be similar for all clusters.
We create three separate datasets D { C 1 ,C 2 } , D { C 1 ,C 3 } and D { C 1 ,C 2 ,C 3 } such that D C is a union of all the clusters in the set
C .
We report the C-index and Adjusted Rand index for the proposed method and the baselines on these 3 simulated datasets in Table 2.
Friendster dataset.
Friendster dataset consists of around 15 million users with 335 million friendship links in the Friendster online social network.
Each user has proﬁle information such as age, gender, marital status, occupation, and interests.
Additionally, there are user comments on each other’s proﬁle pages with timestamps that indicate activity in the site.
In our experiments, we only use data from March 2002 to March 2008, as after March
Friendster’s monthly active users have been signiﬁcantly affected with the introduction of “new
Facebook wall” (Ribeiro and Faloutsos, 2015).
From this, we only consider a subset of 1.1 million users who had participated in at least one comment, and had speciﬁed their basic proﬁle information like age and gender.
We will make our processed data available to the public at location (anonymized).
We use each user’s proﬁle information (like age, gender, relationship status, occupation and location) as features.
We convert the nominal attributes to one-hot encoded features.
We compute the summary statistics of the user’s activity over the initial τ =5 months such as the number of comments sent and received, number of individuals interacted with, etc.
In total, we construct 60 numeric features that are used for each of the models in our experiments.
MIMIC III dataset.
MIMIC III dataset consists of patients compiled from two ICU databases:
CareVue and Metavision.
The dataset consist of 50,000 patients with a total of 330 million different measurements recorded.
We mainly use three tables in the dataset: PATIENTS , ADMISSIONS ,
CHART_EVENTS .
PATIENTS table consists of demographic information about every patient such as gender, date of birth, and ethnicity.
ADMISSIONS table consists of the admission and discharge times of the patients.
A patient can have multiple admissions; in our experiments, we only consider their longest stay.
Finally, CHART_EVENTS table records all the measurements of the patients taken during their stay such as daily weight, heart rate and respiratory rate.
The measurements of the patients are shifted by an unknown offset (consistent across measurements for a single patient) for anonymity, hence all times are relative to the patient.
Each entry in the CHART_EVENTS table has a column for item identiﬁer that speciﬁes the measured item (like heart rate).
Since the dataset is compiled from different databases, same item can have multiple identiﬁers.
We use the following time series for features: ‘Peak Insp.
Pressure’, ‘Plateau
Pressure’, ‘Respiratory Rate’, ‘Heart Rate’, ‘Mean Airway Pressure’, ‘Arterial Base Excess’, ‘BUN’, ‘Creatinine’, ‘Magnesium’, ‘WBC’ and ‘Hemoglobin’.
We observe each of these time series for τ = 24 hours from the patient’s admission to the ICU, and compute summary statistics such as number of observations, mean, variance, mean inter-arrival times, etc.
Complete processing script is provided in the supplementary material.
A. M ETRICS
Here we describe the metrics used for evaluating the clusters obtained from the methods.
Concordance Index.
Concordance index or C-index (Harrell et al., 1982) is a commonly used metric in survival applications (Alaa and van der Schaar, 2017; Luck et al., 2017) to quantify a model’s ability to discriminate between subjects with different lifetimes.
It calculates the fraction of pairs of subjects for which the model predicts the correct order of survival while also incorporating censoring.
Concordance index can be seen as a generalization of AUROC (Area Under ROC curve) and can be interpreted in a similar fashion, i.e., a C-index score of 1 denotes perfect predictions as compared to a C-index score of 0.5 for random predictions.
Integrated Brier Score.
Brier score (Brier, 1950; Graf et al., 1999) is a quadratic scoring rule, computed as follows for survival applications,
[Equation]
[Equation]
where for a given subject u , T ( u ) is her true lifetime and ˆ S ( u ) is her empirical lifetime CCDF.
Brier score is 0 for perfect predictions and 0.25 for random predictions.
Logrank Test Score.
Logrank test Mantel (1966) is a non-parametric hypothesis test that is used to compare survival distributions.
The null hypothesis for the test is deﬁned as H 0 : f 1 ( t )
= . . .
=
f K ( t ) , i.e., the K groups have the same survival distribution.
It is most appropriate when the observations are censored and the censoring is independent of the events.
High values of the logrank statistic denote that it is unlikely that the K groups have the same survival distribution.
Adjusted Rand index.
The Rand index (Rand, 1971) is a measurement of cluster agreement, compared to the ground truth clustering (if available).
The adjusted version (Hubert and Arabie, 1985) is a corrected-for-chance version of the Rand index, which assigns a score of 0 for the expected
Rand index, obtained by random cluster assignment.
The maximum value of the Adjusted Rand index is 1.
We use this metric only for the toy dataset where we have the ground truth cluster assignments available.
A. N EURAL N ETWORK H YPERPARAMETERS
[Table]
B R ELATED W ORK
Traditional survival analysis models.
The Cox regression model (Cox, 1992) is a widely used method in survival analysis to estimate the hazard function λ ( u ) ( t )
= dF ( u ) ( t ) S ( u ) ( t ) , where dF ( u ) is the probability density of F ( u ) .
The hazard function is then estimated using the covariates, X ( u ) , of a subject u .
The hazard function has the form, λ ( t | X ( u ) )
=
λ 0 ( t ) · e { β T X ( u ) } , where λ 0 ( t ) is a base hazard function common for all subjects, and β are the regression coefﬁcients.
The model assumes that the ratio of hazard functions of any two subjects is constant over time.
This assumption is violated frequently in real-world datasets (Li et al., 2015a).
A near-extreme case when this assumption does not hold is shown in Figure 2b, where the survival curves of two groups of subjects cross each other.
Majority of the work in survival analysis has dealt with the task of predicting the survival outcome especially when the number of features is much higher than the number of subjects (Witten and
Tibshirani, 2010a; pre; Hothorn et al., 2006; Shivaswamy et al., 2007).
A number of approaches have also been proposed to perform feature selection in survival data (Ishwaran et al., 2010; Lagani and Tsamardinos, 2010).
In the social network scenario, Sun et al.
(2012) predicts the relationship building time, that is, the time until a particular link is formed in the network.
Alaa and van der
Schaar (2017) proposed a nonparametric Bayesian approach for survival analysis in the case of more than one competing events (multiple diseases).
They not only assume the presence of termination signals but also the type of event that caused the termination.
Survival (or lifetime) clustering.
There have been relatively fewer works that perform lifetime clustering.
Many unsupervised approaches have been proposed to identify cancer subtypes in gene expression data without considering the survival outcome (Eisen et al., 1998; Alizadeh et al., 2000).
Traditional semi-supervised clustering methods (Aggarwal et al., 2004; Basu et al., 2002; 2004;
Nigam et al., 1998) do not perform well in this scenario since they do not provide a way to handle the issues with right censoring.
Bair and Tibshirani (2004) proposed a semi-supervised method for clustering survival data in which they assign Cox scores (Cox, 1992) for each feature in their dataset and considered only the features with scores above a predetermined threshold.
Then, an unsupervised clustering algorithm, like k-means, is used to group the individuals using only the selected features.
Such an approach can miss out on clusters when the features are weakly associated with the survival outcome since such features are discarded immediately after the initial screening.
In order to overcome this issue, Gaynor and Bair (2013) proposes supervised sparse clustering as a modiﬁcation to the sparse clustering algorithm of Witten and Tibshirani (2010b).
The sparse clustering algorithm has a modiﬁed k -means score that uses distinct weights in the feature set; it initializes these feature weights using Cox scores (Cox, 1992) and optimizes the same objective.
Bair and Tibshirani (2004) and Gaynor and Bair (2013) assume the presence of termination signals.
Additionally, there is a disconnect between the use of survival outcomes and the clustering step in these algorithms.
In this paper, we provide a loss function that quantiﬁes the divergence between lifetime distributions of the clusters, and we minimize said loss function using a neural network in order to obtain the optimal clusters.
Divergence measures.
Since we need to optimize the divergence between two distributions using a ﬁnite sample of training data, this problem is related to two-sample tests in statistics.
Recently, there is growing interest in loss functions for comparing two distributions, including the Wasserstein distance (Dudley, 2002, p. 420) and the Maximum Mean Discrepancy (MMD) (Gretton et al., 2009; Fukumizu et al., 2008), speciﬁcally in the context of training generative adversarial networks (GANs) (Arjovsky et al., 2017; Li et al., 2015b).
Traditional two-sample tests, such as the Kolmogorov-Smirnov (KS) test, are generally disregarded in learning tasks due to their alternating inﬁnite series that makes gradient computations computationally expensive.
The alternative state-of-the-art divergence approach that seems most suited to our problem is MMD Gretton et al.
(2009), unfortunately, as seeing in our results, they can be less resilient to small sample sizes in empirical distributions.
Deep survival methods.
Many deep learning approaches Luck et al.
; Katzman et al.
Lee et al.
; Ren et al.
(2018) have been proposed for predicting the lifetime distribution of a subject given her covariates, while effectively handling censored data that typically arise in survival tasks.
DeepHit Lee et al.
(2018) introduced a novel architecture and a ranking loss function in addition to the log-likelihood loss for lifetime prediction in the presence of multiple competing risks.
Using a log-likelihood loss similar to DeepHit, Ren et al.
(2018) propose a recurrent architecture to predict the survival distribution that captures sequential dependencies between neighbouring time points.
To the best of our knowledge, there hasn’t been a work on using neural networks for a lifetime clustering task.
Frailty analysis.
Extensive research has been done on what is known as frailty analysis, for predicting survival outcomes in the presence of clustered observations (Hougaard, 1995; Chuang et al., 2005;
Huang and Wolfe, 2002).
Although frailty models provide more ﬂexibility in the presence of clustered observations, they do not provide a mechanism for obtaining the clusters themselves, which is our primary goal.