cs.LGMar 13, 2026

Modality-free Graph In-context Alignment

Authors: Wei Zhuo, Siqiang Luo

Organizations: Nanyang Technological University

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.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LEDA: Latent Semantic Distribution Alignment for Multi-domain Graph Pre-training

    Feb 26, 2026Lianze Shan, Jitao Zhao, Dongxiao He +3Graph Foundation ModelsCross-Domain Generalization

  2. Surprisingly Simple and Effective Multi-Domain Graph Foundation Model through Graph-to-Table Alignment

    Jul 13, 2026Chunyu Hu, Tianyin Liao, Ge Lan +4Tabular Foundation ModelsGraph Representation Learning

  3. CrossHGL: A Text-Free Foundation Model for Cross-Domain Heterogeneous Graph Learning

    Mar 29, 2026Xuanze Chen, Jiajun Zhou, Yadong Li +2Graph Representation LearningGraph Foundation Models