Alterlab Torch Geometric logo

Alterlab Torch Geometric

Community
AlterLab-IEU
alterlab-torch-geometric

Graph Neural Networks with PyTorch Geometric (PyG) — node and graph classification, link prediction, GCN, GAT, and GraphSAGE layers, heterogeneous graphs, and molecular property prediction. Use when building or training GNNs for geometric deep learning on graph-structured data. Part of the AlterLab Academic Skills suite.

Overview

PublisherAlterLab-IEU
RepositoryAlterLab-Academic-Skills
Skill namealterlab-torch-geometric
Stars
84
Forks
16
Bundled files
12
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 12 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by AlterLab-IEU on GitHub. Read the source before you install it.

Installation

Install the Alterlab Torch Geometric AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/data-science/alterlab-torch-geometric
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AlterLab-IEU/AlterLab-Academic-Skills.git /tmp/AlterLab-Academic-Skills
mkdir -p .claude/skills
cp -r /tmp/AlterLab-Academic-Skills/skills/data-science/alterlab-torch-geometric .claude/skills/alterlab-torch-geometric
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Alterlab Torch Geometric in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Alterlab Torch Geometric on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Alterlab Torch Geometric is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PyTorch Geometric (PyG)

Overview

PyTorch Geometric is a library built on PyTorch for developing and training Graph Neural Networks (GNNs). Apply this skill for deep learning on graphs and irregular structures, including mini-batch processing, multi-GPU training, and geometric deep learning applications.

When to Use This Skill

This skill should be used when working with:

  • Graph-based machine learning: Node classification, graph classification, link prediction
  • Molecular property prediction: Drug discovery, chemical property prediction
  • Social network analysis: Community detection, influence prediction
  • Citation networks: Paper classification, recommendation systems
  • 3D geometric data: Point clouds, meshes, molecular structures
  • Heterogeneous graphs: Multi-type nodes and edges (e.g., knowledge graphs)
  • Large-scale graph learning: Neighbor sampling, distributed training

Does NOT Trigger

ScenarioUse Instead
Classical graph algorithms, centrality, shortest paths, or network visualization without learningalterlab-networkx
Social-network-analysis designs (centrality, community detection, ERGMs) for substantive social-science claimsalterlab-sna
End-to-end molecular property prediction with MoleculeNet featurizers and pretrained chemistry modelsalterlab-deepchem
Projects built on TorchDrug's datasets and tasks (GearNet, retrosynthesis, molecule generation)alterlab-torchdrug

Quick Start

bash
uv pip install torch_geometric
# Optional compiled ops (neighbor sampling, knn/radius graphs, fps): pick TORCH/CUDA to match your install
uv pip install pyg-lib -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html

PyG 2.8 folded torch-cluster and torch-spline-conv into pyg-lib (>= 0.7), so those two packages are no longer needed. NeighborLoader raises ImportError unless pyg-lib (or torch-sparse) is installed; for current PyTorch (2.13/2.14) data.pyg.org publishes only pyg-lib wheels, not torch-scatter/torch-sparse.

Graphs are torch_geometric.data.Data objects: x (node features [N, F]), edge_index (connectivity in COO [2, E]), optional edge_attr, y, pos, and any custom attribute (train_mask, etc.). DataLoader batches multiple graphs into one block-diagonal graph (no padding); a batch vector maps nodes back to their source graph.

Full install/sparse-deps, basic graph creation, benchmark loading, edge-index format, and mini-batching details: references/getting_started.md.

Core Workflow

  1. Load or build data — benchmark datasets, custom InMemoryDataset, or from CSV (references/datasets_and_loading.md; full catalog in references/datasets_reference.md).
  2. Define a GNN — stack pre-built conv layers (GCNConv, GATConv, SAGEConv) or subclass MessagePassing for custom layers (references/building_gnns.md; full layer list in references/layers_reference.md).
  3. Train — node classification (single graph, train/test masks), graph classification (DataLoader + global pooling), or large-scale via NeighborLoader neighbor sampling (references/training_workflows.md).
  4. Go advanced if needed — HeteroData/to_hetero for heterogeneous graphs, transforms, GNNExplainer explainability, hierarchical pooling, GPU, save/load (references/advanced_features.md; transforms catalog in references/transforms_reference.md).

Building GNNs (at a glance)

GNNs follow neighborhood aggregation: transform node features → propagate messages along edges → aggregate from neighbors → update representations. PyG ships 40+ conv layers. When choosing one, check its capabilities: SparseTensor support, edge_weight, edge_attr, bipartite, and lazy (-1 channel) initialization. Code for GCN/GAT/GraphSAGE and custom MessagePassing layers (including the _i/_j target/source naming convention) is in references/building_gnns.md.

Resources

Bundled References

This skill includes detailed reference documentation:

  • references/getting_started.md: Install, basic graph creation, Data structure, edge-index format, mini-batching
  • references/building_gnns.md: Message passing, GCN/GAT/GraphSAGE code, custom MessagePassing layers, layer capabilities
  • references/datasets_and_loading.md: Built-in datasets, custom InMemoryDataset, loading graphs from CSV
  • references/training_workflows.md: Node classification, graph classification, large-scale neighbor sampling
  • references/advanced_features.md: Heterogeneous graphs, transforms, explainability, pooling, GPU, save/load
  • references/layers_reference.md: Complete listing of all 40+ GNN layers with descriptions and capabilities
  • references/datasets_reference.md: Comprehensive dataset catalog organized by category
  • references/transforms_reference.md: All available transforms and their use cases

Scripts

Utility scripts are provided in scripts/:

  • scripts/visualize_graph.py: Visualize graph structure using networkx and matplotlib
  • scripts/create_gnn_template.py: Generate boilerplate code for common GNN architectures
  • scripts/benchmark_model.py: Benchmark model performance on standard datasets

Execute scripts directly or read them for implementation patterns.

Official Resources

Part of the AlterLab Academic Skills suite.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Alterlab Torch Geometric AI skill do?

Graph Neural Networks with PyTorch Geometric (PyG) — node and graph classification, link prediction, GCN, GAT, and GraphSAGE layers, heterogeneous graphs, and molecular property prediction. Use when building or training GNNs for geometric deep learning on graph-structured data. Part of the AlterLab Academic Skills suite.

Why use Alterlab Torch Geometric on TypingMind?

Because you install it once and use it with any model. Alterlab Torch Geometric is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Alterlab Torch Geometric in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/data-science/alterlab-torch-geometric. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Alterlab Torch Geometric?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Alterlab Torch Geometric?

As many as you like. As long as a model supports skills, you can use Alterlab Torch Geometric with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Alterlab Torch Geometric AI skill free?

Yes. It is published on GitHub by AlterLab-IEU under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇