--- license: cc-by-4.0 library_name: pytorch pipeline_tag: graph-ml tags: - graph - graph-neural-networks - graph-foundation-models - benchmark - few-shot-learning datasets: - smufang/GFM-datasets --- # GFM-checkpoints Pre-trained weights for the models evaluated in **GFMBenchmark**, from the paper [*Evaluating Progress in Graph Foundation Models: A Comprehensive Benchmark and New Insights*](https://arxiv.org/abs/2603.10033). These are **not** the checkpoints released by the original authors. In each evaluation setting, we pre-trained every method ourselves on the same corpus, using the authors' official code with the hyperparameters described in the paper's appendix. You can use these weights to reproduce the downstream results without pre-training the models again. - Code: https://github.com/smufang/GFMBenchmark - Datasets and few-shot splits: [smufang/GFM-datasets](https://huggingface.co/datasets/smufang/GFM-datasets) - Project page: https://xiexuanting.github.io/GFMBenchmark_Home/ ## Download From the root of the code repository: ```bash bash scripts/hf_download.sh checkpoints ``` The files land in the folders the code reads from, so the `scripts/*_downstream.sh` scripts can be run directly afterwards. Re-running the command resumes an interrupted download. To fetch only some of the files with Python: ```python from huggingface_hub import snapshot_download snapshot_download("smufang/GFM-checkpoints", local_dir=".", allow_patterns=["checkpoints/samgpt(exp1)*"]) ``` ## What is in this repository | Folder | Models | Read by | |---|---|---| | `checkpoints/()_pretrain()_.../checkpoint.pth` | MDGPT, SAMGPT, MDGFM, G2P2, GraphCLIP, HeCo, TGN, DDGCL | `run.py`, `run_g2p2_test.py`, `run_graphclip_test.py` | | `GFT/ckpts/pretrain_model/..._pretrain_on__seed_42/{encoder,vq}_49.pt` | GFT | `GFT/GFT/finetune.py` | | `UniGraph2/checkpoints/unigraph2_pretrain_exp.pt` | UniGraph2 | `UniGraph2/downstream.py` | | `GCOPE/storage//reconstruct_/pretrain_pretrained_model.pt` (+ `config.json`) | GCOPE | `GCOPE/exec.py` | | `GraphPrompt/checkpoints/id50_hd256_DGI_.pt` | DGI and GraphPrompt (single-domain; one encoder per dataset) | `GraphPrompt/downstream.py` | | `FAGCN/modelset/dssl/wisconsin_DSSL.pkl` | DSSL | `FAGCN/dssl_execute.py` | For the models in `checkpoints/`, the folder name records the pre-training configuration: - Cross-domain models (MDGPT, SAMGPT, MDGFM): `()_pretrain(cross)_____id_hd_nl_nh` - G2P2 and GraphCLIP: `()_pretrain(simple)_`. GraphCLIP adds `_`. - Single-domain models (HeCo, TGN, DDGCL): the id is the pre-training dataset, e.g. `heco(ACM)`. ## Pre-training id → evaluation setting | Id in the file or folder name | Setting in the paper | Pre-training corpus | |---|---|---| | `exp1` | Setting I and Setting II (Setting II reuses the Setting I weights) | the 20 datasets marked *I* in Table 1 of the paper | | `exp2` (GFT, UniGraph2 only) | Setting II | same corpus as `exp1` | | `exp3cite` (GFT, UniGraph2: `exp3citation`) | Setting III-C (citation) | Cora, ogbn-arxiv, ACM, DBLP | | `exp3social` | Setting III-S (social / web) | Reddit, Texas, Wisconsin, Cornell, IMDB | | `exp3molecule` (GFT, UniGraph2: `exp3molecular`) | Setting III-M (molecule) | HIV, COX2 | | `exp3` (MDGPT, SAMGPT, MDGFM, G2P2, GraphCLIP, GCOPE) | Used in an earlier version of the paper; not used in the current version | the union of the three Setting III corpora (the 11 datasets above) | | `exp3` (GFT, UniGraph2) | Used in an earlier version of the paper; not used in the current version | Cora, ACM, DBLP (as defined in `GFT/GFT/pretrain.py` and `UniGraph2/pretrain.py`) | | `exp4` | Setting IV (base format) | Photo, Computers, COX2, PROTEINS, ENZYMES, Elliptic | | `exp4` with `fagcn` backbone; `exp5` (GFT, UniGraph2) | Setting IV with the heterophily-aware FAGCN backbone | same corpus as `exp4` | | `exp0` | development and testing only; not reported in the paper | — | For GFT and UniGraph2, the id is passed as `--exp` without the `exp` prefix (e.g. `--exp 3citation`). Their `exp5` checkpoints use the FAGCN encoder, and the others use each model's default encoder (SAGE for GFT, GAT for UniGraph2); the downstream scripts pick the matching encoder and dimensions from `--exp`. ## Loading Every weight file is a plain PyTorch `state_dict` (an `OrderedDict` of tensors) and loads with `torch.load(path, map_location="cpu", weights_only=True)`. The model classes are defined in the code repository; use the downstream scripts there to rebuild each model before loading its weights. The weights were produced with PyTorch 2.5.1 and PyTorch Geometric 2.7.0. ## License The weights are released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Each original method's code keeps its own license. The weights were trained on the datasets listed in [GFM-datasets](https://huggingface.co/datasets/smufang/GFM-datasets), which keep their original terms. Some of them are for non-commercial use only (Elliptic: CC BY-NC-ND 4.0; FB15K-237: Microsoft Research Data License Agreement), and both are in the Setting I corpus; Elliptic is also in the Setting IV corpus. Check those terms before using weights trained on them for commercial purposes. ## Citation ```bibtex @article{yu2026evaluating, title={Evaluating progress in graph foundation models: A comprehensive benchmark and new insights}, author={Yu, Xingtong and Ye, Shenghua and Liang, Ruijuan and Zhou, Chang and Cheng, Hong and Zhang, Xinming and Fang, Yuan}, journal={arXiv preprint arXiv:2603.10033}, year={2026} } ``` Please also cite the papers of the methods whose checkpoints you use.