Skip to content

gerritgr/DSNN

Repository files navigation

Deep Set Neural Networks (DSNN)

alt text

This repository provides a proof-of-concept implementation for the manuscript Deep Sets Are Viable Graph Learners.

DSNN Model

DSNN computes predictions on graphs, where the graph is represented as a multiset of nodes. Positional embeddings are computed using the following metrics:

  • Centrality measures (e.g., betweenness, eigenvalue, laplacian centrality).
  • The minimal distance to the node(s) with the highest/lowest centrality.
  • The sum of neighboring nodes' features.

DSNN has two components (MLP_1 and MLP_2), each with nine layers. These components have a latent dimension of 64 and utilize residual connections.

Baselines

For comparison, we employ models from PyTorch Geometric as our baselines, specifically GIN, PNA, and GCN. These models are configured with five layers and a latent dimension of 64.

Results

The number of parameters and the accuracy (higher is better) of each model are:

alt text

Run DSNN

Locally

You can run DSNN locally using main.ipynb. First, install Anaconda, then create an environment with the Python dependencies (tested on OS X):

conda env create -f environment.yml -n dsnn
conda activate dsnn
jupyter lab

Then just run the notebook(s) from start to finish.

Via Docker

Install docker and then:

docker pull gerritgr/dsnn:latest
docker run -p 8888:8888 gerritgr/dsnn:latest

You need to manually copy the URL to your browser, navigate to the notebook, and activate the dsnnenv kernel (Kernel -> Change Kernel...).

Errata

  • The positional encodings contain a sum of the values of all neighboring nodes (not only of their positional encodings).
  • Accuracy decreased due to a calculation error in the split of train/val/test compared to the revision version.

About

Deep Sets Are Viable Graph Learners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published