Skip to main content
QUICK REVIEW

[Paper Review] survex: an R package for explaining machine learning survival models

Mikołaj Spytek, Mateusz Krzyziński|arXiv (Cornell University)|Aug 30, 2023
Explainable Artificial Intelligence (XAI)Computer Science4 citations
TL;DR

The survex R package introduces a comprehensive framework for explaining machine learning survival models using explainable AI (XAI) techniques, enabling local and global interpretability through methods like SurvSHAP(t) and SurvLIME. It supports model diagnostics, variable importance, and visualization, enhancing transparency and trust in biomedical and healthcare applications.

ABSTRACT

Due to their flexibility and superior performance, machine learning models frequently complement and outperform traditional statistical survival models. However, their widespread adoption is hindered by a lack of user-friendly tools to explain their internal operations and prediction rationales. To tackle this issue, we introduce the survex R package, which provides a cohesive framework for explaining any survival model by applying explainable artificial intelligence techniques. The capabilities of the proposed software encompass understanding and diagnosing survival models, which can lead to their improvement. By revealing insights into the decision-making process, such as variable effects and importances, survex enables the assessment of model reliability and the detection of biases. Thus, transparency and responsibility may be promoted in sensitive areas, such as biomedical research and healthcare applications.

Motivation & Objective

  • Address the lack of user-friendly tools to explain black-box machine learning survival models in biomedical and healthcare contexts.
  • Provide a unified, extensible framework for interpreting both individual predictions and global model behavior in survival analysis.
  • Integrate advanced XAI methods—such as SurvSHAP(t) and SurvLIME—specifically adapted for survival models with censoring.
  • Enable model diagnostics through residual analysis and performance evaluation to support model validation and bias detection.
  • Promote transparency and responsible use of survival models by revealing variable effects, importances, and interaction patterns.

Proposed method

  • Implement a modular interface that supports multiple survival model packages in R, including random survival forests, Cox models, and deep learning via survivalmodels.
  • Apply SurvSHAP(t) to compute time-dependent SHAP values for survival function predictions, enabling variable contribution analysis across time points.
  • Use SurvLIME to fit local surrogate Cox models around individual predictions, extracting interpretable coefficients as explanations.
  • Generate partial dependence and accumulated local effect profiles to visualize the marginal impact of variables on survival predictions.
  • Support 2D profile plots to detect interaction effects between pairs of variables on model outputs.
  • Integrate diagnostic tools such as martingale, deviance, and Cox-Snell residuals for model quality assessment and calibration evaluation.

Experimental results

Research questions

  • RQ1How can machine learning survival models be effectively explained using XAI techniques tailored to the time-to-event and censored nature of survival data?
  • RQ2To what extent do SurvSHAP(t) and SurvLIME provide reliable and interpretable explanations for individual survival predictions across diverse datasets?
  • RQ3Can global model explanations such as partial dependence and accumulated local effect plots reveal meaningful patterns in variable influence and interaction effects?
  • RQ4How do diagnostic tools like residual analysis improve the assessment of model calibration and reliability in survival modeling?
  • RQ5In what ways can the survex framework enhance trust and transparency in clinical and biomedical applications of survival models?

Key findings

  • The survex package successfully implements time-aware XAI methods such as SurvSHAP(t) and SurvLIME, enabling interpretable explanations for survival model predictions with censoring.
  • Model diagnostics via martingale, deviance, and Cox-Snell residuals allow for robust assessment of model calibration and goodness-of-fit.
  • Partial dependence and 2D profile plots reveal non-linear effects and interaction patterns of variables on survival outcomes, supporting model understanding and refinement.
  • The SurvSHAP(t) bee swarm and dependence plots provide intuitive visualizations of variable contributions across time, enhancing interpretability for clinicians and researchers.
  • survex has been successfully applied in real-world biomedical studies, including pancreatic cancer risk prediction and hospital length-of-stay modeling, demonstrating practical utility.
  • The package supports a wide range of survival models and is extensible to future methods, including counterfactual explanations and competing risks models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.