Skip to main content
QUICK REVIEW

[Paper Review] Evaluating Logical Generalization in Graph Neural Networks

Koustuv Sinha, Shagun Sodhani|arXiv (Cornell University)|Mar 14, 2020
Advanced Graph Neural NetworksComputer Science57 references15 citations
TL;DR

This paper introduces GraphLog, a benchmark for evaluating logical generalization in Graph Neural Networks (GNNs) using synthetic knowledge graphs grounded in first-order logic. It evaluates GNNs across supervised, multi-task, and continual learning setups, finding that attention mechanisms and modular architecture design significantly improve generalization, while catastrophic forgetting remains a key challenge in continual learning.

ABSTRACT

Recent research has highlighted the role of relational inductive biases in building learning agents that can generalize and reason in a compositional manner. However, while relational learning algorithms such as graph neural networks (GNNs) show promise, we do not understand how effectively these approaches can adapt to new tasks. In this work, we study the task of logical generalization using GNNs by designing a benchmark suite grounded in first-order logic. Our benchmark suite, GraphLog, requires that learning algorithms perform rule induction in different synthetic logics, represented as knowledge graphs. GraphLog consists of relation prediction tasks on 57 distinct logical domains. We use GraphLog to evaluate GNNs in three different setups: single-task supervised learning, multi-task pretraining, and continual learning. Unlike previous benchmarks, our approach allows us to precisely control the logical relationship between the different tasks. We find that the ability for models to generalize and adapt is strongly determined by the diversity of the logical rules they encounter during training, and our results highlight new challenges for the design of GNN models. We publicly release the dataset and code used to generate and interact with the dataset at https://www.cs.mcgill.ca/~ksinha4/graphlog.

Motivation & Objective

  • To investigate how well Graph Neural Networks (GNNs) can generalize logically across diverse relational tasks.
  • To design a controlled benchmark that enables precise analysis of task similarity and compositional generalization in GNNs.
  • To evaluate the impact of architectural choices—such as attention and modularity—on logical generalization performance.
  • To assess the limitations of GNNs in multi-task and continual learning scenarios, particularly regarding catastrophic forgetting.
  • To provide a publicly available dataset and codebase for future research on logical reasoning in GNNs.

Proposed method

  • The benchmark, GraphLog, generates synthetic knowledge graphs based on sets of first-order logic rules, defining distinct 'logical worlds' with overlapping rule sets.
  • Each world generates multiple knowledge graphs with missing facts, forming relation prediction tasks requiring logical composition for solution.
  • Models are evaluated in three setups: single-task supervised learning, multi-task pretraining across diverse worlds, and continual learning with sequential world exposure.
  • Architectural components include GAT with edge attention (GAT-EGAT) and modular designs with parametric representation functions for relations.
  • Task similarity is controlled by adjusting the overlap in logical rules between different worlds, enabling systematic analysis of transfer and generalization.
  • Performance is measured via mean accuracy on unseen rule combinations, with ablation studies on shared components (representation vs. composition functions).

Experimental results

Research questions

  • RQ1How do GNNs perform in generalizing logical rules across unseen combinations of known rules in a supervised setting?
  • RQ2To what extent does training on a diverse set of logical worlds improve multi-task generalization and adaptation performance?
  • RQ3How do architectural choices such as attention mechanisms and modular design affect logical generalization in GNNs?
  • RQ4What are the limitations of GNNs in continual learning, particularly regarding catastrophic forgetting across distinct logical domains?
  • RQ5Can sharing specific components (representation or composition functions) mitigate forgetting in continual learning scenarios?

Key findings

  • GAT-EGAT with edge attention and a parametric representation function for relations consistently outperforms other GNN architectures in logical generalization tasks.
  • Training on a diverse set of 20 logical worlds leads to better generalization than training on fewer or more worlds, with performance peaking before declining due to capacity saturation.
  • All evaluated models exhibit catastrophic forgetting in continual learning, with rapid performance degradation on previously seen worlds as new ones are introduced.
  • Sharing the representation function across worlds reduces catastrophic forgetting, while sharing the composition function does not, indicating that representations are more transferable than compositional functions.
  • In multi-task pretraining, models adapt better to new, dissimilar worlds when pre-trained on a diverse distribution, suggesting that diversity enhances transferability.
  • Zero-shot adaptation performance decreases with lower similarity between training and evaluation worlds, but fine-tuning performance increases as similarity decreases, indicating that diversity improves adaptation capacity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.