Neural Distribution Learning for generalized time-to-event prediction

1 INTRODUCTION . Many real-world tasks can be formulated as time-to-event ( TTE ) prediction problems , forecasting the time taken until an event-of-interest happens in the future . Examples are predicting time to the onset of a particular disease ( Price et al. , 2017 ) , predicting when a machine fails ( Salfner et al. , 2010 ) or predicting future user logins ( Sobaszek & Gola , 2016 ) . Unfortunately , the data often consists of temporal features and recurrent events which are sparsely and irregularly sampled over time . This makes the data challenging to work with . Furthermore , the main challenge is that if we do not observe a terminating event for a sequence , the time to event becomes right censored ( Klein & Moeschberger , 2005 ) . This essentially means that we only know that the event will take place later than when it was known to not occur . Proposed solutions taking account for censoring includes predicting TTE binned across fixed time windows ( classification approaches ( Harutyunyan et al. , 2017 ; Lee et al. , 2018 ) ) , predicting TTE point-wise ( regressive approaches ( Ishwaran et al. , 2008 ) ) , ranking the risk of subjects ( semiparametric ( Katzman et al. , 2016 ; Luck et al. , 2017 ) and non-parametric ( Kalderstam , 2015 ; Chen et al. , 2013 ) ) , or estimating the target and the feature distributions jointly ( variational , stochastic formulations ( Soleimani et al. , 2017 ; Ranganath et al. , 2016 ; Mei & Eisner , 2017 ; Xu et al. , 2017 ) ) . Numerous works have used combinations of these approaches ( Du et al. , 2016 ; Li , 2017 ; Xiao et al. , 2017b ; a ; Harutyunyan et al. , 2017 ; Lee et al. , 2018 ) . However , most existing solutions have problems with tight couplings to particular types of queries , restrictive and data-dependent loss formulations , complex model architectures , or improper handling of censored data . While there has been no lack of novelty in the proposed solutions , we find that the seemingly most straightforward generalized parametric survival approach has lacked a thorough treatment . In this paper , we formulate the TTE prediction task as , in each timestep , predicting all parameters of some discretized probability distribution over the current time to the next event . We show the benefits of defining distributions in terms of cumulative hazard functions ( Sec . 3.1 ) . Finally , we show that the regular negative log-likelihood for right-censored data , censored log-likelihood ( known at least since de Moivre ( 1731 ) ) as the loss function is sufficient to yield near perfect calibration . All together , this leads to an obvious yet novel framework for general-purpose TTE prediction . We will refer to this as HazardNet . While generalizing previous work , it is easy to implement and evaluate while being capable of yielding real-time predictions on various inference queries , such as predicting the probability of a user returning in 30 days , the expected time to failure or median time of survival . In section 4 we show that the model makes unbiased , calibrated probabilistic predictions and efficiently utilizes training data . This is shown by evaluating on three publicly available datasets comparing multiple TTE-distributions and neural network architectures . For the purpose of establishing a strong baseline , we propose a novel evaluation scheme , designed for real-life applications . In addition , in section 5 we reformulate the binary task of musical onset detection into a multivariate distribution prediction task , achieving state of the art results . 2 RELATED WORK . There is a diverse array of problem formulations for TTE-prediction ( Wang et al. , 2017 ) . The methods for censored data are mainly based on classical semi-parametric Cox-models for continuous target values ( Katzman et al. , 2016 ; Luck et al. , 2017 ; Joshi & Reeves , 2006 ) . Others formulate it as classification problems ( Harutyunyan et al. , 2017 ; Lee et al. , 2018 ) or multi-task learning ( Luck et al. , 2017 ; Lee et al. , 2018 ) by predicting the event probability in each step for a fixed number of steps τ ahead together with a ranking loss . Non-parametric learning-to-rank methods have been proposed ( Kalderstam , 2015 ) but they suffer from scalability problems . Some studies ( Du et al. , 2016 ; Li , 2017 ; Xiao et al. , 2017b ; a ) predict both TTE and classification of next event jointly using composition of loss functions . Others have learned from censored data by predicting features and target jointly , either using Gaussian processes ( Soleimani et al. , 2017 ) or deep exponential families ( Ranganath et al. , 2016 ) . Recent extensions of this work ( Miscouridou et al . ) includes an interesting discussion on methods for approximating arbitrary distributions , discretization , evaluation and missing feature data . Sequential prediction is often formulated as asynchronously predicting at the same time as the event ( Du et al. , 2016 ; Li , 2017 ; Xiao et al. , 2017b ; a ; Lee et al. , 2018 ; Avati et al. , 2018 ) . However , this makes it unclear how to make predictions between events . For features arriving at different times , it has been proposed to use two recurrent neural networks ( RNNs ) acting on different timescales ( Xiao et al. , 2017b ) , but it did not deal with censored data . For the general problem of unevenly spaced sequences , there has been other notable successful neural network approaches such as Phased LSTM ( Neil et al. , 2016 ) or Time-LSTM ( Zhu et al. ) . Limitations : Most solutions are designed specifically for each task , such as rank prediction ( Katzman et al. , 2016 ; Luck et al. , 2017 ; Kalderstam , 2015 ; Chen et al. , 2013 ) , classification ( Harutyunyan et al. , 2017 ; Lee et al. , 2018 ) , and more . When using stochastic formulations ( Soleimani et al. , 2017 ; Ranganath et al. , 2016 ; Mei & Eisner , 2017 ; Xu et al. , 2017 ) , inference requires extra steps and are arguably made for other tasks ( such as missingness of data or understanding feature importance ) . Without taking into account censored data ( Du et al. , 2016 ; Li , 2017 ; Xiao et al. , 2017b ; a ) probabilistic predictions might have little meaning . Most models are based on strong assumptions about data or underlying distributions , and are difficult to adapt to new problems . The pure parametric survival approaches based on density networks either focused on specific distributions ( Martinsson , 2016 ; Avati et al. , 2018 ) or made cases against the use of regular log-likelihood ( Avati et al. , 2018 ; Ren et al. , 2018 ) . While there has been recent interest in the importance of calibration ( Luck et al. , 2017 ; Avati et al. , 2018 ) , we argue for a different method of evaluating it in a real-world setting , and most importantly we want to establish a baseline to compare against whether the regular log-likelihood loss needs improvement at all . Our contribution : Building on the work of Martinsson ( 2016 ) , we present a flexible and generalizable framework for time to event prediction that can work with multiple model architectures and distributions , supporting various probabilistic inference queries and handle asynchronously arriving features . We found no in-depth experiments or convincing results on how to evaluate performance , especially calibration for probabilistic predictions . To this end , we propose an evaluation strategy in Section 4 . We found no general discussions on learning parametric survival distributions in this setting nor any in depth examples using the Weibull , Pareto , LogLogistic , their mixtures , or other distributions as discretized forms . By thoroughly investigating what ought to be a standard approach and suggesting evaluation methods for it , we hope to establish a strong baseline for time to event prediction . The implementation will be released online . 3 HAZARDNET . While many previous approaches have focused on specific data distributions or tasks , our goal is to provide a general framework by focusing on the problem formulation for TTE-prediction itself . We frame it as a Distribution Learning problem . The basic idea is a density network coupled with a parametric survival approach . Let a neural network predict parameters of some TTE-distribution and train it using log-likelihood for censored data . As shown in Figure 1 , in every step t we let the predictor map features xt to predicted parameters θt , governing the shape of a distribution . The distribution is specified by fixing a functional form of a cumulative hazard function Λ . In the following sections we will show how to use discrete target values and the possibility of learning to approximate arbitrarily complex distributions . 3.1 EFFICIENTLY WORKING WITH DISTRIBUTIONS USING CUMULATIVE HAZARD FUNCTIONS . We will employ the notational convenience of using cumulative hazard functions ( CHF ) to define probability distributions . In the survival analysis context , it is common to focus on hazard functions , but we found it more efficient to focus on its integral , defined in the following . Definition 1 . A cumulative hazard function Λ : R+ → R+ is a monotonically increasing positive function such that for all x ≥ 0 , ≥ 0 , 0 = Λ ( 0 ) ≤ Λ ( x ) ≤ Λ ( x+ ) ≤ Λ ( ∞ ) =∞ ( 1 ) where the hazard function λ ( x ) = ∂∂xΛ ( x ) is its positive derivative if it exists . A cumulative hazard function Λ ( x ) is a straightforward way of representing a positive distribution . If X is a random variable , we can write its corresponding cumulative density function as F ( x ) = Pr ( X < x ) = 1− e−Λ ( x ) or conversely , Λ ≡ − log ( 1− F ) . Its probability density function can be written f ( x ) = ∂∂xF ( x ) = λ ( x ) e −Λ ( x ) . If we let the random variable X represent a life span , the survival function S ( x ) = Pr ( X > x ) = 1 − F ( x ) = e−Λ ( x ) is the probability of surviving until time x . Cumulative Hazard functions makes a good abstraction for implementation since the conditions of Equation 1 are easily verifiable . It also simplifies transition from continuous to discrete distributions , an important consideration since real-world data tend to be discrete . Given Λ ( x ) , we can easily form a discrete distribution by defining a probability mass function p ( t ) = S ( t ) − S ( t + 1 ) = e−Λ ( t ) −e−Λ ( t+1 ) for t = 1 , 2 , . . . , ∞ . This also makes it easy to use different levels of discretization ( i.e. , days to weeks ) . In doing so , instead of using a continuous loss function after discretization , we can learn the discretized distribution directly , which in turn can be used to approximate a continuous distribution if needed . Example The exponential distribution f ( x ) = 1αe − xα can be defined with the CHF ΛExponential ( x ) = x α . Discretization yields the geometric distribution , with probability mass function p ( x ) = e− x α − e− x+1α .

Summary: The authors propose a parametric framework (HazardNet) for survival analysis with deep learning where they mainly focus on the discrete-time case. The framework allows different popular architectures to learn the representation of the past events with different explicit features. Then, it considers a bunch of parametric families and their mixtures for the distribution of inter-event time. Experiments include a comprehensive comparison between HazardNet and different binary classifiers trained separately at each target time duration.