From c4e0a874385d8397cda5387b04ac92a131b5aa63 Mon Sep 17 00:00:00 2001 From: Yelrose <270018958@qq.com> Date: Fri, 31 Jul 2020 10:22:58 +0800 Subject: [PATCH] reproduce paper results --- examples/citation_benchmark/README.md | 16 +++++++++++++++- examples/citation_benchmark/config/gat.yaml | 2 +- examples/citation_benchmark/train.py | 6 ++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/examples/citation_benchmark/README.md b/examples/citation_benchmark/README.md index ba7690d..f2abd2a 100644 --- a/examples/citation_benchmark/README.md +++ b/examples/citation_benchmark/README.md @@ -6,7 +6,21 @@ This page tries to reproduce all the **Graph Neural Network** paper for Citation -All datasets are runned with public split of **semi-supervised** settings. +All datasets are runned with public split of **semi-supervised** settings. And we report the averarge accuracy by running 10 times. + + + +# Experiment Results + +| Model | Cora | Pubmed | Citeseer | Remarks | +| ------------------------------------------------------------ | ------------ | ------------ | ------------ | --------------------------------------------------------- | +| [Vanilla GCN (Kipf 2017)](https://openreview.net/pdf?id=SJU4ayYgl ) | 0.807(0.010) | 0.794(0.003) | 0.710(0.007) | | +| [GAT (Veličković 2017)](https://arxiv.org/pdf/1710.10903.pdf) | 0.834(0.004) | 0.772(0.004) | 0.700(0.006) | | +| [SGC(Wu 2019)](https://arxiv.org/pdf/1902.07153.pdf) | 0.818(0.000) | 0.782(0.000) | 0.708(0.000) | | +| [APPNP (Johannes 2018)](https://arxiv.org/abs/1810.05997) | 0.846(0.003) | 0.803(0.002) | 0.719(0.003) | Almost the same with the results reported in Appendix E. | +| [GCNII (64 Layers, 1500 Epochs, Chen 2020)](https://arxiv.org/pdf/2007.02133.pdf) | 0.846(0.003) | 0.798(0.003) | 0.724(0.006) | | + + diff --git a/examples/citation_benchmark/config/gat.yaml b/examples/citation_benchmark/config/gat.yaml index 4c08e7f..9f62aed 100644 --- a/examples/citation_benchmark/config/gat.yaml +++ b/examples/citation_benchmark/config/gat.yaml @@ -6,4 +6,4 @@ feat_drop: 0.6 attn_drop: 0.6 num_heads: 8 hidden_size: 8 -edge_dropout: 0.1 +edge_dropout: 0.0 diff --git a/examples/citation_benchmark/train.py b/examples/citation_benchmark/train.py index 618a96c..9e96fda 100644 --- a/examples/citation_benchmark/train.py +++ b/examples/citation_benchmark/train.py @@ -131,7 +131,9 @@ def main(args, config): cal_test_acc[np.argmin(cal_val_loss)])) best_test.append(cal_test_acc[np.argmin(cal_val_loss)]) - log.info("Best Test Accuracy: %f ( stddev: %f )" % (np.mean(best_test), np.std(best_test))) + log.info("Dataset: %s Best Test Accuracy: %f ( stddev: %f )" % (args.dataset, np.mean(best_test), np.std(best_test))) + print("Dataset: %s Best Test Accuracy: %f ( stddev: %f )" % (args.dataset, np.mean(best_test), np.std(best_test))) + @@ -142,7 +144,7 @@ if __name__ == '__main__': parser.add_argument("--use_cuda", action='store_true', help="use_cuda") parser.add_argument("--conf", type=str, help="config file for models") parser.add_argument("--epoch", type=int, default=200, help="Epoch") - parser.add_argument("--runs", type=int, default=5, help="runs") + parser.add_argument("--runs", type=int, default=10, help="runs") parser.add_argument("--feature_pre_normalize", type=bool, default=True, help="pre_normalize feature") args = parser.parse_args() config = edict(yaml.load(open(args.conf), Loader=yaml.FullLoader)) -- GitLab