One-click install
npx skills add https://github.com/silverstein/claude-scientific-skills-desktop --skill torch-geometric-silverstein
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-geometric
Source: https://github.com/silverstein/claude-scientific-skills-desktop/tree/main/corpus/torch_geometric
Command: npx skills add https://github.com/silverstein/claude-scientific-skills-desktop --skill torch-geometric-silverstein

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, numpy, matplotlib, networkx, torch_scatter, torch_sparse, torch_cluster, torch_spline_conv, pyg_lib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you design and implement Graph Neural Networks (GNNs) for graph-structured data without piecing together PyTorch Geometric APIs from scratch.

Core Features & Use Cases

  • Graph modeling with PyG: Construct graphs with Data/edge_index, node features (x), edge features (edge_attr), and labels (y) for node/graph tasks.
  • Train practical GNN architectures: Use message passing layers like GCN, GAT, GraphSAGE, and graph-level pooling for graph classification.
  • Handle realistic scenarios: Apply batching, neighbor sampling (NeighborLoader), heterogeneous graphs (HeteroData), and 3D/spatial/geometric workflows.
  • Leverage datasets and utilities: Load benchmark datasets (e.g., Planetoid, TUDataset, QM9) and use common patterns for splits, transforms, and model explainability.

Quick Start

Describe your task (node classification or graph classification), your data shape (node features, edge index/edge attributes), and the model you want (e.g., GCN or GAT) to get a complete PyTorch Geometric training scaffold.

Frequently Asked Questions about torch-geometric

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

FAQPage Schema
How do I implement a graph neural network for node classification using PyTorch?

To implement a graph neural network for node classification, convert your dataset into a PyG Data object with node features, edge_index, and labels, then train a message-passing model like GCN or GAT using standard training loops.

What is the best way to train graph neural networks on heterogeneous graphs with multiple node types?

Training graph neural networks on heterogeneous graphs requires converting your multi-entity data into a HeteroData object, which allows you to define distinct message-passing relations and node feature sets for training models across varied node and edge types.

Can I use neighbor sampling for graph neural networks on large scale graphs?

Yes, you can scale graph neural networks to large graphs by using the NeighborLoader for neighbor sampling, which batches subgraphs efficiently to prevent memory overflow during message passing and model training.

How do I convert my Networkx graph data into a format suitable for graph classification?

To prepare networkx graph data for graph classification, map node attributes and edge lists to PyG Data attributes including x for features, edge_index for connectivity, and y for graph-level labels to train models with graph pooling layers.

Does PyTorch Geometric support link prediction workflows with edge attributes?

Yes, PyTorch Geometric supports link prediction workflows by utilizing edge_attr for edge features alongside edge_index, allowing message passing models to learn from both structural connectivity and edge-specific properties.