GithubHelp home page GithubHelp logo

expressgnn's Introduction

ExpressGNN

This is an implementation of the ExpressGNN proposed in the paper "Efficient Probabilistic Logic Reasoning with Graph Neural Networks".

Requirements

  • python 3.7
  • pytorch 1.1
  • scikit-learn
  • networkx
  • tqdm

Quick Start

The following command starts the inference on the Kinship-S1 dataset on GPU:

python -m main.train -data_root data/kinship/S1 -slice_dim 8 -batchsize 16 -use_gcn 1 -embedding_size 64 -gcn_free_size 32 -load_method 0 -exp_folder exp -exp_name kinship -device cuda

To run ExpressGNN on the FB15K-237 dataset on GPU, use the follwoing command line: Free Parameters + GNN, Free parameters dim = free_dim, GNN parameters dim = embedding_size - free_dim

python -m main.train -slice_dim 16 -batchsize 16 -num_hops 1 -patience 20 -lr_decay_patience 100 -entropy_temp 1 -load_method 1 -exp_folder exp -device cuda -rule_filename cleaned_rules_weight_larger_than_0.9.txt -data_root data/fb15k-237 -embedding_size 128 -gcn_free_size 127  -exp_name fb15k-237 -mylambda 1 -exp_mode 1

GNN parameters, Free parameters dim = 0, GNN parameters dim = embedding_size

python -m main.train -slice_dim 16 -batchsize 16 -num_hops 1 -patience 20 -lr_decay_patience 100 -entropy_temp 1 -load_method 1 -exp_folder exp -device cuda -rule_filename cleaned_rules_weight_larger_than_0.9.txt -data_root data/fb15k-237 -embedding_size 128 -exp_name fb15k-237 -mylambda 1 -exp_mode 2

GNN parameters, Free parameters dim = embedding_size, GNN parameters dim = 0

python -m main.train -slice_dim 16 -batchsize 16 -num_hops 1 -patience 20 -lr_decay_patience 100 -entropy_temp 1 -load_method 1 -exp_folder exp -device cuda -rule_filename cleaned_rules_weight_larger_than_0.9.txt -data_root data/fb15k-237 -embedding_size 128 -exp_name fb15k-237 -mylambda 1 -exp_mode 3

expressgnn's People

Contributors

wenhsinghuang avatar expressgnn avatar

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.