Coder Social home page Coder Social logo

graphprompt's Introduction

We provide the code (in pytorch) and datasets for our paper "GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural Networks", which is accepted by WWW2023.

Description

The repository is organised as follows:

  • data/: contains data we use.
  • graphdownstream/: implements pre-training and downstream tasks at the graph level.
  • nodedownstream/: implements downstream tasks at the node level.
  • convertor/: generate raw data.

Package Dependencies

  • cuda 11.3
  • dgl0.9.0-cu113
  • dgllife

Running experiments

Graph Classification

Default dataset is ENZYMES. You need to change the corresponding parameters in pre_train.py and prompt_fewshot.py to train and evaluate on other datasets.

Pretrain:

  • python pre_train.py

Prompt tune and test:

  • python prompt_fewshot.py

Node Classification

Default dataset is ENZYMES. You need to change the corresponding parameters in prompt_fewshot.py to train and evaluate on other datasets.

Prompt tune and test:

  • python run.py

Citation

@inproceedings{liu2023graphprompt,
title={GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural Networks},
author={Liu, Zemin and Yu, Xingtong and Fang, Yuan and Zhang, Xinming},
booktitle={Proceedings of the ACM Web Conference 2023},
year={2023}
}

graphprompt's People

Contributors

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