AnyGraph: Graph Foundation Model in the Wild
Paper · 2026 · Lianghao Xia and Chao Huang
Summary
Graph neural models usually need heavy fine-tuning for each new graph, and they transfer poorly when structure or node features change across domains. Lianghao Xia and Chao Huang propose AnyGraph, a graph foundation model for zero-shot use and quick adaptation on heterogeneous, often text-attributed, graphs. It is built as a Graph Mixture-of-Experts (MoE). Each expert maps a graph into a node embedding space, and predictions are dot products between embeddings. This single formulation covers link prediction and node or graph classification.
A lightweight router chooses one expert per input graph. It scores each expert by how well that expert separates real edges from sampled negative pairs, which is a self-supervised signal. A regularizer based on training frequency stops a few experts from taking over. Experts rely on structure-aware embeddings produced by a non-trainable preprocessing step, so the model avoids full-graph message passing.
Across 38 datasets, AnyGraph shows strong zero-shot generalization, fast fine-tuning convergence, and performance that grows with model size and data. This makes it a practical, open-source option for cross-domain graph learning.
Key points
- Experiments: 38 datasets in total. The zero-shot comparison against GraphGPT and OpenGraph used 14 datasets and the NDCG@20 metric.
- Expert routing:
- The router assigns each graph to the expert with the highest sigmoid-bounded score gap between positive and negative edges.
- Frequency regularization, scaled by the hyperparameter ρ, pushes training toward under-used experts.
- Efficiency:
- Only one of the K experts is active per graph, so compute is roughly 1/K of a comparable non-MoE model.
- On PPA, 100 training steps took 41.1s for AnyGraph, 101.1s for GCN and 130.8s for GraphCL.
- Fine-tuning: AnyGraph converged faster than GraphCL fine-tuning and GCN trained from scratch on Citation-2019 and PPA. On PPA, GraphCL pre-training (on Link2) did not help.
- Limitations and availability:
- The model handles only static graphs.
- All edge types are treated the same way.
- Code is available at github.com/HKUDS/AnyGraph.
Institutions
Fields, topics and concepts
📚 Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksComputer Vision and Pattern Recognition · 2,869 works
🧭 Topics 1Research subjects and languages the work is about.Language models & pretraining · 3,320 works
Cite
Cite as Lianghao Xia and Chao Huang. 2026. AnyGraph: Graph Foundation Model in the Wild. Findings of the Association for Computational Linguistics: ACL 2026.
@inproceedings{xia2026anygraph,
title = {{AnyGraph: Graph Foundation Model in the Wild}},
author = {Lianghao Xia and Chao Huang},
booktitle = {Findings of the Association for Computational Linguistics: ACL 2026},
year = {2026},
doi = {10.18653/v1/2026.findings-acl.44},
url = {https://doi.org/10.18653/v1/2026.findings-acl.44}
}References
- Shaked Brody, Uri Alon, and Eran Yahav. 2022. How attentive are graph attention networks? In International Conference on Learning Representations. find
- Xuheng Cai, Chao Huang, Lianghao Xia, and Xubin Ren. 2023. Lightgcl: Simple yet effective graph contrastive learning for recommendation. International Conference on Learning Representations (ICLR). find
- Jianxin Chang, Chen Gao, Yu Zheng, Yiqun Hui, Yanan Niu, Yang Song, Depeng Jin, and Yong Li. 2021. Sequential recommendation with graph neural networks. In The International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), pages 378–387. learning on relational datab… find
- Zhongkai Hao, Chengqiang Lu, Zhenya Huang, Hao Wang, Zheyuan Hu, Qi Liu, Enhong Chen, and Cheekong Lee. 2020. Asgn: An active semi-supervised graph neural network for molecular property prediction. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), pages 731–752. find
- Xiangnan He, Kuan Deng, Xiang Wang, Yan Li, Yongdong Zhang, and Meng Wang. 2020. Lightgcn: Simplifying and powering graph convolution network for recommendation. In The International ACM SI-GIR Conference on Research and Development in Information Retrieval (SIGIR), pages 639–648. find
- Ziniu Hu, Yuxiao Dong, Kuansan Wang, and Yizhou Sun. 2020. Heterogeneous graph transformer. In ACM The Web Conference (WWW), pages 2704– 2710. find
- Di Jin, Zhizhi Yu, Cuiying Huo, Rui Wang, Xiao Wang, Dongxiao He, and Jiawei Han. 2021. Universal graph convolutional networks. In Conference on Neural Information Processing Systems (NeurIPS), pages 10654–10664. find
- Wei Jin, Xiaorui Liu, Xiangyu Zhao, Yao Ma, Neil Shah, and Jiliang Tang. 2022. Automated self-supervised learning for graphs. In International Conference on Learning Representations (ICLR). find
- Wei Jin, Yao Ma, Xiaorui Liu, Xianfeng Tang, Suhang Wang, and Jiliang Tang. 2020. Graph structure learning for robust graph neural networks. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), pages 66–74. find
- Min Chen, Zhikun Zhang, Tianhao Wang, Michael Backes, Mathias Humbert, and Yang Zhang. 2022. Graph unlearning. In IEEE Symposium on Security & Privacy (SIGSAC), pages 499–513. find
- Thomas N Kipf and Max Welling. 2017. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR).
- Runjin Chen, Tong Zhao, Ajay Jaiswal, Neil Shah, and Zhangyang Wang. 2024. Llaga: Large language and graph assistant. In International Conference on Machine Learning (ICML). find
- Guohao Li, Matthias Müller, Bernard Ghanem, and Vladlen Koltun. 2021. Training graph neural networks with 1000 layers. In International Conference on Machine Learning (ICML), pages 6437–6449. find
- Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. 2023. Reproducible scaling laws for contrastive language-image learning. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2…
- Yuhan Li, Peisong Wang, Zhixun Li, Jeffrey Xu Yu, and Jia Li. 2024. Zerog: Investigating cross-dataset zero-shot transferability in graphs. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). find
- Taoran Fang, Yunchao Zhang, Yang Yang, Chunping Wang, and Lei Chen. 2023. Universal prompt tuning for graph neural networks. Conference on Neural Information Processing Systems (NeurIPS). find
- Matthias Fey, Weihua Hu, Kexin Huang, Jan Eric Lenssen, Rishabh Ranjan, Joshua Robinson, Rex Ying, Jiaxuan You, and Jure Leskovec. 2024. Position: Relational deep learning-graph representation Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang, Dacheng Tao, Yixin Chen, and Muhan Zhang. 2024. One for… find
- Yixin Liu, Ming Jin, Shirui Pan, Chuan Zhou, Yu Zheng, Feng Xia, and S Yu Philip. 2022. Graph self-supervised learning: A survey. Transactions on Knowledge and Data Engineering (TKDE), pages 5879–5900. find
- Zemin Liu, Xingtong Yu, Yuan Fang, and Xinming Zhang. 2023. Graphprompt: Unifying pre-training and downstream tasks for graph neural networks. In ACM The Web Conference (WWW), pages 417–428. find
- Haitao Mao, Zhikai Chen, Wei Jin, Haoyu Han, Yao Ma, Tong Zhao, Neil Shah, and Jiliang Tang. 2024. Demystifying structural disparity in graph neural networks: Can one size fit all? In Conference on Neural Information Processing Systems (NeurIPS), volume 36. find
- Niklas Muennighoff, Alexander Rush, Boaz Barak, Teven Le Scao, Nouamane Tazi, Aleksandra Piktus, Sampo Pyysalo, Thomas Wolf, and Colin A Raffel. 2024. Scaling data-constrained language models. In Conference on Neural Information Processing Systems (NeurIPS), volume 36. find
- Mingchen Sun, Kaixiong Zhou, Xin He, Ying Wang, and Xin Wang. 2022. Gppt: Graph pre-training and prompt tuning to generalize graph neural networks. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), pages 1717–1727. find
- Jiabin Tang, Yuhao Yang, Wei Wei, Lei Shi, Lixin Su, Suqi Cheng, Dawei Yin, and Chao Huang. 2024a. Graphgpt: Graph instruction tuning for large language models. In The International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), pages 491–500. find
- Jiabin Tang, Yuhao Yang, Wei Wei, Lei Shi, Long Xia, Dawei Yin, and Chao Huang. 2024b. Higpt: Heterogeneous graph language model. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). find
- Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. 2018. Graph attention networks. In International Conference on Learning Representations (ICLR). find
- Junke Wang, Dongdong Chen, Zuxuan Wu, Chong Luo, Luowei Zhou, Yucheng Zhao, Yujia Xie, Ce Liu, Yu-Gang Jiang, and Lu Yuan. 2022. Omnivl: One foundation model for image-language and video-language tasks. Conference on Neural Information Processing Systems (NeurIPS), 35:5696–5710. find
- Wenhai Wang, Jifeng Dai, Zhe Chen, Zhenhang Huang, Zhiqi Li, Xizhou Zhu, Xiaowei Hu, Tong Lu, Lewei Lu, Hongsheng Li, et al. 2023. Internimage: Exploring large-scale vision foundation models with deformable convolutions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 144… find
- Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. 2019. Simplifying graph convolutional networks. In International Conference on Learning Representations (ICLR), pages 6861–6871. find
- Jiancan Wu, Xiang Wang, Fuli Feng, Xiangnan He, Liang Chen, Jianxun Lian, and Xing Xie. 2021. Self-supervised graph learning for recommendation. In The International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR), pages 726–735. find
- Lianghao Xia, Ben Kao, and Chao Huang. 2024. Opengraph: Towards open graph foundation models. In Conference on Empirical Methods in Natural Language Processing (EMNLP). find
- Teng Xiao, Zhengyu Chen, Donglin Wang, and Suhang Wang. 2021. Learning how to propagate messages in graph neural networks. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), pages 1894–1903. find
- Yaochen Xie, Zhao Xu, Jingtun Zhang, Zhengyang Wang, and Shuiwang Ji. 2022. Self-supervised learning of graph neural networks: A unified review. Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 45(2):2412–2429. find
- Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. 2018. How powerful are graph neural networks? In International Conference on Learning Representations (ICLR).
- Ruosong Ye, Caiqi Zhang, Runhui Wang, Shuyuan Xu, and Yongfeng Zhang. 2024. Language is all a graph needs. In Conference of the European Chapter of the Association for Computational Linguistics (EACL), pages 1955–1973. find
- Yuning You, Tianlong Chen, Yang Shen, and Zhangyang Wang. 2021. Graph contrastive learning automated. In International Conference on Machine Learning (ICML), pages 12121–12132. PMLR. find
- Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. 2020. Graph contrastive learning with augmentations. Conference on Neural Information Processing Systems (NeurIPS), 33:5812–5823. find
- Qiannan Zhang, Shichao Pei, Qiang Yang, Chuxu Zhang, Nitesh V Chawla, and Xiangliang Zhang. 2023. Cross-domain few-shot graph classification with a reinforced task coordinator. In AAAI Conference on Artificial Intelligence (AAAI), pages 4893– 4901. find
- Haihong Zhao, Aochuan Chen, Xiangguo Sun, Hong Cheng, and Jia Li. 2024. All in one and one for all: A simple yet effective method towards cross-domain graph pretraining. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD). find
- Yanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu, Shu Wu, and Liang Wang. 2021. Graph contrastive learning with adaptive augmentation. In ACM The Web Conference (WWW), pages 2069–2080. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/xia-2026-anygraph-graph-foundation-model-wild/