Lune

NeurIPS2023Top-tier venue

PRODIGY: Enabling In-context Learning Over Graphs

Qian Huang, Hongyu Ren, Peng Chen, Gregor Krzmanc, Daniel Zeng, Percy Liang, Jure Leskovec

Abstract

In-context learning is the ability of a pretrained model to adapt to novel and diverse downstream tasks by conditioning on prompt examples, without optimizing any parameters. While large language models have demonstrated this ability, how in-context learning could be performed over graphs is unexplored. In this paper, we develop Pretraining Over Diverse In-Context Graph Systems (PRODIGY), the first pretraining framework that enables in-context learning over graphs. The key idea of our framework is to formulate in-context learning over graphs with a novel prompt graph representation, which connects prompt examples and queries. We then propose a graph neural network architecture over the prompt graph and a corresponding family of in-context pretraining objectives. With PRODIGY, the pretrained model can directly perform novel downstream classification tasks on unseen graphs via in-context learning. We provide empirical evidence of the effectiveness of our framework by showcasing its strong in-context learning performance on tasks involving citation networks and knowledge graphs. Our approach outperforms the in-context learning accuracy of contrastive pretraining baselines with hard-coded adaptation by 18% on average across all setups. Moreover, it also outperforms standard finetuning with limited data by 33% on average with in-context learning.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

50 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • One For All: Towards Training One Graph Model For All Classification Tasks cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • One For All: Towards Training One Graph Model For All Classification Tasks cites A Survey on In-context Learning
  • One For All: Towards Training One Graph Model For All Classification Tasks cites Language Models are Few-Shot Learners
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs cites Strategies for Pre-training Graph Neural Networks
  • UniTS: A Unified Multi-Task Time Series Model cites Language Models are Few-Shot Learners
  • GraphTranslator: Aligning Graph Model to Large Language Model for Open-ended Tasks cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • A Survey on In-context Learning cites Language Models are Few-Shot Learners
  • GFT: Graph Foundation Model with Transferable Tree Vocabulary cites One For All: Towards Training One Graph Model For All Classification Tasks
  • GFT: Graph Foundation Model with Transferable Tree Vocabulary cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
  • Graph Contrastive Learning with Augmentations cites Open Graph Benchmark: Datasets for Machine Learning on Graphs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers50

  1. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
  2. One For All: Towards Training One Graph Model For All Classification TasksHao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang et al.ICLR 2024 · 253 citations
  3. UniTS: A Unified Multi-Task Time Series ModelShanghua Gao, Teddy Koker, Owen Queen, Tom Hartvigsen et al.NeurIPS 2024 · 159 citations
  4. GFT: Graph Foundation Model with Transferable Tree VocabularyZehong Wang, Zheyuan Zhang, Nitesh V. Chawla, Chuxu Zhang et al.NeurIPS 2024 · 108 citations
  5. GraphTranslator: Aligning Graph Model to Large Language Model for Open-ended TasksMengmei Zhang, Mingwei Sun, Peng Wang, Shen Fan et al.WWW 2024 · 99 citations

Builds on12

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
  3. Graph Contrastive Learning with AugmentationsYuning You, Tianlong Chen, Yongduo Sui, Ting Chen et al.NeurIPS 2020 · 3,042 citations
  4. MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu et al.NeurIPS 2020 · 1,957 citations
  5. Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations

Related papers

  1. GraphPrompter: Multi-Stage Adaptive Prompt Optimization for Graph In-Context LearningRui Lv, Zaixi Zhang, Kai Zhang, Qi Liu et al.ICDE 2025 · 1 citation
  2. GraphPrompt: Unifying Pre-Training and Downstream Tasks for Graph Neural NetworksZemin Liu, Xingtong Yu, Yuan Fang, Xinming ZhangWWW 2023 · 263 citations
  3. Instruction-based Hypergraph PretrainingMingdai Yang, Zhiwei Liu, Liangwei Yang, Xiaolong Liu et al.SIGIR 2024 · 4 citations
  4. One Prompt Fits All: Universal Graph Adaptation for Pretrained ModelsYongqi Huang, Jitao Zhao, Dongxiao He, Xiaobao Wang et al.NeurIPS 2025 · 15 citations
  5. All in One: Multi-Task Prompting for Graph Neural NetworksXiangguo Sun, Hong Cheng, Jia Li, Bo Liu et al.KDD 2023 · 149 citations
Dusk over the sea between two cliffs drawn in fine vertical lines