Code for the paper "Asymptotics of ℓ2 Regularized Network Embeddings"

Overview

README

Code for the paper Asymptotics of L2 Regularized Network Embeddings.

Requirements

Requires Stellargraph 1.2.1, Tensorflow 2.6.0, scikit-learm 0.24.1, tqdm, along with any other packages required for the above three packages.

Code

To run node classification or link prediction experiments, run

python -m code.train_embed [[args]]

or

python -m code.train_embed_link [[args]]

from the command line respectively, where [[args]] correspond to the command line arguments for each function. Note that the scripts expect to run from the parent directory of the code folder; you will need to change the import statements in the associated python files if you move them around. The -h command line argument will display the arguments (with descriptions) of each of the two files.

train_embed.py arguments

short long default help
-h --help show this help message and exit
--dataset Cora Dataset to perform training on. Available options: Cora,CiteSeer,PubMedDiabetes
--emb-size 128 Embedding dimension. Defaults to 128.
--reg-weight 0.0 Weight to use for L2 regularization. If norm_reg is True, then reg_weight/num_of_nodes is used instead.
--norm-reg Boolean for whether to normalize the L2 regularization weight by the number of nodes in the graph. Defaults to false.
--method node2vec Algorithm to perform training on. Available options: node2vec,GraphSAGE,GCN,DGI
--verbose 1 Level of verbosity. Defaults to 1.
--epochs 5 Number of epochs through the dataset to be used for training.
--optimizer Adam Optimization algorithm to use for training.
--learning-rate 0.001 Learning rate to use for optimization.
--batch-size 64 Batch size used for training.
--train-split [0.01, 0.025, 0.05] Percentage(s) to use for the training split when using the learned embeddings for downstream classification tasks.
--train-split-num 25 Decides the number of random training/test splits to use for evaluating performance. Defaults to 50.
--output-fname None If not None, saves the hyperparameters and testing results to a .json file with filename given by the argument.
--node2vec-p 1.0 Hyperparameter governing probability of returning to source node.
--node2vec-q 1.0 Hyperparameter governing probability of moving to a node away from the source node.
--node2vec-walk-number 50 Number of walks used to generate a sample for node2vec.
--node2vec-walk-length 5 Walk length to use for node2vec.
--dgi-sampler fullbatch Specifies either a fullbatch or a minibatch sampling scheme for DGI.
--gcn-activation ['relu'] Determines the activations of each layer within a GCN. Defaults to a single layer with relu activation.
--graphSAGE-aggregator mean Specifies the aggreagtion rule used in GraphSAGE. Defaults to mean pooling.
--graphSAGE-nbhd-sizes [10, 5] Specify multiple neighbourhood sizes for sampling in GraphSAGE. Defaults to [10, 5].
--tensorboard If toggles, saves Tensorboard logs for debugging purposes.
--visualize-embeds None If specified with a directory, saves an image of a TSNE 2D projection of the learned embeddings at the specified directory.
--save-spectrum None If specifies, saves the spectrum of the learned embeddings output by the algorithm.

train_embed_link.py arguments

short long default help
-h --help show this help message and exit
--dataset Cora Dataset to perform training on. Available options: Cora,CiteSeer,PubMedDiabetes
--emb-size 128 Embedding dimension. Defaults to 128.
--reg-weight 0.0 Weight to use for L2 regularization. If norm_reg is True, then reg_weight/num_of_nodes is used instead.
--norm-reg Boolean for whether to normalize the L2 regularization weight by the number of nodes in the graph. Defaults to false.
--method node2vec Algorithm to perform training on. Available options: node2vec,GraphSAGE,GCN,DGI
--verbose 1 Level of verbosity. Defaults to 1.
--epochs 5 Number of epochs through the dataset to be used for training.
--optimizer Adam Optimization algorithm to use for training.
--learning-rate 0.001 Learning rate to use for optimization.
--batch-size 64 Batch size used for training.
--test-split 0.1 Split of edge/non-edge set to be used for testing.
--output-fname None If not None, saves the hyperparameters and testing results to a .json file with filename given by the argument.
--node2vec-p 1.0 Hyperparameter governing probability of returning to source node.
--node2vec-q 1.0 Hyperparameter governing probability of moving to a node away from the source node.
--node2vec-walk-number 50 Number of walks used to generate a sample for node2vec.
--node2vec-walk-length 5 Walk length to use for node2vec.
--gcn-activation ['relu'] Specifies layers in terms of their output activation (either relu or linear), with the number of arguments determining the length of the GCN. Defaults to a single layer with relu activation.
--graphSAGE-aggregator mean Specifies the aggreagtion rule used in GraphSAGE. Defaults to mean pooling.
--graphSAGE-nbhd-sizes [10, 5] Specify multiple neighbourhood sizes for sampling in GraphSAGE. Defaults to [25, 10].
Owner
Andrew Davison
Andrew Davison
CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Detection in Remote Sensing Images

CFC-Net This project hosts the official implementation for the paper: CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Dete

ming71 55 Dec 12, 2022
Normalization Calibration (NorCal) for Long-Tailed Object Detection and Instance Segmentation

NorCal Normalization Calibration (NorCal) for Long-Tailed Object Detection and Instance Segmentation On Model Calibration for Long-Tailed Object Detec

Tai-Yu (Daniel) Pan 24 Dec 25, 2022
RIFE: Real-Time Intermediate Flow Estimation for Video Frame Interpolation

RIFE - Real Time Video Interpolation arXiv | YouTube | Colab | Tutorial | Demo Table of Contents Introduction Collection Usage Evaluation Training and

hzwer 3k Jan 04, 2023
Study of human inductive biases in CNNs and Transformers.

Are Convolutional Neural Networks or Transformers more like human vision? This repository contains the code and fine-tuned models of popular Convoluti

Shikhar Tuli 39 Dec 08, 2022
ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models (ICCV 2021 Oral)

ILVR + ADM This is the implementation of ILVR: Conditioning Method for Denoising Diffusion Probabilistic Models (ICCV 2021 Oral). This repository is h

Jooyoung Choi 225 Dec 28, 2022
novel deep learning research works with PaddlePaddle

Research 发布基于飞桨的前沿研究工作,包括CV、NLP、KG、STDM等领域的顶会论文和比赛冠军模型。 目录 计算机视觉(Computer Vision) 自然语言处理(Natrual Language Processing) 知识图谱(Knowledge Graph) 时空数据挖掘(Spa

1.5k Dec 29, 2022
Drone detection using YOLOv5

This drone detection system uses YOLOv5 which is a family of object detection architectures and we have trained the model on Drone Dataset. Overview I

Tushar Sarkar 27 Dec 20, 2022
Modified prey-predator system - Modified prey–predator model describes the rate of change for each species by adding coupling terms.

Modified prey-predator system We aim to study the behaviors of the modified prey–predator model and establish the effects of several parameters that p

Seoyoung Oh 1 Jan 02, 2022
Deep Learning agent of Starcraft2, similar to AlphaStar of DeepMind except size of network.

Introduction This repository is for Deep Learning agent of Starcraft2. It is very similar to AlphaStar of DeepMind except size of network. I only test

Dohyeong Kim 136 Jan 04, 2023
NEATEST: Evolving Neural Networks Through Augmenting Topologies with Evolution Strategy Training

NEATEST: Evolving Neural Networks Through Augmenting Topologies with Evolution Strategy Training

Göktuğ Karakaşlı 16 Dec 05, 2022
Code for the published paper : Learning to recognize rare traffic sign

Improving traffic sign recognition by active search This repo contains code for the paper : "Learning to recognise rare traffic signs" How to use this

samsja 4 Jan 05, 2023
Syntax-Aware Action Targeting for Video Captioning

Syntax-Aware Action Targeting for Video Captioning Code for SAAT from "Syntax-Aware Action Targeting for Video Captioning" (Accepted to CVPR 2020). Th

59 Oct 13, 2022
learning and feeling SLAM together with hands-on-experiments

modern-slam-tutorial-python Learning and feeling SLAM together with hands-on-experiments 😀 😃 😆 Dependencies Most of the examples are based on GTSAM

Giseop Kim 59 Dec 22, 2022
Code associated with the paper "Deep Optics for Single-shot High-dynamic-range Imaging"

Deep Optics for Single-shot High-dynamic-range Imaging Code associated with the paper "Deep Optics for Single-shot High-dynamic-range Imaging" CVPR, 2

Stanford Computational Imaging Lab 40 Dec 12, 2022
MiraiML: asynchronous, autonomous and continuous Machine Learning in Python

MiraiML Mirai: future in japanese. MiraiML is an asynchronous engine for continuous & autonomous machine learning, built for real-time usage. Usage In

Arthur Paulino 25 Jul 27, 2022
PyTorch implementations of Generative Adversarial Networks.

This repository has gone stale as I unfortunately do not have the time to maintain it anymore. If you would like to continue the development of it as

Erik Linder-Norén 13.4k Jan 08, 2023
Ros2-voiceroid2 - ROS2 wrapper package of VOICEROID2

ros2_voiceroid2 ROS2 wrapper package of VOICEROID2 Windows Only Installation Ins

Nkyoku 1 Jan 23, 2022
Dilated Convolution with Learnable Spacings PyTorch

Dilated-Convolution-with-Learnable-Spacings-PyTorch Ismail Khalfaoui Hassani Dilated Convolution with Learnable Spacings (abbreviated to DCLS) is a no

15 Dec 09, 2022
Repository for the paper : Meta-FDMixup: Cross-Domain Few-Shot Learning Guided byLabeled Target Data

1 Meta-FDMIxup Repository for the paper : Meta-FDMixup: Cross-Domain Few-Shot Learning Guided byLabeled Target Data. (ACM MM 2021) paper News! the rep

Fu Yuqian 44 Nov 18, 2022
Open source repository for the code accompanying the paper 'Non-Rigid Neural Radiance Fields Reconstruction and Novel View Synthesis of a Deforming Scene from Monocular Video'.

Non-Rigid Neural Radiance Fields This is the official repository for the project "Non-Rigid Neural Radiance Fields: Reconstruction and Novel View Synt

Facebook Research 296 Dec 29, 2022