arXiv:2610.26104cs.LGOct 2026

Manuscript Offprint

arXiv:2610.26104

Declarative Explanations for Graph Neural Networks: A Demonstration

Cibo Yu, Haitong Tang, Yinghui Wu, Arijit Khan, Tingting Zhu, Tingyang Chen, Xiangyu Ke

Cibo Yu*, Haitong Tang*, Yinghui Wu†, Arijit Khan‡, Tingting Zhu*, Tingyang Chen*, and Xiangyu Ke*

  • Zhejiang University, Hangzhou, China

{cbyu, tht, tingtingzhu, chenty, xiangyu.ke}@zju.edu.cn

† Case Western Reserve University, Cleveland, USA

yxw1650@case.edu

‡ Bowling Green State University, Bowling Green, USA

arijitk@bgsu.edu

Abstract—Graph Neural Networks (GNNs) have proven effective for graph analytical tasks, yet their “black-box” nature complicates the understanding of their layer-wise behavior and hinders their application to large graphs. We demonstrate SliceGXQ, an end-to-end declarative and interactive system for querying and exploring layer-wise explanations for GNNs over large-scale graphs. In particular, SliceGXQ provides (1) an interactive graphical user interface for dataset, model, and explanation configuration; (2) a lightweight SPARQL-like parser that allows users to specify target nodes, layers, explanation modes, and constraints; and (3) an integrated execution and visualization workflow that invokes SliceGX [1] as its underlying explanation engine. We demonstrate how users can diagnose a misclassified node, identify problematic layers and influential messages, and perform targeted model debugging, together with large-scale graph interpretation and fraud-detection analysis. Our demonstration video and source code are available at https://github.com/jinzhaoqet/SliceGXQ.

Index Terms—graph neural networks, explainability, declarative queries, model diagnosis, interactive visualization

I. INTRODUCTION

Graph Neural Networks (GNNs) have demonstrated remarkable success across various tasks, including node classification. By leveraging message passing and node feature aggregation, GNNs effectively learn node representations by integrating graph structural information with node features. This capability has enabled the widespread applications of GNNs in domains such as social network analysis, cyber threat analysis, bioinformatics, and recommendation systems.

Due to complex message-passing mechanisms and end-to-end learning, GNNs are often queried and accessed as “black-boxes”, making their decision-making process opaque to users. Recent efforts in explainable graph learning [2] have developed various GNN explainers e.g., [3]–[5]. These methods identify essential substructures and data features responsible for GNNs’ outputs, and their influence and impact.

Nevertheless, existing GNN explanation techniques exhibit several limitations [6], [7]: (1) Most of them provide static, one-time explanations that focus solely on the final outputs rather than insights into how a GNN processes information progressively. This lack of fine-grained mechanisms for interpretation and manipulation hinders users' ability to localize and explore the internal reasoning behavior of GNNs. (2) Many explainers are themselves "black-box", making it difficult to validate their outputs; and (3) Users often need to tailor explanations to specific requirements, such as filtering for particular substructures in the output or focusing on specific layers of the model, which typically requires manual intervention and domain expertise. Hence, a declarative explanation system is essential for users to efficiently specify queries and easily customize explanations according to their needs.

To this end, we introduce a declarative framework that supports a class of SPARQL-like explanatory queries, called SliceGX queries, to support layer-wise explanations 1^{1} of GNNs. A SliceGXQ query Q follows a general structured format:

EXPLAIN (M, VTV_{T}) AT ltl_{t}

FROM{G, L}

WHERE P, k WITH mode

Specifically, the following declarative operators are integral to SliceGXQ queries: (1) EXPLAIN specifies the primary objective of the query, which is to generate explanations for a pre-trained GNN model (M) and test nodes of interest ( VTV_T); (2) AT allows users to inspect a specific layer ( ltl_t) within the GNN to interact with, enabling fine-grained, progressive analysis; (3) FROM defines the graph dataset (G) and selected layers (L) to generate explanations for model behaviors at ltl_t; (4) WHERE applies “shape” constraints on the explanations as subgraphs, such as filtering by a graph/path pattern (P), as seen in SPARQL queries; or limiting the result size (k); and (5) WITH specifies the explanation mode (e.g., model diagnosis vs. interpretation, as detailed in §III). Moreover, SliceGXQ supports SQL-like aggregators, such as ORDER BY, allowing users to sort the generated explanations by specific utility. WHERE supports graph/path-pattern constraints, k bounds the explanation size, and ORDER BY ranks explanations by their explainability scores.

SliceGXQ addresses critical challenges in GNN explanation, including limited granularity, interactivity, and customization by introducing a declarative paradigm that allows users to access layer-wise explanations through SPARQL-like queries. Different from SliceGX [1], SliceGXQ focuses on the declar-

1^{1}We present layer-wise GNN explanations in the full research paper [1].

Figure

Fig. 1. SliceGXQ workflow. Users select a graph and a GNN model, submit an explanation request, and inspect the layer-wise results returned.

ative query interface, interactive visualization, and end-to-end explanation workflow built upon the SliceGX engine. The key contributions of SliceGXQ are summarized as follows.

  • SliceGXQ enables a declarative workflow to generate explanations throughout the decision-making process of GNNs at any specific, segmented layers, and allows users to construct flexible, configurable queries tailored to application needs.

  • SliceGXQ contains an interactive visualization toolkit for the configuration of explanation context, inference-time explanation browsing, and statistical analysis. This interactive interface empowers users to gain finer-grained layer-wise insights into both data properties and model behavior.

• We demonstrate the effectiveness of SliceGXQ through layer-wise model diagnosis and debugging scenarios. By visualizing how the model processes information at each layer, users can identify potential error sources and refine the model accordingly.