TL;DR
To build a universal foundation model for graphs, researchers usually mash networks from wildly different domains into one shared mathematical space. Unfortunately, this blurs two opposite rules of connection: birds of a feather flock together (homophily) and opposites attract (heterophily). This paper introduces HHGFM, a graph foundation model that softly untangles these two patterns without cutting a single edge, allowing models to transfer knowledge seamlessly across completely different types of networks.
What Problem Does This Paper Address?
After watching foundation models conquer text and images, researchers want the same magic for graphs: pre-train once on diverse networks, then adapt to unseen tasks with just a handful of examples. Because source graphs look wildly different from one another, the standard playbook is to map all of them into a single "domain-invariant" representation space.
Here is the catch: real-world networks follow conflicting social rules. Citation networks are mostly homophilic (papers cite papers on the same topic), whereas web-page hyperlink graphs are often heterophilic (a professor's homepage links to courses and students, rarely to other professors).
When you force both types of graphs into a single shared space, nodes with completely opposite neighborhood dynamics get squished into indistinguishable representations. Some recent methods try to fix this by chopping graphs into two separate subgraphs—one homophilic, one heterophilic—before processing them. However, in self-supervised pre-training, edges are your supervision signal; severing them throws away vital structural information.
Methods
The authors propose HHGFM (Homophilic and Heterophilic Pattern-Disentangled Graph Foundation Model), which separates the two connectivity patterns while keeping the original graph intact.
- Standard Feature Alignment: First, following established multi-domain techniques, HHGFM uses truncated SVD to unify differing node feature dimensions (down to 50) and multiplies them by learnable domain tokens to align their semantics.
- Novel Soft Disentanglement: Because pre-training is unsupervised (no node labels), how do you know if an edge is homophilic or heterophilic? HHGFM builds a proxy by combining a node's aligned features with structural encodings (degree centrality, Laplacian positional encoding, and random-walk return probabilities). It calculates pairwise dissimilarity between connected nodes and passes it through an exponential kernel to generate a soft homophilic weight $W^{\text{ho}} \in [0, 1]$ for each edge. The heterophilic weight is simply the remainder: $W^{\text{he}} = A - W^{\text{ho}}$. Because the two views sum back to the original adjacency matrix $A$, zero connectivity is lost.
- Dual-Backbone Filtering & Opposite Losses: Instead of a single encoder, HHGFM routes the two weighted views into dual 3-layer backbones: a low-pass filter (a standard GCN) to smooth similar neighbors on $W^{\text{ho}}$, and a high-pass filter to capture differences between neighbors on $W^{\text{he}}$. During contrastive link prediction, the homophilic loss pulls connected nodes closer, while the heterophilic loss deliberately pushes connected nodes apart (and pulls negative samples closer).
- Prompt-Tuned Adaptation: For downstream few-shot tasks, the pre-trained backbones are frozen, and lightweight learnable prompts mix the source domain tokens and balance the homophilic and heterophilic representations.
Datasets
No new benchmarks are introduced. Instead, the authors evaluate multi-domain transfer across eight standard benchmark datasets spanning three distinct domains:
- Citation Networks (typically homophilic): Cora, CiteSeer, and PubMed.
- Co-purchase Graphs (typically homophilic): Photo and Computers.
- Web-page Graphs (typically heterophilic): Cornell, Texas, and Wisconsin.
Key Insights and Ideas
- Invariant alignment flattens relational diversity: Empirically plotting the homophily ratios of learned representations (see the right side of the first figure) reveals that standard invariant alignment produces a flat, washed-out distribution. HHGFM preserves two crisp, distinct peaks near 0.0 and 1.0.
- Soft weights beat hard cuts: In ablation studies, forcing a hard 0.5 threshold to split edges into disjoint channels (
HHGFM-Hard) caused a steeper drop in accuracy than removing the heterophilic loss altogether. Keeping soft, complementary edge weights is crucial for self-supervised learning. - Theoretical trade-off: Using domain adaptation theory, the authors prove that aligning homophilic and heterophilic patterns separately tightens the upper bound on target-domain error—provided the error introduced by imperfect unsupervised disentanglement remains smaller than the cross-domain mismatch you just eliminated.
Key Results
Across 1-shot, 5-shot, 10-shot, and zero-shot node and graph classification tasks, HHGFM consistently matches or outperforms 15 baselines (including multi-domain GFMs like SAMGPT, BRIDGE, and MDGPT).
- Cross-homophily transfer: When pre-training on homophilic citation graphs (Cora, CiteSeer) and transferring to a heterophilic web graph (Cornell) under 1-shot node classification, HHGFM reaches 39.00% accuracy, beating SAMGPT (35.45%) and MDGPT (30.26%). For 1-shot graph classification on the same setup, it jumps to 39.65% vs. SAMGPT's 33.20%.
- Reverse transfer: Pre-training on heterophilic graphs (Cornell, Texas) and transferring to homophilic Photo yields 65.80% 1-shot node accuracy (vs. 61.05% for SAMGPT).
- Broad multi-domain setups: In 1-shot cross-domain node classification transferring from citation and co-purchase graphs to Cornell, HHGFM achieves 39.18%, outperforming SAMGPT (36.40%) and BRIDGE (34.76%).
Limitations and Future Work
While the paper does not feature a dedicated limitations section, the authors explicitly highlight an inherent theoretical and practical trade-off in their method: because true node labels are unavailable during pre-training, the soft disentanglement relies on an unsupervised feature-and-structure proxy. As shown in their generalization bound (Theorem 1), imperfect disentanglement introduces an explicit risk term ($\varepsilon_{\text{dis}}$)—meaning the method's success hinges on whether those unsupervised similarity cues are informative enough to outweigh proxy noise. Future directions are not explicitly discussed in the main text.
Summary updated