Explainable deep models reveal when patient data shapes survival predictions

DynSHAP: Towards Explainable Dynamic Survival Analysis

Machine LearningArtificial Intelligence

Summary

Predicting how long patients will survive based on medical data is important but can be hard to understand because models are complex. The authors created DynSHAP to explain which parts of patient records influence these predictions over time. Their approach works better than earlier methods in showing how different patient features at different times matter. This helps doctors see why a model made a specific prediction and when, improving trust in these tools.

What this means in practice

  • For clinical data scientists: Use DynSHAP to identify which time-specific patient data influences survival predictions for better model interpretation in medical studies.
  • For healthcare ai developers: Incorporate DynSHAP as a tool to enhance explainability of survival prediction models that use irregular time series patient data.

Authors

Nastasya Anokhina, Jonas Jürß, Pietro Liò

Abstract

Deep learning models for dynamic survival analysis (DSA) achieve strong predictive performance by incorporating longitudinal patient data, but their black box nature limits clinical trust and adoption. Existing explainability methods cannot handle longitudinal, irregular inputs and functional survival outputs simultaneously, which limits their usability in DSA. We propose DynSHAP, a SHAP framework suited specifically for dynamic survival analysis. It extends common marginal SHAP estimators to this setting by treating time--feature pairs as players in the Shapley game. We further introduce Temporal DynSHAP, which learns linear dependencies in features over time and uses conditional sampling to address them in explanations. When applied to synthetic data with known ground-truth attributions, Temporal DynSHAP recovers temporally dependent features more accurately than marginal estimators for a given state-of-the-art model. Applied to two real-world clinical datasets and two DSA architectures, DynSHAP produces attributions faithful to model learning, allowing medical experts to see which patient information drove the prediction and when.