Git Product home page Git Product logo

la-gcn's Introduction

Learnable Aggregator for Graph Convolutional Networks in PyTorch

Implementation of Learnable Aggregators for Graph Convolutional Networks in PyTorch.

LA-GCN with Mask Aggregator

Learnable Aggregator for GCN (LA-GCN) by introducing a shared auxiliary model that provides a customized schema in neighborhood aggregation. Under this framework, a new model proposed called LA-GCN(Mask) consisting of a new aggregator function, mask aggregator. The auxiliary model learns a specific mask for each neighbor of a given node, allowing both node-level and feature-level attention. This mechanism learns to assign different importance to both nodes and features for prediction, which provides interpretable explanations for prediction and increases the model robustness. [1]

Li Zhang ,Haiping Lu, A Feature-Importance-Aware and Robust Aggregator for GCN (CIKM 2020)

For official implementation report

Requirements

  • PyTorch 1.8
  • Python 3.8

Training

python train.py

You can also try out in colab if you don't have any requirements!

Note: Since random inits, your training results may not exact the same as reported in the paper!

Data

In order to use your own data, you have to provide

  • an N by N adjacency matrix (N is the number of nodes),
  • an N by D feature matrix (D is the number of features per node), and
  • an N by E binary label matrix (E is the number of classes). [2]

Have a look at the load_data() function in utils.py for an example.

In this example, we load citation network data (Cora, Citeseer or Pubmed). The original datasets can be found here: http://www.cs.umd.edu/~sen/lbc-proj/LBC.html. In our version (see data folder) we use dataset splits provided by https://github.com/kimiyoung/planetoid (Zhilin Yang, William W. Cohen, Ruslan Salakhutdinov, Revisiting Semi-Supervised Learning with Graph Embeddings, ICML 2016).

You can specify a dataset as follows:

  • For Citeseer:
python train.py --dataset "citeseer"
  • For Cora:
python train.py --dataset "cora"
  • For Pubmed:
python train.py --dataset "pubmed"

Reference

[1] Zhang & Lu, A Feature-Importance-Aware and Robust Aggregator for GCN, CIKM 2020 report

[2] Kipf & Welling, Semi-Supervised Classification with Graph Convolutional Networks, 2016 report

Citation

@inproceedings{zhang2020feature,
  title={A Feature-Importance-Aware and Robust Aggregator for GCN},
  author={Zhang, Li and Lu, Haiping},
  booktitle={Proceedings of the 29th ACM International Conference on Information \& Knowledge Management},
  pages={1813--1822},
  year={2020}
}
@article{kipf2016semi,
  title={Semi-supervised classification with graph convolutional networks},
  author={Kipf, Thomas N and Welling, Max},
  journal={arXiv preprint arXiv:1609.02907},
  year={2016}
}

la-gcn's People

Contributors

asarigun avatar ahmetrifaioglu 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.