Paper commentary
Gated Graph Sequence Neural Networks
Gated graph sequence networks predict ordered outputs from graph-structured inputs
- Problem Graph neural networks were built to return one label per graph or node, so they struggle with tasks needing ordered outputs such as paths. Earlier propagation rules also limited what the model could represent.
- Method GGS-NN is a gated graph sequence model that unrolls gated recurrent propagation for a fixed number of steps. Chained output steps each emit one element of the sequence, instead of a contraction-map constraint.
- Results GG-NN reached 100.0 ±0.0 accuracy on bAbI Tasks 4, 15, 16 and 18 with 50 training examples. The model also reached 89.96% on separation logic formula prediction, against 89.11% for the authors' earlier approach.
Why sequence outputs on graphs need a different learner
Many learning tasks take graphs as input, and the standard options are hand-engineered features, graph kernels, and features defined through random walks. Learned feature methods on graphs, such as Graph Neural Networks, were mostly built to return one output, either a label for the whole graph or a value for each node. Many graph problems need an ordered output instead, for example a path between two nodes, a list of nodes with a chosen property, or a run of global labels with a start and an end marker.
For a sequence, the model must represent the part of the output already produced and also the part still to come, and it has to store both inside the node states. The motivating application is program verification. Proving memory safety requires a logical description of the data structures a program builds, and earlier work obtained these descriptions from a large amount of hand-built features.
Graph Neural Networks and the convergence constraint
A Graph Neural Network assigns each node a vector and repeatedly updates these vectors from the labels and vectors of neighbouring nodes, using edge-type and direction dependent functions. The updates are summed over incoming and outgoing edges, and the original formulation is run until the node vectors stop changing. A per-node output function then maps each final node vector and its label to an output, and graph-level targets are handled by a dummy super node connected to all other nodes.
The original learning rule, the Almeida-Pineda algorithm, runs propagation to convergence and computes gradients at the converged state, so intermediate states need not be stored. This rule only works if the propagation step is a contraction map, a constraint that guarantees convergence but can limit what the model can represent. The authors note that when the propagation function is a neural network, the constraint is encouraged with a penalty on the 1-norm of the network's Jacobian, and they argue that contraction maps struggle to carry information across long distances in a graph.
Gated propagation and node annotations
GG-NNs drop the contraction constraint, unroll the recurrence for a fixed number of steps T, and train with backpropagation through time, which costs more memory than the converged-state rule but frees the parameters from that constraint. Because the fixed point no longer washes out the starting state, the initial node vectors can carry input information, which the model uses to store node annotations.
An annotation such as a marker for a special node is copied into the first dimensions of that node's state, and the remaining dimensions are zero-padded to fit a larger hidden size.
In a reachability example, a propagation matrix can learn to carry the source marker along forward edges, so every node reachable from the source ends up with a nonzero first entry and a readout can decide whether the target is reached. Each step first forms the aggregated message a(t)v from neighbouring states through a sparse block matrix whose blocks depend on edge type and direction, and then applies GRU-style update and reset gates to form the next state.
The update can be written as \\( h^{(t)}_v = (1 - z^{t}_v)\\odot h^{(t-1)}_v + z^{t}_v\\odot \\tilde h^{(t)}_v \\), where z is the update gate and the candidate state is built from the reset-gated previous state, and the authors report that a vanilla recurrent update was less effective in their preliminary experiments.
For node selection, the final node vector and annotation are scored per node and a softmax is applied over the nodes. For graph-level outputs, a soft attention weight from a learned function of each node decides how much each node contributes to a pooled graph vector, and the tanh functions around the pooled vector can be replaced with the identity.
From one output step to a sequence
A GGS-NN runs an output GG-NN at each step k, which predicts the output for that step from the node annotations X(k), and a second GG-NN that predicts the annotations X(k+1) carried into the next step. Each step starts from the annotations by zero-extending them per node, and the two GG-NNs can either have separate propagation models or share one, the shared variant being faster to train and evaluate.
The node annotation output model computes the next annotation of each node independently from its final vector and current annotation, through a sigmoid over a neural network.
There are two training regimes. When the intermediate annotations are known, the sequence prediction splits into single-step problems that can be trained separately, and at test time predicted annotations feed the next step. When the annotations are not observed, they are treated as hidden units and the whole sequence is trained jointly by backpropagation, which the authors describe as the more general option.
bAbI tasks and learned graph algorithms
The authors convert bAbI stories in symbolic form into a graph, with entities as nodes and relations as labelled edges, and the question arguments become initial node annotations. This transformation drops the temporal order of the facts and does not handle ternary or higher-order relations, so an event such as a sentence about a visit does not map to a simple edge.
The RNN and LSTM baselines read the same symbolic facts as token sequences with end-of-line and answer tokens.
Training sets were grown from 50 to 100, 250, 500 and 950 examples, with 50 of the training examples held out for validation, until test accuracy reached 95%, and each task used 10 generated datasets with mean and standard deviation reported. Propagation was unrolled for 5 steps, and the node vector size D was 4, 5, 6, 3 and 6 for tasks 4, 15, 16, 18 and 19, and 20 for the shortest path and Eulerian circuit tasks.
For Task 4 a separate GG-NN was trained for each of four question types, so the total is 1084 parameters, with 271 per question type.
On the single-step tasks, GG-NN reached 100.0 ±0.0 accuracy with 50 training examples on Tasks 4, 15, 16 and 18. The RNN reached 97.3 ±1.9 on Task 4 with 250 examples, the LSTM reached 97.4 ±2.0 on the same count, and both baselines were limited to 48.6 to 88.9 on Tasks 15, 16 and 18 even with 950 examples. Table 2 shows that the baselines on Task 4 need more data, with RNN at 76.7 ±3.8 and LSTM at 73.5 ±5.2 when trained on 50 examples.
On bAbI Task 19 (Path Finding), the GGS-NN reached 71.1 ±14.7 with 50 examples, 92.5 ±5.9 with 100 and 99.0 ±1.1 with 250, while the RNN and LSTM reached 24.7 ±2.7 and 28.2 ±1.3 with 950 examples. On the new Shortest Paths and Eulerian Circuits tasks, the GGS-NN reached 100.0 ±0.0 with 50 examples, and the RNN and LSTM stayed at 9.7 ±1.7 and 10.5 ±1.2 on shortest paths and 0.3 ±0.2 and 0.1 ±0.2 on Eulerian circuits.
Because the Task 19 comparison uses symbolic data, the authors state that its numbers are not comparable to those in the earlier work on this task, which reported accuracy below 20%.
Predicting separation logic formulas from heap graphs
The example concatenation function needs a loop invariant that describes the list segments at each iteration, and separation logic provides inductive predicates such as ls for such segments. The conjunction in separation logic requires its parts to refer to separate heap regions, which is what lets an invariant capture a structure like a list ending at a chosen node.
Using such an invariant, a Hoare-style verification can show memory safety and correct concatenation, so predicting the formula is the step the authors automate with machine learning.
Input heap graphs have a node for each address, labelled edges for pointer fields, and a subset of nodes labelled by program variables. The output is restricted to existentially quantified formulas over atoms such as ls, tree and none, and an example formula with a named node for a cycle shows how existentials name nodes that need a label.
The training data is synthetic: predicates are instantiated over program variables, and heap graphs satisfying each formula are enumerated.
The model uses three node annotations, is-named, active and is-explained, which are computed from the input graph for the first step and then updated by the procedure. The procedure first decides whether an existential variable is needed, chooses the node it names, and then loops over named variables to choose a predicate and, for a list, the list end node, with the graph-level and node-selection steps each implemented as a GG-NN.
The authors trained this variant with observed annotations, so the intermediate labels come from the data generator, and they note that an unobserved variant is possible but not used.
For batch prediction over several heap graphs of the same program, one GGS-NN runs per graph, and the scores for a named variable are summed across graphs so that the variable links nodes on different graphs. Graph-level class scores are added across the batch, and node annotations are updated per graph, with the named variable's nodes in all graphs updated together.
The method uses D = 16 for the existential decision and node-selection components and D = 8 for the others, with 10 unrolled steps, Adam, and minibatches of 20 graphs.
The dataset has 327 formulas over three program variables with 498 graphs per formula, and the formulas are split 6:2:2 into training, validation and test sets, so test formulas are absent from training. Correctness means logical equivalence to the ground truth, approximated by canonicalizing names and order and comparing for exact equality.
The earlier approach, which treats each prediction step as standard classification and uses manual problem-specific feature engineering, reached 89.11% accuracy, while the GGS-NN-based model, trained with no feature engineering and little domain knowledge, reached 89.96%. The authors also used the model to supply invariants to a theorem prover for list-manipulating programs such as insertion sort, and Table 4 lists invariants found for benchmark programs, including Traverse, Concat, Copy, Dispose, Insert and Remove.
Limitations and open questions
The bAbI translation loses temporal order and higher-order relations, and the authors suggest concatenating GG-NNs per edge or using factor graphs as possible fixes that were not tested. Less structured input, such as raw text instead of the symbolic bAbI form, is left as a harder open problem, and the authors say mapping general natural language to symbolic form is non-trivial.
The current model receives the question only after all facts are consumed, so it must derive every consequence and store the relevant information in the nodes, which the authors consider unlikely to be ideal. The separation logic experiments cover one dataset of 327 formulas with three program variables, and the reported comparison is with the authors' earlier method rather than with other learners.
The nested data structure extension is described only as an appendix result and no numbers for it appear in the text provided here.
Relation to other graph and sequence models
The GRU-based propagation can be seen as an analogue of the move from recurrent to convolution-like graph models, and the authors compare the replacement of belief propagation by truncated updates with the GG-NN change from the contraction rule. Pointer networks share the goal of choosing input nodes as outputs, but GNNs keep the graph structure explicit and can represent nodes defined only by their position in the graph.
Node annotations that record which nodes were already explained are presented as an explicit mechanism for using each input node exactly once over the output sequence.
Paper info
- Authors
- Yujia Li, Daniel Tarlow, Marc Brockschmidt, Richard Zemel
- Venue
- arXiv · Preprint
- First published
- 2015-11-17
- Added
- 2026-11-12
- Updated
- 2017-9-22
- Version
- v4
- arXiv
- 1511.05493
- Category
- cs.LG · cs.AI · cs.NE · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Yujia Li, Daniel Tarlow, Marc Brockschmidt, Richard Zemel (2015). Gated Graph Sequence Neural Networks. arXiv:1511.05493v4. https://arxiv.org/abs/1511.05493v4
BibTeX
@misc{li2015gated,
title = {{Gated Graph Sequence Neural Networks}},
author = {Yujia Li and Daniel Tarlow and Marc Brockschmidt and Richard Zemel},
year = {2015},
eprint = {1511.05493},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1511.05493v4}
}