This is a PyTorch implementation of the Gated Graph Sequence Neural Networks (GGNN) as described in the paper Gated Graph Sequence Neural Networks by Y. Li, D. Tarlow, M. Brockschmidt, and R. Zemel. This implementation gets 100% accuracy on node-selection bAbI task 4, 15, and 16. Their official implementation are available in the yujiali/ggnn repo on GitHub.
- Solve graph-structured data and problems
- A gated propagation model to compute node representations
- Unroll recurrence for a fixed number of steps and use backpropogation through time
- An output model to make predictions on nodes
- python==2.7
- PyTorch>=0.2
Train and test the GGNN:
python main.py --cuda (use GPUs or not)
Suggesting configurations for each task:
# task 4
python main.py --task_id 4 --state_dim 4 --niter 10
# task 15
python main.py --task_id 15 --state_dim 5 --niter 10
# task 16
python main.py --task_id 16 --state_dim 10 --niter 150
I followed the paper, randomly picking only 50 training examples for training. Performances are evaluated on 50 random validation examples.
bAbI Task | Performance |
---|---|
4 | 100% |
15 | 100% |
16 | 100% |
Here's an example of bAbI deduction task (task 15)
The data processing codes are from official implementation yujiali/ggnn.
- GraphLevel Output
- Gated Graph Sequence Neural Networks, ICLR 2016
- yujiali/ggnn
Currently, we set main3.py/model3.py as the base one. main4.py/model4.py try to replace Tahn with Sigmoid, but the result are similar. main5.py/model5.py/test5.py/vali5.py try to modify output in model5.py . How manual_seed influence the model