Modality-free Graph In-context Alignment

Wei Zhuo, Siqiang Luo

International Conference on Learning Representations 2026 · Oral

Overview

This talk introduces Modality-free Graph In-context Alignment (MFGIA), a groundbreaking framework designed to bring true in-context learning capabilities to graph neural networks (GNNs). Presented by Wei Zhuo and Siqiang Luo, MFGIA addresses fundamental limitations prevalent in current GNN paradigms, which are typically domain-specific, modality-locked, and necessitate extensive fine-tuning for each new task. The core innovation lies in achieving three critical criteria simultaneously: being fine-tuning-free, enabling robust cross-domain alignment, and, most importantly, operating in a modality-free manner. This positions MFGIA as the first graph foundation model to deliver such comprehensive generality.

Watch on SlidesLive

Visual summary for Modality-free Graph In-context Alignment by Wei Zhuo, Siqiang Luo
Visual summary for Modality-free Graph In-context Alignment by Wei Zhuo, Siqiang Luo

Key moments

  1. 0:00 Introduction and the 'Alignment Wall' problem
  2. 2:00 Overview of the MFGIA framework stages
  3. 3:15 Key insight: Gradient fingerprint for domain description
  4. 4:10 Modality-free feature and label alignment via FiLM
  5. 5:15 Dual Prompt-Aware Attention for in-context reasoning
  6. 6:30 Test-time prediction with frozen model and fingerprint
  7. 7:50 SOTA performance and cross-task generalization demonstrated

Modality-free Graph In-context Alignment

Speakers: Wei Zhuo, Siqiang Luo

Conference: ICLR 2026

YouTube: https://slideslive.com/39062155

Overview

This talk introduces Modality-free Graph In-context Alignment (MFGIA), a groundbreaking framework designed to bring true in-context learning capabilities to graph neural networks (GNNs). Presented by Wei Zhuo and Siqiang Luo, MFGIA addresses fundamental limitations prevalent in current GNN paradigms, which are typically domain-specific, modality-locked, and necessitate extensive fine-tuning for each new task. The core innovation lies in achieving three critical criteria simultaneously: being fine-tuning-free, enabling robust cross-domain alignment, and, most importantly, operating in a modality-free manner. This positions MFGIA as the first graph foundation model to deliver such comprehensive generality.

The significance of MFGIA stems from its direct confrontation with what the speakers term the "alignment wall." Existing graph foundation models often rely on text-attributed graphs, converting all information into natural language to leverage large language models (LLMs) for creating a shared embedding space. However, this approach falters in numerous real-world scenarios where raw text data is unavailable due to privacy constraints (e.g., social networks), proprietary encoding (e.g., biomedical molecular fingerprints), or encryption (e.g., financial behavioral vectors). MFGIA bypasses this dependency entirely, working directly with pre-encoded features regardless of their original modality. This capability is crucial for unlocking the full potential of GNNs in diverse, sensitive, and data-constrained applications, ushering in an era of more adaptable and generalizable graph intelligence.

Background

▶ Watch: Introduction and the 'Alignment Wall' problem (0:00)

The landscape of machine learning has been dramatically reshaped by the advent of large language models (LLMs) in natural language processing (NLP). A hallmark of these models is their astonishing in-context learning ability: given a few examples as a prompt, they can solve new, unseen tasks without any parameter updates. This paradigm shift means the task is defined by the context provided, rather than by modifications to the model's trained weights, leading to unprecedented flexibility and generalization.

In stark contrast, graph neural networks have historically struggled to achieve this level of foundation-level generality. Traditional GNNs are inherently domain-specific and modality-locked. They demand extensive fine-tuning for every new task or dataset, and their learned representations often fail to transfer effectively across different domains or even different data modalities. This limitation severely restricts their applicability in real-world scenarios where data is heterogeneous, evolving, and often scarce for novel tasks. The challenge, therefore, is to bridge this gap: how can we imbue GNNs with the same powerful in-context learning capabilities observed in LLMs, enabling them to adapt to new graph tasks and domains without requiring costly and time-consuming fine-tuning?

Existing approaches to graph generalization have attempted to tackle parts of this problem, but none have successfully addressed all facets simultaneously. Some methods might offer cross-domain transfer, but still require fine-tuning. Others might be fine-tuning-free within a specific domain, but lack cross-domain alignment. A significant hurdle, and the primary motivation behind MFGIA, is what the speakers identify as the "alignment wall." Many proposed graph foundation models attempt to achieve cross-domain alignment by converting diverse graph data into a common natural language representation. They then leverage pre-trained language models to embed this text into a shared latent space. While seemingly intuitive, this approach encounters a fundamental roadblock: real-world graph data often lacks associated raw text. Consider social networks where privacy regulations prohibit access to user-generated content, or biomedical domains where molecular fingerprints are derived from proprietary computational pipelines, or financial networks using encrypted behavioral vectors. In these cases, the data is pre-encoded, and reverse-engineering the original text modality is impossible. Any method reliant on text as an alignment bridge thus becomes inapplicable, hitting this "alignment wall." MFGIA directly addresses this by proposing a truly modality-free approach, capable of operating effectively with any pre-encoded features, thereby eliminating the dependency on raw text and opening up GNNs to a vast array of previously inaccessible applications.

Key Findings

▶ Watch: Key insight: Gradient fingerprint for domain description (3:15)

The talk presents MFGIA as a pioneering framework that fundamentally redefines in-context learning for graph data, achieving what no prior method has accomplished. The key findings and contributions are multifaceted:

  1. First to Achieve True Graph In-context Learning: MFGIA is presented as the first graph foundation model to simultaneously satisfy the three crucial criteria for true in-context learning on graphs: it is fine-tuning-free, it enables cross-domain alignment, and it is profoundly modality-free. This overcomes the long-standing limitations of existing GNNs that are typically domain-specific, modality-locked, and require extensive retraining.
  1. Introduction of the Gradient Fingerprint: A novel and highly effective method, the gradient fingerprint, is introduced for characterizing graph domains without any knowledge of their original data modality. By taking a single gradient step on a graph from a shared model initialization, the resulting parameter displacement (delta_theta) serves as a unique "fingerprint" that captures the graph's intrinsic properties and how it interacts with the model. This is a critical innovation for modality-free domain identification.
  1. Modality-Free Alignment for Features and Labels: MFGIA develops a sophisticated mechanism for aligning both node features and labels across diverse domains. This is achieved by conditioning feature-wise linear modulation (FiLM) transformations on the domain embeddings derived from the gradient fingerprint. This ensures that features from similar domains map to neighboring subspaces while labels are reconciled to a shared, domain-agnostic base, thereby enabling seamless cross-domain generalization.
  1. Dual Prompt-Aware Attention Mechanism (DPAA): A specialized attention mechanism, DPAA, is designed to facilitate in-context reasoning. It allows query nodes to attend to aligned support features and then interact with aligned label prototypes to produce similarity scores for classification. Crucially, DPAA enforces a strict in-context learning principle where prompt examples do not interact with each other, only providing context to the query.
  1. State-of-the-Art Performance and Generalization: MFGIA consistently achieves state-of-the-art performance on various few-shot node classification benchmarks across diverse datasets and domains. Furthermore, it demonstrates remarkable transferability, achieving competitive or superior accuracy on unseen tasks, such as cross-domain link prediction, even though it was pre-trained solely on node classification tasks. This validates the framework's robust in-context reasoning capability and its ability to generalize beyond its pre-training objective.

Technical Deep Dive

▶ Watch: Modality-free feature and label alignment via FiLM (4:10)

The MFGIA framework is meticulously designed with three interconnected stages: modality-free alignment, episodic pre-training, and in-context prediction. Each stage contributes to the model's ability to perform true in-context learning on graphs.

Modality-Free Alignment

The cornerstone of MFGIA's cross-domain and modality-free capabilities is its innovative alignment mechanism, which operates on both features and labels.

Gradient Fingerprint

A central challenge in cross-domain graph learning is how to characterize a graph's domain without relying on its specific data modality (e.g., text, images). MFGIA introduces the gradient fingerprint as an ingenious solution. The idea is as follows:

  1. Shared Initialization: The process begins with a shared model parameter initialization, denoted as theta_0. This theta_0 represents a generic, untrained state of the underlying GNN encoder.
  2. Single Gradient Step: For each graph in the pre-training set, a single gradient step is performed using its available labels. This step calculates how the graph's unique combination of features, labels, and structural topology influences the shared encoder's parameters.
  3. Displacement as Fingerprint: The resulting displacement in parameters, delta_theta, from theta_0 effectively captures a "fingerprint" of that specific graph's domain. Intuitively, graphs belonging to similar domains will exhibit similar gradient patterns when interacting with theta_0, leading to similar delta_theta vectors. Conversely, graphs from disparate domains will produce distinct delta_theta patterns.

Crucially, this process requires no knowledge of the original data modality, as it operates directly on the graph's structure, features, and labels, regardless of their semantic origin.

  1. Domain Embedding: These delta_theta gradient fingerprints are then projected into a compact, learnable domain embedding space. This projection is handled by a dedicated domain embedder, which consists of a 2D convolution layer followed by a multi-layer perceptron (MLP). This module learns to distill the high-dimensional gradient patterns into concise domain embeddings (e_i), where e_i represents the embedding for domain i.

Feature Alignment

Once a domain embedding e_i is obtained from the gradient fingerprint, it is used to drive the alignment of node features.

  1. GNN Encoding: A base GNN encoder first processes the raw node features from any given graph, transforming them into initial, domain-agnostic base representations.
  2. FiLM Transformation: These base representations are then calibrated into a unified feature space using feature-wise linear modulation (FiLM). The domain embedding e_i acts as the conditioning input to FiLM, generating domain-specific scale (gamma) and shift (beta) parameters.

The FiLM operation can be expressed as: output = gamma * input + beta.

The key property here is that similar domains, having similar e_i embeddings, will produce similar gamma and beta parameters. This ensures that their aligned features occupy neighboring subspaces within the unified embedding space, preserving crucial geometric relationships across domains while effectively normalizing inter-domain variations.

Label Alignment

In addition to features, MFGIA also aligns labels across domains, acknowledging that the semantic meaning of a label ID (e.g., "class 0") can vary significantly between different graph datasets.

  1. Shared Label Base: The framework maintains a shared label base, which is a set of domain-agnostic label prototypes. These prototypes represent the canonical meaning of each class across all possible domains.
  2. Domain-Specific Transformation: Similar to feature alignment, the same FiLM mechanism, conditioned on the domain embedding e_i, transforms these shared label prototypes into domain-specific label embeddings. This means that for a given domain i, the label prototype for "class 0" will be transformed into label_embedding_i_0, which is semantically aligned with the features of that specific domain. This mechanism effectively reconciles the disparate interpretations of label IDs across heterogeneous graphs, allowing for a unified classification mechanism.

Episodic Pre-training

To instill the in-context reasoning capability, MFGIA employs an episodic pre-training regime. This approach directly simulates the few-shot scenarios the model will encounter during inference.

  • N-way K-shot Episodes: From the diverse pre-training graphs, the system constructs numerous N-way K-shot episodes. Each episode consists of a "support set" (K labeled examples for N classes) and a "query set" (unlabeled examples to be classified).
  • Learning Feature-Label Matching: By training on these episodes, the model learns to effectively match query nodes against the aligned support examples, thereby acquiring the crucial feature-label matching capability essential for in-context learning on entirely unseen domains at test time.

Dual Prompt-Aware Attention Mechanism (DPAA)

The core mechanism for in-context reasoning within MFGIA is the dual prompt-aware attention mechanism (DPAA). This mechanism is designed to leverage the aligned support examples (the prompt) to classify query nodes.

  1. Feature-Side Attention: For a given query node, the DPAA first employs a feature-side attention mechanism. This allows the query node's aligned feature representation to attend to the aligned features of the support examples in the prompt. The output is a prompt-conditioned feature representation for the query node, effectively integrating contextual information from the support set.
  2. Label-Side Attention: Subsequently, a label-side attention mechanism takes this prompt-conditioned feature representation and allows it to interact with the aligned label prototypes. This interaction produces a similarity score for each possible class.
  3. Final Prediction: The query node is then classified into the class corresponding to the highest similarity score.

Crucially, DPAA adheres strictly to the principles of in-context learning by ensuring that prompt examples do not attend to each other. Information flow is strictly unidirectional: from the prompt examples to the query node, mirroring how LLMs utilize prompts.

In-context Prediction (Test Time)

One of MFGIA's most powerful aspects is its inference phase, where the entire model remains completely frozen, requiring no parameter updates. Given a completely unseen graph from a novel domain and a small support set of labeled examples (the prompt), MFGIA performs prediction in three steps:

  1. Domain Fingerprint Computation: The model first computes the gradient fingerprint from the provided support set. This involves taking a single gradient step from the same frozen theta_0 initialization used during pre-training. The resulting delta_theta is then passed through the pre-trained domain embedder to obtain the in-context domain embedding for this new, unseen domain.
  2. Alignment Parameter Generation: The newly computed domain embedding then generates the necessary gamma and beta alignment parameters through the pre-trained FiLM modules. These parameters are used to map all features and labels of the unseen graph into the unified embedding space established during pre-training.
  3. Prompt-Aware Attention Matching: Finally, the DPAA mechanism performs prompt-aware attention matching to classify the query nodes against the aligned support set. This entire process is entirely parameter update-free with respect to the pre-trained model; the gradient fingerprint automatically triggers the correct alignment and reasoning for the semantics of the new domain.

Prediction Enhancements

To further improve performance, especially with sparse support labels, MFGIA incorporates two enhancements during inference:

  • Label Propagation: Predictions are refined by propagating label information through the graph structure, leveraging the inherent connectivity of the graph.
  • Adapted Distance Metric: An adapted distance metric is employed, which combines cosine similarity (capturing directionality) and inverse Euclidean distance (capturing magnitude). This metric is weighted per query by feature variance, allowing for a more nuanced similarity assessment that fully exploits the graph topology and the sparse support labels.

Experimental Setup & Results

▶ Watch: Test-time prediction with frozen model and fingerprint (6:30)

The effectiveness of MFGIA was rigorously evaluated across various few-shot learning scenarios, demonstrating its superior performance and generalization capabilities.

Tasks: The primary evaluation task was few-shot node classification, where the model is presented with a new graph and a very limited number of labeled examples (the support set) to classify the remaining unlabeled nodes. Additionally, the framework's generalization was tested on cross-domain link prediction tasks, even though the model was not explicitly pre-trained for this type of task.

Datasets: The experiments utilized "various datasets from different domains" for node classification, implying a diverse collection of graph benchmarks representative of different real-world applications. For link prediction, "cross-domain datasets on link tasks" were used, further emphasizing the model's ability to transfer learning across heterogeneous data sources. While specific dataset names were not explicitly listed in the transcript, the emphasis was on their diversity and the challenge they posed due to their pre-encoded nature.

Baselines: MFGIA was benchmarked against existing state-of-the-art methods. A critical observation from the results table presented in the talk was the presence of dashes for many baseline methods when applied to pre-encoded graphs. These dashes signify that text-based models simply cannot operate in scenarios where raw text is unavailable, leading to their complete failure. In contrast, MFGIA, being modality-free, consistently functions and produces results across all these challenging settings. Some baselines for link prediction were specifically designed and trained for knowledge graph relation prediction, providing a strong comparative benchmark for MFGIA's cross-task generalization.

Metrics: The primary performance metric reported was accuracy for both node classification and link prediction tasks.

Headline Numbers & Key Results:

  • Node Classification: MFGIA consistently achieved state-of-the-art performance across all dataset settings and few-shot configurations for node classification. This underscores its ability to effectively learn from limited examples and generalize to unseen domains without fine-tuning.
  • Modality-Freeness Validation: The ability of MFGIA to run on datasets where text-based baselines failed (indicated by dashes) is a direct validation of its modality-free design, confirming its applicability in real-world scenarios with pre-encoded features.
  • Cross-Task Generalization: Remarkably, MFGIA demonstrated seamless transferability from node-level to edge-level tasks. On cross-domain link prediction, MFGIA achieved competitive or even superior accuracy compared to baselines, including those specifically designed and trained for knowledge graph relation prediction. This is a significant finding, as MFGIA was pre-trained only on node classification tasks, yet its in-context reasoning capability generalized effectively to a different task type. This highlights the robustness and fundamental generality of the proposed framework.

Ablation Studies: The transcript does not explicitly detail any ablation studies regarding the individual components of MFGIA (e.g., the gradient fingerprint, FiLM, or DPAA). However, the strong performance and comparisons against failing baselines implicitly demonstrate the necessity and efficacy of its modality-free approach and alignment mechanisms.

In summary, the experimental results unequivocally position MFGIA as a leader in graph in-context learning, capable of operating in challenging, modality-constrained environments and generalizing across diverse tasks and domains without requiring parameter updates.

Practical Implications

▶ Watch: SOTA performance and cross-task generalization demonstrated (7:50)

The introduction of MFGIA carries profound practical implications for various stakeholders in the AI/ML ecosystem, particularly those working with graph data. Its modality-free, fine-tuning-free, and cross-domain alignment capabilities address several critical bottlenecks in the deployment and scalability of GNNs.

For practitioners and model builders, MFGIA represents a paradigm shift. It unlocks the ability to apply GNNs to a vast array of real-world scenarios where raw text or specific data modalities are unavailable, inaccessible, or subject to stringent privacy regulations. This includes sensitive domains like:

  • Social Networks: Analyzing user behavior graphs without needing access to private user-generated content.
  • Biomedical Domains: Working with proprietary molecular fingerprints or biological interaction networks without needing to reverse-engineer their chemical structure or textual descriptions.
  • Financial Networks: Detecting fraud or analyzing transaction patterns using encrypted behavioral vectors, where data privacy and security are paramount.

With MFGIA, model builders can rapidly deploy GNN solutions for new graph tasks using only a handful of labeled examples, significantly reducing the development cycle and the dependency on large, labeled datasets. This agility is crucial for iterating quickly in fast-evolving domains.

For infrastructure teams and deployers, MFGIA offers substantial operational benefits. The fact that the model is "completely frozen" at test time means there is no need for continuous retraining or fine-tuning pipelines for every new task or domain. This simplifies deployment considerably, reducing computational overhead, storage requirements for multiple fine-tuned models, and the complexity of MLOps workflows. A single pre-trained MFGIA model can serve a multitude of diverse graph tasks across different domains, leading to more efficient resource utilization and a streamlined inference architecture.

Tradeoffs and Limitations: While MFGIA offers significant advantages, it's important to consider potential tradeoffs.

  • Inference Computation: The gradient fingerprint computation, while only a single gradient step and minimal compared to full fine-tuning, still introduces a small computational cost during the initial phase of inference for a new domain. This is not entirely "zero-cost" in terms of computation, though it is "zero-cost" in terms of parameter updates.
  • Dependence on Shared Initialization: The effectiveness of the gradient fingerprint relies on the quality of the shared theta_0 initialization and the learnable domain embedder. If theta_0 is not sufficiently generic or the embedder is not well-trained, the domain characterization might be suboptimal.
  • Leveraging Available Modality: By being strictly modality-free, MFGIA's design means it cannot actively leverage additional semantic information if raw text or other modalities are available and rich. In scenarios where such data is plentiful and high-quality, a multi-modal approach might extract even richer representations. However, MFGIA's primary value proposition is precisely for situations where this data is absent or unusable.
  • Scalability of Gradient Fingerprint: While a single gradient step is efficient, calculating delta_theta for extremely large graphs might still incur a noticeable overhead. However, the talk implies this is manageable and a small price for the benefits reaped.

In essence, MFGIA empowers practitioners to build and deploy general-purpose GNNs that are adaptable, robust, and privacy-preserving, bridging the gap between cutting-edge graph research and the demands of real-world, data-constrained applications.

Key Takeaways

  • First True Graph In-context Learning: MFGIA is the first framework to achieve true in-context learning on graphs by simultaneously being fine-tuning-free, enabling cross-domain alignment, and operating in a modality-free manner.
  • Overcoming the Alignment Wall: It effectively bypasses the "alignment wall" problem, allowing GNNs to work with pre-encoded features in real-world scenarios where raw text or original data modalities are unavailable (e.g., due to privacy or proprietary formats).
  • Novel Gradient Fingerprint: The gradient fingerprint is a key innovation, providing a modality-free method to characterize graph domains by capturing how a graph's features, labels, and structure influence a shared model's parameters.
  • Unified Alignment via FiLM and DPAA: MFGIA employs feature-wise linear modulation (FiLM) conditioned on domain embeddings for both feature and label alignment, coupled with a dual prompt-aware attention mechanism (DPAA) for robust in-context reasoning.
  • State-of-the-Art Performance & Generalization: The framework achieves state-of-the-art performance in few-shot node classification and demonstrates remarkable generalization capabilities, seamlessly transferring to unseen tasks like cross-domain link prediction without explicit training.
  • Practical and Efficient Deployment: MFGIA enables practical and efficient deployment of GNNs in diverse real-world settings by providing a frozen, adaptable model that requires no parameter updates for new tasks or domains, simplifying MLOps and reducing computational overhead.

About the Speaker(s)

The talk "Modality-free Graph In-context Alignment" was presented by Wei Zhuo and Siqiang Luo. The transcript does not provide further biographical details such as their affiliations or specific titles.

Reviews

→ Top-rated talks at International Conference on Learning Representations 2026

All talks from International Conference on Learning Representations 2026