Skip to content

BUPT-GAMMA/Graph-Structure-Estimation-Neural-Networks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GEN

Source code for WWW2021 paper "Graph Structure Estimation Neural Networks"

Environment Settings

  • python == 3.6.9
  • torch == 1.6.0

Parameter Settings

  • k: k of knn graph
  • threshold: threshold for adjacency matrix
  • tolerance: tolerance to stop EM algorithm
  • iter: number of iterations to train the GEN
  • base: backbone GNNs
  • seed: random seed
  • lr: learning rate
  • weight_decay: weight decay (L2 loss on parameters)
  • hidden: embedding dimension
  • dropout: dropout rate
  • activation: activation function selection
  • dataset: str in ['cora', 'citeseer', 'pubmed', 'chameleon', 'squirrel', 'actor', 'sbm']
  • epoch: number of epochs to train the base model

Files in the folder

GEN/
β”œβ”€β”€ code/
β”‚   β”œβ”€β”€ train.py: training the GEN model
β”‚   β”œβ”€β”€ models.py: implementation of GEN and backbone GNNs
β”‚   β”œβ”€β”€ utils.py
β”‚   β”œβ”€β”€ generator.py: generating dataset based on attribute SBM
β”‚   β”œβ”€β”€ nx.py: saving graph structure as .gexf files for Gephi
β”‚   └── heatmap.py: generating heatmaps of community matrices
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ ind.cora.x: cora dataset
β”‚   β”œβ”€β”€ ind.cora.y
β”‚   β”œβ”€β”€ ind.cora.tx
β”‚   β”œβ”€β”€ ind.cora.ty
β”‚   β”œβ”€β”€ ind.cora.allx
β”‚   β”œβ”€β”€ ind.cora.ally
β”‚   β”œβ”€β”€ ind.cora.graph
β”‚   β”œβ”€β”€ ind.cora.test.index
β”‚   β”œβ”€β”€ ind.citeseer.x: citeseer dataset
β”‚   β”œβ”€β”€ ind.citeseer.y
β”‚   β”œβ”€β”€ ind.citeseer.tx
β”‚   β”œβ”€β”€ ind.citeseer.ty
β”‚   β”œβ”€β”€ ind.citeseer.allx
β”‚   β”œβ”€β”€ ind.citeseer.ally
β”‚   β”œβ”€β”€ ind.citeseer.graph
β”‚   β”œβ”€β”€ ind.citeseer.test.index
β”‚   β”œβ”€β”€ ind.pubmed.x: pubmed dataset
β”‚   β”œβ”€β”€ ind.pubmed.y
β”‚   β”œβ”€β”€ ind.pubmed.tx
β”‚   β”œβ”€β”€ ind.pubmed.ty
β”‚   β”œβ”€β”€ ind.pubmed.allx
β”‚   β”œβ”€β”€ ind.pubmed.ally
β”‚   β”œβ”€β”€ ind.pubmed.graph
β”‚   β”œβ”€β”€ ind.pubmed.test.index
β”‚   β”œβ”€β”€ squirrel_node_feature_label.txt: squirrel dataset
β”‚   β”œβ”€β”€ squirrel_graph_edges.txt
β”‚   β”œβ”€β”€ chameleon_node_feature_label.txt: chameleon dataset
β”‚   β”œβ”€β”€ chameleon_graph_edges.txt
β”‚   β”œβ”€β”€ actor_node_feature_label.txt: actor dataset
β”‚   β”œβ”€β”€ actor_graph_edges.txt
β”‚   β”œβ”€β”€ sbm.p: synthetic dataset
β”‚   └── sbm_adj.p: graph structure estimated by GEN
└── README.md

Basic Usage

python ./code/train.py 

Hyper-parameter Tuning

There are three key hyper-parameters: k, threshold and tolerance.

  • k: [3, 4, 5 …, 14, 15]
  • threshold: [0.1, 0.2, 0.3, …, 0.8, 0.9]
  • tolerance: [0.1, 0.01]

For the hyper-parameter settings of six benchmark datasets used in this paper, please refer to Section 4.4.

Reference

@inproceedings{wang2021graph,
  title={Graph Structure Estimation Neural Networks},
  author={Wang, Ruijia and Mou, Shuai and Wang, Xiao and Xiao, Wanpeng and Ju, Qi and Shi, Chuan and Xie, Xing},
  booktitle={Proceedings of the Web Conference 2021},
  pages={342--353},
  year={2021}
}

About

Source code for WWW 2021 paper "Graph Structure Estimation Neural Networks"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages