Out-of-Distribution Robust Explainer for Graph Neural Networks
Graph Neural Networks (GNNs) have become widely used for analyzing graph-structured data, motivating post-hoc explanation methods for interpreting pre-trained GNNs. However, most existing explainers have primarily been designed and evaluated in settings where the inference graph is structurally or distributionally similar to the graph used to train the GNN. This setting can be fragile in practical deployment, where inference time graphs may contain newly introduced nodes and edges that deviate substantially from the training distribution. Such Out-of-Distribution (OOD) entities can introduce spurious signals during explanation generation, causing explainers to highlight unreliable graph components. Nevertheless, the robustness of post-hoc GNN explainers under OOD-contaminated inference graphs remains largely unexplored. To address this gap, we propose ORExplainer (Out-of-Distribution Robust Explainer), a post-hoc node-level explanation framework for inference graphs containing OOD nodes. ORExplainer quantifies node-level distributional deviation using an energy-based score computed from a pre-trained GNN, and propagates this score to learn explanations that emphasize In-Distribution (ID) nodes while suppressing OOD influence. Experiments on synthetic and real-world datasets show that ORExplainer consistently provides more robust explanations across diverse node-level OOD settings, outperforming existing baselines. Our code is available at https://github.com/gunhee8178/ORExplainer.