Manuscript Offprint
arXiv:2611.12446Pricing Symbolic Rules by What GNNs Leave Unlearned
ABSTRACT
Symbolic knowledge (motif counts, ring counts, label constraints) is routinely added to graph neural networks (GNNs) and justified by their limited expressivity. We replace this yardstick with an exact one. The largest log-loss reduction a rule can give a model family is given what the family computes; every realised gain splits exactly into this term plus repaid neural debt; and for a trained network with representation the value is , the label information training failed to extract. Rule design thus becomes rule discovery: we score candidates on the network's out-of-fold residual against calibrated permutation nulls with family-wise error control. On ZINC, discovery recovers the hidden ring term of the target in three independent runs () and beats expert cycle counts; frozen and applied to five unseen datasets it is never significantly worse than the plain network or the expert rule, and on BBBP it significantly beats both.
Keywords graph neural networks · neuro-symbolic learning · Weisfeiler–Leman · usable information · learnability · rule discovery
1 Introduction
Neuro-symbolic graph learning augments GNNs with cycle and motif counts (Bouritsas et al., 2023; Bodnar et al., 2021), probabilistic label models (Qu et al., 2019; Huang et al., 2021) and logic (Qu and Tang, 2019; Zhang et al., 2020). The standard argument is expressivity: message passing is at most as strong as 1-WL (Xu et al., 2019; Morris et al., 2019), which cannot count many substructures (Chen et al., 2020), so the missing structure should be supplied symbolically. This says why rules can help, not how much a rule is worth to a given network on given data. We prove an absorption identity (Theorem 1), a gain ledger (Theorem 2) and a learnability decomposition (Theorem 3) with a Fano certificate, and turn them into calibrated out-of-fold rule discovery (Section 4). Unlike rule extraction, which reads out what a network has learned (Geng et al., 2025; Morris et al., 2024), discovery targets what it has not.
A -layer GIN computes a function of the 1-WL colouring and can be injective on the classes of any finite sample, so there (Xu et al., 2019). The ambiguity of a rule on a dataset is
\alpha_t(s) = \frac{1}{N} \big{|} \{ i : \exists j, \mathrm{WL}_t(G_i) = \mathrm{WL}_t(G_j), \, s(G_i) \neq s(G_j) \} \big{|}, \tag{2}*Accepted at the GraphML Workshop (Graph Machine Learning: Foundations, Frontiers, and Applications) at the 18th Asian Conference on Machine Learning (ACML 2026), Melbourne, Australia.
and means is -measurable on the data. For a trained network, is the input of its readout, and .
Throughout, and every rule take values in countable sets with finite entropy. -algebras are identified with the random variables that generate them, and is the conditional entropy given . All information quantities are in nats. The following lemma is used repeatedly.
Lemma 1 (Gibbs). Let be a -algebra and any -measurable conditional distribution on . Then , with equality iff almost surely.
Proof. , with equality iff the KL divergence vanishes almost surely.
3 Theory
3.1 Representational value: the absorption identity
Theorem 1 (Absorption identity). Let contain all -measurable predictors and all -measurable ones. Then
and the upper bound exceeds the unclipped lower bound by exactly .
Proof. contains every -measurable conditional distribution, so by Lemma 1 , attained at . The augmented family contains every -measurable conditional distribution whose logits are additive in a -measurable and an -measurable term. When the branch ranges over all functions of (the Bayes family), the same lemma gives . In general it gives at least this value, with equality whenever is a function of alone. Hence , which is the first equality in (3). The chain rule applied to in both orders gives
which rearranges to the second equality in (3). Since and , the lower bound in (4) holds. For discrete variables, and symmetrically , which is the upper bound. Finally,
so the gap between the bounds is , which is zero iff S is a function of Y.
Additive branches. The equality case above explains a design choice of rule branches. An additive branch reaches the Bayes gain when the log-likelihood ratio contributed by does not interact with . Otherwise the realised gain is lower, and the shortfall enters the ledger of Theorem 2 as .
Corollary 1 (Expressible knowledge is worthless). If is -measurable, then and . For a -layer GIN, every rule with on the data distribution has zero representational value, including rules that 1-WL cannot compute on general graphs.
Proof. If is -measurable, , and the upper bound in (4) gives . For a -layer GIN with injective aggregation, on every finite sample (Xu et al., 2019; Morris et al., 2019). means that is constant on every class present, so is -measurable on the empirical distribution and its plug-in conditional entropy is zero.
Hence a rule with is worth zero to a Bayes-optimal t-layer GIN, even if 1-WL cannot compute it on general graphs.
3.2 Realised value: the gain ledger
Real networks are not Bayes-optimal; their neural debt is .
Theorem 2 (Gain ledger). For every family and rule ,
Hence a -measurable rule can only repay debt, , and if with , every nat of debt the larger family repays removes one nat from the ceiling of any such rule.
Proof. By the definitions of the debts, and . Subtracting the second from the first and using yields (5). Every is a conditional distribution measurable with respect to , so Lemma 1 gives and therefore the upper bound. Choosing shows , so and .
For the consequences: if is -measurable, in (5), so . In particular a test-loss reduction by such a rule certifies up to estimation error. If , then ; with the Bayes term is shared, so , and the ceiling of every -measurable rule falls by exactly the debt the larger family repays. If , (5) reduces to Theorem 1.
3.3 Trained networks: the learnability decomposition
Theorem 3 (Learnability decomposition). If , the best post-hoc gain of adding to is , and
(6)
Proof. The post-hoc family of all conditional distributions measurable in attains by Lemma 1, and the family measurable in attains , so . By the chain rule,
Because , conditioning on is conditioning on , so . Rearranging gives (6). Since , . If is -measurable, the first term of (6) vanishes.
Expressivity is thus neither necessary nor sufficient: a rule determines is worthless however far beyond 1-WL it lies, and an unlearned -measurable rule can be worth . Theorems 2 and 3 are two views of one identity. Let be the family of predictors that read only. Its debt relative to is , exactly the bound in Theorem 3. The learnability decomposition is therefore the ledger identity for the family “trained network plus arbitrary post-hoc head”, with the debt made explicit as lost label information. A probe checks which case holds:
Proposition 1 (Fano certificate). For discrete rule columns with alphabets and any probe with error rates ,
Proof. . Since , conditioning on refines conditioning on , so . By the chain rule and because conditioning reduces entropy, . Fano's inequality (Cover and Thomas, 2006, Thm. 2.10.1) bounds each term by . If for all , the bound is zero.
4 Methodology: out-of-fold rule discovery
Theorem 3 names the rule worth adding: the candidate maximising . Discovery therefore selects rules from a candidate library: it decides which named, interpretable statistic carries the label information a trained network failed to extract. It does not synthesise new functional forms, and every library used is listed in Section 5. Let be the residual (one-hot minus probabilities for classification) and the part of a block of standardised candidate columns that does not predict, with orthonormal basis . The block energy
is a local surrogate of value (Proposition 2).
Proposition 2 (Local value of a block). (a) If are jointly Gaussian given , then , where is the population variance of the projection of on , and . (b) Adding to the logit of a binary predictor changes the expected log-loss by at its optimum, with and . With whitened and , the reduction is to first order. (c) For classes the exact local reduction is with and replaces by a multiple of the identity, which is exact when the curvature is uncorrelated with .
Proof. (a) Let and be jointly Gaussian given , with , and . Then . The quantity is the variance of the projection of onto , whose sample analogue with an orthonormal basis of the centred columns is . Consistency follows from the law of large numbers for second moments.
(b) Let and . Then and . A second-order Taylor expansion gives , which is minimised at with . If and , then and the reduction is . With whitened sample rows , the plug-in score is , so .
(c) For classes, is the one-hot label minus the predicted probabilities, and the same argument applied to each logit gives the Frobenius form in (8).
For Gaussian residuals the energy is therefore an exact monotone transform of value, and for a classifier it is the first-order log-loss reduction. Otherwise only ranks blocks, so significance nominates and validation decides.
Out-of-fold residuals. In-sample residuals carry a memorisation term that cancels all evidence when interpolates (Proposition 3). We take r and T from networks trained on the other half of the data (cross-fitting, Chernozhukov et al., 2018).
Proposition 3 (Out-of-fold versus in-sample evidence). Let be trained on . For , . For a network trained on all of and trained without graph ,
If interpolates its training labels, the in-sample residual vanishes and the evidence for every candidate collapses.
Proof. For , is independent of , which is a function of and of the training randomness only. Conditioning on and writing gives . For the in-sample residual, add and subtract :
then multiply by and take expectations to obtain (9). If interpolates the training labels, for every , so all in-sample covariances vanish. The leave-one-out residual is unaffected, so the memorisation term exactly cancels the true residual covariance.
Remark 1 (Statistical debt). The out-of-fold residual measures the debt of a network trained on graphs, part of which disappears at graphs. A block can therefore be significant for the half-data network and worth little to the full-data network, which is why significance nominates rules and validation loss decides how many to keep. In particular, the half-data networks are used only to compute residuals: every gain we report is measured after retraining on the full training set with the rule added, so a rule that a fully trained network already learns shows no gain there (Section 6.6).

ZINC: the first block is , the hidden ring term of penalised ( in three independent runs)
Figure 1: Out-of-fold rule discovery. Networks trained on half of the training graphs expose what the architecture fails to generalise; candidate rules are scored by how much of that residual their unlearned part explains, each block against its own permutation null; the winning named rule is added to the network.
Calibration and family-wise error. Blocks differ in size and skew, so we permute the residual rows times, fit the null energies by a moment-matched scaled , with and (Satterthwaite, 1946; Box, 1954), and score each block by its surprise . The pick receives the Westfall–Young max- p-value (Westfall and Young, 1993)
which controls the family-wise error rate over all blocks. The residual is projected off the picked span and the search repeats (group OMP, Pati et al., 1993); validation loss picks how many blocks to keep (Algorithm 1, Figure 1).
Scope of the guarantee. The family-wise error control of (10) is a guarantee for the first round: it bounds the probability that the first pick is declared significant when no block carries signal. The -values of later greedy rounds are conditional on the earlier picks and are reported descriptively; the number of blocks kept is decided by validation loss, not by these -values.
Validity of the calibrated max- test. Under the complete null that the residual rows are exchangeable with respect to the candidate rows, every permutation of the residual leaves the joint distribution of unchanged. The surprises are fixed monotone transforms of the energies , with transforms estimated from the same permutations. The max- p-value (10) is therefore a valid permutation -value for the family-wise null, and it controls the family-wise error rate at any level (Westfall and Young, 1993). Strong control holds under subset pivotality. Because the transform is fitted on the permutation null itself, it only rescales the blocks to a common scale and does not affect validity.
Moment-matched scaled chi-square. If were exactly (Gaussian residual, fixed basis), its mean and variance would be and . For non-Gaussian residuals and skewed candidate columns, the null of has mean and variance that deviate from this. Matching to them gives and , hence and (Satterthwaite, 1946; Box, 1954). This calibration removes the bias of raw z-scores towards single-column blocks, whose nulls are heavy-tailed. We confirmed this on planted signals: both a single planted column and a weak planted ten-column group were recovered, and the pure null gave .
Cost. A discovery round costs for graphs, total block dimension and residual columns, on top of training four half-data networks. This took seconds to minutes on one GPU for a few hundred candidates.
5 Experimental setup
Data. Data are real only: TU benchmarks (Morris et al., 2020), ZINC-12k (Dwivedi et al., 2023), scaffold-split OGB molecules (Hu et al., 2020a) and eleven node-classification graphs (Table 1). Sources: TU benchmarks, https://chrsmrrs.github.io/datasets/; OGB, https://ogb.stanford.edu/docs/graphprop/; ZINC-12k, https://github.com/graphdeeplearning/benchmarking-gnns; node-level graphs, https://github.com/kimiyoung/planetoid, https://github.com/shchur/gnn-benchmark, https://github.com/
Algorithm 1: Out-of-fold rule discovery
Input: training graphs , candidate library with blocks (every column and every family), rounds , permutations
Split into ; for seeds train on and keep its best-validation outputs;
for do
for do // cross-fitted MLP probe within fold
for do for do permute rows of times, compute null energies, fit , surprises by (10), // project off the picked span
Train the network with rule branches for the nested sets ; keep the set with the best validation loss;
Table 1: Datasets. Splits: CV = stratified 10-fold cross-validation (WL, absorption and ledger experiments); 80/10/10 = fixed stratified split (discovery experiments); scaffold = OGB scaffold split; ZINC = the standard 10k/1k/1k split.
| Dataset | task | graphs | classes | splits used |
|---|---|---|---|---|
| MUTAG, PTC | binary classification | 188, 344 | 2 | CV |
| PROTEINS | binary classification | 1113 | 2 | CV, 80/10/10, random/size |
| NCI1 | binary classification | 4110 | 2 | CV, random/size |
| IMDB-BINARY | binary classification | 1000 | 2 | CV, 80/10/10, random/size |
| IMDB-MULTI | 3-class classification | 1500 | 3 | CV |
| COLLAB | 3-class classification | 5000 | 3 | CV, 80/10/10 |
| REDDIT-BINARY | binary classification | 2000 | 2 | 80/10/10 |
| ZINC-12k | regression (MAE) | 12000 | — | standard |
| ogbg-molhiv | binary (ROC-AUC) | 41127 | 2 | scaffold, random |
| ogbg-molbace | binary (ROC-AUC) | 1513 | 2 | scaffold, random |
| ogbg-molbbbp | binary (ROC-AUC) | 2039 | 2 | scaffold, random |
Node level: Cora, CiteSeer, PubMed, Amazon-Photo, Amazon-Computers, Actor, Roman-empire, Amazon-ratings, Minesweeper, Tolokers, Questions; label rates 5% and 50%; 5 seeds.
com/graphdml-uiuc-jlu/geom-gcn and https://github.com/yandex-research/heterophilous-graphs. ZINC, molhiv and COLLAB served for development; five datasets were held out.
Rule libraries. The classical library has eleven rules: graph size, degree histogram, node-type histogram, closed-walk counts, cyclomatic number, triangle counts, cycle counts of length 3–8, ring-atom counts, Laplacian spectral moments, bond-type histogram and a Gaussian-noise placebo. The discovery library adds, for molecules, chordless-ring counts by size (3–12), ring summaries (number of rings, , , rings with more than six atoms), fusion and spiro counts and the 150 most frequent ring compositions; for social graphs, 26 statistics of size, density, degree shape, triangles and clustering, cores and cliques, components, spectrum and assortativity. The classical library is included as distractors. The same discovery library is used for every molecular dataset; the term is one of its ring summaries, among about 300 ring statistics.
Networks. Models are four-layer GIN (Xu et al., 2019) or GINE with all OGB features (Hu et al., 2020b); rules enter as an MLP branch on the logits. GIN updates node states as with a two-layer MLP and batch normalisation. GINE adds a learned embedding of the bond features to each message before the ReLU. On OGB data, the nine atom and three bond features each have their own embedding table, and the embeddings are summed, as in the OGB AtomEncoder and BondEncoder. The representation is the concatenation of the sum-pooled node states of all layers, including the input layer, so . The readout is batch normalisation followed by a two-layer MLP. A rule branch maps the standardised rule columns through a two-layer MLP to the output dimension, and its output is added to the logits. For efficiency, all members of one experiment
Table 2: Hyperparameters. All models use four layers and Adam.
| Experiment | model | hidden | lr | schedule | dropout | epochs | batch |
|---|---|---|---|---|---|---|---|
| WL/absorption/ledger (TU, 10-fold) | GIN, DeepSets | 64 | patience 100 | 0.5 | 350 | – | |
| Classical rules on ZINC/NCI1/PROTEINS | GIN, GINE | 128 | cosine | 0 | 200 | 128 | |
| Discovery, ZINC | GINE | 128 | cosine | 0 | 200 | 128 | |
| Discovery, molhiv | GINE (OGB feat.) | 256 | cosine | 0.5 | 80 | 128 | |
| Discovery, molbace/molbbbp | GINE (OGB feat.) | 256 | cosine | 0.5 | 100 | 32 | |
| Discovery, COLLAB/TU | GIN (degree tags) | 64 | cosine | 0 | 150 | 32 | |
| Random-split absorption, OGB | GINE (OGB feat.) | 256 (128 molhiv) | cosine | 0.5 | 100 (60) | 32 (128) | |
| Random-split absorption, TU | GIN | 64 | cosine | 0 | 150 | 32 |
Table 3: Exact 1-WL ambiguity (%), maximum over six beyond-1-WL rules) and test-accuracy gain of adding those rules (10-fold CV).
| MUTAG | PTC | PROTEINS | NCI1 | IMDB-B | IMDB-M | COLLAB | |
|---|---|---|---|---|---|---|---|
| 13.3 | 3.2 | 46.4 | 33.5 | 0 | 0 | 0 | |
| 0 / 0 | 0 / 0 | 0 / 0 | 0.12 / 0 | 0 / 0 | 0 / 0 | 0 / 0 | |
| gain, DeepSets | +11.3 | +2.0 | +4.6 | +3.1 | +1.6 | -0.5 | +1.9 |
| gain, GIN | -1.6 | -3.8 | +2.4 | +0.8 | -0.3 | +0.3 | +2.1 |
(seeds × rule sets × fold networks) are trained jointly as one batched network. Each member has its own weights and batch-normalisation statistics, all members share mini-batches, and each keeps the outputs of its own best validation epoch. Table 2 lists the hyperparameters.
Probes and . The probe that predicts a rule (or a candidate) from is a two-layer MLP with 64 hidden units, trained with Adam (learning rate , weight decay ) for 300 steps with early stopping on a held-out fifth. It is cross-fitted over two folds, so every prediction is out-of-sample. is averaged over the rule's columns.
Discovery. Out-of-fold residuals come from two seeds × two folds of networks trained on half of the training graphs. For every training graph, the residual uses the average prediction of the two networks that did not see it, and the representation comes from the first of them. Candidate columns are signed-log transformed, standardised on training graphs and clipped to . Ring patterns enter the pool if they occur in at least 20 training graphs (at most 150 patterns), and chordless rings are enumerated up to length 12. Blocks are every single column plus every family. The families are: each classical rule, ring sizes, ring summary, ring fusion, ring atom patterns, ring bond patterns, size, degree shape, triangles and clustering, cores and cliques, components and spectrum. We use residual permutations per round and three rounds. Rule sets are retrained on the full training set with the same seeds as the plain network, and the set with the lowest mean validation loss is reported. Controls are the expert rule, a size-matched random set of non-picked candidate columns, and the whole pool.
Statistics. Every comparison is paired by seed. Intervals are 95% percentile bootstrap intervals of the mean paired difference (4000 resamples). Classification log-losses are per graph in nats. OGB atom types are atomic number minus one, so in ring patterns 5 is C, 6 is N and 7 is O; bond types are 0 single, 1 double, 2 triple and 3 aromatic.
6 Results
6.1 Expressible knowledge is absorbed
Computing exactly on every graph of seven TU benchmarks (Table 3, Figure 2), up to 46% of graphs are ambiguous before message passing (PROTEINS), at most 0.12% after one round (NCI1) and none after two. By Theorem 1, six beyond-1-WL rules are worth zero to a GIN of depth two; their gain to a graph-blind DeepSets model (up to +11.3 points) largely vanishes under GIN. GNNs absorb a median 99% of a belief-propagation layer's value on eleven node-classification graphs, and where GIN still gains, an MLP readout repays 80–83% of it (COLLAB, NCI1), as the ledger predicts.

Figure 2: Exact 1-WL ambiguity of beyond-1-WL rules, maximum over six rules (Table 3). One round of colour refinement removes the ambiguity almost entirely, and two rounds remove it completely.
Table 4: Gain ledger for 1-WL-computable rules on GIN (10-fold CV, test log-loss gain in nats, 95% CI). The readout and coordinate parts are the reductions in rule gain when the linear readout is replaced by an MLP readout and when log-size coordinates are added.
| Dataset | observed gain | readout part | coordinate part | residual |
|---|---|---|---|---|
| COLLAB | +0.052 [+0.038, +0.067] | +0.042 | -0.003 | +0.013 [+0.003, +0.023] |
| NCI1 | +0.026 [+0.011, +0.041] | +0.022 | -0.007 | +0.011 [-0.021, +0.043] |
| PROTEINS | +0.026 [+0.007, +0.044] | +0.007 | -0.019 | +0.038 [-0.001, +0.076] |
6.2 The gain ledger on graph-level benchmarks
For 1-WL-computable rules on GIN, the ledger of Theorem 2 splits the observed gain into the part repaid by an MLP readout, the part repaid by log-size coordinates and a residual (Table 4, Figure 3). Most of the gain on COLLAB and NCI1 is debt that a better readout also repays (Table 5). For beyond-1-WL rules, the ledger gives an observed gain of +0.020 nats on COLLAB, with a residual of +0.012 [+0.003, +0.021] after the readout and coordinate parts. On PROTEINS the observed gain is +0.023, with a residual of +0.032 [-0.002, +0.066]. On every other dataset the observed gain is not significant. The shuffled-rule placebo is significantly negative on COLLAB (-0.052), IMDB-B (-0.047) and IMDB-M (-0.031) and never significantly positive, because an extra branch that carries no information can only overfit.
6.3 Learnability, not expressivity, decides
On ZINC (Figure 4a, Table 6) bond-type counts are invisible to GIN, yet it decodes them from atoms () and they are worth nothing. Ring counts are the least learned rules () and the only ones that pay, cutting MAE by 27% (GIN) and 32% (GINE). Triangles are unlearned () but worthless: large H() is necessary, not sufficient. On NCI1 and PROTEINS (GIN, same protocol), the largest single-rule gains in test log-loss are +0.021 (cyclomatic number on NCI1, ) and +0.037 (type histogram on PROTEINS, ). Both are learnable rules that repay debt in the sense of Theorem 2. The Fano bound of Proposition 1 held for all 14 rules for which it is defined, at 0.26–32 nats.
6.4 Discovery recovers the hidden term of the target
ZINC's penalised logP subtracts the ring penalty from Crippen logP (Gómez-Bombarelli et al., 2018; Jin et al., 2018); atom-additive logP is easy for message passing, the longest-cycle term is not. Among 300 ring statistics plus the classical library, the first pick is exactly for GIN and GINE in three independent runs (, the minimum for ). The method selects this term from the library; what the result shows is that, among hundreds of plausible ring statistics and distractors, the out-of-fold residual singles out the one term of the target that message passing leaves unlearned. The validation-selected set reaches MAE 0.1196 against 0.1306 for expert cycle counts (+0.011 [0.009, 0.012]). On molivit it adds +0.021 [+0.010, +0.031] ROC-AUC (Tables 7 and 8).

Figure 3: Gain ledger of 1-WL-computable rules on GIN (Table 4). The observed gain decomposes into the part repaid by an MLP readout, the part repaid by log-size coordinates, and the residual. Error bars are the 95% intervals of the observed gain and the residual.
Table 5: Plain GIN with three readouts (10-fold CV): test log-loss (nats) and accuracy. The MLP readout repays most of the debt that rules otherwise repay (Table 4).
| Dataset | log-loss | accuracy | ||||
|---|---|---|---|---|---|---|
| linear | MLP | log-MLP | linear | MLP | log-MLP | |
| COLLAB | 0.518 | 0.468 | 0.470 | 0.751 | 0.790 | 0.792 |
| NCI1 | 0.484 | 0.479 | 0.474 | 0.783 | 0.788 | 0.783 |
| PROTEINS | 0.574 | 0.550 | 0.575 | 0.735 | 0.731 | 0.704 |
| IMDB-B | 0.516 | 0.533 | 0.529 | 0.726 | 0.724 | 0.721 |
On ZINC the first pick dominates every later pick by a factor of about five, and it lies far above the 95th percentile of its 1000-permutation null (Figure 5). Earlier discovery runs on ZINC confirm the result. The first discovery run used single columns, in-sample residuals and picks chosen by validation. On GIN it reached MAE 0.1829 (plain 0.2673, cycles 0.1951, whole pool 0.1653, random 8 columns 0.2057). On GINE it reached 0.1186 (plain 0.1938, cycles 0.1333, whole pool 0.1277, random 0.1118). The fresh-seed certification run reached 0.1779 on GIN (plain 0.2722, cycles 0.1965, whole pool 0.1659) and 0.1173 on GINE (plain 0.1885, cycles 0.1322, whole pool 0.1269, random 0.1147). Discovery beat the expert cycle counts in all four cases, by between 0.012 and 0.019 MAE with intervals above zero. Earlier molhiv runs fed the network only atom and bond type and are superseded by the full-feature protocol of Table 7.
6.5 Held-out datasets
On five held-out datasets (10 seeds; Figure 4b, Tables 7 and 9), the discovered set is never significantly worse than the plain network or the expert rule. On molbbbp it significantly beats both (+0.035 [+0.025, +0.045] and +0.016 [+0.002, +0.030] ROC-AUC). On the other four, point estimates lie in [-0.012, -0.002] with every interval covering zero. The molbace interval against the expert rule only just covers zero (upper limit +0.0003).
6.6 Out-of-fold versus in-sample evidence
For the first pick, (scaled-) out-of-fold vs. in-sample was -9.1 vs. -3.9 on molhiv. On the held-out datasets it was -3.3 vs. -2.1 (molbbbp), -12.3 vs. -4.0 (REDDIT-B), -1.2 vs. -0.9 (IMDB-B), -4.1 vs. -4.6 (molbace) and -2.6 vs. -2.9 (PROTEINS). The networks trained on half the data are weaker than those trained on all of it (ZINC MAE 0.279 vs. 0.191, molhiv ROC-AUC 0.737 vs. 0.759, COLLAB accuracy 0.758 vs. 0.800), which is the statistical debt of Remark 1.
This weakness affects which rules are nominated, not the gains we report. Every gain in Tables 7–9 is measured on networks retrained on the full training set with the rule branch added, against the full-data plain network with the same seeds. A rule that only the half-data network fails to learn, and that a fully trained network absorbs, would therefore show no gain in these tables. On ZINC the ring term alone () still cuts the full-data MAE from 0.1911 to 0.1181, so

Figure 4: (a) ZINC: a rule's gain tracks its unlearned share 1 – , not 1-WL expressivity. (b) Discovered (blue) and expert (orange) rules vs. the plain network, 95% intervals; rows below the dashed line were held out.
Table 6: Classical rules added to GIN and GINE on ZINC (3 seeds). Gain: reduction in test MAE (plain GIN 0.2742, GINE 0.1918) with 95% interval. : share of the rule decoded from the plain network's representation. Probe pick: the two rules with the largest residual score, chosen before any rule model was trained.
| Rule | GIN | GINE | ||
|---|---|---|---|---|
| gain [95% CI] | gain [95% CI] | |||
| cycles (3–8) | 0.49 | +0.0751 [+0.0643, +0.0900] | 0.59 | +0.0617 [+0.0565, +0.0667] |
| triangles | 0.40 | +0.0019 [−0.0206, +0.0168] | 0.64 | −0.0008 [−0.0085, +0.0052] |
| spectrum | 0.85 | −0.0070 [−0.0286, +0.0083] | 0.86 | +0.0032 [−0.0044, +0.0114] |
| bond histogram | 0.86 | +0.0054 [−0.0069, +0.0226] | 0.98 | −0.0014 [−0.0041, +0.0039] |
| ring atoms | 0.94 | −0.0034 [−0.0196, +0.0055] | 0.95 | −0.0063 [−0.0165, −0.0010] |
| degree histogram | 0.98 | +0.0004 [−0.0179, +0.0163] | 0.98 | −0.0093 [−0.0106, −0.0070] |
| cyclomatic number | 0.98 | +0.0068 [−0.0094, +0.0198] | 0.98 | +0.0068 [−0.0022, +0.0167] |
| type histogram | 0.99 | −0.0046 [−0.0123, +0.0086] | 0.99 | +0.0040 [−0.0012, +0.0092] |
| closed walks | 0.99 | +0.0067 [−0.0094, +0.0163] | 0.99 | +0.0011 [−0.0044, +0.0041] |
| size | 0.99 | −0.0032 [−0.0150, +0.0050] | 0.99 | +0.0042 [−0.0010, +0.0071] |
| noise (placebo) | – | −0.0003 [−0.0018, +0.0027] | – | −0.0018 [−0.0083, +0.0103] |
| probe pick (top 2) | +0.0755 [+0.0627, +0.0820] | +0.0608 [+0.0536, +0.0648] | ||
| all rules | +0.0745 [+0.0614, +0.0872] | +0.0523 [+0.0500, +0.0553] | ||
it is information that the fully trained network also leaves unlearned. Where a nominated block is worth little at full data (REDDIT-B: , no gain), validation loss and the paired comparison expose it, which is why significance nominates and validation decides.
6.7 In-distribution and shifted splits
Under train-small/test-large splits, the plain networks are badly overconfident on large graphs: their test log-loss is 2.85 nats (NCI1) and 4.64 nats (PROTEINS), against 0.46 and 0.50 under random splits. Rule gains under size shift therefore mix information and calibration effects, which is why we report them without interpretation (Table 10). Under random splits every classical rule set lies within nats of its noise-input twin (Figure 6).


Figure 5: (a) Greedy residual scores of the first discovery run (log scale). On ZINC the first pick, the ring term of the target, dominates every later pick by a factor of about five. (b) Fresh-seed run: the first pick against the 95th percentile of its 1000-permutation null.
Table 7: Out-of-fold discovery with the frozen method. Expert: cycle counts (molecules, PROTEINS) or graph size (social graphs). Gains are paired by seed with 95% bootstrap intervals; for MAE a positive gain means lower error. First block: the first pick and its Westfall–Young .
| Dataset (metric) | seeds | plain | expert | discovered | gain vs. plain | gain vs. expert | first block () |
|---|---|---|---|---|---|---|---|
| development | |||||||
| ZINC (MAE↓) | 3 | 0.1911 | 0.1306 | 0.1196 | +0.072 [.065, .077] | +0.011 [.009, .012] | ring term (.001) |
| molhiv (AUC) | 8 | 0.7588 | 0.7871 | 0.7796 | +0.021 [.010, .031] | -0.008 [-.023, .010] | 12-ring, arom. (.001) |
| COLLAB (acc) | 5 | 0.7996 | 0.8072 | 0.8064 | +0.007 [.000, .016] | -0.001 [-.008, .006] | clustering (.001) |
| held out, frozen method | |||||||
| molbbbp (AUC) | 10 | 0.6421 | 0.6610 | 0.6768 | +0.035 [.025, .045] | +0.016 [.002, .030] | CO 6-ring (.046) |
| molbace (AUC) | 10 | 0.8084 | 0.8074 | 0.7959 | -0.012 [-.029, .008] | -0.011 [-.024, .000] | walks (.006) |
| PROTEINS (acc) | 10 | 0.7786 | 0.7696 | 0.7759 | -0.003 [-.015, .008] | +0.006 [-.005, .017] | assortativity (.105) |
| IMDB-B (acc) | 10 | 0.7590 | 0.7560 | 0.7520 | -0.007 [-.023, .010] | -0.004 [-.017, .008] | type hist. (.995) |
| REDDIT-B (acc) | 10 | 0.9175 | 0.9170 | 0.9155 | -0.002 [-.014, .012] | -0.002 [-.015, .011] | mean degree (.001) |
7 Scope
Large gains concentrate where a structural term is unlearned (ring-dependent molecular targets); on social and protein graphs trained GINs leave little usable debt. Selection buys parsimony more than accuracy: the whole candidate pool sometimes matches the selected set (molbbbp +0.047 vs. +0.035) but can also hurt (molhiv -0.039). Significance nominates but does not measure size (REDDIT-B: , no gain; Remark 1). Under scaffold or size shift classical rules gain more on four of six datasets, but no in-distribution quantity predicted the shifted value. The Fano certificate is valid but loose (0.26–32 nats); the usable-information bound (Xu et al., 2020) is a tighter alternative. A discovered rule is a residual correlate of one trained network, not a causal mechanism; named chemotypes are hypotheses for domain experts.
8 Conclusion
A rule is worth what a GNN fails to learn, , of which expressivity controls only the first term. Out-of-fold residuals turn this identity into a calibrated search over named candidate rules, which recovered the hidden ring term of ZINC's target and transferred, frozen, to unseen datasets without significant loss and with a significant gain on BBBP.
References
Cristian Bodnar, Fabrizio Frasca, Nina Otter, Yuguang Wang, Pietro Liò, Guido F. Montúfar, and Michael Bronstein. Weisfeiler and Lehman go cellular: CW networks. In Advances in Neural Information Processing Systems, volume 34,
Table 8: Development datasets with the frozen out-of-fold method: every configuration, paired gain over the plain network with 95% interval (MAE: positive = lower error). Bold: validation-selected. Blocks in order of discovery. ZINC: max(0, ); 10-ring count; closed walks. molhiv: 12-ring with seven aromatic bonds; 7-ring with two aromatic bonds; type histogram. COLLAB: triangles/clustering family; 90th percentile of degree.
| Config | ZINC (MAE, 3 seeds) | molhiv (AUC, 8 seeds) | COLLAB (acc, 5 seeds) | |||
|---|---|---|---|---|---|---|
| score | gain | score | gain | score | gain | |
| plain | 0.1911 | - | 0.7588 | - | 0.7996 | - |
| expert rule | 0.1306 | +0.061 [.056, .065] | 0.7871 | +0.028 [.013, .042] | 0.8072 | +0.008 [.001, .014] |
| blk₁ | 0.1181 | +0.073 [.066, .079] | 0.7741 | +0.015 [.007, .025] | 0.8064 | +0.007 [.000, .016] |
| blk₂ | 0.1196 | +0.072 [.065, .077] | 0.7796 | +0.021 [.010, .031] | 0.8092 | +0.010 [.002, .024] |
| blk₃ | 0.1215 | +0.070 [.066, .076] | 0.7783 | +0.020 [.005, .033] | 0.8052 | +0.006 [−.003, .015] |
| random (size-matched) | 0.1814 | +0.010 [.005, .013] | 0.7742 | +0.015 [.008, .023] | 0.7968 | -0.003 [−.016, .014] |
| whole pool | 0.1301 | +0.061 [.054, .070] | 0.7202 | -0.039 [−.046, -.031] | 0.8168 | +0.017 [.010, .026] |
Table 9: Held-out datasets (frozen method, 10 seeds): every configuration, paired gain over the plain network with 95% interval. Bold: validation-selected.
| Config | molbace (AUC) | molbbbp (AUC) | PROTEINS (acc) | IMDB-B (acc) | REDDIT-B (acc) |
|---|---|---|---|---|---|
| plain | 0.8084 | 0.6421 | 0.7786 | 0.7590 | 0.9175 |
| expert rule | -0.001 [−.019, .018] | +0.019 [.011, .027] | -0.009 [−.023, .005] | -0.003 [−.016, .009] | -0.001 [−.011, .011] |
| blk₁ | -0.017 [−.039, .002] | +0.019 [.010, .031] | -0.003 [−.015, .008] | -0.019 [−.034, -.005] | +0.008 [−.006, .022] |
| blk₂ | -0.007 [−.027, .014] | +0.032 [.016, .046] | -0.013 [−.030, .001] | -0.022 [−.041, -.002] | -0.002 [−.014, .012] |
| blk₃ | -0.012 [−.029, .008] | +0.035 [.025, .044] | -0.003 [−.016, .011] | -0.007 [−.023, .010] | -0.006 [−.017, .006] |
| random (size-matched) | -0.024 [−.047, .001] | +0.022 [.011, .033] | -0.001 [−.015, .013] | +0.001 [−.012, .015] | +0.002 [−.009, .013] |
| whole pool | -0.005 [−.026, .015] | +0.047 [.037, .058] | +0.004 [−.006, .016] | +0.015 [.002, .027] | -0.003 [−.013, .008] |
pages 2625–2640, 2021. doi: 10.48550/arXiv.2106.12575.
Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, and Michael M. Bronstein. Improving graph neural network expressivity via subgraph isomorphism counting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(1):657–668, 2023. doi: 10.1109/TPAMI.2022.3154319.
G. E. P. Box. Some theorems on quadratic forms applied in the study of analysis of variance problems, I. effect of inequality of variance in the one-way classification. The Annals of Mathematical Statistics, 25(2):290–302, 1954. doi: 10.1214/aoms/1177728786.
Zhengdao Chen, Lei Chen, Soledad Villar, and Joan Bruna. Can graph neural networks count substructures? In Advances in Neural Information Processing Systems, volume 33, pages 10383–10395, 2020. doi: 10.48550/arXiv.2002.04025.
Victor Chernozhukov, Denis Chetverikov, Mert Demirer, Esther Duflo, Christian Hansen, Whitney Newey, and James Robins. Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21(1):C1–C68, 2018. doi: 10.1111/ectj.12097.
Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. John Wiley & Sons, Hoboken, NJ, 2nd edition, 2006. doi: 10.1002/047174882X.
Vijay Prakash Dwivedi, Chaitanya K. Joshi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio, and Xavier Bresson. Benchmarking graph neural networks. Journal of Machine Learning Research, 24(43):1–48, 2023. doi: 10.48550/arXiv.2003.00982.
Chuqin Geng, Ziyu Zhao, Zhaoyue Wang, Haolin Ye, Yuhe Jiang, and Xujie Si. LogicXGNN: Grounded logical rules for explaining graph neural networks, 2025. arXiv:2503.19476; first version titled “Extracting Interpretable Logic Rules from Graph Neural Networks”.
Rafael Gómez-Bombarelli, Jennifer N. Wei, David Duvenaud, José Miguel Hernández-Lobato, Benjamín Sánchez-Lengeling, Dennis Sheberla, Jorge Aguilera-Iparraguirre, Timothy D. Hirzel, Ryan P. Adams, and Alán Aspuru-Guzik. Automatic chemical design using a data-driven continuous representation of molecules. ACS Central Science, 4(2): 268–276, 2018. doi: 10.1021/acscentsci.7b00572.
Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. In Advances in Neural Information Processing Systems, volume 33, pages 22118–22133, 2020a. doi: 10.48550/arXiv.2005.00687.
Table 10: Mean test log-loss gain of the classical rules over the noise-input twin (3 seeds), random split vs. shifted split (scaffold for molecules, train-small/test-large for TU). Plain: ROC-AUC (molecules) or accuracy (TU) of the plain network.
| Dataset | plain (random) | plain (shifted) | mean rule gain, random | mean rule gain, shifted |
|---|---|---|---|---|
| ogbg-molhiv | 0.828 | 0.756 | +0.0021 | +0.0016 |
| ogbg-molbace | 0.862 | 0.810 | -0.0195 | +0.0627 |
| ogbg-molbbbp | 0.954 | 0.664 | -0.0062 | +0.0105 |
| NCI1 | 0.813 | 0.564 | +0.0063 | +0.2112 |
| PROTEINS | 0.771 | 0.593 | -0.0157 | +0.1702 |
| IMDB-B | 0.716 | 0.744 | -0.0062 | -1.2528 |

Figure 6: Mean test log-loss gain of the classical rules over the noise-input twin under random splits. Every dataset lies within ±0.02 nats (shaded band).
Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Strategies for pre-training graph neural networks. In International Conference on Learning Representations, 2020b. doi: 10.48550/arXiv.1905.12265.
Qian Huang, Horace He, Abhay Singh, Ser-Nam Lim, and Austin R. Benson. Combining label propagation and simple models out-performs graph neural networks. In International Conference on Learning Representations, 2021. doi: 10.48550/arXiv.2010.13993.
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2323–2332. PMLR, 2018. doi: 10.48550/arXiv.1802.04364.
Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman go neural: Higher-order graph neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 4602–4609, 2019. doi: 10.1609/aaai.v33i01.33014602.
Christopher Morris, Nils M. Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Marion Neumann. TUDataset: A collection of benchmark datasets for learning with graphs. In ICML 2020 Workshop on Graph Representation Learning and Beyond (GRL+), 2020. doi: 10.48550/arXiv.2007.08663.
Matthew Morris, David J. Tena Cucala, Bernardo Cuenca Grau, and Ian Horrocks. Relational graph convolutional networks do not learn sound rules. In Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning (KR 2024), pages 897–908. IJCAI Organization, 2024. doi: 10.24963/kr.2024/84.
Yagyensh C. Pati, Ramin Rezaifar, and Perinkulam S. Krishnaprasad. Orthogonal matching pursuit: Recursive function approximation with applications to wavelet decomposition. In Proceedings of 27th Asilomar Conference on Signals, Systems and Computers, pages 40–44, 1993. doi: 10.1109/ACSSC.1993.342465.
Meng Qu and Jian Tang. Probabilistic logic neural networks for reasoning. In Advances in Neural Information Processing Systems, volume 32, 2019. doi: 10.48550/arXiv.1906.08495.
Meng Qu, Yoshua Bengio, and Jian Tang. GMNN: Graph Markov neural networks. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 5241–5250. PMLR, 2019. doi: 10.48550/arXiv.1905.06214.
F. E. Satterthwaite. An approximate distribution of estimates of variance components. Biometrics Bulletin, 2(6): 110–114, 1946. doi: 10.2307/3002019.
Peter H. Westfall and S. Stanley Young. Resampling-Based Multiple Testing: Examples and Methods for p-Value Adjustment. Wiley Series in Probability and Mathematical Statistics. Wiley, New York, 1993. ISBN 0-471-55761-7.
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. doi: 10.48550/arXiv.1810.00826.
Yilun Xu, Shengjia Zhao, Jiaming Song, Russell Stewart, and Stefano Ermon. A theory of usable information under computational constraints. In International Conference on Learning Representations, 2020. doi: 10.48550/arXiv.2002.10689.
Yuyu Zhang, Xinshi Chen, Yuan Yang, Arun Ramamurthy, Bo Li, Yuan Qi, and Le Song. Efficient probabilistic logic reasoning with graph neural networks. In International Conference on Learning Representations, 2020. doi: 10.48550/arXiv.2001.11850.