torch-geometric

Develop and train graph neural networks with PyTorch Geometric.

16|7|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/jackspace/ClaudeSkillz --skill torch-geometric-jackspace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-geometric
Source: https://github.com/jackspace/ClaudeSkillz/tree/main/skills/scientific-pkg-torch_geometric
Command: npx skills add https://github.com/jackspace/ClaudeSkillz --skill torch-geometric-jackspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a pathway to develop and train Graph Neural Networks (GNNs) with PyTorch Geometric, enabling node/graph classification, link prediction, heterogeneous graphs, and molecular property prediction.

Core Features & Use Cases

  • Installation and setup of PyG with CUDA dependencies
  • Graph creation, datasets loading, and mini-batch processing
  • Pre-built layers: GCN, GAT, GraphSAGE, etc.
  • Support for heterogeneous graphs and large-scale training

Quick Start

Install PyG, load a built-in dataset (e.g., Planetoid/Cora), and define a simple GCN model to begin training.

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?

Graph neural networks classify nodes using GNN layers like GCN or GAT applied to graph-structured data. PyG provides pre-built layers, PyTorch integration, and datasets (e.g., Cora) to train end-to-end models for node classification tasks.

What's the difference between GCN, GAT, and GraphSAGE for graphs?

GCN, GAT, and GraphSAGE are distinct GNN architectures in PyG. GCN uses spectral convolution, GAT applies attention mechanisms, and GraphSAGE samples neighborhoods. Each suits different graph structures and learning objectives.

Can I train graph neural networks on large-scale graphs with mini-batch processing?

Yes. PyG supports mini-batch training and distributed training for large-scale graphs using DataLoader-based batching and edge_index COO format, enabling scalable GNN development beyond single-GPU memory limits.

How do I handle heterogeneous graphs and molecular property prediction with PyG?

PyG supports heterogeneous graphs and molecular property prediction through Data objects with edge attributes, node features, and custom GNN layers. Molecular tasks use graph classification on compound structures.

What Python and PyTorch requirements do I need to install PyG?

Graph neural network development with PyG requires Python 3.x, PyTorch, and torch_geometric installation. Optional dependencies include pyg_lib, torch_scatter, torch_sparse, torch_cluster, and torch_spline_conv for advanced features.

Do I need CUDA to run PyG graph neural networks?

CUDA is optional for PyG. CPU execution is supported, but CUDA dependencies accelerate training on large graphs. Installation varies based on your hardware and PyTorch version.