torch-geometric

Build and train graph neural network workflows in PyTorch Geometric.

74|5|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/dralkh/seerai --skill torch-geometric-dralkh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: torch-geometric
Source: https://github.com/dralkh/seerai/tree/main/skills/torch-geometric
Command: npx skills add https://github.com/dralkh/seerai --skill torch-geometric-dralkh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design, train, and troubleshoot graph neural network workflows in PyTorch Geometric without having to piece together scattered API details, sampling strategies, and model patterns by hand.

Core Features & Use Cases

  • Graph Modeling: Build node, edge, and graph prediction models with GCN, GAT, GraphSAGE, GIN, HGT, and custom message passing layers.
  • Scalable Training: Use neighbor sampling, link sampling, clustering, and other loaders for large graphs that do not fit in memory.
  • Heterogeneous Graphs: Work with multi-type node and edge graphs for recommendation systems, knowledge graphs, and citation networks.
  • Explainability and Datasets: Create custom datasets, convert from CSV or NetworkX, and interpret predictions with GNN explainers.
  • Use Case: A researcher can turn a citation network into a trainable node classification pipeline, then scale it to sampled mini-batches and explain the most influential subgraph for a prediction.

Quick Start

Ask for a PyTorch Geometric workflow tailored to your graph task, and include your graph type, target prediction goal, and any scale or explainability constraints.

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 in PyTorch Geometric for node classification?

To build a graph neural network for node classification in PyTorch Geometric, you structure your data with correct edge_index formatting, select layers like GCN or GraphSAGE, and define explicit activations. This Skill guides you through designing and training these complete model workflows.

What is the best way to train graph neural networks on large graphs that do not fit in memory?

Training large-scale graph neural networks requires neighbor sampling, link sampling, or clustering loaders. This Skill helps you implement scalable training workflows for large graphs that exceed memory limits by configuring appropriate mini-batch sampling strategies in PyTorch Geometric.

How does message passing work for heterogeneous graphs with multiple node and edge types?

Message passing for heterogeneous graphs handles multi-type nodes and edges using architectures like HGT. This Skill allows you to build heterogeneous graph models for recommendation systems and knowledge graphs by defining type-specific transformations and message passing functions in PyTorch Geometric.

Can I convert a NetworkX graph or CSV data into a custom PyTorch Geometric dataset?

Yes, you can convert NetworkX graphs or CSV data into custom PyTorch Geometric datasets. This Skill covers creating custom datasets, formatting edge_index correctly, and transforming raw graph data into trainable representations for your graph neural network workflows.

How do I interpret graph neural network predictions and find the most influential subgraph?

To interpret graph neural network predictions, you use GNN explainers to identify the most influential subgraph for a specific prediction. This Skill provides workflows for explainability, allowing you to understand which graph structures drive your model's outputs.

Do I need specific PyTorch Geometric dependencies to avoid errors when building link prediction models?

Yes, building link prediction models requires version-compatible PyTorch Geometric dependencies and correct edge_index formatting to avoid errors. This Skill helps you manage explicit activations and dependency versions for stable link prediction and message passing workflows.