msgnn
Official code for the LoG2022 paper -- MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Keywords
Repository
Official code for the LoG2022 paper -- MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian.
Basic Info
Statistics
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
MSGNN
MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian (LoG 2022)
For details, please read our paper. You are also welcome to read our poster.
MSGNN is also implemented in the PyTorch Geometric Signed Directed library.
Citing
If you find MSGNN useful in your research, please consider adding the following citation:
bibtex
@inproceedings{he2022msgnn,
title={MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian},
author={He, Yixuan and Perlmutter, Michael and Reinert, Gesine and Cucuringu, Mihai},
booktitle={Learning on Graphs Conference},
pages={40--1},
year={2022},
organization={PMLR}
}
Environment Setup
Overview
The project has been tested on the following environment specification: 1. Ubuntu 18.04.6 LTS 2. Nvidia Graphic Card (NVIDIA Tesla T4 with driver version 450.142.00) and CPU (Intel Xeon Platinum 8259CL CPUs @ 2.50GHz) 3. Python 3.7 4. CUDA 11.0 5. Pytorch 1.10.1 (built against CUDA 10.2) 6. Other libraries and python packages (See below)
The codebase is implemented in Python 3.7. package versions used for development are below.
networkx 2.6.3
numpy 1.20.3
scipy 1.5.4
argparse 1.1.0
sklearn 0.23.2
torch 1.10.1
torch-geometric 2.0.3 (https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html)
torch-geometric-signed-directed 0.22.0
tensorboard 2.4.0
Folder structure
./execution/ stores files that can be executed to generate outputs. For vast number of experiments, we use parallel, which can be downloaded in command line and make it executable via:
wget http://git.savannah.gnu.org/cgit/parallel.git/plain/src/parallel chmod 755 ./parallel./joblog/ stores job logs from parallel. You might need to create it by
mkdir joblog./Output/ stores raw outputs (ignored by Git) from parallel. You might need to create it by
mkdir Output./data/ stores processed data sets.
./src/ stores files to train various models, utils and metrics.
./*_results/ stores results for different data sets.
Options
MSGNN provides the following command line arguments, which can be viewed in the ./src/parser_node.py for the node clustering tasks and ./src/parser_link.py for the link prediction tasks.
Reproduce results
First, get into the ./execution/ folder:
cd execution
To reproduce all results for MSGNN on GPU 0 (group a):
bash a0.sh
Other execution files are similar to run.
Note that if you are operating on CPU, you may delete the commands ``CUDAVISIBLEDEVICES=xx". You can also set you own number of parallel jobs, not necessarily following the j numbers in the .sh files.
You can also use CPU for training if you add ``--cpu".
Direct execution with training files
First, get into the ./src/ folder:
cd src
Then, below are various options to try:
Creating an MSGNN model for SDSBM on the node clustering task of the default setting on the 3c data set (remeber to specify a data set name).
python ./main_SDSBM_node.py --dataset 3c --weighted_input_feat --sd_input_feat
Creating a model for the FiLL-pvCLCL data set in the year 2010 on the link prediction task 4C with some custom learning rate and epoch number, for the SigMaNet method.
python ./main_signed_directed_link.py --dataset pvCLCL --year 2010 --lr 0.001 --epochs 300 --num_classes 4 --method SigMaNet --weighted_input_feat --sd_input_feat
Creating a model for the FiLL-OPCL data set in the year 2016 on the link prediction task 3C and use CPU, for the SDGNN method.
python ./main_signed_directed_link.py --dataset OPCL --year 2016 --cpu --num_classes 5 --direction_only_task --method SDGNN
Note
- The convention of the definition of the K parameter needs a bit of attention: in the paper, K denotes the degree of the Chebyshev polynomial, while in the code implmentation, K denotes the size of the Chebyshev filter (followed from the Cheb_conv definition from PyTorch Geometric). Therefore, though we have by defualt K=1 as stated in our paper, this default means K=2 in our code.
Owner
- Name: Yixuan He
- Login: SherylHYX
- Kind: user
- Location: Oxford
- Company: University of Oxford
- Website: https://sherylhyx.github.io
- Twitter: sherylhyx
- Repositories: 4
- Profile: https://github.com/SherylHYX
DPhil in Statistics @ University of Oxford
Citation (CITATION.cff)
cff-version: 1.2.0
message: "Please cite our paper if you find our work useful in your research."
title: "DIGRAC: Digraph Clustering Based on Flow Imbalance"
authors:
- family-names: "He"
given-names: "Yixuan"
- family-names: "Permultter"
given-names: "Michael"
- family-names: "Reinert"
given-names: "Gesine"
- family-names: "Cucuringu"
given-names: "Mihai"
license: MIT
url: "https://github.com/SherylHYX/MSGNN"
preferred-citation:
type: article
authors:
- family-names: "He"
given-names: "Yixuan"
- family-names: "Permultter"
given-names: "Michael"
- family-names: "Reinert"
given-names: "Gesine"
- family-names: "Cucuringu"
given-names: "Mihai"
journal: "Proceedings of the First Learning on Graphs Conference, PMLR 198"
title: "MSGNN: A Spectral Graph Neural Network Based on a Novel Magnetic Signed Laplacian"
year: 2022
start: 40
end: 1
GitHub Events
Total
- Push event: 4
- Fork event: 1
Last Year
- Push event: 4
- Fork event: 1
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0