Agent skill

Torch Geometric Graph Neural Networks

by jaechang-hits in jaechang-hits/SciAgent-Skills

PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN.

MITAuto-check passedAI & LLM Engineering

Install Torch Geometric Graph Neural Networks

skills CLI
$ npx skills add jaechang-hits/SciAgent-Skills --skill torch-geometric-graph-neural-networks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jaechang-hits/SciAgent-Skills torch-geometric-graph-neural-networks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jaechang-hits/SciAgent-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/scientific-computing/torch-geometric-graph-neural-networks .claude/skills/torch-geometric-graph-neural-networks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
torch-geometric-graph-neural-networks
GitHub stars
374
Used in
1 other repo
Token cost
~5.1k tokens
SKILL.md length
779 words
Files
3 (incl. references)
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN.

  • Works in 9 steps: Data Representation → Convolutional Layers → Custom Message Passing → …
  • Tasks that involve Deep learning
  • SKILL.md covers Overview, When to Use, Prerequisites and Quick Start, plus 10 more sections
  • Calls pip

What it does

Torch Geometric Graph Neural Networks is an agent skill from jaechang-hits/SciAgent-Skills. PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN. Message passing, mini-batches, heterogeneous graphs, neighbor sampling, explainability. Supports molecules (QM9, MoleculeNet), social/knowledge graphs, 3D point clouds. For non-graph DL use PyTorch; for classical graph algorithms use NetworkX.

Its SKILL.md is about 5.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/datasets_catalog.md` and `references/layers_transforms_reference.md`).

It sits in AI & LLM Engineering, covering Deep learning. It works with PyTorch and NetworkX. The repository describes itself as: 197 bioinformatics & life science skills for Claude Code and AI agents — BixBench 92.0% accuracy. RNA-seq, single-cell, drug discovery, proteomics, and more. Powers OmicsHorizon. The licence is MIT.

When your agent uses it

  • Tasks that involve Deep learning

Example prompts

  • “/torch-geometric-graph-neural-networks”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Data Representation
  2. Convolutional Layers
  3. Custom Message Passing
  4. Pooling & Graph-Level Readout
  5. Heterogeneous Graphs
  6. Transforms & Preprocessing
  7. Node Classification (Full Graph)
  8. Graph Classification (Mini-Batch)
  9. Large-Scale with Neighbor Sampling

What it can do on your machine

Read from SKILL.md and the folder at commit 82c862c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • pytorch-geometric.readthedocs.io
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Torch Geometric Graph Neural Networks loads about 5.1k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 102 tokens; SKILL.md has 779 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~5.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jaechang-hits/SciAgent-Skills at commit 82c862c, republished under its MIT licence (© jaechang-hits). 779 words, ~5,132 tokens.

Download SKILL.mdSave it as .claude/skills/torch-geometric-graph-neural-networks/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
torch-geometric-graph-neural-networks
description
PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN. Message passing, mini-batches, heterogeneous graphs, neighbor sampling, explainability. Supports molecules (QM9, MoleculeNet), social/knowledge graphs, 3D point clouds. For non-graph DL use PyTorch; for classical graph algorithms use NetworkX.
license
MIT

PyTorch Geometric (PyG) — Graph Neural Networks

Overview

PyTorch Geometric is a library built on PyTorch for developing and training Graph Neural Networks (GNNs). It provides 40+ convolutional layers, mini-batch processing via block-diagonal adjacency matrices, neighbor sampling for large-scale graphs, and heterogeneous graph support for multi-type node/edge networks.

When to Use

  • Node classification on citation, social, or biological networks
  • Graph-level classification (molecular activity, protein function)
  • Link prediction (knowledge graphs, recommendation systems)
  • Molecular property prediction (drug discovery, quantum chemistry)
  • 3D point cloud processing and mesh analysis
  • Large-scale graph learning with neighbor sampling (>100K nodes)
  • Heterogeneous graphs with multiple node/edge types
  • For non-graph deep learning → use PyTorch directly
  • For traditional graph algorithms (shortest path, centrality) → use NetworkX

Prerequisites

bash
pip install torch torch_geometric
# Optional sparse operations (recommended):
# pip install pyg_lib torch_scatter torch_sparse torch_cluster
python
import torch
import torch.nn.functional as F
from torch_geometric.data import Data
from torch_geometric.nn import GCNConv

Quick Start

python
from torch_geometric.datasets import Planetoid
from torch_geometric.nn import GCNConv
import torch, torch.nn.functional as F

dataset = Planetoid(root='/tmp/Cora', name='Cora')
data = dataset[0]

class GCN(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = GCNConv(dataset.num_features, 16)
        self.conv2 = GCNConv(16, dataset.num_classes)
    def forward(self, data):
        x = F.relu(self.conv1(data.x, data.edge_index))
        return self.conv2(x, data.edge_index)

model = GCN()
optimizer = torch.optim.Adam(model.parameters(), lr=0.01, weight_decay=5e-4)
for epoch in range(200):
    model.train(); optimizer.zero_grad()
    F.cross_entropy(model(data)[data.train_mask], data.y[data.train_mask]).backward()
    optimizer.step()

model.eval()
pred = model(data).argmax(dim=1)
acc = (pred[data.test_mask] == data.y[data.test_mask]).float().mean()
print(f'Test Accuracy: {acc:.4f}')  # ~0.81

Core API

1. Data Representation
python
import torch
from torch_geometric.data import Data

# Create a graph: 3 nodes, 4 edges (undirected)
edge_index = torch.tensor([[0, 1, 1, 2],
                           [1, 0, 2, 1]], dtype=torch.long)
x = torch.randn(3, 16)  # Node features [num_nodes, features]
y = torch.tensor([0, 1, 0])  # Node labels

data = Data(x=x, edge_index=edge_index, y=y)
print(f'Nodes: {data.num_nodes}, Edges: {data.num_edges}')
print(f'Features: {data.num_node_features}')
print(f'Has self-loops: {data.has_self_loops()}')
print(f'Is undirected: {data.is_undirected()}')

# Optional attributes
data.edge_attr = torch.randn(4, 8)   # Edge features [num_edges, features]
data.pos = torch.randn(3, 3)          # Node positions (3D)
data.train_mask = torch.tensor([True, True, False])  # Custom masks
python
# Mini-batch processing — graphs concatenated as block-diagonal
from torch_geometric.loader import DataLoader

loader = DataLoader(dataset, batch_size=32, shuffle=True)
for batch in loader:
    print(f'Graphs: {batch.num_graphs}, Nodes: {batch.num_nodes}')
    # batch.batch maps each node → its source graph index
    # No padding needed — computationally efficient
2. Convolutional Layers
python
from torch_geometric.nn import GCNConv, GATConv, SAGEConv, GINConv
import torch.nn as nn

# GCNConv — spectral graph convolution (baseline)
conv = GCNConv(in_channels=16, out_channels=32)
# Supports: edge_weight, SparseTensor, Bipartite, Lazy init

# GATConv — attention-based neighbor weighting
conv = GATConv(16, 32, heads=8, dropout=0.6)
# Output: [N, heads * out_channels] (concat) or [N, out_channels] (concat=False)

# SAGEConv — inductive learning via sampling
conv = SAGEConv(16, 32, aggr='mean')  # 'mean', 'max', 'lstm'

# GINConv — maximally powerful for graph isomorphism
nn_module = nn.Sequential(nn.Linear(16, 32), nn.ReLU(), nn.Linear(32, 32))
conv = GINConv(nn_module)

# TransformerConv — graph transformer
from torch_geometric.nn import TransformerConv
conv = TransformerConv(16, 32, heads=8, beta=True)

# All layers: x_out = conv(x, edge_index)
x_out = conv(x, edge_index)
print(f'Output shape: {x_out.shape}')  # [num_nodes, out_channels]
3. Custom Message Passing
python
from torch_geometric.nn import MessagePassing
from torch_geometric.utils import add_self_loops, degree

class CustomConv(MessagePassing):
    def __init__(self, in_channels, out_channels):
        super().__init__(aggr='add')  # 'add', 'mean', 'max'
        self.lin = torch.nn.Linear(in_channels, out_channels)

    def forward(self, x, edge_index):
        edge_index, _ = add_self_loops(edge_index, num_nodes=x.size(0))
        x = self.lin(x)

        # Degree-based normalization
        row, col = edge_index
        deg = degree(col, x.size(0), dtype=x.dtype)
        norm = deg.pow(-0.5)
        norm = norm[row] * norm[col]

        return self.propagate(edge_index, x=x, norm=norm)

    def message(self, x_j, norm):
        # x_j: source node features (automatic via _j suffix)
        return norm.view(-1, 1) * x_j

# Key methods: forward(), message(), aggregate(), update()
# _i suffix → target node, _j suffix → source node
4. Pooling & Graph-Level Readout
python
from torch_geometric.nn import (
    global_mean_pool, global_max_pool, global_add_pool,
    TopKPooling, SAGPooling
)

# Global pooling: node features → graph-level representation
x_graph = global_mean_pool(x, batch)  # [num_graphs, features]

# Hierarchical pooling: coarsen graph
pool = TopKPooling(64, ratio=0.8)  # Keep top 80% nodes
x, edge_index, _, batch, _, _ = pool(x, edge_index, None, batch)

# Graph classification model
class GraphClassifier(torch.nn.Module):
    def __init__(self, num_features, num_classes):
        super().__init__()
        self.conv1 = GCNConv(num_features, 64)
        self.conv2 = GCNConv(64, 64)
        self.pool = TopKPooling(64, ratio=0.8)
        self.lin = torch.nn.Linear(64, num_classes)

    def forward(self, data):
        x, edge_index, batch = data.x, data.edge_index, data.batch
        x = F.relu(self.conv1(x, edge_index))
        x, edge_index, _, batch, _, _ = self.pool(x, edge_index, None, batch)
        x = F.relu(self.conv2(x, edge_index))
        x = global_mean_pool(x, batch)
        return self.lin(x)
5. Heterogeneous Graphs
python
from torch_geometric.data import HeteroData
from torch_geometric.nn import HeteroConv, GCNConv, SAGEConv, to_hetero

# Create heterogeneous graph
data = HeteroData()
data['paper'].x = torch.randn(100, 128)
data['author'].x = torch.randn(200, 64)
data['author', 'writes', 'paper'].edge_index = torch.randint(0, 200, (2, 500))
data['paper', 'cites', 'paper'].edge_index = torch.randint(0, 100, (2, 300))
print(data)  # Shows all node/edge types

# Method 1: Auto-convert homogeneous model
model = GCN(...)
model = to_hetero(model, data.metadata(), aggr='sum')
out = model(data.x_dict, data.edge_index_dict)
python
# Method 2: Custom per-edge-type convolutions
class HeteroGNN(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = HeteroConv({
            ('paper', 'cites', 'paper'): GCNConv(-1, 64),
            ('author', 'writes', 'paper'): SAGEConv((-1, -1), 64),
        }, aggr='sum')

    def forward(self, x_dict, edge_index_dict):
        x_dict = self.conv1(x_dict, edge_index_dict)
        return {k: F.relu(v) for k, v in x_dict.items()}
6. Transforms & Preprocessing
python
from torch_geometric.transforms import (
    NormalizeFeatures, AddSelfLoops, ToUndirected,
    RandomNodeSplit, RandomLinkSplit, Compose,
    KNNGraph, RadiusGraph, AddLaplacianEigenvectorPE
)

# Single transform
dataset = Planetoid(root='/tmp/Cora', name='Cora', transform=NormalizeFeatures())

# Compose multiple transforms
transform = Compose([
    ToUndirected(),
    AddSelfLoops(),
    NormalizeFeatures(),
])

# Data splitting
node_split = RandomNodeSplit(num_val=0.1, num_test=0.2)
link_split = RandomLinkSplit(num_val=0.1, num_test=0.2, is_undirected=True)

# Point cloud → graph
pc_transform = Compose([KNNGraph(k=6), NormalizeFeatures()])

# Positional encodings (for Graph Transformers)
pe_transform = AddLaplacianEigenvectorPE(k=10)

Key Concepts

Layer Selection Guide
TaskLayerKey Feature
Baseline / generalGCNConvSpectral, cached, edge_weight
Variable neighbor importanceGATConv / GATv2ConvMulti-head attention
Large-scale inductiveSAGEConvSampling-friendly, mean/max/lstm aggr
Graph classificationGINConvMaximally powerful WL-test
Long-range dependenciesTransformerConvGraph transformer
Spectral filteringChebConvChebyshev polynomials, K hops
Rich edge featuresNNConvEdge NN processes edge_attr
Molecular / 3D structuresSchNet, DimeNetContinuous filters, angles
Heterogeneous / multi-relationRGCNConv, HGTConvMultiple edge types
Point cloudsEdgeConv, PointNetConvDynamic graphs, local features
Deep GNNs (avoid oversmoothing)APPNP + PairNormSeparated propagation
Data Flow Architecture
  • edge_index: [2, num_edges] COO format. Row 0 = source, Row 1 = target
  • Mini-batch: Block-diagonal adjacency + batch vector mapping nodes → graphs. No padding
  • Neighbor sampling: NeighborLoader samples K-hop subgraphs per seed node. Output is directed, relabeled
  • Heterogeneous: x_dict (per-type features), edge_index_dict (per-relation edges), metadata() for schema
Aggregation Options
AggregationClassUse Case
SumSumAggregationCounting-sensitive tasks
MeanMeanAggregationDegree-invariant
MaxMaxAggregationSalient feature detection
SoftmaxSoftmaxAggregation(learn=True)Learnable attention
MultiMultiAggregation(['mean','max','std'])Combined signals

Common Workflows

1. Node Classification (Full Graph)
python
import torch
import torch.nn.functional as F
from torch_geometric.datasets import Planetoid
from torch_geometric.nn import GCNConv

dataset = Planetoid(root='/tmp/Cora', name='Cora')
data = dataset[0]

class GCN(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = GCNConv(dataset.num_features, 16)
        self.conv2 = GCNConv(16, dataset.num_classes)
    def forward(self, data):
        x = F.dropout(F.relu(self.conv1(data.x, data.edge_index)), p=0.5, training=self.training)
        return self.conv2(x, data.edge_index)

model = GCN()
optimizer = torch.optim.Adam(model.parameters(), lr=0.01, weight_decay=5e-4)

# Training
for epoch in range(200):
    model.train(); optimizer.zero_grad()
    out = model(data)
    F.cross_entropy(out[data.train_mask], data.y[data.train_mask]).backward()
    optimizer.step()

# Evaluation
model.eval()
pred = model(data).argmax(dim=1)
acc = (pred[data.test_mask] == data.y[data.test_mask]).float().mean()
print(f'Test Accuracy: {acc:.4f}')
2. Graph Classification (Mini-Batch)
python
from torch_geometric.datasets import TUDataset
from torch_geometric.loader import DataLoader
from torch_geometric.nn import GCNConv, global_mean_pool

dataset = TUDataset(root='/tmp/ENZYMES', name='ENZYMES')
train_dataset = dataset[:int(0.8 * len(dataset))]
test_dataset = dataset[int(0.8 * len(dataset)):]
train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)

class GraphNet(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = GCNConv(dataset.num_features, 64)
        self.conv2 = GCNConv(64, 64)
        self.lin = torch.nn.Linear(64, dataset.num_classes)
    def forward(self, data):
        x = F.relu(self.conv1(data.x, data.edge_index))
        x = F.relu(self.conv2(x, data.edge_index))
        x = global_mean_pool(x, data.batch)
        return self.lin(x)

model = GraphNet()
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
for epoch in range(100):
    model.train()
    for batch in train_loader:
        optimizer.zero_grad()
        F.cross_entropy(model(batch), batch.y).backward()
        optimizer.step()
3. Large-Scale with Neighbor Sampling
python
from torch_geometric.loader import NeighborLoader

# Sample 25 1-hop and 10 2-hop neighbors per seed node
train_loader = NeighborLoader(
    data,
    num_neighbors=[25, 10],
    batch_size=128,
    input_nodes=data.train_mask,
)

model.train()
for batch in train_loader:
    optimizer.zero_grad()
    out = model(batch)
    # Only compute loss on seed nodes (first batch_size nodes)
    loss = F.cross_entropy(out[:batch.batch_size], batch.y[:batch.batch_size])
    loss.backward()
    optimizer.step()
# Note: output subgraphs are directed, indices relabeled 0..N-1

Key Parameters

ParameterModuleDefaultRangeEffect
in_channelsAll Conv layers—intInput feature dimension
out_channelsAll Conv layers—intOutput feature dimension
headsGATConv11-16Number of attention heads
dropoutGATConv0.00-0.8Attention weight dropout
aggrMessagePassing'add'add/mean/maxNeighbor aggregation
KChebConv—2-5Chebyshev polynomial order
num_neighborsNeighborLoader—list[int]Neighbors per hop (e.g., [25,10])
batch_sizeDataLoader—16-512Graphs or seed nodes per batch
ratioTopKPooling0.50.1-0.9Fraction of nodes to keep
lrAdam—1e-4 to 0.01Learning rate
weight_decayAdam00 to 5e-3L2 regularization

Best Practices

  1. Start with GCNConv: Use 2-layer GCN as baseline before trying complex architectures
  2. Use lazy initialization: Pass -1 as in_channels to infer dimensions automatically: GCNConv(-1, 64)
  3. Normalize features: Apply NormalizeFeatures() transform for citation/social networks
  4. Anti-pattern — too many layers: GNNs typically need only 2-3 layers. Deeper causes oversmoothing. Use JumpingKnowledge or PairNorm if you need depth
  5. GPU transfer: Move both model AND data to GPU: model.to(device), data.to(device)
  6. Anti-pattern — ignoring batch vector: In graph classification, always use global_mean_pool(x, batch) — forgetting batch pools across all graphs
Show full SKILL.md (285 more words)Show less

Common Recipes

Recipe: Model Explainability (GNNExplainer)
python
from torch_geometric.explain import Explainer, GNNExplainer

explainer = Explainer(
    model=model,
    algorithm=GNNExplainer(epochs=200),
    explanation_type='model',
    node_mask_type='attributes',
    edge_mask_type='object',
    model_config=dict(mode='multiclass_classification', task_level='node', return_type='log_probs'),
)

explanation = explainer(data.x, data.edge_index, index=10)
print(f'Important edges: {explanation.edge_mask.topk(5).indices}')
print(f'Important features: {explanation.node_mask[10].topk(5).indices}')
Recipe: Custom InMemoryDataset
python
from torch_geometric.data import InMemoryDataset, Data

class MyDataset(InMemoryDataset):
    def __init__(self, root, transform=None, pre_transform=None):
        super().__init__(root, transform, pre_transform)
        self.load(self.processed_paths[0])

    @property
    def raw_file_names(self):
        return ['data.csv']

    @property
    def processed_file_names(self):
        return ['data.pt']

    def process(self):
        data_list = []
        # Build Data objects from raw files
        edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)
        x = torch.randn(2, 16)
        data_list.append(Data(x=x, edge_index=edge_index, y=torch.tensor([0])))

        if self.pre_filter is not None:
            data_list = [d for d in data_list if self.pre_filter(d)]
        if self.pre_transform is not None:
            data_list = [self.pre_transform(d) for d in data_list]
        self.save(data_list, self.processed_paths[0])
Recipe: Deep GNN with JumpingKnowledge
python
from torch_geometric.nn import GCNConv, JumpingKnowledge, LayerNorm

class DeepGNN(torch.nn.Module):
    def __init__(self, in_ch, hidden, num_layers, out_ch):
        super().__init__()
        self.convs = torch.nn.ModuleList()
        self.norms = torch.nn.ModuleList()
        self.convs.append(GCNConv(in_ch, hidden))
        self.norms.append(LayerNorm(hidden))
        for _ in range(num_layers - 2):
            self.convs.append(GCNConv(hidden, hidden))
            self.norms.append(LayerNorm(hidden))
        self.convs.append(GCNConv(hidden, hidden))
        self.jk = JumpingKnowledge(mode='cat')
        self.lin = torch.nn.Linear(hidden * num_layers, out_ch)

    def forward(self, x, edge_index, batch):
        xs = []
        for conv, norm in zip(self.convs[:-1], self.norms):
            x = F.relu(norm(conv(x, edge_index)))
            xs.append(x)
        xs.append(self.convs[-1](x, edge_index))
        return self.lin(global_mean_pool(self.jk(xs), batch))

Troubleshooting

ProblemCauseSolution
edge_index shape errorWrong format (should be [2, E])Ensure COO format: torch.tensor([[src...],[dst...]], dtype=torch.long)
OOM on large graphFull-graph forward passUse NeighborLoader for mini-batch training
Low accuracyOversmoothing (too many layers)Reduce to 2-3 layers, add JumpingKnowledge or PairNorm
NaN in trainingExploding gradientsAdd gradient clipping, reduce learning rate, check feature scale
Wrong graph-level outputMissing batch in poolingPass batch tensor to global_mean_pool(x, batch)
Heterogeneous type errorMismatched node/edge typesCheck data.metadata() matches model definition
Slow DataLoaderLarge graph, no samplingUse NeighborLoader with reasonable num_neighbors (e.g., [25,10])
x dimension mismatchMulti-head attention outputFor GATConv: output is heads*out_channels unless concat=False
Import error for sparse opsMissing optional dependenciesInstall torch_scatter, torch_sparse from PyG wheels
Pre-transform not appliedDataset already processedDelete processed/ directory and reload

Bundled Resources

  • references/layers_transforms_reference.md — Complete catalog of 40+ convolutional layers (GCN, GAT, SAGE, GIN, molecular layers, hypergraph), aggregation operators, pooling (global + hierarchical), normalization layers, pre-built models, auto-encoders, knowledge graph embeddings, utility layers. Transform catalog: structure, feature, spatial, augmentation, mesh, specialized. Consolidated from original layers_reference.md (486 lines) + transforms_reference.md (680 lines). Script functionality (benchmark_model.py, create_gnn_template.py, visualize_graph.py) covered by Core API code blocks and Common Recipes
  • references/datasets_catalog.md — Comprehensive dataset catalog organized by domain: citation networks (Planetoid, Coauthor, Amazon), graph classification (TUDataset 120+ benchmarks), molecular (QM9, ZINC, MoleculeNet), social (Reddit, Twitch), knowledge graphs (WordNet, FB15k), heterogeneous (OGB_MAG, MovieLens, DBLP), temporal (JODIE), 3D meshes (ShapeNet, ModelNet), OGB integration. Consolidated from original datasets_reference.md (575 lines)
  • matplotlib-scientific-plotting — Visualize graph structures, training curves, attention weights

References

© jaechang-hits, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/scientific-computing/torch-geometric-graph-neural-networks of jaechang-hits/SciAgent-Skills.

  • SKILL.md
  • references/datasets_catalog.md
  • references/layers_transforms_reference.md

Open the folder on GitHubat commit 82c862c

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in jaechang-hits/SciAgent-Skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Torch Geometric Graph Neural Networks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Torch Geometric Graph Neural Networks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Torch Geometric Graph Neural Networks this skilljaechang-hits/SciAgent-Skills3741 repos~5.1kAutomated safety check: PassMIT
Torch GeometricK-Dense-AI/scientific-agent-skills48k1 repos~5.6kAutomated safety check: PassMIT
Docstringpytorch/pytorch104k2 repos~2.6kAutomated safety check: PassCustom licence
CI Metricspytorch/pytorch104k—~1.1kAutomated safety check: PassCustom licence
Cuda Index Widthpytorch/pytorch104k—~1.6kAutomated safety check: PassCustom licence
Benchmark Pyreflyfacebook/pyrefly7.1k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Torch Geometric

    K-Dense-AI/scientific-agent-skills

    Supports PyTorch Geometric (PyG) graph neural networks — node/link/graph classification, message passing (GCN, GAT, GraphSAGE, GIN), heterogeneous graphs, neighbor sampling, and custom datasets.

    48k GitHub starsUsed in 1 repo~5.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Docstring

    pytorch/pytorch

    Write docstrings for PyTorch functions and methods following PyTorch conventions.

    104k GitHub starsUsed in 2 repos~2.6k tokens
    AI & LLM EngineeringAuto-check passed
  • CI Metrics

    pytorch/pytorch

    Query PyTorch CI, GitHub Actions, HUD, Grafana, and infrastructure metrics.

    104k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Cuda Index Width

    pytorch/pytorch

    Choose 32-bit vs 64-bit index math in PyTorch CUDA kernels. An agent skill from pytorch/pytorch.

    104k GitHub stars~1.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Benchmark Pyrefly

    facebook/pyrefly

    Official

    Run Pyrefly benchmarks locally via Buck or Cargo, including PyTorch real-world LSP benchmarks.

    7.1k GitHub stars~1.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Document Public APIs

    pytorch/pytorch

    Document undocumented public APIs in PyTorch by removing functions from coverageignorefunctions and coverageignoreclasses in docs/source/conf.py, running Sphinx coverage, and adding the appropriate…

    104k GitHub stars~4.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from jaechang-hits/SciAgent-Skills

All 169 skills in this repo
  • Neb Irc Activation Energy

    jaechang-hits/SciAgent-Skills

    NEB-IRC activation energy pipeline for reaction barriers using GFN2-xTB and pysisyphus.

    374 GitHub stars~4k tokensUpdated 12 days ago
    Auto-check passed
  • Molecular Visualization 3dmol

    jaechang-hits/SciAgent-Skills

    3Dmol.js WebGL molecular visualization emitted as self-contained HTML.

    374 GitHub stars~3.2k tokensUpdated 12 days ago
    Auto-check passed
  • Cobrapy Metabolic Modeling

    jaechang-hits/SciAgent-Skills

    Constraint-based (COBRA) analysis of genome-scale metabolic models: FBA, FVA, knockouts, flux sampling, production envelopes, gapfilling, media optimization.

    374 GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Rdkit Chemdraw Cdxml

    jaechang-hits/SciAgent-Skills

    Read, write, and edit ChemDraw CDX/CDXML files with RDKit's rdkit.Chem.rdChemDraw plus direct XML editing, always paired with a rendered PNG.

    374 GitHub stars~6.9k tokensUpdated 12 days ago
    Auto-check passed
  • Pubmed Database

    jaechang-hits/SciAgent-Skills

    Programmatic PubMed access via NCBI E-utilities REST API. An agent skill from jaechang-hits/SciAgent-Skills.

    374 GitHub starsUsed in 1 repo~4.4k tokens
    Auto-check passed
  • Sciagent Skill Creator

    jaechang-hits/SciAgent-Skills

    Scaffold a new SciAgent-Skills entry. An agent skill from jaechang-hits/SciAgent-Skills.

    374 GitHub stars~2.3k tokensUpdated 12 days ago
    Auto-check passed

Works with

Questions about Torch Geometric Graph Neural Networks

What does Torch Geometric Graph Neural Networks do?

PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN. Torch Geometric Graph Neural Networks is an agent skill from jaechang-hits/SciAgent-Skills. PyTorch Geometric (PyG) for graph neural networks: node/graph classification, link prediction with GCN, GAT, GraphSAGE, GIN.

When should I use Torch Geometric Graph Neural Networks?

Torch Geometric Graph Neural Networks fits situations like: tasks that involve Deep learning.

How do I install Torch Geometric Graph Neural Networks in Claude Code?

Run `npx skills add jaechang-hits/SciAgent-Skills --skill torch-geometric-graph-neural-networks -a claude-code`. Or copy the skill folder (skills/scientific-computing/torch-geometric-graph-neural-networks in jaechang-hits/SciAgent-Skills) into .claude/skills/torch-geometric-graph-neural-networks in your project. Claude Code loads it when a task matches its description.

How do I install Torch Geometric Graph Neural Networks in Codex?

Run `npx skills add jaechang-hits/SciAgent-Skills --skill torch-geometric-graph-neural-networks -a codex`. Or copy the skill folder (skills/scientific-computing/torch-geometric-graph-neural-networks in jaechang-hits/SciAgent-Skills) into .agents/skills/torch-geometric-graph-neural-networks in your project. Codex loads it when a task matches its description.

Can I use Torch Geometric Graph Neural Networks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jaechang-hits/SciAgent-Skills --skill torch-geometric-graph-neural-networks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/torch-geometric-graph-neural-networks, .gemini/skills/torch-geometric-graph-neural-networks, .github/skills/torch-geometric-graph-neural-networks and .opencode/skills/torch-geometric-graph-neural-networks in your project.

What does Torch Geometric Graph Neural Networks need to run?

Going by SKILL.md and its folder, Torch Geometric Graph Neural Networks needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Torch Geometric Graph Neural Networks access the network?

SKILL.md names 2 domains. As links in the text: pytorch-geometric.readthedocs.io and github.com. This is read from the text; nothing was executed.

Is Torch Geometric Graph Neural Networks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Torch Geometric Graph Neural Networks use?

Torch Geometric Graph Neural Networks is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Torch Geometric Graph Neural Networks use?

About 5.1k tokens (SKILL.md is roughly 21k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.6k tokens, read only when the agent opens those files.

What are the alternatives to Torch Geometric Graph Neural Networks?

Skills that share tags, products or a category with Torch Geometric Graph Neural Networks: Torch Geometric (K-Dense-AI/scientific-agent-skills, 48k stars), Docstring (pytorch/pytorch, 104k stars), CI Metrics (pytorch/pytorch, 104k stars) and Cuda Index Width (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Torch Geometric Graph Neural Networks?

jaechang-hits (a GitHub user) maintains it in jaechang-hits/SciAgent-Skills, which has 374 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 29, 2026.

Source: jaechang-hits/SciAgent-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.