DeepHit

Statistics
Introduced by
Changhee Lee
Year
2018
Type
Neural network competing risks model
Family
Deep Learning

What does it do?

DeepHit is a deep neural network framework for survival analysis with competing risks, introduced by Lee et al. in 2018.

It addresses settings in which a subject can experience one of several mutually exclusive events, such as death from disease versus death from other causes, and estimates the probability of each event type over time for an individual. It is used in medical and reliability settings where each competing outcome needs its own risk estimate.

The intuition behind the method

In competing risks, a subject can experience one of several events, and experiencing one event prevents observing the others. DeepHit uses a neural network to model the cumulative incidence function (CIF) of each event type directly, rather than fitting a hazard model for each cause and combining them afterwards. The network outputs event-specific probabilities over time. These must respect the competing structure: at each time point, the incidence curves for all event types, together with the probability of still being event-free, must add up to one. Modelling the incidence curves directly is a different target from cause-specific hazards, and it is the reason the method is compared with Fine-Gray-type models, which also target the CIF.

History

Competing risks analysis has a long history in biostatistics. Fine and Gray (1999) proposed a semiparametric proportional hazards model for the subdistribution of a competing risk, which gives a direct link between covariates and the cumulative incidence function. Lee et al. (2018) introduced DeepHit at the AAAI conference, using a neural network to model cumulative incidence functions for competing events. DeepSurv (Katzman et al., 2018) is a separate neural approach to survival analysis based on the Cox proportional hazards model.

When to use it

Choose DeepHit when there are two or more mutually exclusive event types of interest, you need individual-level incidence curves for each, and the dataset is large enough to fit a network with one output head per event type. Report the number of observed events of each type before fitting, since this determines whether each output head can be estimated. When an event type has very few events, merge it with another type only if separate estimates are not needed, or model it separately. The method is suited to settings where covariate effects are expected to be complex or non-linear, and the event types are clearly defined, such as disease-specific versus other-cause death in clinical data. Do not use it when there is only one event type, when there are few events of each type, or when interpretable covariate coefficients are the main goal; a Fine-Gray or cause-specific hazard model is simpler in those cases. The method assumes noninformative censoring and that the competing events are defined and measurable; check the censoring assumption against the data rather than taking it for granted.

Limitations and considerations

  • Each event type needs enough observed events to estimate its output head; rare event types are weakly determined by the data.
  • The multi-task objective combines one loss term per event type, so the relative weighting of these terms is an extra choice that has to be tuned.
  • DeepHit's statistical properties are less well characterised in the literature than those of Fine-Gray regression, which comes with a uniformly consistent estimator of predicted cumulative incidence and analytic confidence intervals.
  • Training is more computationally demanding than fitting a Fine-Gray regression.
  • The effect of a single covariate on one event's incidence is hard to read from the learned network, which limits interpretation.
  • Event times are discretised onto a time grid, so the choice of grid affects the predicted incidence curves and should be reported with the results.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Models the cumulative incidence function of each event type directly, rather than deriving it from separately fitted cause-specific hazards.
  • Uses one shared network with a separate output head per event type, so covariate information is learned jointly across the competing outcomes.
  • Does not require covariate effects to be linear, so nonlinear effects and interactions on each event's incidence can be captured when the data support them.
  • Gives individual-level incidence curves for every competing event from a single fitted model.

Applications

  • Oncology: Predicting disease-specific versus other-cause mortality in cancer patients, accounting for competing treatment-related complications
  • Cardiology: Estimating risk of myocardial infarction, stroke, or heart failure in at-risk populations with heterogeneous risk profiles
  • Industrial maintenance: Forecasting equipment failure due to wear versus catastrophic breakage, guiding preventive maintenance decisions
  • Healthcare readmission: Modeling readmission due to disease progression versus discharge to long-term care, optimizing post-discharge support
  • Customer churn: Distinguishing between customers lost to competitors, service dissatisfaction, or relocation, enabling targeted retention

How it works

How it works

1

Define a neural network with a shared hidden representation of the covariates and a separate output head for each competing event type. The outputs are estimated cumulative incidence curves for each event over time.

2

Train the network with a weighted multi-task objective, in which a loss term for each event type is combined into one training criterion. Because the hidden layers are shared, the network is fitted to all incidence curves together, so the weighting of the event-type terms affects what the shared representation learns.

3

For a new subject, pass the covariates through the trained network to obtain predicted cumulative incidence curves for each competing event. These curves give the probability of each event type having occurred by each time point.

4

Assess predictive performance on held-out test data for each event type separately, since a model can perform well for a common event and poorly for a rare one. Use the time-dependent concordance index to measure discrimination, and the integrated Brier score and the cumulative Brier score to measure overall prediction error, which reflects both calibration and discrimination. Log-likelihood can be compared only between models fitted to the same data with the same censoring treatment.

Common pitfalls

  • When some event types are rare, the shared loss can be dominated by the common events, leaving the rare-event heads poorly fitted; check calibration for each event separately.
  • Assuming mutual exclusivity without checking the data: if events can co-occur or are recorded ambiguously, the competing structure the model assumes is misspecified.
  • Tuning many event-specific loss weights on a small validation set can overfit the choice of weights and the network itself.
  • Reading an incidence probability as a cause-specific hazard: the CIF of one event depends on the hazards of all competing events, so a covariate can change an event's incidence through the other events.

Frequently asked questions

How does DeepHit differ from modeling cause-specific hazards separately?

DeepHit models the cumulative incidence functions directly, using one network with a shared representation and a separate output head for each event type, trained with a multi-task objective. Cause-specific approaches fit a hazard model for each event separately and then combine those hazards to obtain incidence. Joint learning can share information across event types, but this does not guarantee better accuracy, so compare the two on held-out data.

What is the relationship between DeepHit and Fine-Gray regression?

Fine and Gray (1999) model the subdistribution hazard with a semiparametric proportional hazards form, estimating covariate effects by partial likelihood with weighting for censoring. DeepHit replaces this linear covariate structure with a neural network, allowing nonlinear effects and interactions. Both target the cumulative incidence function; Fine-Gray gives interpretable regression coefficients, while DeepHit gives greater flexibility at the cost of interpretability.

How does DeepHit ensure that incidence probabilities sum to one?

The incidence curves of all event types, together with the probability of remaining event-free, must total one at each time point; this constraint is a basic property of competing-risks probabilities. Confirm how the implementation you use constructs the curves, and assess their calibration on held-out data for each event type rather than assuming they are reliable.

Can I use DeepHit if one event type is very rare?

Rare event types make training difficult. To handle imbalanced events, use weighted loss functions that upweight rare events during training, or stratified sampling so that each batch contains examples of all event types. Class balancing is important for reliable predictions for the rare event.

How should I choose the number of output heads for different event types?

Include one output head for each distinct competing event type for which you need a separate risk estimate. Grouping rare event types reduces the number of heads, but it changes the quantity being estimated, so do this only when separate estimates are not needed. Compare groupings using cross-validation.

What software implements DeepHit?

DeepHit can be implemented in a standard deep-learning framework such as TensorFlow or PyTorch, and implementations may also be available in software packages. Check that any implementation covers the competing-risks setting and the evaluation metrics you need before relying on it.

Related methods

Sources

  1. Lee, C., Zame, W., Yoon, J., & van der Schaar, M. (2018). DeepHit: A deep learning approach for dynamic survival analysis with competing risks. AAAI Conference on Artificial Intelligence, 32(1), 2314–2321.

    Open publication reference
  2. Fine, J. P., & Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94(446), 496–509.

    Open DOI reference
  3. Katzman, J. L., et al. (2018). DeepSurv: Personalized treatment recommender system using a Cox proportional hazards deep neural network. Journal of Machine Learning Research, 40, 40–51.

    Open DOI reference