Papers
Topics
Authors
Recent
Search
2000 character limit reached

DeepGraphLog Neurosymbolic Framework

Updated 10 July 2026
  • DeepGraphLog is a neurosymbolic AI framework that extends ProbLog using Graph Neural Predicates to enable multi-layer reasoning over graph-structured symbolic data.
  • It employs a novel integration where neural outputs can trigger logical derivations and vice versa, breaking the fixed pipeline seen in earlier systems.
  • Empirical results demonstrate improved data efficiency and expressivity beyond 1-WL GNNs in tasks such as graph classification, structure learning, and planning.

Searching arXiv for the specified paper to ground the article. DeepGraphLog is a neurosymbolic AI framework that extends ProbLog with Graph Neural Predicates (GNPs) and enables multi-layer neural-symbolic reasoning in arbitrary order, rather than enforcing a fixed flow in which symbolic reasoning always follows neural processing. It is introduced to address complex dependencies in irregular data structures such as graphs, and it does so by treating symbolic representations as graphs that can be processed by Graph Neural Networks (GNNs). The framework is presented as more expressive and flexible than existing NeSy systems such as DeepProbLog, while retaining rigorous probabilistic semantics and end-to-end differentiability (Kikaj et al., 9 Sep 2025).

1. Conceptual scope and relation to prior neurosymbolic frameworks

Neurosymbolic AI aims to integrate the statistical strengths of neural networks with the interpretability and structure of symbolic reasoning. Within that setting, DeepGraphLog is defined by a specific contrast with current NeSy frameworks like DeepProbLog: those systems enforce a fixed flow where symbolic reasoning always follows neural processing, whereas DeepGraphLog permits arbitrary interleaving of neural and symbolic components (Kikaj et al., 9 Sep 2025).

This distinction is central to the framework’s motivation. In the formulation associated with DeepGraphLog, symbolic reasoning is not restricted to a terminal stage after representation learning. Instead, symbolic outputs can be converted into graph-structured inputs for later neural stages, and neural outputs can in turn trigger further rule-based derivations. The paper characterizes this as multi-layer neural-symbolic reasoning and explicitly associates it with planning, knowledge graph completion with distant supervision, and GNN expressivity (Kikaj et al., 9 Sep 2025).

A common assumption in earlier NeSy pipelines is that neural modules consume raw data while symbolic modules consume neural predictions. DeepGraphLog rejects that restriction by allowing symbolic representations themselves to become graph objects for GNN processing. This suggests a broader view of NeSy composition in which learned relational inference and logical derivation can alternate across multiple layers rather than occupy fixed roles.

2. Formal foundations: syntax, semantics, and objective

DeepGraphLog extends probabilistic logic programs (ProbLog) with Graph Neural Predicates. A DeepGraphLog program is a triple (F,R,G)(F,R,G), where FF is a set of ground probabilistic facts of the form p::fp :: f, with 0p10 \le p \le 1 and ff a ground atom; RR is a set of definite clauses of the form h:b1,,bnh :- b_1,\ldots,b_n; and GG is a set of graph neural facts of the form

gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).

Here, mrm_r is an identifier for a fixed GNN architecture whose parameters are learned, FF0 is a ground set of atoms encoding a possibly probabilistic input graph, and FF1 is the predicate whose probability is given by evaluating the GNN FF2 on the graph induced by FF3 (Kikaj et al., 9 Sep 2025).

The semantics treat FF4 and FF5 symmetrically as random facts. A possible world is determined by choosing a subset FF6 of true facts and then taking the least model with respect to FF7. If FF8 is sampled, its probability is FF9; if p::fp :: f0, then its truth is sampled according to the neural predicate on the concrete graph induced by p::fp :: f1. For each neural fact p::fp :: f2, the input-graph instance is defined as p::fp :: f3, and the probability of p::fp :: f4 in world p::fp :: f5 is

p::fp :: f6

Under the assumption that, conditioned on their input graphs, all facts are independent, the probability of a world p::fp :: f7 is

p::fp :: f8

Queries p::fp :: f9 have marginal probability

0p10 \le p \le 10

and conditional queries follow

0p10 \le p \le 11

Training uses a negative log-likelihood objective over queries with labels 0p10 \le p \le 12:

0p10 \le p \le 13

where 0p10 \le p \le 14 denotes all learnable parameters, including GNN weights and, if present, probabilities of pure ProbLog facts. Gradients are computed by backpropagating through the summation, or via sampling or approximation if the world-space is large (Kikaj et al., 9 Sep 2025).

These definitions situate DeepGraphLog as a probabilistic logic programming framework rather than merely a neural architecture with logical post-processing. Its semantics are given at the level of possible worlds, least models, and marginal query probabilities, which is significant because it preserves the formal discipline of ProbLog while admitting neural predicates over graph-structured symbolic inputs.

3. Graph Neural Predicates and symbolic-to-graph translation

Graph Neural Predicates are the mechanism by which symbolic structures become neural inputs. Given a neural fact

0p10 \le p \le 15

DeepGraphLog constructs a directed multi-relational graph 0p10 \le p \le 16 in which 0p10 \le p \le 17 consists of all constants appearing in 0p10 \le p \le 18; each unary atom 0p10 \le p \le 19 becomes a node attribute for node ff0 and, more specifically, gives node ff1 a one-hot feature ff2; and each binary atom ff3 becomes a directed labelled edge ff4 labelled ff5 (Kikaj et al., 9 Sep 2025).

The generic ff6-layer GNN update is specified as

ff7

ff8

ff9

for RR0, where RR1 is sum, mean, or max, RR2 is an activation, and RR3 is an edge-type embedding. The final node embeddings RR4 are pooled over query nodes RR5, then passed through a readout layer and sigmoid or softmax to yield the probability of the predicate:

RR6

RR7

The framework therefore does not merely attach a GNN to a logic program; it defines a translation from atoms to graph structure and then evaluates predicates over that induced graph. This suggests that the expressive contribution of DeepGraphLog lies partly in its ability to reinterpret symbolic state as a relational graph on demand, including possibly incomplete or uncertain inputs, rather than requiring all graph structure to be given exogenously.

4. Layered reasoning, optimization, and inference modes

DeepGraphLog permits arbitrary interleaving of neural and symbolic layers. The typical two-layer pipeline described for the framework is:

  • INPUT facts RR8
  • Neural layer 1: evaluate all RR9
  • Derive new symbolic facts via h:b1,,bnh :- b_1,\ldots,b_n0
  • Neural layer 2: evaluate h:b1,,bnh :- b_1,\ldots,b_n1 on extended graph
  • Final symbolic inference via h:b1,,bnh :- b_1,\ldots,b_n2
  • QUERY h:b1,,bnh :- b_1,\ldots,b_n3

The corresponding pseudocode for layered reasoning evaluates all subsets h:b1,,bnh :- b_1,\ldots,b_n4 consistent with evidence, computes the least model h:b1,,bnh :- b_1,\ldots,b_n5, extracts the input subgraph h:b1,,bnh :- b_1,\ldots,b_n6 for each GNN fact, computes each h:b1,,bnh :- b_1,\ldots,b_n7 through a forward pass, forms

h:b1,,bnh :- b_1,\ldots,b_n8

and sums these probabilities over worlds satisfying the query (Kikaj et al., 9 Sep 2025).

Optimization minimizes the negative log-likelihood h:b1,,bnh :- b_1,\ldots,b_n9 over training queries using gradient descent (Adam). Gradients flow through both symbolic inference and neural predicates: through the enumeration or circuit-compiled path on the symbolic side, and through standard backpropagation on the GNN side (Kikaj et al., 9 Sep 2025).

Inference is divided into two modes. Pure ProbLog queries with no GNPs use knowledge compilation, such as d-DNNF or SDD, in time polynomial in circuit size. Mixed queries with GNPs require explicit summation over worlds or Monte Carlo sampling, and each world evaluation involves one GNN forward pass per neural fact. The framework description explicitly notes that approximate methods, including importance sampling and variational methods, may be used for scalability (Kikaj et al., 9 Sep 2025).

This architecture clarifies a key point that is sometimes blurred in discussions of NeSy systems: the layering is not only conceptual but operational. Neural modules can alter the set of facts from which later graphs are induced, and symbolic rules can alter the graph context seen by later GNN predicates. A plausible implication is that DeepGraphLog is designed for settings where intermediate symbolic state is not a static annotation but part of the learned computation.

5. Empirical demonstrations: expressivity and structure learning

One evaluation concerns GNN expressivity beyond 1-WL. The task is to classify graphs by the presence of a 4-cycle, a case in which 1-WL GNNs alone fail. The baselines are a 1-WL GNN on the raw graph and a GNN with “logic-at-the-bottom,” where the graph is augmented with explicit cycle-indicator nodes. DeepGraphLog is used in a “logic-at-the-top” configuration that employs a GNP to detect GG0 via a logical predicate and GNN readout (Kikaj et al., 9 Sep 2025).

The reported test accuracies, averaged over 5 runs, are:

  • For 1000 training examples: GNN raw GG1, GNN + feats GG2, DeepGraphLog GG3
  • For 500 training examples: GNN raw GG4, GNN + feats GG5, DeepGraphLog GG6
  • For 100 training examples: GNN raw GG7, GNN + feats GG8, DeepGraphLog GG9 (Kikaj et al., 9 Sep 2025)

A second evaluation addresses structure learning via parameter learning. The task is graph classification where gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).0 presence of gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).1, gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).2, and gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).3 no cycle. The model uses GNPs gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).4 with learnable probability gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).5. The reported outcome is that DeepGraphLog correctly learns

gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).6

and that this matches ground truth, while a standard GNN cannot isolate these patterns (Kikaj et al., 9 Sep 2025).

Taken together, these experiments are used to support two claims made explicitly in the paper: improved data efficiency and expressivity beyond 1-WL GNNs. They also illustrate a broader methodological point. In DeepGraphLog, logical structure is not only auxiliary supervision or feature engineering; it can define latent predicates and probability parameters that are subsequently learned through the probabilistic semantics of the overall program.

6. Empirical demonstrations: distant supervision, planning, and limitations

In knowledge graph completion with distant supervision, the family-tree graph uses nodes in person and edges parentOf. The goal is to learn motherOf and fatherOf without direct supervision, using only grandparentOf(a,b). The DeepGraphLog program includes GNN predicates for fatherOf and motherOf and symbolic rules for grandfatherOf: FF01 The baseline is a pure GNN predicting fatherOf and motherOf. For fatherOf, the reported results are F1 gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).7 for the GNN and gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).8 for DeepGraphLog; AUCROC gnn(mr,Yr,[x1,,xk])::r(x1,,xk).\mathrm{gnn}(m_r, Y_r, [x_1,\ldots,x_k]) :: r(x_1,\ldots,x_k).9 for the GNN and mrm_r0 for DeepGraphLog; Hits@5 mrm_r1 for the GNN and mrm_r2 for DeepGraphLog; and Hits@20 mrm_r3 for the GNN and mrm_r4 for DeepGraphLog. For motherOf, the reported F1 is mrm_r5 for the GNN and mrm_r6 for DeepGraphLog (Kikaj et al., 9 Sep 2025).

In the Blocks World planning setting, the domain consists of blocks on the floor, each block in mrm_r7, under the constraint that one cannot move onto glass. The pipeline is explicitly multi-layered:

  1. GNP move(X,Y) predicts all possible moves.
  2. Symbolic filter illegal(X,Y) :- move(X,Y),glass(Y).
  3. Derived after_move(X,Y).
  4. GNP tower(after_move/2,glass/1) predicts if a valid tower results.

The baselines are a single GNN that directly predicts tower-possible and two GNNs without a symbolic constraint between them. Test accuracy is reported as mrm_r8 for the single GNN, mrm_r9 for the two-GNN system without constraint, and FF00 for DeepGraphLog (Kikaj et al., 9 Sep 2025).

The framework’s advantages are summarized in the source as follows: arbitrary layering of neural and symbolic modules enables multi-step, bidirectional reasoning; GNPs allow neural nets to operate on symbolic graphs, possibly incomplete or uncertain; the approach retains rigorous probabilistic semantics; and it improves data efficiency and expressivity beyond 1-WL GNNs while enabling structure learning and distant supervision (Kikaj et al., 9 Sep 2025).

The limitations and open challenges are equally explicit. Inference with GNPs may require summation over exponentially many worlds and therefore incurs high computational cost. Approximate or sampling-based inference and variance-reduced gradient estimators are needed for large graphs. Automatic discovery of useful symbolic rules remains nontrivial beyond small template sets. Scaling to deep recursive reasoning or very large knowledge bases requires further work on compilation and caching of intermediate circuits (Kikaj et al., 9 Sep 2025).

These constraints are important for interpreting the reported results. The empirical demonstrations establish the framework’s reasoning power across planning, graph classification, and knowledge-graph tasks, but the same formal machinery that yields expressive layered inference also creates a computational bottleneck. A plausible implication is that the future development of DeepGraphLog will depend not only on better GNN architectures or richer logic templates, but also on improved approximate inference, compilation strategies, and intermediate-state reuse.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DeepGraphLog.