Skip to main content

Python implementation of Deep Graph Echo State Networks

Project description

Graph ESN library

Pytorch implementation of echo state networks for static graphs and discrete-time dynamic graphs.

Installation

Easiest way to get our library is via python package:

pip install graphesn

Usage

The library is quite straightforward to use:

from graphesn import StaticGraphReservoir, Readout, initializer
from torch_geometric.data import Data

data = Data(...)

reservoir = StaticGraphReservoir(num_layers=3, in_features=8, hidden_features=16)
reservoir.initialize_parameters(recurrent=initializer('uniform', rho=.9), input=initializer('uniform', scale=1))
embeddings = reservoir(data.edge_index, data.x)

readout = Readout(num_features=reservoir.out_features, num_targets=3)
readout.fit(data=(embeddings, data.y), regularization=1e-3)
predictions = readout(embeddings)

Code outlook

The library is contained in folder src/graphesn:

  • reservoir.py implementation of reservoirs for static and discrete-time dynamic graphs;
  • matrix.py random matrices generating functions;
  • readout.py implementation of a linear readout for large-scale ridge regression;
  • data.py classes to represent temporal and dynamic graphs;
  • dataset.py some dynamic graph datasets;
  • util.py general utilities.

The examples folder contains demos for our library on some common graph datasets.

Contributing

This research software is provided as-is. We are working on this library in our spare time.

Code is released under the MIT license, see LICENSE for details.

If you find a bug, please open an issue to report it, and we will do our best to solve it. For general or technical questions, please email us rather than opening an issue.

References

  • C. Gallicchio, A. Micheli (2010). Graph Echo State Networks. The 2010 International Joint Conference on Neural Networks (IJCNN 2010), pp. 3967–3974.
  • C. Gallicchio, A. Micheli (2020). Fast and Deep Graph Neural Networks. The Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI-20).
  • C. Gallicchio, A. Micheli (2020). Ring Reservoir Neural Networks for Graphs. The 2020 International Joint Conference on Neural Networks (IJCNN 2020).
  • D. Tortorella, A. Micheli (2021). Dynamic Graph Echo State Networks. Proceedings of the 29th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN 2021), pp. 99–104.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphesn-0.2.17.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphesn-0.2.17-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file graphesn-0.2.17.tar.gz.

File metadata

  • Download URL: graphesn-0.2.17.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for graphesn-0.2.17.tar.gz
Algorithm Hash digest
SHA256 91aae1113628e9e9330184fe248dbd6b42f359de9d90d660c3f17da81ab16211
MD5 af21bfeeefe0253554b32e7e28b5287a
BLAKE2b-256 23238d82850ca32192dcd2032531c289e45d82566293c631e69f32f19ea69959

See more details on using hashes here.

File details

Details for the file graphesn-0.2.17-py3-none-any.whl.

File metadata

  • Download URL: graphesn-0.2.17-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for graphesn-0.2.17-py3-none-any.whl
Algorithm Hash digest
SHA256 cd675d3b915a11f8f8a1b66667b7bd69e11d6165928ed24b7c40471b73c0c1f3
MD5 67f3e22dee19ed14af0de0d1f735bd84
BLAKE2b-256 f01cfd4ebf95a61688c237d7ddb93f47016127400c6fe6e9e8bda114143ce915

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page