TRANSMISSION // 2612.02147v1

Making Graph Neural Networks Explain Their Rules

Source published

A logic-gate graph network can be translated into rules that exactly reproduce its predictions, while shorter motif rules offer a more compact but imperfect summary.

AI-generated conceptual illustration for Making Graph Neural Networks Explain Their Rules
AI-generated conceptual illustration; not documentary evidence.

Graph neural networks can classify molecules and other connected data, but the patterns behind their decisions are often difficult to inspect. Researchers propose building logic gates into these networks from the start, so their learned computations can be written as exact rules. The approach performed competitively on benchmark datasets, though its shorter, human-readable summaries sometimes disagree with the model.

Graph neural networks (GNNs) learn from connections between data points. In a molecule, for example, atoms are nodes and chemical bonds are edges. A GNN passes information between neighboring nodes and combines it to classify the whole graph. That can work well, but it is not always clear which combinations of features and connections drove a prediction.

One route to understanding a model is to describe its behavior with logical rules. Yet a rule-based explanation may only approximate the original network: it can sound plausible while making different predictions. The authors of this study ask whether a GNN can instead be designed so that its learned computations have an exact logical description—and whether shorter rules can summarize those computations usefully.

Building the rules into the network

The proposed Logic Gate Graph Neural Network (LGGNN) uses discrete Boolean operations—logic gates whose inputs and outputs are 0 or 1—throughout its graph-processing layers and final classifier. Before information is passed through gates, the model sums values from each node’s neighborhood, including the node itself, and compares those sums with fixed thresholds. These comparisons produce bits. The gates combine the bits, and the classifier predicts a class from the resulting votes.

Training discrete operations directly is challenging because hard choices do not provide ordinary gradients for learning. The researchers use a straight-through estimation method: the forward calculation uses discrete values, while a smoother approximation allows gradients to guide training. The model learns from labels directly, without first copying a separate teacher GNN.

After training, the authors translate the network’s gates and thresholds into circuit rules. Under the conditions they specify, those rules reproduce the model’s internal values and predictions. For binary node features, the threshold tests can also be expressed using graded modal logic—a formal language for describing how many neighboring nodes meet a condition.

The team evaluated the method on seven graph-classification datasets and three node-classification datasets, using ten random seeds and shared data splits for the main comparisons. The datasets included molecular and protein graphs as well as synthetic graph tasks. They compared LGGNN with GIN, a standard GNN, and with self-explainable or post-hoc explanation approaches.

Exact circuits, shorter summaries

Across the seven graph datasets, LGGNN achieved mean test accuracy of 87.16%, compared with 86.74% for the researchers’ GIN runs. This is a small difference in the reported averages, not evidence that the new model will outperform GIN in every setting. Results varied by dataset: LGGNN did not lead on all of them.

The circuit rules matched LGGNN’s predictions on all evaluated test graphs. But exact circuit descriptions can be large: the paper reports hundreds of distinct non-constant classifier formulas per model on average. To make the explanations shorter, the researchers traced which parts of graphs contributed to class votes, identified candidate subgraphs called motifs, and fitted compact rules describing their presence or absence.

These motif rules are summaries, not exact translations. Their agreement with LGGNN’s predictions—called fidelity—ranged from 71.24% to 100% across the seven datasets. Averaged across those datasets, fidelity was 85.06%, higher than the reported averages for the two explanation baselines. On some tasks, the rules matched every test prediction; on others, they did not. A rule’s agreement with the model is also distinct from its accuracy against the true labels: a model can be summarized faithfully without being correct on every example.

What the results do—and do not—show

The central distinction is between an exact account of a particular circuit and a compact account of its behavior. The circuit rules can reproduce the trained model under the paper’s stated assumptions. The motif rules are easier to scan but discard information, including some counts and numerical feature details. They may therefore miss distinctions the circuit uses.

Nor does exact reproduction prove that a rule identifies a scientifically meaningful cause of a prediction. The authors explicitly caution that their circuit clauses are not guaranteed to be causally relevant, minimally sufficient, or reliable under changes to the input. The study also reports no user study, so it does not establish that people find these explanations understandable or useful. Its explanation evaluation is limited to graph-classification datasets, even though the model is also tested on node-classification tasks.

The supplied paper text describes benchmark experiments and formal conditions for translating the network, but the evidence here does not establish performance beyond those settings. This is an arXiv preprint, and the available source does not establish that it has undergone peer review. The results are best read as a technical demonstration: designing a GNN around discrete gates can make its computations exactly translatable into rules, while more readable motif summaries remain approximate.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.