TL;DR
MemExplainer is a new framework that opens the "black box" of Temporal Graph Networks (TGNs) by tracing predictions back to their historical roots. Unlike previous methods that only look at recent graph structure, MemExplainer uses a "memory backtracking tree" to reveal how past interactions shaped a node's internal state, leading to significantly more faithful and human-understandable explanations.
What Problem Does This Paper Address?
Temporal Graph Networks (TGNs) are the gold standard for modeling dynamic data, such as social media interactions, financial transactions, or even human movement. They work by maintaining a "memory" for every node, which is updated every time an event occurs.
However, TGNs are notoriously difficult to explain. Existing explanation tools (like GNNExplainer or TGNNExplainer) focus almost entirely on topology—the immediate web of connections surrounding a node. They ignore the memory module, which is the "brain" of the TGN. This creates a massive gap: if a model predicts a user is a fraudster based on a pattern of behavior from last week stored in their memory, a topology-only explainer will miss it entirely. The authors tackle this "chain of temporal influence" that has previously been left unexplored.
Methods
The authors introduce MemExplainer, which decomposes a model's prediction into two distinct but integrated attribution trees:
- Topology Attribution Tree (Spatial): This uses Layer-wise Relevance Propagation (LRP) to attribute the model's output (logits) to the most recent events and the current memory vectors of the involved nodes.
- Memory Backtracking Tree (Temporal): This is the core innovation. It recursively "backtracks" through time, applying LRP to the memory update functions (like GRUs or LSTMs). It traces how a node's current memory was built by a sequence of historical events, effectively assigning a "contribution score" to events that happened long before the prediction.
Finally, instead of just picking the top-scoring events (a heuristic called top-k selection), the authors formulate an optimization problem. They use KL-divergence to select a subset of events that, when kept, most closely mimic the original model's probability output.
Datasets
The researchers evaluated their method on seven diverse real-world datasets across two primary tasks:
- Link Prediction (Will these two nodes interact?): Wikipedia, Reddit, Enron (email interactions), and UCI (online forum).
- Node Property Prediction (What category does this node belong to?):
tgbn-trade(international trade),tgbn-genre(music preferences), andtgbn-reddit(user-subreddit interactions). - Case Study: They also applied the model to a pose-based action classification task using the HMDB51 dataset, treating human joints as nodes in a temporal graph.
Key Insights and Ideas
- Memory is the Key to Faithfulness: The paper demonstrates that ignoring the memory module leads to "unfaithful" explanations. If the explainer doesn't account for how memory evolves, it attributes importance to the wrong events.
- The Conservation Principle: By using LRP, the framework ensures that the total "importance" assigned to all historical events exactly equals the model's total output logit. This mathematical rigor prevents the explainer from "hallucinating" importance.
- The "Sweet Spot" of History: Through sensitivity analysis, the authors found that there is an optimal depth for backtracking. Looking too shallow misses the cause, but looking too deep introduces noise and complicates the optimization, actually reducing the fidelity of the explanation.
- Beyond Top-K: The shift from simple ranking to a KL-divergence optimization objective allows the explainer to handle the non-linear mapping between model internal scores (logits) and final probabilities.
Key Results
- Superior Fidelity: MemExplainer consistently outperformed four state-of-the-art baselines (including TGNNExplainer and TempME) across all seven datasets. It achieved significantly lower Fidelity scores (meaning the explanations were more accurate reflections of the model's logic).
- Robustness: The method proved effective regardless of whether the TGN used a simple sum function or a complex Graph Attention mechanism for its embeddings.
- Qualitative Clarity: In the pose-estimation case study, MemExplainer identified clear biomechanical chains (like the hip-knee-ankle movement in running), whereas baseline methods produced noisy, scattered masks that were difficult for humans to interpret.
Limitations and Future Work
- Computational Complexity: Constructing the memory backtracking tree is computationally expensive, scaling exponentially ($O(2^T)$) with the depth of the history being traced. While practical for depths up to 10, it may struggle with extremely long-term dependencies.
- Manual Depth Selection: The "optimal depth" for backtracking currently needs to be set manually or found through trial and error for each dataset.
- Future Directions: The authors suggest exploring ways to automate depth selection and improving the efficiency of the backtracking algorithm to handle even larger-scale temporal graphs.
Summary updated