Generating Counterfactual Temporal Motifs: Unraveling the Mysteries of Temporal Graph Neural Networks
摘要
Temporal Graph Neural Networks (TGNNs) are increasingly applied in dynamic scenarios, however, their limited explainability hinders their adoption in high-stakes domains. Existing methods tend to conflate causality with temporal proximity, leading to ambiguous explanations that mix impactful and irrelevant events. Moreover, they lack counterfactual reasoning to assess whether altering specific temporal events would change TGNN predictions. To overcome these challenges, we propose CTM-Explainer, which identifies critical temporal dependencies through iterative “what-if” perturbation analysis. To the best of our knowledge, this is the first post-hoc counterfactual explanation framework for TGNN. It enables precise attribution of how specific timestamped events influence TGNN predictions. By embedding causal analysis into a reinforcement learning framework, CTM-Explainer constructs Counterfactual Temporal Motifs (CTMs) that are causally grounded in model outcome shifts via interventional probability estimation. This design eliminates temporally correlated but non-essential events, while preserving those with verified causal influence. Extensive experiments on real-world and synthetic datasets confirm that CTM-Explainer generates more faithful and concise explanations than existing methods, at significantly lower computational cost.