torch-geometric

Develop graph neural network models with PyTorch Geometric for classification and link prediction.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ogngnaoh/scientific-agent-skills --skill torch-geometric-ogngnaoh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: torch-geometric
Source: https://github.com/ogngnaoh/scientific-agent-skills/tree/main/scientific-agent-skills/skills/torch-geometric
Command: npx skills add https://github.com/ogngnaoh/scientific-agent-skills --skill torch-geometric-ogngnaoh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires torch, torch_geometric, torch_sparse, torch_scatter, torch_cluster, and includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill enables users to develop and understand graph neural network models leveraging the PyTorch Geometric library, facilitating tasks on structured graph data.

Core Features & Use Cases

  • Model Building and Training: Provides pre-defined GNN layers, models, and training patterns for node classification, graph classification, and link prediction.
  • Data Handling: Supports various datasets, transformations, and heterogeneous graph structures, streamlining complex graph workflows.
  • Use Case: A data scientist wants to implement a node classification model on the Cora dataset using GraphSAGE layers, training and evaluating it efficiently.

Quick Start

Guide to building a simple GCN model to classify nodes in a citation network with minimal setup instructions and code snippets.

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 using PyTorch for node classification?▼

To build a graph neural network for node classification, you can use predefined GNN layers like GraphSAGE to process graph data and train models efficiently. This approach supports creating architectures for citation networks using minimal setup and code snippets.

Can I train models on heterogeneous graph structures with PyTorch Geometric?▼

Yes, you can train models on heterogeneous graph structures using PyTorch Geometric. It supports handling complex graph workflows by providing specific data handling and transformations for heterogeneous graphs, streamlining both research and production deployments.

Does this Skill require installing torch_sparse and torch_scatter for graph data processing?▼

Yes, processing graph data requires installing dependencies like torch_sparse, torch_scatter, and torch_cluster alongside PyTorch. These libraries provide the underlying operations needed to handle graph structures and scale GNN training workflows effectively.

What is the best way to handle graph datasets and transformations for deep learning models?▼

The best way to handle graph datasets and transformations is to use built-in data handling features that support various dataset formats. This streamlines complex graph workflows by applying transformations directly during the model training pipeline.

How do I implement custom GNN layers for link prediction tasks?▼

You can implement custom GNN layers for link prediction by following provided explanations on layer implementation and training patterns. This allows you to define specific message passing logic tailored to your graph data and prediction requirements.