Skip to main content
QUICK REVIEW

[Paper Review] PyTorch Geometric Signed Directed: A Software Package on Graph Neural Networks for Signed and Directed Graphs

Yixuan He, Xitong Zhang|arXiv (Cornell University)|Feb 22, 2022
Advanced Graph Neural NetworksComputer Science6 citations
TL;DR

PyTorch Geometric Signed Directed (PyGSD) is the first open-source deep learning library for graph neural networks (GNNs) tailored specifically for signed and directed graphs. It extends PyTorch Geometric with specialized GNN models, data loaders, loss functions, and evaluation metrics, demonstrating improved efficiency and performance across node classification, link prediction, and direction prediction tasks on real and synthetic signed-directed networks.

ABSTRACT

Networks are ubiquitous in many real-world applications (e.g., social networks encoding trust/distrust relationships, correlation networks arising from time series data). While many networks are signed or directed, or both, there is a lack of unified software packages on graph neural networks (GNNs) specially designed for signed and directed networks. In this paper, we present PyTorch Geometric Signed Directed (PyGSD), a software package which fills this gap. Along the way, we evaluate the implemented methods with experiments with a view to providing insights into which method to choose for a given task. The deep learning framework consists of easy-to-use GNN models, synthetic and real-world data, as well as task-specific evaluation metrics and loss functions for signed and directed networks. As an extension library for PyG, our proposed software is maintained with open-source releases, detailed documentation, continuous integration, unit tests and code coverage checks. The GitHub repository of the library is https://github.com/SherylHYX/pytorch_geometric_signed_directed.

Motivation & Objective

  • To address the lack of unified, open-source software for graph neural networks (GNNs) tailored to signed and directed networks.
  • To provide a comprehensive, maintainable, and efficient software package that supports GNN models, data generation, and task-specific evaluation for signed and directed graphs.
  • To evaluate and compare existing GNN methods on signed and directed networks to guide practitioners in model selection.
  • To extend PyTorch Geometric with specialized components for signed and directed graph learning, including custom loss functions and metrics.
  • To ensure software quality through open-source releases, documentation, continuous integration, unit testing, and code coverage.

Proposed method

  • The library implements specialized GNN architectures such as DGCN, DiGCN, DiGCNIB, DiGCL, MagNet, SGCN, SNEA, SiGAT, SDGNN, SSSNET, and MSGNN, adapted for signed and directed edge weights.
  • It introduces task-specific loss functions and evaluation metrics for node classification, link prediction (including three-class and existence prediction), and direction prediction on signed-directed graphs.
  • The package integrates synthetic data generators and real-world data loaders for benchmarking, including datasets like CoraML, CiteSeer, Telegram, BitCoin-Alpha, BitCoin-OTC, Slashdot, Epinions, and FiLL.
  • It leverages PyTorch Geometric's MessagePassing framework, with optimized implementations for efficiency, including a re-implemented MagNet that reduces runtime by up to 70% compared to the original.
  • The software is built with rigorous software engineering practices: open-source release, detailed documentation, continuous integration, unit tests, and code coverage checks.
  • Experiments use standard splits (20% test edges) and default hyperparameters from original papers, with performance measured via accuracy and runtime across multiple datasets and tasks.

Experimental results

Research questions

  • RQ1Which GNN architectures perform best for node classification on signed and directed graphs?
  • RQ2How do different GNN models compare in link prediction tasks involving signed and directed edges?
  • RQ3What is the computational efficiency of PyGSD's implementations compared to original codebases?
  • RQ4How do specialized loss functions and metrics improve performance on signed-directed graph learning tasks?
  • RQ5Which model architecture offers the best trade-off between accuracy and inference speed on real-world signed-directed networks?

Key findings

  • PyGSD reduces the runtime of MagNet by up to 70% compared to the original implementation, with our optimized version achieving 21s on Cornell for node classification versus 73s in the original.
  • DiGCN and DiGCNIB achieve the fastest inference times across most datasets, with less than 10s per fold on Cornell, Texas, and Wisconsin for node classification.
  • For link prediction on the FiLL dataset (42 networks), the average runtime of SGCN is 591s, while DiGCN runs in 30s, indicating significant efficiency gains for certain models.
  • The proposed loss functions for SGCN, SNEA, SiGAT, SDGNN, SSSNET, and MSGNN lead to competitive performance across all tasks, with high accuracy on standard benchmarks.
  • The library's implementation of DiGCL achieves 37s on Telegram for direction prediction, outperforming the original implementation in speed while maintaining competitive accuracy.
  • The software's modular design and extensive testing ensure reliability and reproducibility, with full code coverage and continuous integration checks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.