torch-geometric

Build and optimize Graph Neural Network models with PyG for node classification, link prediction, and graph classification.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/viniruggeri/applied-dynamical-systems --skill torch-geometric-viniruggeri
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-geometric
Source: https://github.com/viniruggeri/applied-dynamical-systems/tree/main/.agents/skills/torch-geometric
Command: npx skills add https://github.com/viniruggeri/applied-dynamical-systems --skill torch-geometric-viniruggeri

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PyG provides a comprehensive framework for building Graph Neural Networks (GNNs) on top of PyTorch, enabling practitioners to design, train, and evaluate GNNs for real-world graph data with streamlined workflows.

Core Features & Use Cases

  • Support for homogeneous and heterogeneous graphs through Data and HeteroData structures.
  • A wide range of GNN layers and architectures (GCN, GAT, GraphSAGE, GIN, TransformerConv, RGCN, etc.) along with scalable data loading patterns like NeighborLoader.
  • Tutorials and references covering datasets, transforms, explainability, and advanced topics such as heterogeneous graphs and large-scale training.

Quick Start

Install PyG and run a minimal 2-layer GCN on a standard dataset like Cora to start exploring graph neural networks with PyG.

Frequently Asked Questions about torch-geometric

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Graph Neural Network for node classification?

To build a Graph Neural Network for node classification, use PyG to construct a 2-layer GCN with standard Data structures, enabling you to train and evaluate models on graph datasets like Cora.

What's the best way to handle large-scale graph training in PyTorch?

For large-scale graph training, apply PyG's NeighborLoader to perform scalable neighbor sampling, allowing you to train GNN models efficiently on massive graphs without loading the entire dataset into memory.

Can I use Graph Neural Networks for heterogeneous graph data?

Yes, you can process heterogeneous graph data using PyG's HeteroData structures and specialized layers like RGCN, allowing you to model complex relationships across diverse node and edge types.

Which GNN layers are available for link prediction tasks?

Available GNN layers for link prediction include GCN, GAT, GraphSAGE, GIN, and TransformerConv, providing multiple architectures to capture structural connectivity and predict missing links.

How do I explain Graph Neural Network predictions?

To explain Graph Neural Network predictions, utilize PyG's built-in explainability tools and transforms, which help identify the node features and structural edges driving your model's outputs.

Do I need PyTorch to use PyG for graph classification?

Yes, PyG is built directly on top of PyTorch, so you need it to construct GNN layers, define standard training loops, and evaluate graph classification models within the framework.