Abstract
Graph neural networks (GNNs) are the predominant approach for graph-based machine learning. While neural networks have shown great performance at learning useful representations, they are often criticized for their limited high-level reasoning abilities. In this work, we present Graph Reasoning Networks (GRNs), a novel approach to combine the strengths of fixed and learned graph representations and a reasoning module based on a differentiable satisfiability solver. While results on real-world datasets show comparable performance to GNN, experiments on synthetic datasets demonstrate the potential of the newly proposed method.
Introduction
While Graph Neural Networks (GNNs) have revolutionized how we process graph-structured data, they face a well-known "reasoning gap." GNNs excel at learning continuous embeddings but struggle with discrete, high-level logical reasoning—such as determining if a specific complex subgraph exists or counting motifs. Furthermore, standard GNNs are often "black boxes," making interpretation difficult. A major hurdle in addressing this has been the "differentiability problem": traditional logical reasoning engines are discrete and non-differentiable. Graph Reasoning Networks (GRNs) bridge this gap by creating an end-to-end trainable architecture that marries neural encoding with symbolic logic.
Methods
The proposed Graph Reasoning Network (GRN) consists of two main submodules: an Encoder and a Reasoner.
The Encoder maps a graph into a $d$-dimensional feature vector using three variations:
- Fixed (GRN$_{ASC}$): Uses a canonicalized adjacency string for a stable, permutation-invariant representation of topology.
- Learned (GRN$_{GNN}$): Uses a standard GNN (like a GCN or GAT) to learn the representation.
- Hybrid (GRN$_{ASC+GNN}$): Concatenates both fixed topological features and learned neural features.
The Reasoner utilizes SatNet, a differentiable MAX-SAT solver. Instead of outputting a simple probability distribution, the reasoner learns a set of logical rules (clauses) and attempts to find the binary assignment that maximally satisfies those rules for a given input. Because SatNet is differentiable, the entire system can be trained via backpropagation, allowing the encoder to learn representations that specifically assist the logic solver in finding the correct rules.
Experimental Setup
The authors evaluated GRNs on two types of benchmarks:
- Synthetic Datasets: Random graphs (Erdos-Renyi and 3-Regular) designed for specific topological tasks: detecting connectivity and counting motifs (triangles, squares, and 5-edge/4-node motifs).
- Real-World Datasets: Standard graph classification benchmarks including NCI1 (chemical compounds), PROTEINS (bioinformatics), and IMDB-BIN (social networks). These were tested both with and without original node features to isolate the impact of pure topology.
Key Results and Insights
- GNNs are "Motif-Blind": Standard GNNs essentially fail at motif counting tasks on synthetic data, often performing only slightly better than random guessing. GRNs, by contrast, achieve near-perfect accuracy (1.00 for square counting vs. 0.59 for GNNs) because they can learn explicit logical rules.
- The Power of Fixed Topology: On real-world datasets like PROTEINS (without node features), the simplest version of the model (GRN$_{ASC}$) achieved an accuracy of 0.67, significantly higher than the GNN's 0.60. This suggests that for some problems, the graph's raw shape is more informative than features learned through message-passing.
- Neuro-Symbolic Synergy: GRNs demonstrate that we don't have to choose between "black-box" neural nets and "rigid" symbolic logic. By making the logic solver differentiable, the model gains the interpretability and reasoning power of logic without losing adaptive learning capabilities.
Limitations and Future Work
The primary limitation is scalability. The use of an adjacency string ($O(n^2)$) restricts the current approach to small or medium-sized graphs (typically fewer than 20 nodes). Additionally, joint training can be unstable, often requiring different learning rates for the GNN and SatNet components. Future work involves exploring more efficient graph representations—such as those based on the Weisfeiler-Leman (WL) isomorphism test—and developing more robust training schedules to stabilize the interaction between neural and logical components.
Summary updated