In computer vision and natural language processing, the concept of a "foundation model" relies on a universal input space. A pixel is always a pixel, and a word can always be mapped to a token from a shared vocabulary. Because of this uniformity, a model pre-trained on millions of web images can easily adapt to specialized medical scans.
In graph machine learning, however, this foundational assumption completely breaks down. Graphs are characterized by extreme domain fragmentation. If you train a Graph Neural Network (GNN) on a social network, a node feature might represent a user's demographic profile. If you move to a molecular dataset, a node feature represents an atomic number.
As identified by Kaveh Hassani in Cross-Domain Few-Shot Graph Classification, graph datasets across different domains feature non-overlapping and non-equivalent node attributes. This creates a fundamental mathematical barrier: standard GNN layers rely on fixed weight matrices ($W \in \mathbb{R}^{d_{out} \times d_{in}}$) tailored to a specific input dimension ($d_{in}$) and semantic context. When the feature space changes, the architecture itself becomes incompatible.
To build true graph foundation models, researchers must bridge this feature space misalignment. Recent breakthroughs attack this problem through three distinct intuition-driven strategies: textual unification, structural tokenization, and geometric projection.
Unifying Heterogeneous Features via Natural Language
The most intuitive way to align disparate feature spaces is to translate them into a shared medium that already possesses a universal vocabulary: natural language.
Instead of representing node attributes as raw, domain-specific vectors, text-space graph models convert attributes into descriptive text strings. For example, a social network node becomes "A 25-year-old user interested in technology", while a molecular node becomes "A carbon atom with an aromatic bond".
[Domain A: Social Network] ---> "User aged 25" ----\
+---> [Language Model] ---> Unified Vector Space (e.g., d=768) ---> [Shared GNN]
[Domain B: Molecular Graph] --> "Carbon Atom" ----/
By passing these descriptions through a text encoder or a Large Language Model (LLM), the heterogeneous inputs are mapped into a single, continuous vector space (such as a 768-dimensional embedding space). As demonstrated by Hao Liu et al. in One For All: Towards Training One Graph Model For All Classification Tasks, this transformation allows a single GNN architecture to process molecules, citation networks, and social graphs simultaneously using the exact same set of weights.
The core reason this works is that the language model acts as a semantic anchor. It ensures that geometric proximity in the embedding space corresponds to conceptual meaning, regardless of the underlying domain. In UniGraph: Learning a Unified Cross-Domain Foundation Model for Text-Attributed Graphs, Bryan Hooi and Xiaoxin He leverage this property to enable zero-shot transfer across entirely unseen graphs. However, as noted by Zhikai Chen et al. in Text-space Graph Foundation Models: Comprehensive Benchmarks and New Insights, the success of this paradigm hinges on carefully balancing these high-quality text embeddings with the structural inductive biases inherent to graph topologies.
Bypassing Features via Structural Tokenization
What happens when text descriptions are unavailable, or when the raw features are too noisy to align? A second strategy bypasses the feature space entirely by shifting the model's focus to pure graph topology.
While a feature's meaning changes across domains, structural primitives—such as triangles, cycles, or specific message-passing pathways—are universal. A clique of interconnected nodes behaves the same way topologically whether it represents a community of friends or a chemical ring.
One prominent approach is Feature-Structuralization, proposed by Fabrizio Frasca et al. in Towards Foundation Models on Graphs: An Analysis on Cross-Dataset Transfer of Pretrained GNNs. This technique explicitly encodes node features directly into graph topology, rendering the model feature-agnostic and allowing pretrained weights to transfer across datasets with completely different input dimensions.
Taking this concept further, Zehong Wang et al. introduced GFT: Graph Foundation Model with Transferable Tree Vocabulary. Instead of tokenizing text, GFT tokenizes local message-passing structures—specifically, computation trees.
Graph Topology Computation Tree Discrete Token
(O)---(O) (Node v)
| | / \
(O)---(O) (u1) (u2) ===> [ Token #42 ]
/ \ |
(w1)(w2) (w3)
By quantizing these continuous structural trees into a discrete "graph vocabulary," the authors create a domain-independent representation space. This allows the model to recognize and transfer structural insights across disparate domains without ever needing to reconcile their mismatched feature dimensions.
Mathematical and Geometric Projections
The third strategy preserves the original, raw feature spaces but uses advanced mathematical frameworks to project or "glue" them into a unified representation.
Instead of forcing features into text or discarding them for topology, these methods find invariant mathematical properties that persist across domains. For instance, Moshe Eliasof et al. developed a framework called ALL-IN in Bridging Input Feature Spaces Towards Graph Foundation Models. ALL-IN projects heterogeneous features into a shared random space and utilizes node-covariance statistics as graph operators. Because covariance structures capture how information varies across neighborhoods regardless of what that information represents, the model achieves strong zero-shot transfer performance on completely unseen datasets.
Alternatively, this alignment can be framed as a geometric or optimal transport problem:
- Riemannian Manifolds: In Multi-Domain Riemannian Graph Gluing for Building Graph Foundation Models, Li Sun et al. map disparate graph domains into a single, smooth Riemannian manifold. By treating knowledge transfer as a geometric alignment problem, they uncover a "geometric scaling law" where training on more diverse graph domains naturally smooths the shared representation space.
- Optimal Transport: In Template based Graph Neural Network with Optimal Transport Distances, Cédric Vincent-Cuaz et al. utilize the Fused Gromov-Wasserstein distance to measure a graph's distance to a set of learnable "template" graphs. This explicitly aligns both node features and graph structures mathematically, adaptively balancing the two based on the target domain's characteristics.
Summary
The challenge of cross-domain graph learning stems directly from feature space misalignment. Whether by leveraging the universal semantic space of natural language, quantizing local structural topologies into discrete vocabularies, or projecting disparate spaces onto shared geometric manifolds, solving this misalignment is what ultimately unlocks the ability to train generalist models capable of traversing the diverse landscape of graph data.