Giter Club home page Giter Club logo

walkpooling's Introduction

WalkPooling

About

This is the source code for paper Neural Link Prediction with Walk Pooling.

PWCPWCPWC

Requirements

python>=3.3.7

torch>=1.9.0

torch-cluster>=1.5.9

torch-geometric>=2.0.0

torch-scatter>=2.0.8

torch-sparse>=0.6.11

tqdm

This code was tested on macOS and Linux.

Run

Quick start

python ./src/main.py --data-name USAir

Parameters

Data and sample

--data-name: supported data:

  1. Without node attributes: USAir NS Power Celegans Router PB Ecoli Yeast

  2. With node attributes: cora citeseer pubmed

--use-splitted: when it is True, we use the splitted data from SEAL. When it is False, we will randomly split train, validation and test data.

--data-split-num: the index of splitted data when --use-splitted is True. From 1 to 10.

--test-ratio and --val-ratio: Test ratio and validation ratio of the data set when --use-splitted is False. Defaults are 0.1 and 0.05 respectively.

--observe-val-and-injection: whether to contain the validation set in the observed graph and apply injection trick.

--practical-neg-sample: whether only see the train positive edges when sampling negative.

--num-hops: number of hops in sampling subgraph. Default is 2.

--max-nodes-per-hop: When the graph is too large or too dense, we need max node per hop threshold to avoid OOM. Default is None.

Hyperparameters

--init-attribute: the initial attribute for graphs without node attributes. options: n2v, one_hot, spc, ones, zeros, None. Default is ones.

--init-representation: node feature representation . options: gic, vgae, argva, None. Default is None.

--drnl: whether to use drnl labeling. Default is False.

--seed: random seed. Default is 1.

--lr: learning rate. Default is 0.00005.

-heads: using multi-heads in the attention link weight encoder. Default is 2.

--hidden-channels: Default is 32.

--batch-size: Default is 32.

--epoch-num: Default is 50.

Reproducibility

Reproduce Table 1, 2, 3, 4 in the paper.

./bash/run.sh

Reference

If you find our work useful in your research, please cite our paper:

@article{pan2021neural,
  title={Neural Link Prediction with Walk Pooling},
  author={Pan, Liming and Shi, Cheng and Dokmani{\'c}, Ivan},
  journal={arXiv preprint arXiv:2110.04375},
  year={2021}
}

walkpooling's People

Contributors

mltml24 avatar dadacheng 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.