NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Algorithmic Concept-Based Explainable Reasoning

Dobrik Georgiev, Pietro Barbiero, Dmitry Kazhdan, Petar Velickovic, Pietro Lió

Abstract

Graph Neural Networks (GNNs) have demonstrated remarkable success in "neural execution"—the ability to learn and emulate classical algorithms. However, their "black-box" nature limits their deployment in safety-critical domains. This paper introduces Concept Bottleneck Graph Neural Networks (CBGNNs), a framework that enhances GNN interpretability by requiring the model to reason through human-understandable intermediate concepts. By extracting symbolic logic rules from these bottlenecks, we achieve transparent reasoning without compromising the model's strong generalization capabilities. Our results across Breadth-First Search (BFS), Parallel Coloring, and Kruskal’s algorithm show that CBGNNs maintain high accuracy while providing clear, rule-based explanations.

Introduction

While GNNs are adept at learning graph-based algorithms, they typically lack transparency. Previous explainability methods, such as saliency maps, highlight important features but fail to reveal the underlying logical rules the model has internalized. This is a significant hurdle for applications in healthcare or engineering where understanding the how is as important as the what. This work bridges the gap between deep learning performance and symbolic transparency by introducing a concept-based reasoning layer.

Methodology

The CBGNN architecture follows an encode-process-decode blueprint, modified with a "Concept Bottleneck":

  1. Concept Bottleneck Layer: Instead of directly mapping latent embeddings to outputs, the model predicts a set of predefined, human-interpretable concepts. For instance, in BFS, concepts include whether a node has been visited or has a visited neighbor.
  2. Logic Extraction: Using the pytorch_explain library, the authors analyze decoder weights to extract Disjunctive Normal Form (DNF) logic formulas. This transforms neural weights into readable rules, such as: "A node is visited if it was not previously visited AND it has a visited neighbor."
  3. Interpretable Termination: To determine when an algorithm should stop, the framework employs an adapted PrediNet architecture. This learns global termination rules based on the same intermediate concepts, ensuring the entire execution process is interpretable.
CBGNN reasoning process for BFS, Parallel Coloring, and Kruskal's algorithm, showing how intermediate concepts lead to final outputs.

Experimental Setup

The framework was evaluated on three fundamental algorithmic tasks using synthetic graphs:

  • Breadth-First Search (BFS): Fundamental graph traversal.
  • Parallel Graph Coloring: A heuristic for node coloring.
  • Kruskal’s Algorithm: Finding the Minimum Spanning Tree (MST).

Models were typically trained on small graphs (8 to 20 nodes) and tested on graphs up to 100 nodes to evaluate strong generalization.

Results and Key Insights

The experimental results demonstrate that interpretability does not come at the cost of performance.

  • High Concept Accuracy: CBGNNs achieved over 99% accuracy in predicting concepts for BFS and Parallel Coloring. Concept accuracy stabilizes quickly during training, as evidenced by the high mean and last-step accuracy metrics.
  • Strong Generalization: The extracted symbolic rules remained valid when scaled to graphs 5x larger than those seen during training. This suggests that the model learns fundamental algorithmic logic rather than overfitting to specific graph topologies.
  • Formula Fidelity: For Parallel Coloring, the extracted logic formulas matched the neural network's original predictions within a 5-6% margin, confirming that the formulas accurately represent the model's internal logic.
Mean and last-step accuracy for various concepts during the training of a Parallel Coloring CBGNN.

Conclusion and Future Work

CBGNNs prove that interpretability can be integrated into neural execution frameworks "for free," often matching or exceeding the performance of black-box GNNs. By aligning high-dimensional embeddings with human logic, these models provide a path toward trustworthy AI in graph-based reasoning.

Future research will address current limitations, such as the difficulty in handling continuous arithmetic (e.g., Dijkstra’s algorithm) and the reliance on human-defined concepts. Exploring unsupervised concept discovery could further automate the creation of transparent, rule-based neural models.

Summary updated

BibTeX
@inproceedings{georgiev2022algorithmic,
  author = {Dobrik Georgiev and Pietro Barbiero and Dmitry Kazhdan and Petar Velickovic and Pietro Lió},
  title = {{Algorithmic Concept-Based Explainable Reasoning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i6.20623},
}
Figure