GithubHelp home page GithubHelp logo

cagnn's Introduction

CAGNN

A PyTorch implementation of CAGNN "Exploiting Neighbor Effect: Conv-Agnostic GNNs Framework for Graphs with Heterophily". (TNNLS 2023)

(https://arxiv.org/abs/2203.11200)

Abstract

Due to the homophily assumption in graph convolution networks (GNNs), a common consensus in the graph node classification task is that GNNs perform well on homophilic graphs but may fail on heterophilic graphs with many inter-class edges. However, the previous inter-class edges perspective and related homo-ratio metrics cannot well explain the GNNs performance under some heterophilic datasets, which implies that not all the inter-class edges are harmful to GNNs. In this work, we propose a new metric based on von Neumann entropy to re-examine the heterophily problem of GNNs and investigate the feature aggregation of inter-class edges from an entire neighbor identifiable perspective. Moreover, we propose a simple yet effective Conv-Agnostic GNN framework (CAGNNs) to enhance the performance of most GNNs on heterophily datasets by learning the neighbor effect for each node. Specifically, we first decouple the feature of each node into the discriminative feature for downstream tasks and the aggregation feature for graph convolution. Then, we propose a shared mixer module to adaptively evaluate the neighbor effect of each node to incorporate the neighbor information. The proposed framework can be regarded as a plug-in component and is compatible with most GNNs. The experimental results over nine well-known benchmark datasets indicate that our framework can significantly improve performance, especially for the heterophily graphs. The average performance gain is 9.81%, 25.81%, and 20.61% compared with GIN, GAT, and GCN, respectively. Extensive ablation studies and robustness analysis further verify the effectiveness, robustness, and interpretability of our framework.

Dependencies

  • python 3.7.3
  • pytorch 1.6.0
  • dgl 0.6.0
  • torch-geometric 1.6.2

Code Architecture

|── datasets                # datasets and load scripts
|── utils                   # Common useful modules(transform, loss function)
|── models                  # models 
|  └── layers               # code for layers
|  └── models               # code for models
|── scripts                 # train scripts for each dataset     
└── train.py                # basic trainner and hyper-parameter

Train

python train.py

Scripts

sh scripts/texas.sh
sh scripts/wisconsin.sh
sh scripts/actor.sh
sh scripts/squirrel.sh
sh scripts/chameleon.sh
sh scripts/cornell.sh
sh scripts/citeseer.sh
sh scripts/pubmed.sh
sh scripts/cora.sh

Citation

@article{chen2023exploiting,
  title={Exploiting Neighbor Effect: Conv-Agnostic GNN Framework for Graphs With Heterophily},
  author={Chen, Jie and Chen, Shouzhen and Gao, Junbin and Huang, Zengfeng and Zhang, Junping and Pu, Jian},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  year={2023},
  publisher={IEEE}
}

cagnn's People

Contributors

jc-202 avatar

Stargazers

april211 avatar  avatar WangYueying avatar Zhiyao Zhou avatar  avatar Ziyang Zhang avatar  avatar ChenJG avatar  avatar Mingyuan Bai avatar  avatar

Watchers

 avatar Mingyuan Bai avatar  avatar

Forkers

yzfxmu

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.