Papers › Systematic Reasoning About Relational Domains With Graph Neural Networks

Systematic Reasoning About Relational Domains With Graph Neural Networks

24 Jul 2024arXiv:2407.17396archive 2025-07-28

Irtaza Khalid, Steven Schockaert

Developing models that can learn to reason is a notoriously challenging problem. We focus on reasoning in relational domains, where the use of Graph Neural Networks (GNNs) seems like a natural choice. However, previous work on reasoning with GNNs has shown that such models tend to fail when presented with test examples that require longer inference chains than those seen during training. This suggests that GNNs lack the ability to generalize from training examples in a systematic way, which would fundamentally limit their reasoning abilities. A common solution is to instead rely on neuro-symbolic methods, which are capable of reasoning in a systematic way by design. Unfortunately, the scalability of such methods is often limited and they tend to rely on overly strong assumptions, e.g.\ that queries can be answered by inspecting a single relational path. In this paper, we revisit the idea of reasoning with GNNs, showing that systematic generalization is possible as long as the right inductive bias is provided. In particular, we argue that node embeddings should be treated as epistemic states and that GNN should be parameterised accordingly. We propose a simple GNN architecture which is based on this view and show that it is capable of achieving state-of-the-art results. We furthermore introduce a benchmark which requires models to aggregate evidence from multiple relational paths. We show that existing neuro-symbolic approaches fail on this benchmark, whereas our considered GNN model learns to reason accurately.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.17396")

Code

Syntology Ran 9 of 10 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 9 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

erg0dic/gnn-sg officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 9 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

9ran
1unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from erg0dic/gnn-sg. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_prob_constraints_row_col erg0dic/gnn-sg/src/utils.py official repository ran fingerprinted MIT (permissive) · b499d63f3e151bcc · report
compute_algebraic_closure_for_paths erg0dic/gnn-sg/src/comp_dataset_generator.py official repository ran MIT (permissive) · 1f4eed9bd5dab8be · report
compute_sim erg0dic/gnn-sg/src/model_nbf_general.py official repository ran MIT (permissive) · 450e7e3a9b1078da · report
entropy erg0dic/gnn-sg/src/model_nbf_general.py official repository ran MIT (permissive) · 8941c24e039224c5 · report
get_acc erg0dic/gnn-sg/src/utils.py official repository ran fingerprinted MIT (permissive) · 47018080816b2451 · report
get_negative_relations erg0dic/gnn-sg/src/model_nbf_fb.py official repository ran MIT (permissive) · cd8dbbb1d4fa1f4b · report
kl_div erg0dic/gnn-sg/src/model_nbf_fb.py official repository ran fingerprinted MIT (permissive) · bd75778ce5bcfcd6 · report
stable_norm_denominator erg0dic/gnn-sg/src/model_nbf_general.py official repository ran fingerprinted MIT (permissive) · 00538f78c1005cc9 · report
xent erg0dic/gnn-sg/src/model_nbf_fb.py official repository ran fingerprinted MIT (permissive) · c55be2270957af67 · report
compose erg0dic/gnn-sg/src/comp_dataset_generator.py official repository unverified MIT (permissive) · ae574bc97431f499 · report

Tasks

Inductive BiasSystematic Generalization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Focus

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections