stgraph

๐ŸŒŸ Vertex Centric approach for building GNN/TGNNs

https://github.com/bfgraph/stgraph

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • โœ“
    CITATION.cff file
    Found CITATION.cff file
  • โœ“
    codemeta.json file
    Found codemeta.json file
  • โœ“
    .zenodo.json file
    Found .zenodo.json file
  • โœ“
    DOI references
    Found 2 DOI reference(s) in README
  • โœ“
    Academic publication links
    Links to: arxiv.org, ieee.org, zenodo.org
  • โ—‹
    Academic email domains
  • โ—‹
    Institutional organization owner
  • โ—‹
    JOSS paper metadata
  • โ—‹
    Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

gpu-programming graph-neural-networks graphs python temporal-graph-neural-networks temporal-graphs
Last synced: 4 months ago · JSON representation ·

Repository

๐ŸŒŸ Vertex Centric approach for building GNN/TGNNs

Basic Info
  • Host: GitHub
  • Owner: bfGraph
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 13.7 MB
Statistics
  • Stars: 22
  • Watchers: 1
  • Forks: 0
  • Open Issues: 20
  • Releases: 2
Topics
gpu-programming graph-neural-networks graphs python temporal-graph-neural-networks temporal-graphs
Created almost 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

STGraph Banner

Documentation Status TGL Workshop - @ NeurIPS'23 GrAPL - @IPDPS'24 PyPI - 1.1.0

Explore the docs ยป

Installation guide ยท Report Bug ยท View Discussions . Paper

๐ŸŒŸ STGraph

STGraph is a framework designed for deep-learning practitioners to write and train Graph Neural Networks (GNNs) and Temporal Graph Neural Networks (TGNNs). It is built on top of Seastar and utilizes the vertex-centric approach to produce highly efficient fused GPU kernels for forward and backward passes. It achieves better usability, faster computation time and consumes less memory than state-of-the-art graph deep-learning systems like DGL, PyG and PyG-T.

NOTE: If the contents of this repository are used for research work, kindly cite the paper linked above.

Why STGraph

Seastar GCN Formula

The primary goal of Seastar is more natural GNN programming so that the users learning curve is flattened. Our key observation lies in recognizing that the equation governing a GCN layer, as shown above, takes the form of vertex-centric computation and can be implemented succinctly with only one line of code. Moreover, we can see a clear correspondence between the GNN formulas and the vertex-centric implementations. The benefit is two-fold: users can effortlessly implement GNN models, while simultaneously understanding these models by inspecting their direct implementations.

The Seastar system outperforms state-of-the-art GNN frameworks but lacks support for TGNNs. STGraph bridges that gap and enables users to to develop TGNN models through a vertex-centric approach. STGraph has shown to be significantly faster and more memory efficient that state-of-the-art frameworks like PyG-T for training TGNN models.

Getting Started

Installation for STGraph Package Users

This guide is tailored for users of the STGraph package, designed for constructing GNN and TGNN models. We recommend creating a new virtual environment with Python version 3.8 and installing stgraph inside that dedicated environment.

Installing STGraph from PyPI

bash pip install stgraph

Installing PyTorch

In addition, STGraph relies on PyTorch. Ensure it is installed in your virtual environment with the following command

bash pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Upon completion of the above steps, you have successfully installed STGraph. Proceed to write and train your first GNN model by referring to the provided tutorial.

Installation for STGraph Package Developers

This guide is intended for those interested in developing and contributing to STGraph.

Download source files from GitHub

bash git clone https://github.com/bfGraph/STGraph.git cd STGraph

Create a dedicated virtual environment

Inside the STGraph directory create and activate a dedicated virtual environment named dev-stgraph with Python version 3.8.

bash python3.8 -m venv dev-stgraph source dev-stgraph/bin/activate

Install STGraph in editable mode

Make sure to install the STGraph package in editable mode to ease your development process.

bash pip install -e .[dev] pip list

Install PyTorch

Ensure to install PyTorch as well for development

bash pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

With this you have successfully installed STGraph locally to make development changes and contribute to the project. Head out to our Pull Requests page and get started with your first contribution.

Running your first STGraph Program

Please have a look inside the tutorials/ directory to write and train your own GNNs using STGraph

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests, issues, etc to us.

How to contribute to Documentation

We follow the PEP-8 format. Black is used as the formatter and pycodestyle as the linter. The linter is is configure to work properly with black (set line length to 88)

Tutorial for Python Docstrings can be found here

sphinx-apidoc -o docs/developers_guide/developer_manual/package_reference/ python/stgraph/ -f cd docs/ make clean make html

Authors

| Author | Bio | | --------------------------------- | --------------------------------------------------------------------- | | Joel Mathew Cherian | Computer Science Student at National Institute of Technology Calicut | | Nithin Puthalath Manoj | Computer Science Student at National Institute of Technology Calicut | | Dr. Unnikrishnan Cheramangalath | Assistant Professor in CSED at Indian Institue of Technology Palakkad | | Kevin Jude | Ph.D. in CSED at Indian Institue of Technology Palakkad |

References

| Author(s) | Title | Link(s) | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | Wu, Yidi and Ma, Kaihao and Cai, Zhenkun and Jin, Tatiana and Li, Boyang and Zheng, Chenguang and Cheng, James and Yu, Fan | Seastar: vertex-centric programming for graph neural networks, 2021 | paper, code | | Wheatman, Brian and Xu, Helen | Packed Compressed Sparse Row: A Dynamic Graph Representation, 2018 | paper, code | | Sha, Mo and Li, Yuchen and He, Bingsheng and Tan, Kian-Lee | Accelerating Dynamic Graph Analytics on GPUs, 2017 | paper, code | | Benedek Rozemberczki, Paul Scherer, Yixuan He, George Panagopoulos, Alexander Riedel, Maria Astefanoaei, Oliver Kiss, Ferenc Beres, Guzmรกn Lรณpez, Nicolas Collignon, Rik Sarkar | PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models, 2021 | paper, code |

Owner

  • Name: But First Graphs!
  • Login: bfGraph
  • Kind: organization
  • Location: India

A community that works on graph based problems

Citation (CITATION.cff)

title: STGraph
abstract: Vertex Centric approach for building GNN/TGNNs
authors:
  - family-names: Puthalath Manoj
    given-names: Nithin
    orcid: "https://orcid.org/0009-0000-3822-8391"
  - family-names: Mathew Cherian
    given-names: Joel
cff-version: 1.2.0
date-released: "2023-12-16"
identifiers:
  - type: url
    value: "https://github.com/bfGraph/STGraph"
    description: Latest version of STGraph
keywords:
  - "Temporal Graph Neural Networks"
  - "Deep Learning"
  - "Python"
license: MIT
message: If you use this software, please cite it using these metadata.
repository-code: "https://github.com/bfGraph/STGraph"
preferred-citation:
  title: "STGraph: A Framework for Temporal Graph Neural Networks"
  type: conference-paper
  authors:
  - family-names: "Puthalath Manoj"
    given-names: "Nithin"
  - family-names: "Mathew Cherian"
    given-names: "Joel"
  - family-names: "Jude Concessao"
    given-names: "Kevin"
  - family-names: "Cheramgalath"
    given-names: "Unnikrishnan"
  collection-title: "Temporal Graph Learning Workshop @ NeurIPS 2023" # booktitle
  collection-type: "proceedings"
  conference:
    name: "NeurIPS" # series
  year: 2023

GitHub Events

Total
  • Watch event: 5
  • Push event: 1
Last Year
  • Watch event: 5
  • Push event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 18 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 2
pypi.org: stgraph

๐ŸŒŸ Vertex Centric approach for building GNN/TGNNs

  • Homepage: https://github.com/bfGraph/STGraph
  • Documentation: https://stgraph.readthedocs.io/
  • License: MIT License Copyright (c) 2023 STGraph Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 1.1.0
    published over 1 year ago
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 18 Last month
Rankings
Dependent packages count: 10.0%
Average: 38.8%
Dependent repos count: 67.6%
Maintainers (2)
Last synced: 4 months ago