Giter VIP home page Giter VIP logo

cpf's Introduction

CPF

The official code of WWW2021 paper: Extract the Knowledge of Graph Neural Networks and Go Beyond it: An Effective Knowledge Distillation Framework

Getting Started

Requirements

  • Python version >= 3.6
  • PyTorch version >= 1.7.1
  • DGL
  • Optuna (optional)

Usage

Quick start

  1. use python train_dgl.py --dataset=XXX --teacher=XXX to run teacher model.
  2. use python spawn_worker.py --dataset=XXX --teacher=XXX to run student model, we provide our hyper-parameters setting as reported in our paper, and an AutoML version for hyper-parameters search. (Our code supports Optuna to search best hyper-parameters for knowledge distillation. You can use --automl to run Optuna code.)

Add your own datasets

You can add your own datasets to folder data, the formats should accord to DGL requirements.

Add your own models

You can add your own teacher or student model by adding them into folder models, and following the format of model run.

Results

There are some results on GCN teacher model, with different datasets and student varients. More results can be seen in our paper.

Datasets GCN (Teacher) CPF-ind (Student) CPF-tra (Student) improvement
Cora 0.8244 0.8576 0.8567 4.0%
Citeseer 0.7110 0.7619 0.7652 7.6%
Pubmed 0.7804 0.8080 0.8104 3.8%
A-Computers 0.8318 0.8443 0.8443 1.5%
A-Photo 0.9072 0.9317 0.9248 2.7%

Cite

Please cite our paper if you use this code in your own work:

@inproceedings{yang2021extract,
  title={Extract the Knowledge of Graph Neural Networks and Go Beyond it: An Effective Knowledge Distillation Framework},
  author={Cheng Yang and Jiawei Liu and Chuan Shi},
  booktitle={Proceedings of The Web Conference 2021 (WWW โ€™21)},
  publisher={ACM},
  year={2021}
}

Contact Us

Please open an issue or contact [email protected] with any questions.

cpf's People

Watchers

 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.