Skip to main content

Graph Neural Network Model

This repo contains a Tensorflow implementation of the Graph Neural Network model.

Install

Requirements

The GNN framework requires the packages tensorflow, numpy, scipy.

To install the requirements you can use the following command

pip install -U -r requirements.txt

Install the latest version of GNN:

pip install gnn

For additional details, please see Install.

Simple usage example

import gnn.GNN as GNN
import gnn.gnn_utils
import Net as n

# Provide your own functions to generate input data
inp, arcnode, nodegraph, labels = set_load()

# Create the state transition function, output function, loss function and  metrics
net = n.Net(input_dim, state_dim, output_dim)

# Create the graph neural network model
g = GNN.GNN(net, input_dim, output_dim, state_dim)

#Training

for j in range(0, num_epoch):
    g.Train(inp, arcnode, labels, count, nodegraph)

    # Validate
    print(g.Validate(inp_val, arcnode_val, labels_val, count, nodegraph_val))

Citing

To cite the GNN implementation please use the following publication:

Rossi, A., Tiezzi, M., Dimitri, G.M., Bianchini, M., Maggini, M., & Scarselli, F. (2018).
"Inductive–Transductive Learning with Graph Neural Networks",
In Artificial Neural Networks in Pattern Recognition (pp.201-212).
Berlin : Springer-Verlag.

Bibtex:

@inproceedings{rossi2018inductive,
  title={Inductive--Transductive Learning with Graph Neural Networks},
  author={Rossi, Alberto and Tiezzi, Matteo and Dimitri, Giovanna Maria and Bianchini, Monica and Maggini, Marco and Scarselli, Franco},
  booktitle={IAPR Workshop on Artificial Neural Networks in Pattern Recognition},
  pages={201--212},
  year={2018},
  organization={Springer}
}

To cite GNN please use the following publication:

F. Scarselli, M. Gori,  A. C. Tsoi, M. Hagenbuchner, G. Monfardini,
"The Graph Neural Network Model", IEEE Transactions on Neural Networks,
vol. 20(1); p. 61-80, 2009.

Bibtex:

@article{Scarselli2009TheGN,
  title={The Graph Neural Network Model},
  author={Franco Scarselli and Marco Gori and Ah Chung Tsoi and Markus Hagenbuchner and Gabriele Monfardini},
  journal={IEEE Transactions on Neural Networks},
  year={2009},
  volume={20},
  pages={61-80}
}

License

Released under the 3-Clause BSD license (see LICENSE.txt):

Copyright (C) 2004-2019 Matteo Tiezzi
Matteo Tiezzi <mtiezzi@diism.unisi.it>
Alberto Rossi <alrossi@unifi.it>

Metadata

Release files for gnn 1.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gnn 1.1.9
File Interpreter ABI Platform
gnn-1.1.9-py3-none-any.whl Python 3 none any Details

Release files / gnn-1.1.9-py3-none-any.whl

Download URL gnn-1.1.9-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77deba87847f49f4a76670e284279f716215ecc3c91716496f54a559e6360687
BLAKE2b-256 checksum
How to use checksums
004df2ddea8ce94efad2b766aae9be49bc424fa36fa4e426473dd5e9dc00a15a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Security for gnn 1.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page