Modality-free Graph In-context Alignment
Wei Zhuo, Siqiang Luo
Abstract
In-context learning (ICL) converts static encoders into task-conditioned reasoners, enabling adaptation to new data from just a few examples without updating pretrained parameters. This capability is essential for graph foundation models (GFMs) to approach LLM-level generality. Yet current GFMs struggle with cross-domain alignment, typically relying on modality-specific encoders that fail when graphs are pre-vectorized or raw data is inaccessible. In this paper, we introduce Modality-Free Graph In-context Alignment (MF-GIA), a framework that makes a pretrained graph encoder promptable for few-shot prediction across heterogeneous domains without modality assumptions. MF-GIA captures domain characteristics through gradient fingerprints, which parameterize lightweight transformations that align pre-encoded features and indexed labels into unified semantic spaces. During pretraining, a dual prompt-aware attention mechanism with episodic objective learns to match queries against aligned support examples to establish prompt-based reasoning capabilities. At inference, MF-GIA performs parameter-update-free adaptation using only a few-shot support set to trigger cross-domain alignment and enable immediate prediction on unseen domains. Experiments demonstrate that MF-GIA achieves superior few-shot performance across diverse graph domains and strong generalization to unseen domains. The code is available at https://github.com/JhuoW/MF-GIA.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f596cfdd-b8f2-4fd7-b68d-23c7da711233Builds on36
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Graph Contrastive Learning with AugmentationsYuning You, Tianlong Chen, Yongduo Sui, Ting Chen et al.NeurIPS 2020 · 3,042 citations
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
Related papers
- GFMate: Empowering Graph Foundation Models with Test-time Prompt TuningYan Jiang, Ruihong Qiu, Zi HuangICML 2026
- SAMGPT: Text-free Graph Foundation Model for Multi-domain Pre-training and Cross-domain AdaptationXingtong Yu, Zechuan Gong, Chang Zhou, Yuan Fang et al.WWW 2025 · 45 citations
- PRODIGY: Enabling In-context Learning Over GraphsQian Huang, Hongyu Ren, Peng Chen, Gregor Krzmanc et al.NeurIPS 2023 · 131 citations
- Multi-Domain Graph Foundation Models: Robust Knowledge Transfer via Topology AlignmentShuo Wang, Bokui Wang, Zhixiang Shen, Boyan Deng et al.ICML 2025
- A Prompt-Based Knowledge Graph Foundation Model for Universal In-Context ReasoningYuanning Cui, Zequn Sun, Wei HuNeurIPS 2024 · 46 citations
