Code Monkey home page Code Monkey logo

ggnn_reasoning's Introduction

GGNN_Reasoning

This is a Pytorch implementantion of Gated Graph Neural Network (Li, Yujia, et al. "Gated graph sequence neural networks." arXiv preprint arXiv:1511.05493 (2015)). This implementation follows the framework of JamesChuanggg/ggnn.pytorch. The main difference is that my implemantation are more suitable for graph datasets with tremendous edge types such as Knowledge Graphs as it's more memory-efficient. Note that, most other implementations you can find are designed for datasets with only several edge types, such as bAbI dataset.

Though our scenario is using GGNN to approximate the ABox consistency checking problem in OWL2 EL, where each ABox sample can be deemed as a small directed graph and thus the consistency checking can be modeled as a graph-level binary classification problem, the implementation is quite generic.

Requirements:

Python 3.6
PyTorch >=0.4

Usage:

  • For the input json data format:
    each sample has the format as follows,
    {'target': label of sample,
    'graph': all edges in the graph, each edge is represented as a triple: (source_id, edge_id, target_id),
    'node_features': task-specific innitial annotation for each node in the graph
    }

    (All ids start from 1)
  • To run the code, please use command python main.py.
  • To run it on GPU, please use command python main.py --cuda.

(For general use, you should only care about files without a suffix 'plus', as those files are for specific use of ABox reasoning model. Specifically, for GGNN_plus, there is no need for you to specify the initial annotations for each node by yourself, the annotation for all nodes are stored in an embedding layer, which is also learnable during the training process. Experiments demonstrate that GGNN_plus outperforms GGNN on ABox Reasoning in terms of both efficiency and effectiveness.)

Citation

Please cite the original GGNN paper:

@inproceedings{li2016gated,
  title={Gated Graph Sequence Neural Networks},
  author={Li, Yujia and Zemel, Richard and Brockschmidt, Marc and Tarlow, Daniel},
  booktitle={Proceedings of ICLR'16},
  year={2016}
}

Also, if you find our implementation useful, please also cite the following paper:

@inproceedings{gu2019local,
  title={Local ABox consistency prediction with transparent TBoxes using gated graph neural networks},
  author={Gu, Yu and Pan, Jeff Z and Cheng, Gong and Paulheim, Heiko and Stoilos, Giorgos},
  booktitle={Proc. 14th International Workshop on Neural-Symbolic Learning and Reasoning (NeSy)},
  year={2019}
}

ggnn_reasoning's People

Contributors

entslscheia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ggnn_reasoning's Issues

Node features

Why is number of node features is one greater than number of nodes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.