Towards the Explainability of Temporal Graph Networks via Memory Backtracking and Topological Attribution
Abstract
Temporal graphs are ubiquitous in real-world applications and Temporal Graph Networks (TGNs) have achieved superior predictive accuracy. Understanding which historical events drive model predictions can enhance trustworthiness of TGNs. Existing explanation methods overlook the memory module, the core component that records and updates node histories, leaving the influence of past events unexplored. To address this, we attribute TGNs predictions through the topology attribution tree and memory backtracking tree. The topology attribution tree captures the influence of neighbors and their memory vectors, then the memory backtracking tree quantifies how historical events shape node memory vectors. We apply the LRP in TGNs, ensuring that the total contribution of events equals the model’s logits. Finally, top-k selection may be unfaithful due to the nonlinear mapping from logits to probabilities, we design optimization objectives to identify the important events. Experiments on nine temporal graph datasets, spanning node property prediction, link prediction tasks and graph classification tasks, show that our method provides faithful explanations and outperforms state-of-the-art baselines. The code is available at https://github.com/yazhengliu/MemExplainer.
Lay Summary
Many real-world systems, such as social networks, financial transactions, and communication records, can be seen as networks that change over time. AI models are good at making predictions on these dynamic networks, but it is often unclear which past events led to a prediction. This lack of transparency can make the models harder to trust, debug, or use in high-stakes settings. Our work explains these predictions by tracing them back through the model’s memory. Instead of only looking at nearby connections, we show how earlier interactions shape what the model remembers about each node, and how this memory influences the final prediction. Across a wide range of datasets and tasks, our method identifies the interactions that truly matter, providing more faithful explanations than existing approaches.