Code Monkey home page Code Monkey logo

gfl's Introduction

GFL (Graph Few-shot Learning)

About

Source code of the paper Graph Few-shot Learning via Knowledge Transfer . This code is built based upon the pytorch implementation of few-shot learning few-shot.

All graphs are sampled from a large graph. For questions about model implementations, please contact Huaxiu Yao. For questions about graph sampling, please contact Chuxu Zhang.

Data Format (see sample data for the detailed format):

  1. Meta-training Graphs:
  • put all graphs in ./data/graph/, each graph is named as graph_#id.txt. Each line represents one link and the format is 'node_id_1 node_id_2'
  • put the correponding label in ./data/graph/, each graph is named as graph_#id_label.txt. The format is 'node_id label'
  • put all features in ./data/feature.txt. The format is 'node_id, feature_1, ..., feature_n'
  1. Meta-testing Graphs:
  • put all graphs in ./data/graph/, each graph is named as test_graph_#id.txt. Each line represents one link and the format is 'node_id_1 node_id_2'
  • put the correponding label in ./data/graph/, each graph is named as test_graph_#id_label.txt. The format is 'node_id label'
  • put all features in feature.txt, the format is 'node_id, feature_1, ..., feature_n'

How to use

  • meta-training: python main.py --datapath=./data/xxx/ --graphpath=./data/xxx/graph/ --in_f_d=xxx --nclasses=xxx --meta_lr=0.01 --update_batch_size=50 --logdir=../logs --hidden=32 --proto=graph --train=1 --inner_train_steps=5 --module_type=sigmoid --structure_dim=32 --hop_concat_type=attention --metatrain_iterations=xxx
  • meta-testing: python main.py --datapath=./data/xxx/ --graphpath=./data/xxx/graph/ --in_f_d=xxx --nclasses=xxx --meta_lr=0.01 --update_batch_size=50 --logdir=../logs --hidden=32 --proto=graph --train=0 --inner_train_steps=5 --module_type=sigmoid --structure_dim=32 --hop_concat_type=attention --metatrain_iterations=xxx --test_load_epoch=xxx

If you find this repository useful in your research, please cite the following paper:

@inproceedings{yao2020graph,
  title={Graph Few-shot Learning via Knowledge Transfer},
  author={Yao, Huaxiu and Zhang, Chuxu and Wei, Ying and Jiang, Meng and Wang, Suhang and Huang, Junzhou and Chawla, Nitesh V and Li, Zhenhui},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2020} 
}

gfl's People

Contributors

huaxiuyao avatar

Watchers

James Cloos 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.