A General Machine Learning Framework for Survival Analysis

Andreas Bender, David Rügamer, Fabian Scheipl, Bernd BischlECML/PKDD 2020 · DOI

Abstract

The modeling of time-to-event data, also known as survival analysis, requires specialized methods that can deal with censoring and truncation, time-varying features and effects, and that extend to settings with multiple competing events. However, many machine learning methods for survival analysis only consider the standard setting with right-censored data and proportional hazards assumption. The methods that do provide extensions usually address at most a subset of these challenges and often require specialized software that can not be integrated into standard machine learning workflows directly. In this work, we present a very general machine learning framework for time-to-event analysis that uses a data augmentation strategy to reduce complex survival tasks to standard Poisson regression tasks. This reformulation is based on well developed statistical theory. With the proposed approach, any algorithm that can optimize a Poisson (log-)likelihood, such as gradient boosted trees, deep neural networks, model-based boosting and many more can be used in the context of time-to-event analysis. The proposed technique does not require any assumptions with respect to the distribution of event times or the functional shapes of feature and interaction effects. Based on the proposed framework we develop new methods that are competitive with specialized state of the art approaches in terms of accuracy, and versatility, but with comparatively small investments of programming effort or requirements for specialized methodological know-how.

Introduction

Survival analysis—predicting the time until an event occurs—is a critical field in medicine, engineering, and social sciences. However, it is notoriously complex due to several factors: censoring (subjects leaving a study before the event), time-varying features (covariates that change over time), and competing risks (alternative events that prevent the primary event from being observed).

While traditional statistical models like the Cox Proportional Hazards model are widely used, they often struggle with non-linear effects and complex temporal dynamics. Conversely, many modern machine learning (ML) approaches for survival analysis are limited to simple right-censored data and often require custom loss functions that are difficult to integrate into standard production workflows. This paper introduces a holistic framework that reduces these specialized survival tasks to standard Poisson regression problems, enabling the use of any off-the-shelf ML algorithm.

The Proposed Framework

The core innovation of this work is a modular pipeline that bridges the gap between complex survival data and standard regression algorithms. The framework consists of three main stages: preprocessing, computation, and post-processing.

The general machine learning framework for survival analysis, illustrating the flow from raw input to prediction visualization through data augmentation and standard ML computation.

In the preprocessing stage, raw input data—which may include left-truncation, right-censoring, time-varying features (TVF), and multiple states—is transformed into Piece-wise Exponential Data (PED). This augmented data format allows the survival problem to be treated as a Poisson regression task. During the computation phase, any algorithm capable of optimizing a Poisson log-likelihood (e.g., Gradient Boosted Trees, Deep Learning, Bayesian Regression) can be applied. Finally, the results are post-processed for prediction and visualization.

Data Augmentation and the Poisson Reformulation

The framework relies on the Piece-wise Exponential Model (PEM). The transformation to PED involves dividing the observation period into discrete time intervals. Instead of a single row per subject, the dataset is expanded so that each row represents a subject's status within a specific time interval.

The structure of Piece-wise Exponential Data (PED), showing the transformation of subject data into interval-specific observations with event indicators and time-at-risk offsets.

Statistical theory demonstrates that the log-likelihood of a PEM is proportional to a Poisson log-likelihood. By treating the "time spent at risk" in each interval as an offset (a fixed constant in the regression), the model can estimate the hazard rate directly. This "Poisson trick" is a computational vehicle; it does not assume the underlying data follows a Poisson distribution but rather provides a mathematically equivalent objective function for hazard estimation.

One significant advantage of this approach is how it handles Time-Varying Effects (TVE). In the PED format, a TVE is simply modeled as an interaction between a feature and the time-interval index. This allows standard tree-based models, such as XGBoost, to capture complex temporal dynamics without specialized architectural changes.

Experimental Evaluation

The authors benchmarked their Gradient Boosted Trees implementation, GBT (PEM), against state-of-the-art survival models like Oblique Random Survival Forests (ORSF) and DeepHit across various datasets:

  • Standard Survival Tasks: On datasets like PBC (Primary Biliary Cholangitis) and GBSG 2, GBT (PEM) achieved performance competitive with or superior to specialized survival models.
  • Complex Dynamics: In synthetic scenarios specifically designed to test non-linear, time-varying effects, the proposed framework significantly outperformed both Cox models and ORSF.
  • Competing Risks: The framework successfully handled competing risks (e.g., in the METABRIC and MGUS 2 datasets) by stacking datasets for different event types and including the event type as a feature.

Conclusion

The proposed framework offers a versatile and accessible approach to survival analysis. By reducing complex survival tasks to standard Poisson regression, it democratizes high-performance survival modeling, allowing practitioners to leverage the full power of modern machine learning libraries. While the data augmentation step increases memory requirements, the use of representative sub-sampling ensures that the approach remains computationally efficient even for large-scale applications. Future work will further explore the potential of deep neural architectures within this multi-state survival framework.

Summary updated

BibTeX
@inproceedings{bender2020general,
  author = {Andreas Bender and David Rügamer and Fabian Scheipl and Bernd Bischl},
  title = {{A General Machine Learning Framework for Survival Analysis}},
  booktitle = {ECML/PKDD},
  year = {2020},
  doi = {10.1007/978-3-030-67664-3\_10},
}
Figure