Skip to content

alelab-upenn/edgenets

Repository files navigation

EdgeNets

Experimentation on EdgeNets. This is the code used for obtaining the results in the paper submitted to EUSIPCO 2019. If any part of this code is used, the following paper must be cited:

E. Isufi, F. Gama, and A. Ribeiro, "Generalizing Graph Convolutional Neural Networks with Edge-Variant Recursions on Graphs," in 27th Eur. Signal Process. Conf. A Coruña, Spain: EURASIP, 2-6 Sep. 2019.

Any questions, comments or suggestions, please e-mail Fernando Gama at [email protected]. The specific random seeds and resulting trained models used to get the results that appear in the paper can be obtained by request.

Datasets

Two experiments are run.

1. The first one, under the name sourceLocalizationEdgeNets.py is a synthetic experiment on a stochastic block model (SBM) graph. The objective of this problem is to localize the community that was the source of a diffused process.

A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová, "Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications," Physical Review E, vol. 84, no. 6, p. 066106, Dec. 2011.

2. The second one, on the file authorshipAttributionEdgeNets.py considers the problem of authorship attribution. The dataset is available under authorData/ and the following paper must be cited whenever such dataset is used

S. Segarra, M. Eisen, and A. Ribeiro, "Authorship attribution through function word adjacency networks," IEEE Trans. Signal Process., vol. 63, no. 20, pp. 5464–5478, Oct. 2015.

Code

The code is written in Python3 and the machine learning toolbox is PyTorch. Details as follows.

Dependencies

The following Python libraries are required: os, numpy, matplotlib, pickle, datetime, scipy, torch, hdf5storage, torchvision, operator, tensorboardX and glob, as well as a LaTeX installation.

Concept

The two main files sourceLocalizationEdgeNets.py and authorshipAttributionEdgeNets.py consists of the two main experiments. The first lines of code on each of those files (after importing the corresponding libraries) have the main (hyper) parameters defined, which could be edited for running experiment under a different scenario.

The directory Modules/ contains the implemented architectures architectures.py, the function to simultaneously train multiple models train.py, as well as an auxiliary container to bind together the architecture, the optimizer and the loss function model.py (as well as other utilities).

Under Utils/ there are five modules containing utilitary classes and functions, such as those handling the graph graphTools.py, handling the data dataTools.py, the graph machine learning liberary graphML.py which implements the basic layers and functions for handling graph signals, some miscellaneous tools miscTools.py and the visualization tools on tensorboard visualTools.py.

Run

The code runs by simply executing python sourceLocalizationEdgeNets.py or any of the two other experiments (assuming python is the command for Python3). For running the authorship attribution experiment, the .rar files on authorData/ have to be uncompressed.

About

Experimentation on EdgeNets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages