In high-stakes domains like clinical medicine, a prediction is rarely a single snapshot. When a model predicts a patient’s risk of sepsis or the likelihood of a wildfire, it is predicting a trajectory over time. However, traditional Explainable AI (XAI) tools like SHAP or LIME typically produce a single "importance score" for each feature. This creates a static importance fallacy: it assumes that if a feature is important now, it remains equally important throughout the entire prediction horizon.
A growing body of research argues that for survival analysis and longitudinal forecasting, we must treat feature importance as a dynamic function rather than a static scalar.
The Functional Nature of Risk
In survival analysis, the output of a model is not a single number but a survival curve—a function representing the probability of an event occurring over time. As Aleksandra Grudziaz, Alicja Gosiewska, and Przemyslaw Biecek argue in their work on survxai, the entire curve should be the primary unit of explanation.
If a model predicts a patient has a high risk of mortality over five years, the reasons for that risk might change. A baseline characteristic like age might dominate the long-term forecast, while an acute physiological change like a drop in blood pressure drives the immediate risk. Bartłomiej Sobieski and colleagues demonstrate in Interpretable machine learning for time-to-event prediction in medicine and healthcare that clinical features often dominate early-stage predictions, while molecular markers become the primary drivers for long-term outcomes.
Capturing the Temporal Shift
The core intuition behind this research direction is that the "predictive weight" of a variable waxes and wanes. This is clearly visible in disease progression. For example, Espen Jimenez‐Solem and Christian Igel found that in COVID-19 adverse outcome models, risk predictors shift from baseline frailty markers (like BMI) to acute indicators of organ dysfunction as the disease progresses.
Similarly, in Alzheimer’s research, Tyler C. Hammond and Kwangsik Nho used machine learning to show that $\beta$-amyloid and tau drive early decline, while glucose hypometabolism becomes the dominant driver in later stages. A static model would average these effects, potentially missing the window where a specific treatment (like an amyloid-targeting drug) is actually effective.
Methods for Time-Dependent Attribution
To capture these shifts, researchers have developed several frameworks that extend classical attribution methods into the temporal domain:
- SurvSHAP(t): Mateusz Krzyziński and Przemyslaw Biecek introduced SurvSHAP(t), which calculates Shapley values as a continuous function of time. This allows for the detection of "crossing effects," where a feature’s influence might reverse—for instance, a treatment that is harmful in the acute phase but protective in the long term.
- GradSHAP(t): For deep learning models, Niklas Koenen developed GradSHAP(t), a gradient-based approach that provides these time-varying attributions much faster than model-agnostic methods, making it feasible for complex, multi-modal medical data.
- Contextual Explanation Networks (CENs): Maruan Al-Shedivat and Eric P. Xing proposed CENs, which use a neural network to learn patient-specific linear models for different time intervals. This provides a "glass-box" view of how risk factors evolve for a specific individual.
Beyond Medicine: Strategic and Tactical Evolution
While clinical care is the primary driver of this research, the concept of dynamic attribution extends to any system where goals evolve. In reinforcement learning, Daniel Beechey and Thomas M. S. Smith developed SVERL to show how the utility of environmental features is phase-dependent, shifting as an agent moves through different sub-goals.
Even in sports analytics, Mustafa Cavus and Przemyslaw Biecek use glocal explanations to track tactical evolution in football, identifying how the drivers of "Expected Goals" change across different periods of a match or season.
Why It Works: Intuition
The reason dynamic attribution is more effective than static importance is that it respects the non-stationarity of real-world processes. A patient in the ICU is not a static object; they are a biological system in flux. By calculating importance at every discrete time step—as seen in the I-RNN developed by Asif Rahman and Yale Chang—we move from "black-box" scores to "risk curves." This allows practitioners to see exactly when a physiological change began to drive a high-risk alert, providing a transparent timeline of a patient's clinical trajectory.