Source code for AAAI 2020 paper: ASAP: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representation
Overview of ASAP: ASAP initially considers all possible local clusters with a fixed receptive field for a given input graph. It then computes the cluster membership of the nodes using an attention mechanism. These clusters are then scored using a GNN. Further, a fraction of the top scoring clusters are selected as nodes in the pooled graph and new edge weights are computed between neighboring clusters. Please refer to Section 4 of the paper for details.
main.py
- contains the driver code for the whole projectasap_pool.py
- source code for ASAP pooling operator proposed in the paperasap_pool_model.py
- a network which uses ASAP pooling as pooling operatorle_conv.py
- source code for LEConv GNN used in the paperrequirements.txt
- contains the required libraries used in this project
- Compatible with PyTorch 1.0 and Python 3.x.
- Dependencies can be installed using
requirements.txt
.
Can be installed using the following command:
pip install -r requirements.txt
Example for PROTEINS dataset:
python main.py -data PROTEINS -batch 128 -hid_dim 64 -dropout_att 0.1 -lr 0.01
Dataset | Batch Size | Hidden Dimension | Dropout | Learning rate |
---|---|---|---|---|
PROTEINS | 128 | 64 | 0.1 | 0.01 |
FRANKENSTEIN | 128 | 32 | 0 | 0.001 |
NCI1 | 128 | 128 | 0 | 0.01 |
NCI109 | 128 | 128 | 0 | 0.01 |
DD | 64 | 16 | 0.3 | 0.01 |
Please cite the following paper if you found it useful in your work.
@article{ranjan2019asap,
title={{ASAP}: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representations},
author={Ranjan, Ekagra and Sanyal, Soumya and Talukdar, Partha Pratim},
journal={arXiv preprint arXiv:1911.07979},
year={2019}
}
For any clarification, comments, or suggestions please create an issue or contact Ekagra.