This repository contains the code and material to reproduce the results of the manuscript "Gradient-based Explanations for Deep Learning Survival Models" accepted for publication in the proceedings of the Forty-Second International Conference on Machine Learning (ICML) 2025.
The reproduction material is based on the accompanying R package survinng
available on github/bips-hb.
setup.R: R environment setup script that installs required packages, the necessary conda environmentSurvinng_paper, and sets global options. It also installs thesurvinngpackage from the mentioned GitHub repository.Sim_time_dependent.Rmd: Simulation for time-dependent features. The results used in the paper are stored in the notebookSim_time_dependent.htmland figures are saved in thefigures_paper/directory.Sim_time_independent.Rmd: Simulation for time-independent features. The results used in the paper are stored in the notebookSim_time_independent.htmland figures are saved in thefigures_paper/directory.Sim_GradSHAP: Simulation for comparing GradSHAP(t) and SurvSHAP(t) on time-independent features regarding runtime, local accuarcy and feature ranking.real_data/: Scripts for reproducing the results on the real data example.figures_paper/: Directory for storing the figures used in the paper.
-
To reproduce the results, from Section 5.1.1 TIME-INDEPENDENT EFFECTS, run the RMarkdown file
Sim_time_independent.Rmdand the results will be storedSim_time_independent.htmland the figures in thefigures_paper/directory. -
To reproduce the results, from Section 5.1.2 TIME-DEPENDENT EFFECTS, run the RMarkdown file
Sim_time_dependent.Rmdand the results will be storedSim_time_dependent.htmland the figures in thefigures_paper/directory. -
To reproduce the results, from Section 5.2 GradSHAP(t) vs. SurvSHAP(t), run corresponding scripts in the directory
Sim_GradSHAP/, i.e.,sim_locacc.R: for the local accuracy comparisonsim_runtime.R: for the runtime comparisonsim_global_imp.R: for the global feature ranking comparison. The figures will be stored in thefigures_paper/directory. Note: This simulation is computationally expensive and conducts a simulation study usingbatchtools.
-
To reproduce the results, from the Section 5.2 Practical Feasibility and Section 5.3 Example on Real Multi-modal Medical Data, we refer to the README file in the folder
real_data/.
The script setup.R tries to install the necessary packages and the conda
environment Survinng_paper (see file env_survinng_paper.yml).
It installs the following R packages:
Survival packages
simsurvsurvivalsurvminerSurvMetricssurvinng(from github/bips-hb)survexsurvivalmodelstorch(necessary for thesurvinngpackage)
Plotting and other useful packages
ggplot2cowplotviridisdplyrtidyrreticulatecallrheredata.tablebatchtools