Recent survival models integrating longitudinal data achieve strong predictive performance, but their predictions are often difficult to interpret, limiting their clinical use. We propose DynSurvX, a model-agnostic explainability framework for dynamic survival prediction with mixed static and longitudinal covariates. Based on Shapley values, DynSurvX introduces a hierarchical two-phase strategy that first identifies influential longitudinal features and then adaptively refines their temporal importance, enabling fine-grained explanations while reducing computational cost. The framework provides time-resolved explanations that evolve as new patient data become available. Experiments on simulated and two clinical datasets show varying agreement with theoretical importance across prediction models, with closer agreement for better-performing models, alongside clinically interpretable insights in real-world settings. It remains robust across prediction settings and reduces computation time by 41--80% relative to the temporal explanation baseline, making dynamic explanations practical.
Figures & tables
Figure 1: Simulated dataset – Predictive performance. C-index ( left ) and Brier score ( right ) for CoxSig ( top ), DDH ( middle ), and DySurv ( bottom ) at prediction points (tP,δt) .
Figure 2: Simulated dataset – Feature importance ( top ) and interval-wise feature importance ( bottom ). Theoretical values ( left ) and DynSurvX estimates for CoxSig, DDH, and DySurv ( three right panels ) at a prediction time.
Figure 3: Individual interval-wise feature importance . Observed longitudinal data ( top, left ) and DynSurvX explanations for CoxSig ( top, right ), DDH ( bottom, left ), and DySurv ( bottom, right ).
Figure 4: PBCseq dataset – Feature importance ( top ) and interval-wise feature importance ( bottom ) estimated by DynSurvX for CoxSig ( left ), DDH ( middle ) and DySurv ( right ) at a prediction time. The red dashed line separates longitudinal and static features.
Figure 5: Simulated dataset – Feature importance comparison. Theoretical values ( top , left ) and estimates for DynSurvX ( top , right ), WindowSHAP ( bottom , left ) and JointLIME ( bottom , right ).
Figure 6: Simulated dataset - Interval-wise feature importance . Theoretical values ( left ) and estimates for DynSurvX ( middle ), WindowSHAP ( right ).
Figure 7: Runtime comparison.
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Illustration of the DynSurvX algorithm during Phase 2 on a longitudinal trajectory (in orange), between two consecutive splitting iterations (q) and (q+1) . At iteration (q) , the second time window ω2 has an importance score exceeding the threshold δ2 and is therefore split into two smaller windows, while the first time window ω1 remains unchanged. The algorithm terminates at iteration (q+1) , as all window importance scores fall below the threshold δ2 .
Figure 9: Dynamic explanations at two prediction times: tP ( top ) and tP′ ( bottom ). Left panels show the observed longitudinal trajectories up to the prediction time and the corresponding expected remaining restricted survival time. Right panels display normalized interval-specific Shapley values produced by DynSurvX , highlighting how feature–time contributions evolve as new observations become available.
Figure 10: Top: longitudinal trajectories X(t) for a randomly selected individual. Bottom: latent risk process w(t) . The red star indicates the first hitting time of the threshold value w⋆=12 .
Figure 11: Simulated dataset – Example longitudinal trajectories for two individuals, recorded up to their observed times ( left , middle ) and the Kaplan–Meier estimate of the event-time distribution ( right ).
Figure 12: PBCseq dataset – Example longitudinal trajectories for two individuals, recorded up to their observed times ( left , middle ) and the Kaplan–Meier estimate of the event-time distribution ( right ).
Dataset
N
Nexp
h
d
m
ρc
Simulation
1000
200
3
5
56.86
2.6%
PBCseq
312
150
2
5
6.52
57%
MSK-Chord
3253
200
5
2
20.13
51%
Appendix
Table 1: Dataset characteristics: number of samples (N) , number of static features (h) , number of longitudinal features (d) , the average number of observations times over individuals (m) , the number of samples to be explained (Nexp) and the censoring level (ρc) .
Figure 13: MSK-Chord dataset – Example longitudinal trajectories for two individuals, recorded up to their observed times ( left , middle ) and the Kaplan–Meier estimate of the event-time distribution ( right ).
Figure 14: Network structure of DDH. Figure is taken from Lee et al. (2019) .
Figure 15: Different number of evaluated coalitions on simulated dataset
Figure 16: PBCseq dataset – Predictive performance. C-Index ( left ) and Brier score ( right ) of the three models: CoxSig ( top ), DDH ( middle ) and DySurv ( bottom ) evaluated at chosen points (tP,δt) .
Figure 17: MSK-Chord dataset – Predictive performance. C-Index ( left ) and Brier score ( right ) of the three models: CoxSig ( top ), DDH ( middle ) and DySurv ( bottom ) evaluated at chosen points (tP,δt) .
Figure 18: Simulated dataset – Feature importance . Theoretical values ( left ) and estimates for DynSurvX for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=2.15 ( top ) and tP=3.75 ( bottom ), with the red vertical line separates longitudinal features from static features.
Figure 19: Simulated dataset – Interval-wise feature importance . Theoretical values ( left ) and estimates for DynSurvX for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=2.15 ( top ) and tP=3.75 ( bottom ).
Figure 20: PBCseq dataset – Feature importance comparison between estimates obtained with DynSurvX for CoxSig ( left ), DDH ( middle ) and DySurv ( right ) at two prediction times tP=2.35 ( top ) and tP=3.95 ( bottom ), with the red vertical line separates longitudinal features from static features.
Figure 21: PBCseq dataset – Interval-wise feature importance comparison between estimates obtained with DynSurvX for CoxSig ( left ), DDH ( middle ) and DySurv ( right ) at two prediction times tP=2.35 ( top ) and tP=3.95 ( bottom ).
Figure 22: MSK-Chord dataset – Feature importance comparison between estimates obtained with DynSurvX for CoxSig ( left ), DDH ( middle ) and DySurv ( right ) at two prediction times tP=3.3 ( top ) and tP=6.4 ( bottom ), with the red vertical line separates longitudinal features from static features.
Figure 23: MSK-Chord dataset – Interval-wise feature importance comparison between estimates obtained with DynSurvX for CoxSig ( left ), DDH ( middle ) and DySurv ( right ) at two prediction times tP=3.3 ( top ) and tP=6.4 ( bottom ).
Figure 24: Elbow-based selection of δ1 on simulated dataset ( left ) and PBC dataset ( right ). Individual-level sorted longitudinal feature importance scores ( orange ) and their population average ( green ). The elbow point of the mean curve defines the threshold δ1 .
Figure 25: Simulated dataset + median survival time as prediction function – Feature importance comparison between the theoretical values ( left ) and estimates obtained with DynSurvX , together with 95% variability intervals shown as error bars, for CoxSig ( middle ) and DDH ( right ) at two prediction times tP=2.15 ( top ) and tP=3.75 ( bottom ).
Figure 26: Simulated dataset + median survival time as prediction function – Interval-wise feature importance comparison between the theoretical values ( left ) and estimates obtained with DynSurvX , together with 95% variability intervals, for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=2.15 ( top ) and tP=3.75 ( bottom ).
Figure 27: PBCseq dataset + median survival time as prediction function – Feature importance comparison between estimates obtained with DynSurvX , together with 95% variability intervals shown as error bars, for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=2.35 ( top ) and tP=3.95 ( bottom ).
Figure 28: PBCseq dataset + median survival time as prediction function – Interval-wise feature importance comparison between estimates obtained with DynSurvX , together with 95% variability intervals shown as error bars, for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=2.35 ( top ) and tP=3.95 ( bottom ).
Figure 29: MSK-Chord dataset + median survival time as prediction function – Feature importance comparison between estimates obtained with DynSurvX , together with 95% variability intervals shown as error bars, for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=3.3 ( top ) and tP=6.4 ( bottom ).
Figure 30: MSK-Chord dataset + median survival time as prediction function – Interval-wise feature importance comparison between estimates obtained with DynSurvX , together with 95% variability intervals shown as error bars, for CoxSig, DDH, and DySurv ( three right panels ) at two prediction times tP=3.3 ( top ) and tP=6.4 ( bottom ).
Leibniz Institute for Prevention Research and Epidemiology – BIPS · Faculty of Mathematics and Computer Science, University of Bremen · University of Warsaw +3
Department of Computer and Systems Sciences (DSV) Stockholm University Stockholm, Sweden · Department of Electrical Engineering (ISY) Linköping University Linköping, Sweden