# ProG-V2: one registry for prompt strategies, backbones and pretraining methods

> ProG-V2 is a Python toolkit for graph prompt learning that keeps the pre-train, prompt-tune and evaluate workflow but replaces per-paper code with registries, so 17 prompt strategies, 6 graph neural network backbones and 7 pretraining methods can be mixed through command line flags.

**sheldonresearch/ProG** — A Unified Python Library for Graph Prompting

- Repository: https://github.com/sheldonresearch/ProG
- Stars: 586 · Forks: 74
- Language: Python
- License: MIT
- Published: 2026-10-22 · Updated: 2026-10-22 · Language: en
- Canonical page: https://hysenlabs.com/projects/sheldonresearch-prog

## The problem is that every prompt paper ships its own code

Graph prompt learning is a field with a reproducibility problem, and ProG-V2 is an attempt at the engineering answer rather than the algorithmic one. The project describes itself as an engineering-focused extension of the original ProG benchmark for graph prompt learning, and it keeps the standard pre-train, prompt-tune and evaluate workflow. The pitch is that the field has many methods, each implemented in its own repository with its own data loading, its own model factory and its own result format, so comparing two methods means reconciling two codebases rather than running an experiment. ProG-V2 turns the moving parts into registries and the experiment into a set of flags. The audience is a researcher who runs these comparisons, and the second audience is the student who wants to reproduce a table without inheriting a stack of scripts. The repository is MIT licensed, the last push was on 2026-06-02, and the released tags are v0.1, v0.2 and v1.0 from February and June 2024.

## Registries replace per-paper code

The new in V2 section lists what the refactor actually bought. There are 17 prompt strategies registered through a PromptStrategy registry, and 6 GNN backbones registered through prompt_graph.model.build_gnn. On top of that sit reproducible few-shot benchmark utilities for node and graph level tasks, centralized filesystem paths, device resolution, logging and a CLI with YAML configuration, tests covering data loading, GNN factory construction, strategy registration and prompt-task smoke runs, and a set of fixes for benchmark-blocking edge cases in WebKB, MultiGprompt, RELIEF and GraphMAE. The edge case fixes are the interesting line in that list, because they describe the difference between a method that works on your dataset and a method whose data pipeline has a corner case that silently drops examples.

## Installing it, and the PyTorch Geometric wheel problem

The install is a conda environment plus an editable pip install, and the README specifies Python 3.9 or 3.11 with 3.11 recommended for local development.

```bash
conda create -n prog-v2 python=3.11 -y
conda activate prog-v2
pip install -e ".[dev]"
pre-commit install
```

The dependencies in the package metadata are torch at 1.13 or later and below 3, torch_geometric, ogb, pandas, openpyxl, scikit-learn, torchmetrics, networkx, numpy below 2, deprecated, tqdm and pyyaml, with a dev extra of pytest, ruff, pre-commit and mypy. The README then flags the installation snag that most PyTorch Geometric users hit.

```bash
python -m pip install torch_scatter torch_sparse -f https://data.pyg.org/whl/
```

If the PyTorch Geometric extension wheels are not resolved automatically, you fetch the matching ones for your PyTorch and CUDA version from the official PyG wheel index. The numpy ceiling of below 2 is another pin worth noticing, since it is the kind of constraint that silently conflicts with a newer environment. The package requires Python 3.9 or later, and the ruff configuration targets py39 with a line length of 100.

## Running one cell of the grid

The entry points are a downstream task script and a benchmark script, and both take the same vocabulary of flags. A minimal downstream run names the task, the dataset, the backbone, the prompt, the shot count, the epochs and the device.

```bash
python downstream_task.py \
  --downstream_task NodeTask \
  --dataset_name Cora \
  --gnn_type GCN \
  --prompt_type GPF \
  --shot_num 1 \
  --epochs 1 \
  --device cpu
```

The benchmark script adds the pretraining task, the path to a pretrained checkpoint and an iteration count, and it can write an Excel matrix.

```bash
python bench.py \
  --pretrain_task NodeTask \
  --dataset_name Cora \
  --prompt_type None \
  --gnn_type GCN \
  --shot_num 1 \
  --epochs 1 \
  --device cpu \
  --pre_train_model_path None \
  --num_iter 1
```

There is also a bootstrap step that creates empty Excel matrices for a chosen backbone, so the workflow is bootstrap, fill, then export. The public sweep scripts are parameterised the same way, with a --fast flag for a quicker pass and a --datasets argument to narrow the set.

```bash
bash scripts/pretrain_full_grid.sh --gnn_type GCN --fast
bash scripts/bench_full_grid.sh --gnn_type GCN --fast --datasets "Cora MUTAG"
```

## Two published benchmark reports in one format

The results are published as two complementary reports, one for node and graph classification and one for edge tasks, and both use the same {pretrain}+{prompt} matrix format so they can be read and merged with the same tooling. The classification report under results/benchmark-gcn/ covers 714 independent dataset, shot and pretrain plus prompt combinations and 2142 metric values across Accuracy, Macro-F1 and AUROC, with a summary.csv, a final_matrices.xlsx with 12 sheets, and a README defining the metrics. The link prediction report under results/link-prediction-gcn/ covers 2912 combinations over Accuracy, F1, AUROC and AUPRC across eight datasets, with 32 sheets in its workbook. The experimental settings are fixed and published: GCN backbone, 2 layers, hidden dimension 128, seed 42, 1, 3 and 5 shot, 5 splits per shot setting reported as mean and standard deviation, a downstream budget of 50 epochs with early stopping, and a pretrain budget of 200 epochs for generated checkpoints. The README is explicit that both reports currently use GCN and that other backbones exist in the model registry but are not part of these public tables.

## Where ProG-V2 is the wrong tool

There are three limits and they are all about coverage. The first is that the registries are finite. The prompt strategy list is 17 names, the backbone list is 6, and the pretraining list is 7, so a method published after this snapshot simply is not in the toolkit, and adding one means writing a strategy that follows the registry contract. The second is the task type. The downstream task table shows NodeTask over 12 datasets, GraphTask over 11, and LinkTask over 16 curated datasets, and there is no node property prediction, no clustering and no generative task in that list. The third is the benchmark tables themselves. Every published number uses GCN, so a reader cannot conclude anything about GAT, GIN or GraphTransformer from the released results, and the summaries are point estimates from one seed of splits rather than a claim about the best configuration. The alternative worth naming is the opposite approach, keeping each method's own repository and writing a thin adapter that produces a common result schema, which gives you unlimited coverage at the cost of the very integration work the toolkit was built to remove. ProG-V2 is the right answer when the number of methods you want to compare is bounded by what the registry holds.

## The repository as a working example

The layout tells you how the project is meant to be used. There is a prompt_graph/ package for the library itself, and its setuptools configuration includes only prompt_graph packages, so the library is a clean installable unit rather than a script directory. Around it sit pre_train.py, bench.py and downstream_task.py as the three entry points, a configs/ directory for the YAML configuration, scripts/ for the sweep and Excel bootstrap tooling, results/ for the published reports, tests/ for the test suite, a Tutorial/ directory, and assets/ for the images. The pyproject also marks a slow test marker with a description saying the opt-in tests take more than 30 seconds per case for RL loops and heavy benchmarks, and the default pytest options exclude them, running with -m 'not slow'. That is a small design detail that says a lot about the intent: the default test run is meant to be fast enough to run on every change, with the expensive sweeps available explicitly.

## Conclusion

Adopt ProG-V2 if you are comparing graph prompt learning methods and want one codebase, one result format and one command line for every combination rather than a separate repository per paper. Do not adopt it if you need the newest backbone or a task type beyond node, graph and link prediction, since the registry coverage is finite and the published benchmark tables use GCN only. Verify first which Python and CUDA combination your PyTorch Geometric wheels resolve to, because the install notes warn that the extension wheels may need to be fetched by hand, and read the benchmark README files before trusting the reported numbers.

## FAQ

### What is ProG-V2 and how does it differ from the original ProG?

It is an engineering-focused extension of the original ProG benchmark for graph prompt learning. It keeps the pre-train, prompt-tune and evaluate workflow while adding a modular prompt-strategy architecture, broader coverage, centralized path, device and logging utilities, benchmark scripts, tests and public merged result reports.

### How do I install ProG-V2?

Create a conda environment with Python 3.9 or 3.11, with 3.11 recommended, then run pip install -e ".[dev]" and pre-commit install. If PyTorch Geometric extension wheels are not resolved automatically, install torch_scatter and torch_sparse from the official PyG wheel index for your PyTorch and CUDA version.

### How many prompt strategies, backbones and pretraining methods does ProG-V2 support?

There are 17 prompt strategies registered through a PromptStrategy registry, 6 GNN backbones registered through prompt_graph.model.build_gnn, and 7 pretraining methods. The downstream tasks are NodeTask over 12 datasets, GraphTask over 11 and LinkTask over 16 curated datasets.

### What do the published ProG-V2 benchmark reports cover?

Two reports. The node and graph classification one covers 714 dataset, shot and pretrain plus prompt combinations and 2142 metric values over Accuracy, Macro-F1 and AUROC, and the link prediction one covers 2912 combinations over Accuracy, F1, AUROC and AUPRC across eight datasets. Both currently use the GCN backbone only, with 2 layers, hidden dimension 128 and seed 42.

## Sources

- [Issues](https://github.com/sheldonresearch/ProG/issues)
- [License: MIT](https://github.com/sheldonresearch/ProG/blob/main/LICENSE)
- [README](https://github.com/sheldonresearch/ProG/blob/main/README.md)
- [Releases](https://github.com/sheldonresearch/ProG/releases)
- [sheldonresearch/ProG on GitHub](https://github.com/sheldonresearch/ProG)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/sheldonresearch-prog
