Giter VIP home page Giter VIP logo

smf-gin's Introduction

SMF-GIN

This is a Pytorch implementation for our submitted AI OPEN journal paper: Structure-Enhanced Meta-Learning For Few-Shot Graph Classification[arXiv](http://arxiv.org/abs/2103.03547)

Contributors: Shunyu Jiang, Fuli Feng, Weijian Chen, Xiangnan He

Installation

We used the following Python packages for core development. We tested on Python 3.7.

pytorch                   1.0.1
rdkit                     2019.03.1.0
numpy                     
json
pandas

Parameters

+ --lr:               learning rate
+ --type:             local-structure or global-structure
+ --norm_type:       centering and scaling in paper
+ --attention_type:   five attention models in paper
+ --num_ways:         classes number in meta-task in paper
+ --spt_shots:        support-set number in meta-task in paper
+ --qry_shots:        query-set number in meta-task in paper

Dataset

We conduct experiments on the multi-class Chembl dataset and public dataset TRIANGLES. Detailed information about these two datasets illustrated in paper. Dataset ChemBL was too large, so we divided it into 273 subfiles according to classes. Finally, we compressed and uploaded the ChemBL and TRIANGLES datasets.

Examples

We provide solutions of local structure and global structure respectively, which contain five different models of attention mechanism.

TRIANGLES

nohup python main_local.py --type=local --attention_type=transformer --dataset=TRIANGLES --num_ways=3 > TRIANGLES_local_log.out &

or

nohup python main_global.py --type=gloabl --attention_type=self-attention --dataset=TRIANGLES --num_ways=3 > TRIANGLES_global_log.out &

smf-gin's People

Contributors

jiangshunyu 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.