GithubHelp home page GithubHelp logo

fignn's Introduction

Feature Interaction-aware Graph Neural Networks

This repository is the official implementation of Feature Interaction-aware Graph Neural Networks.

The sketches of FI-GNN model structure. GraphStructure

Requirements

To install requirements:

pip install -r requirements.txt

Training

You can train on four different datasets (BlogCatalog, Flickr, ACM, DBLP) by changing the parameters of data_name. You can also train three different GNNs (gcn, SimpleGCN, graphsage) by changing model_type

Semi-supervised Node Classification

  • Training FI-GCN in node classification
cd FI_GCN
python train.py --supervised \
--epochs 200 \
--hidden 32 \
--lr 1e-3 \
--truncate_size 200 \
--model_type gcn \
--data_name BlogCatalog \
--output_file \path\to\output\file \
--weight_decay 5e-4 \
--dropout 0.2 
  • Training FI-GraphSAGE in node classification
cd FI_GraphSAGE_SimpleGCN
python graphsage_classification.py \
--num-hidden 32 \
--lr 0.001 \
--dropout 0.2 \
--data_name BlogCatalog \
--output_file \path\to\output\file
  • Training FI-SimpleGCN in node classification
cd FI_GraphSAGE_SimpleGCN
python simple_gcn_classification.py \
--num-hidden 32 \
--lr 0.001 \
--data_name BlogCatalog \
--output_file \path\to\output\file

Unsupervised Link Prediction

  • Training FI-GCN in link prediction
cd FI_GCN
python train.py
--epochs 200 \
--hidden 32 \
--lr 1e-3 \
--truncate_size 200 \
--model_type gcn \
--data_name BlogCatalog \
--output_file \path\to\output\file \
--weight_decay 5e-4 \
--dropout 0.2 
  • Training FI-GraphSAGE in link prediction
cd FI_GraphSAGE_SimpleGCN 
python link_prediction.py
--epochs 200 \
--hidden 32 \
--lr 1e-3 \
--truncate_size 200 \
--model_type graphsage \
--data_name BlogCatalog \
--output_file \path\to\output\file \
--weight_decay 5e-4 \
--dropout 0.2 
  • Training FI-SimpleGCN in link prediction
cd FI_GraphSAGE_SimpleGCN 
python link_prediction.py
--epochs 200 \
--hidden 32 \
--lr 1e-3 \
--truncate_size 200 \
--model_type simplegcn \
--data_name BlogCatalog \
--output_file \path\to\output\file \
--weight_decay 5e-4 \
--dropout 0.2 
  • Hyper-parameter search

We use grid search in our node classification task. You can check the parameter_search.sh as an example for gcn.

The hyper-parameters setting for these models are as follows:

Hyper-Parameter Search Space
learning rate: lr gcn:{0.01, 0.001, 0.005}, graphsage:{0.01, 0.001}, SimpleGCN:{0.2, 0.1}
hidden dimension: hidden gcn, graphsage, SimpleGCN:{32, 32}
dropout ratio: dropout gcn, graphsage, SimpleGCN:{0.2 0.5}
weight decay (l2 loss): weight_decay gcn, SimpleGCN, graphsage:{5e-3, 5e-4}

Evaluation

By setting the output_file in the previous step, you can find the test result in \path\to\output\file.

fignn's People

Contributors

fignn avatar bigheiniu 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.