Manuscript Offprint
arXiv:2610.38335Learning a Prior-Data Fitted Network for Graph Foundation Models via Structural Causal Model Priors
Ziwei Zhang
Beihang University
Haidian District, Beijing, China
Ge Lan
Nankai University
Binhai New Area, Tianjin, China
Qingyun Sun
Beihang University
Haidian District, Beijing, China
Tianyin Liao
Nankai University
Binhai New Area, Tianjin, China
Nuo Xu
Tsinghua University
Haidian District, Beijing, China
Xingxuan Zhang
Tsinghua University
Haidian District, Beijing, China
Chunyu Hu
Nankai University
Binhai New Area, Tianjin, China
Yi Huang
Beihang University
Haidian District, Beijing, China
Peng Cui
Tsinghua University
Haidian District, Beijing, China
Jianxin Li
Beihang University
Haidian District, Beijing, China
Abstract
Graph Foundation Models (GFMs) have recently emerged as a promising paradigm for learning transferable representations across different graphs and domains. However, existing GFMs face notable limitations, including limited pre-training scale or reliance on aligning with textual information in Large Language Models (LLMs). To overcome these limitations, recent studies have drawn inspiration from prior-data fitted networks (PFNs), which learn from large synthetic datasets and support multi-domain prediction backed by causal learning. However, existing graph PFNs encounter severe difficulties in modeling causal relationships within and across node and edge sets, generating diverse graph structures, and designing suitable architectures that can learn from complex synthetic datasets. To address these challenges, we propose GSCM-PFN (Graph SCM-based Prior-Data Fitted Network), a graph PFN pre-trained on synthetic data generated from an SCM-based prior that jointly models nodes and graph topology. Specifically, we first design a joint feature-edge-label SCM to guide the generation of nodes and edges in synthetic graphs, enabling the PFN to capture causal relationships within and across node and edge sets. Next, we introduce a prior-guided node-edge dependency modeling module that instantiated diverse synthetic graph generation strategies. We prove that our SCM-based graph generation strategy is more expressive than existing priors. Finally, we propose a feature-permutation-invariant dual-path graph network to learn from diverse synthetic graph data with theoretical guarantees. Experiments on 23 real-world benchmarks show that GSCM-PFN outperforms both conventional GFMs and PFN-based GFMs, without utilizing real-world graph data for pre-training. Our code is available at https://anonymous.4open.science/r/GSCM-PFN-A3A3/.
CCS Concepts
• Mathematics of computing → Graph algorithms; • Computing methodologies → Neural networks.
ACM Reference Format:
Ziwei Zhang, Tianyin Liao, Chunyu Hu, Ge Lan, Nuo Xu, Yi Huang, Qingyun Sun, Xingxuan Zhang, Peng Cui, and Jianxin Li. 2018. Learning a Prior-Data Fitted Network for Graph Foundation Models via Structural Causal Model Priors. In Proceedings of Make sure to enter the correct conference title from your rights confirmation email (Conference acronym 'XX). ACM, New York, NY, USA, 13 pages. https://doi.org/XXXXXXX.XXXXXXX
1 Introduction
Graph Foundation Models (GFMs) [15, 31, 51] have recently emerged as a promising paradigm for learning transferable representations across different graphs and domains. Unlike graph neural networks (GNNs) [39, 43], which are often trained for specific tasks or domains, GFMs are pre-trained on diverse graph data and can be adapted to a broad range of downstream problems. This pre-training
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from permissions@acm.org.
Conference acronym 'XX, Woodstock, NY
© 2018 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 978-1-4503-XXXX-X/2018/06
https://doi.org/XXXXXXX.XXXXXXX
Trovato et al.
then adapting paradigm offers a unified and flexible approach to universal graph learning, with applications including molecular property prediction [50] and knowledge graph reasoning [17]. On the Web, GFMs can be applied to downstream tasks such as social network analysis [52], recommender systems [19, 45], knowledge graph mining [16], etc.
However, existing GFMs face notable limitations. For example, GNN-based GFMs [15, 51] depend heavily on large-scale pre-training data from diverse graph domains [31], yet such data may be insufficient to support generalization across domains and tasks. Meanwhile, LLM-based GFMs [8, 30] often rely on aligning with textual information, which can lead to inconsistent data priors when applied to graphs with few textual attributes [12, 13, 29].
To overcome these limitations, recent studies [12, 13, 24] have drawn inspiration from the success of prior-data fitted networks (PFNs) [22, 48], which achieve multi-domain prediction across diverse tabular datasets. PFNs, such as TabPFN [23] and LimiX-2 [49], are pre-trained on diverse synthetic datasets to learn posterior predictive distributions induced by a structural causal model (SCM) prior, thereby enabling effective in-context learning, particularly for numerical attributes. One line of work [18, 29] has adapted PFNs pre-trained in the tabular domain to graph foundation models, as in G2T-FM [12] and TAG [20]. Although these models have achieved reasonable performance, they still rely heavily on hand-crafted features and lack large-scale pre-training on diverse graph data, limiting their ability to capture complex graph patterns [13].
Another line of work [9, 13] develops graph-specific priors for multi-domain node classification that natively incorporate topology, as in GraphPFN [13] and NodePFN [9]. However, they face three unresolved major challenges. First, although both models use SCM priors to generate node features, they rely on the Erdős–Rényi (ER) model and methods in the stochastic block model (SBM) family to generate graph topology [2, 11, 21, 25], rather than on a unified SCM that jointly models causal dependencies within node and edge sets and between them. Such an SCM could provide a more principled basis for generalization, since causal dependencies both exist within node and edge sets and between them [4, 5, 28, 40]. For example, node attributes can affect other nodes and give rise to edges, while existing edges can alter node attributes and lead to further edges.
Second, generating diverse synthetic graph data is more challenging than generating tabular data, since graph topologies can exhibit complex dependencies among edges. The existing methods rely on ER-based and SBM-family priors, which do not explicitly capture several such dependencies, including triadic closure [44], degree assortativity [35], and continuous core-periphery structure [3]. The synthetic graphs therefore cover a narrower range of topologies.
Lastly, designing an architecture that can learn from such complex synthetic datasets is also a challenge. These datasets combine heterogeneous feature semantics which differ across graphs with topological dependencies that vary widely in range. NodePFN does not guarantee feature-permutation invariance, so it fails to model inputs whose feature dimensions do not share a fixed meaning. GraphPFN augments the tabular LimiX model by stacking message-passing layers in series, but this design cannot capture complex and diverse graph structures.
To address these challenges, we propose GSCM-PFN (Graph SCM-based Prior-Data Fitted Network), a PFN-based multi-domain
graph foundation model. Specifically, GSCM-PFN is pre-trained on synthetic data generated from an SCM-based prior that jointly models nodes and graph topology through three tailored modules to address the challenges outlined above. First, we design a joint feature-edge-label SCM to coordinate the generation of nodes and edges in synthetic graphs. Through a graph causal-relation decoupling mechanism, the SCM lets the model capture causal relationships within the node set and the edge set, as well as between them. Next, we introduce a prior-guided node-edge dependency modeling module that carries out the synthetic graph generation process specified by the SCM. This module yields diverse generation strategies by composing multiple layers, which exchange information between nodes and edges at the sample level. We prove that this strategy is strictly more expressive than the ER and SBM priors used in existing methods. Finally, we propose a feature-permutation-invariant dual-path graph network for learning on synthetic graphs sampled from complex SCM priors. The network combines a provably feature-permutation-invariant design with graph transformer layers, which makes it suitable for learning from diverse synthetic graph data with heterogeneous feature semantics. We evaluate our method on real-world benchmarks and the results show that GSCM-PFN outperforms both conventional GFMs and PFN-based GFMs, without using real-world graph data for pre-training.
Our contributions are summarized as follows:
- We propose GSCM-PFN, a PFN-based multi-domain graph foundation model pre-trained on causally inspired synthetic graphs instead of real-world graph data.
- We develop a joint feature-edge-label SCM to guide the prior-guided node-edge dependency modeling module for diverse graph generation, modeling causal dependencies within and between the node and edge sets. We prove that our strategy is more expressive than existing ER and Bernoulli SBM priors.
- We design a feature-permutation-invariant dual-path graph network that handles heterogeneous feature semantics and captures graph topology with theoretical guarantees.
- GSCM-PFN outperforms both conventional GFMs and PFN-based GFMs on 23 real-world benchmarks, while only utilizing synthetic data during pre-training.
2 Preliminaries and Problem Formulation
Given a graph , where is the node set, is the adjacency matrix, is the node feature matrix with feature dimension , and is a node-indexed vector of observed labels whose observed entries identify the labeled nodes , the goal of node classification is to predict the test-label vector , whose entries are the labels of the remaining nodes .
Following [34], we view the unknown distribution of a fully labeled graph as one draw from a prior . Sampling from this prior proceeds by drawing and then drawing the fully labeled graph from . A subset of these labels is observed and collected in . The remaining labels form . The posterior predictive distribution (PPD) is the conditional distribution of given under this sampling scheme.
Conference acronym 'XX, June 03-05, 2018, Woodstock, NY
A prior-data fitted network [9, 13] for node classification is a parametric conditional distribution trained to approximate the PPD. The parameters minimize
where the expectation follows the sampling scheme above. Nodes in are the context, and nodes in are the queries. At test time, is evaluated on a new graph in one forward pass, without gradient updates.
3 Method
In this section, we introduce GSCM-PFN and its three components, as shown in Figure 1. First, the joint feature-edge-label SCM defines a joint causal prior over node features, graph topology, and labels. Next, the prior-guided node-edge dependency modeling module instantiated diverse graph generation strategies through multilayer causal updates of features, labels, and edges. Finally, the feature-permutation-invariant dual-path graph network supports in-context node classification.
3.1 Joint Feature-Edge-Label SCM
The module is designed to guide the joint generation of nodes and edges in synthetic graphs. Unlike the sequential graph generation strategies used in NodePFN [9] and GraphPFN [13], which generate node features before edges or vice versa, our approach uses a graph causal mechanism to generate nodes and edges simultaneously.
Our method first defines graph-level latent variables for the generation mechanism. Specifically, we use a two-stage decoupling strategy to decompose the abstract graph latent variable into components that can be instantiated by the generation algorithm. First, considering node and edge information have distinct semantics, we separate the node-related latent variables from the edge-related latent variables and represent the edge-related variables as a vector of scalar components , where denotes the number of scalar components in this group. Second, coupling node features with labels can weaken the causal relations between labels and other graph elements, particularly in a complex graph-generating SCM. Tabular PFNs primarily model causal dependencies between features and labels under an i.i.d. sample assumption. Graph generation, by contrast, must also capture dependencies within and across node and edge sets, resulting in a more complex SCM with potentially multi-hop causal pathways. This complexity makes it difficult to preserve the causal relationships between labels and other graph elements, particularly when label variables are coupled with a much larger set of node features. We therefore further decompose the node-related latent variables into node-feature latent variables and node-label latent variables where and denote the numbers of scalar components in their respective groups.
Building on this two-stage decoupling, we next introduce the relations among the latent variables. The node-feature latent variables , the node-label latent variables , and the edge latent variables are collected into the graph-level latent variables . This latent variables determine the node features, the node labels, and the adjacency matrix:
These variables in turn determine the synthetic graph :
Then, we describe how the SCM samples a synthetic graph. First, we randomly instantiate the priors and draw initial values:
Existing PFN methods widely use a DAG to instantiate the causal relations between latent and observable variables. These initial values therefore serve only as the starting points for a DAG and do not constitute the complete set of latent variables used in the generation process. Second, the DAG propagates these inputs through its causal functions to generate additional variables:
where denotes the composition of the causal functions along the DAG. These variables may represent additional latent variables or observable node features , node labels , and the adjacency matrix , depending on the outcome of the subsequent sampling step. During this process, the DAG is capable of capturing both causal relationships among variables within the same latent group, such as the relationship between and , and relationships within and across the node and edge sets. Third, following the sampling protocols used in existing PFNs [9, 13], we randomly designate a subset of DAG-generated variables as the observed variables, while treating the remaining variables as latent. Together, the observed variables form the synthetic graph .
Discussion. Here, we explain how our SCM unifies and extends the SCM priors used by PFNs in both the tabular and graph domains. For tabular data [22], our SCM reduces to a tabular SCM by omitting the latent groups and , along with the adjacency matrix . For graph data, we consider GraphPFN [13] and NodePFN [9]. GraphPFN first generates graph topology from an SBM-family prior and then generates and conditioned on the topology and . It can therefore be viewed as a special case with no separate latent group and with corresponding directly to the adjacency matrix . On the other hand, NodePFN first generates and using a tabular SCM prior, then generates community-based graph topology conditioned on using an SBM-family prior. It can be viewed as a special case with no separate latent groups and , in which generates the entire graph .
3.2 Prior-Guided Node-Edge Dependency Modeling
The SCM provides theoretical guidance for the synthetic graphs. This module further instantiated that guidance through diverse synthetic graph generation strategies. Consistent with Eq. (4) and Eq. (5), the module is designed to serve as the DAG, which takes the initial latent state as input and jointly generates variables governing node features, node labels, and edges. However, realizing this goal meets two challenges. First, causal dependencies between nodes in real-world graphs may span multiple hops, so one node can affect another that, in turn, influences more distant nodes. Second, existing graph PFNs, including GraphPFN and NodePFN, rely on SBM-family priors and fail to capture dependencies among edges beyond these factors. For example, link prediction methods often exploit triadic closure, whereby two nodes sharing a neighbor are
Trovato et al.

Figure 1: The framework of GSCM-PFN. Our proposed method is composed of three modules: (1) the joint feature-edge-label SCM, which defines a causal prior over node features, graph topology, and labels; (2) the prior-guided node-edge dependency modeling module, which generates graphs by updating node-edge variables at the sample level and individual dimensions at the feature level; and (3) the feature-permutation-invariant dual-path graph network, which performs in-context prediction while addressing heterogeneous feature semantics and topological dependencies that vary in range.
more likely to be connected [44]. Complex networks also show degree assortativity, whereby high-degree nodes preferentially connect to other high-degree nodes or to low-degree nodes [35], and continuous core-periphery structure, whereby nodes have graded coreness and connections become denser toward the core [3].
To address these challenges, we propose prior-guided message passing layers that jointly update the node- and edge-related variables. Multi-hop causal effects and dependencies among edges then evolve together during generation rather than the topology staying fixed given the community assignments. Let denote the state at the -th layer, where , and denote the feature-, label-, and edge-related variables, respectively, initialized as . Their status as observed or latent variables is determined by the sampling step that follows DAG propagation. The joint layerwise update is given by
where denotes the layer index and maps the variable tuple at the -th layer to the -th layer.
After defining the layerwise update function , we aim to capture sample-level causal relationships both within and across the node and edge sets, building on the second step of the joint feature-edge-label SCM. To this end, we decompose into the
following three functions:
where combines feature-to-feature and label-to-feature linear transformations with either standard or degree-based neighbor aggregation. combines a feature-to-label linear transformation, a label residual, and label propagation with either standard or degree-based aggregation. combines a feature-similarity kernel, a label-similarity kernel or a Chung-Lu mechanism [10], and an adjacency residual. At each layer, all three variable groups are jointly updated based on the groups from the preceding layer, allowing the module to model these sample-level dependencies. The linear transformations in , as in the random MLPs used in tabular settings [22], allow the module to model causal relationships at the level of individual dimensions, complementing the sample-level dependencies captured by the joint updates.
At each layer, we randomly sample an activation function to introduce nonlinearity and inject random Gaussian noise into all three groups to improve the realism of the generated data. Finally, after the module completes its propagation in Eq. (5), we designate a subset of the generated variables as the observables , and :
(8) while retaining the remaining variables as latent, following the sampling protocol used in existing PFNs [9, 13]. The pseudocode of this module is provided in Appendix B. Although we initialize from a prior combining ER and Bernoulli SBM, our SCM-based graph generation strategy is more expressive than existing ER and Bernoulli SBM priors as follows.
Theorem 1 (Graph Generation Strategy Expressiveness). Let be the set of distributions of graphs realizable by our SCM graph generation strategy, and let and be the sets realizable by ER and Bernoulli SBM priors, respectively. Under mild assumptions, the SCM-based graph generation strategy is more expressive than the ER and Bernoulli SBM priors:
The proof is provided in Appendix A.1.
3.3 Feature-Permutation-Invariant Dual-Path Graph Network
Lastly, we design a backbone architecture to learn from the synthetic graphs while addressing two challenges. First, feature semantics are heterogeneous across both synthetic and real-world graphs, and the meaning of a given feature dimension may differ from one graph to another. These heterogeneous feature semantics limit the direct use of standard graph architectures such as GNNs [39, 43] and graph Transformers [6, 38]. They rely on order-sensitive inter-feature information exchange, implicitly assuming that a given feature dimension has a consistent meaning across graphs [27]. This assumption keeps them from being feature-permutation invariant, thereby making them ill-equipped to generalize across arbitrary graphs with varying features [15]. Second, graphs vary in the range and strength of their topological dependencies. Some exhibit long-range dependencies that benefit from deeper message passing, whereas others involve weak neighbor influence, making extensive message passing unnecessary.
Inspired by LimiX [48], our architecture addresses heterogeneous feature semantics across graphs with encoders for node features and labels, followed by feature-level and sample-level attention. Each node is encoded as feature embeddings and one label embedding, collected in . Feature-level attention acts independently on each node,
where and denotes the attention function. For feature position , let and denote the context and query embeddings. Sample-level attention is
where joins the two blocks along the node axis. The encoders and feature-level attention exchange information equivariantly across features. Sample-level attention maps context-label representations to the query-label representations used for prediction, which makes the network invariant to feature permutations.
To accommodate these varying ranges of topological dependencies, we extend the sample-level attention layer into a feature-permutation-equivariant graph transformer layer. Each feature-permutation-equivariant graph transformer layer runs an attention pathway and a message-passing pathway as two branches, then
integrates them by feature cross-reduction. The attention pathway applies sample-level attention on every dimension:
The message-passing pathway propagates each feature along graph edges and does not read the label dimension:
where denotes the message-passing layer and is shared across features. Feature cross-reduction integrates the two pathways without changing the feature width:
where is the feature-wise concatenation of the attention pathway and the message-passing pathway . We use a dual-path message-passing and attention architecture rather than a sequential one such as GraphPFN because message-passing layers are limited by over-smoothing, over-squashing, and low expressivity with respect to the WL test [1, 42], and they may irreparably fail to preserve some information [38]. Feature cross-reduction can leverage attention to capture information that is more useful for prediction from these two pathways.
We now summarize the complete architecture . The model first encodes node features and observed labels, then processes the representations with a stack of blocks. Each block applies two feature-level attention stages in sequence, followed by a feature-permutation-equivariant graph transformer. After the final block, an MLP classifier maps the query-label representations to class predictions. We show that the resulting architecture is invariant to permutations of the feature dimensions as follows.
Theorem 2 (Feature Permutation Invariance). Let be a permutation of the feature indices . Denote . Then we have:
The proof is provided in Appendix A.2.
Lastly, we introduce the overall training process. During pre-training, we sample a fully labeled graph from the prior and partition its nodes into context nodes with observed labels and query nodes with held-out labels . We withhold the query labels from the input and use them as prediction targets. We train to approximate the PPD by minimizing the expected negative log-likelihood in Eq. (1). At inference, we use the in-context learning setup, where the model predicts test node labels from the observed labels of the same graph in one forward pass, with its parameters held fixed. Its observed labels form the context, and the test nodes are the queries. We predict the label of each query node as the most probable class:
where denotes a candidate class label.
4 Experiments
In this section, we conduct extensive experiments to evaluate GSCM-PFN, focusing on four research questions:
- RQ1: Can GSCM-PFN effectively handle multi-domain graph tasks without utilizing real data during pre-training?
Trovato et al.
Table 1: Performance comparison of different methods on 23 real-world benchmark datasets, measured by accuracy. Numbers after ± indicate standard deviations. The best results are in bold and the second-best results are underlined.
| Dataset | GCN | GAT | GraphAny | TS-Mean | TS-GAT | RGVT | GraphPFN | NodePFN | GSCM-PFN |
|---|---|---|---|---|---|---|---|---|---|
| Actor | 28.55±0.68 | 27.30±0.22 | 28.60±0.21 | 28.09±0.93 | 28.80±2.12 | 32.28±0.68 | 34.46±1.18 | 32.82±1.03 | 35.72±1.18 |
| AirBrazil | 42.31±7.98 | 57.69±14.75 | 34.61±16.09 | 39.23±5.70 | 36.92±10.03 | 86.16±5.76 | 67.69±5.76 | 72.31±6.62 | 72.31±2.88 |
| AirEU | 41.88±3.60 | 32.50±8.45 | 41.50±6.50 | 35.88±6.91 | 38.38±6.32 | 54.75±1.75 | 57.75±4.87 | 53.50±4.53 | 56.50±1.29 |
| AirUS | 46.49±1.81 | 48.47±4.17 | 43.64±1.83 | 42.34±2.12 | 41.69±2.59 | 54.20±1.68 | 61.87±1.56 | 59.14±2.30 | 62.77±1.63 |
| Amazon-Comp | 85.83±0.86 | 87.01±0.50 | 83.04±1.24 | 81.37±1.25 | 80.23±2.44 | 83.85±0.54 | 77.62±1.40 | 78.44±1.64 | 83.11±1.57 |
| Amazon-Photo | 91.88±0.79 | 91.86±1.07 | 90.60±0.82 | 90.18±1.30 | 89.66±1.23 | 91.98±0.44 | 87.89±2.17 | 87.88±1.32 | 91.63±1.21 |
| Amazon-Ratings | 47.35±0.26 | 47.18±0.42 | 42.74±0.12 | 42.27±1.40 | 41.92±0.47 | 43.12±0.97 | 48.52±0.50 | 44.47±0.66 | 50.01±0.22 |
| Chameleon | 41.31±3.05 | 39.83±2.10 | 32.72±4.78 | 43.83±3.99 | 36.40±8.26 | 45.16±2.18 | 46.81±3.02 | 46.68±1.51 | 47.41±3.07 |
| Citeseer | 63.40±0.63 | 69.10±1.59 | 68.34±0.23 | 68.66±0.19 | 68.70±0.48 | 70.08±0.97 | 60.78±1.75 | 67.90±0.25 | 68.86±0.34 |
| Coauthor CS | 91.83±0.71 | 88.47±0.79 | 90.45±0.59 | 90.92±0.41 | 91.13±0.43 | 90.12±0.22 | 91.25±0.42 | 90.92±0.48 | 92.56±0.36 |
| Coauthor Physics | 93.93±0.37 | 93.01±0.89 | 92.69±0.52 | 92.61±0.61 | 92.23±0.61 | 93.54±0.06 | 91.12±1.07 | 93.37±0.45 | 93.77±0.36 |
| Cora | 81.40±0.70 | 81.70±1.43 | 79.38±0.16 | 58.08±0.48 | 22.42±12.90 | 81.40±0.96 | 75.98±1.07 | 82.84±0.28 | 81.22±0.07 |
| Cornell | 35.14±6.51 | 35.14±3.52 | 65.94±1.48 | 68.65±2.42 | 71.35±4.52 | 43.79±2.65 | 71.89±5.57 | 69.73±3.15 | 77.84±2.02 |
| DBLP | 73.02±2.22 | 73.87±1.35 | 70.90±0.88 | 66.42±3.65 | 64.30±3.75 | 75.19±2.97 | 70.18±1.63 | 78.08±0.92 | 77.88±1.29 |
| Deezer | 53.69±2.29 | 55.99±3.78 | 52.11±2.79 | 52.31±2.52 | 52.88±2.86 | 54.56±0.98 | 50.79±1.18 | 50.32±0.97 | 50.02±0.91 |
| Minesweeper | 81.12±0.37 | 80.08±0.04 | 80.30±0.13 | 80.68±0.38 | 80.72±0.78 | 80.00±0.00 | 83.62±0.43 | 79.85±0.12 | 80.00±0.00 |
| Pubmed | 76.60±0.32 | 77.30±0.60 | 76.36±0.17 | 74.98±0.56 | 75.46±0.86 | 78.26±0.56 | 78.52±0.75 | 78.64±0.29 | 80.10±0.14 |
| Questions | 97.15±0.04 | 97.11±0.02 | 97.09±0.02 | 97.02±0.01 | 97.02±0.01 | 97.02±0.00 | 97.27±0.03 | 97.02±0.01 | 97.17±0.02 |
| Squirrel | 38.67±1.84 | 38.78±2.39 | 25.85±1.11 | 39.80±5.01 | 35.84±3.33 | 41.99±0.70 | 49.06±1.20 | 42.33±1.73 | 44.87±1.80 |
| Texas | 51.35±2.71 | 54.05±2.41 | 72.97±2.71 | 73.51±4.53 | 74.05±4.10 | 69.73±1.08 | 78.38±10.95 | 76.76±3.67 | 83.24±3.97 |
| Tolokers | 79.93±0.10 | 78.50±0.55 | 78.18±0.04 | 78.12±0.09 | 78.01±0.23 | 78.26±0.20 | 83.75±0.54 | 78.18±0.03 | 78.20±0.05 |
| WikiCS | 79.12±0.45 | 79.27±0.20 | 74.95±0.61 | 74.16±2.07 | 73.24±2.49 | 78.34±0.57 | 78.75±0.92 | 75.98±0.80 | 81.07±0.70 |
| Wisconsin | 37.25±1.64 | 52.94±3.10 | 65.10±3.22 | 61.18±11.38 | 65.88±9.86 | 61.18±5.74 | 82.35±6.44 | 75.69±3.42 | 83.14±3.64 |
| Average Accuracy | 63.44 | 64.66 | 64.70 | 64.36 | 62.49 | 68.91 | 70.71 | 70.12 | 72.58 |
| Average Ranking | 4.74 | 5.07 | 6.41 | 6.63 | 6.67 | 4.30 | 3.87 | 4.70 | 2.61 |
-
RQ2: How do the number of observed labels and label noise affect the performance of GSCM-PFN?
-
RQ3: How do the key components affect the results?
-
RQ4: Can GSCM-PFN generate diverse synthetic graphs with topological patterns?
4.1 Experimental Setup
Datasets. Following [9], we evaluate our method on 23 benchmark datasets spanning a wide range of domains, including academic collaboration, social, e-commerce, and airline route networks. The task is node classification and the datasets contain between 2 and 15 classes. Further details are provided in Appendix C.1.
Baselines. We compare GSCM-PFN against baselines from three groups. The first comprises standard GNNs, including GCN [26] and GAT [43], trained from scratch on each dataset. The second comprises conventional GFMs, including GraphAny [51], TS-GNN [15], and RGVT [27]. The third comprises PFN-based GFMs, including GraphPFN [13] and NodePFN [9]. To ensure a fair comparison, we adapt both GFM groups using only the training split of each target dataset, with hyperparameters fixed across datasets.
Implementation Details. We realize GSCM-PFN as a 9-layer transformer with embedding dimension 96, three attention heads of dimension 32, and four position-wise feed forward networks of hidden size 384 with GELU activations in each layer. Every sublayer
uses pre-normalization with a LayerNorm that has no affine parameters. A linear head maps the test-node label representations to 20 class logits. Optimization uses AdamW with learning rate , no weight decay, gradient clipping at 1, and a cosine schedule that warms up for 5 epochs and decays to . Mixed precision is enabled. We train for 50 epochs on 128 GPUs, with one graph per GPU and 1000 steps per epoch, and use the epoch-50 checkpoint. Only the training split is provided as labeled context; validation and test nodes are queries, and their labels are masked. Edges are symmetrized and self-loops are removed. We follow the fixed split of each dataset, repeat the evaluation for five runs, and report mean accuracy and standard deviation. Additional implementation details are provided in Appendix C.2.
4.2 Performance Comparisons
To answer RQ1, we report the results of GSCM-PFN compared to baseline methods in Table 1. The results show that GSCM-PFN outperforms standard GNNs, conventional GFMs, and PFN-based GFMs, achieving the best average accuracy and average ranking. For example, on Cornell, GSCM-PFN achieves an 8.28% relative improvement in accuracy over the second-best method. Similarly, on Texas, GSCM-PFN achieves a 6.20% relative improvement in accuracy over the second-best method. Compared with GraphPFN, the strongest baseline by average accuracy, GSCM-PFN improves average accuracy by 2.64% in relative terms and reduces the average

Figure 2: The impact of context ratio and label noise.
rank by 1.26. Beyond Cornell and Texas, it also leads on homophilic graphs such as Pubmed and Coauther CS.
Furthermore, the PFN-based GFMs achieve the top two results in both average accuracy and average rank, highlighting the promise of PFN-based methods for multi-domain node classification. RGVT is the strongest baseline outside this group, yet its average accuracy of 68.91 still trails GSCM-PFN by 3.67 points. This performance may stem from their synthetic-prior-based in-context learning mechanism, which enables adaptation to individual graph datasets at inference time without additional training or dataset-specific hyperparameter tuning. By leveraging labeled context nodes, GSCM-PFN adapts its predictions to downstream node-classification tasks, yielding generalizable and flexible performance.
4.3 In-Depth Analyses
4.3.1 Effectiveness under Varying Numbers of Observed Labels and Label Noise. To answer RQ2, we evaluate GSCM-PFN, GraphPFN, and NodePFN while varying the number of observed labels and the level of label noise, and report average accuracy in Figure 2. We keep 20% to 100% of the original training split as observed labels and randomly corrupt 0% to 40% of them. The results show that GSCM-PFN's performance improves as more labels are observed and fewer of them are corrupted, suggesting that a larger and more reliable set of observed labels helps the model capture the properties of the target graph. Moreover, GSCM-PFN consistently achieves higher average accuracy than GraphPFN and NodePFN across these settings, demonstrating that the improvement remains stable as the number and noise of observed labels vary.
Table 2: Results of ablation for the synthetic prior and the model architecture. We report the average test accuracy. Numbers after – indicate the change relative to the full model.
| Method | Accuracy |
|---|---|
| Full GSCM-PFN | 72.58 |
| Prior | |
| w/o prior-guided message passing | 68.00(-4.58) |
| w/o Y Decouple | 71.62(-0.96) |
| w/o A Decouple | 71.25(-1.33) |
| w/o multilayer structure | 71.11(-1.47) |
| w/o feature relationships | 71.06(-1.52) |
| w/o sample relationships | 69.47(-3.11) |
| Architecture | |
| w/o feature cross-reduction | 72.09(-0.49) |
| w/o message passing | 68.67(-3.92) |
4.3.2 Ablation Studies. To answer RQ3, we ablate six components of the synthetic prior and two components of the model architecture. For the synthetic prior, w/o prior-guided message passing removes the prior-guided node-edge dependency modeling module. w/o Y Decouple removes the separate latent group for node labels, and w/o A Decouple removes the separate latent group for edges. w/o multilayer structure replaces the multiple prior-guided node-edge dependency modeling layers with a single layer. w/o feature relationships removes the linear transformations that model causal dependencies among variables within each group. w/o sample relationships removes the joint layerwise updates of the feature-, label-, and edge-related variables, which capture sample-level dependencies. For the architecture, w/o feature cross-reduction replaces feature cross-reduction with the mean of the attention and message-passing pathways. w/o message passing removes feature-wise message passing along graph edges.
Table 2 reports the average test accuracy, with drops measured relative to the full model. The prior-guided node-edge dependency modeling module is the most important prior component for generating diverse synthetic graphs with structured dependencies, and removing it causes the largest drop. Explicitly modeling label- and edge-related latent variables benefits the prior, as shown by w/o Y Decouple and w/o A Decouple. Multilayer causal updates help capture dependencies across hops, and w/o multilayer structure lowers accuracy. Feature-level relationships improve the prior, while sample-level dependencies contribute more, with w/o sample relationships dropping further than w/o feature relationships. On the architecture, message passing makes a substantial contribution to capturing graph topology, and feature cross-reduction adds a smaller but consistent benefit by combining the two pathways.
Overall, each component of the synthetic prior and the model architecture contributes to GSCM-PFN's performance, with the prior-guided node-edge dependency modeling module and the message-passing pathway showing the largest effects.
4.3.3 Characteristics of Synthetic Prior Datasets. To answer RQ4, we compare graphs generated by our prior with those generated by GraphPFN, the second-best method, using four statistics: (1)
Trovato et al.

Figure 3: Histograms comparing the degree assortativity, global clustering, class-degree association, and adjusted homophily of synthetic graphs.
the degree assortativity coefficient [35] is the correlation between the degrees at the two ends of an edge. Positive values indicate that high-degree nodes tend to connect to each other, whereas negative values indicate that high-degree nodes tend to connect to low-degree nodes; (2) the global clustering coefficient [36] is the fraction of connected triples that close into triangles, so it measures triadic closure through how strongly nodes form local clusters; (3) the class-degree association is the fraction of degree variance explained by the node label; (4) adjusted homophily compares the fraction of edges that connect nodes of the same class with the fraction expected from the class-size distribution. For each method, we generate 200 graphs with the same number of nodes, sampled from [100, 2000], and keep the average degree close to 40, so that synthetic graphs from different methods are compared under matched size and density.
Figure 3 shows the distributions of the statistics. Across all four measures, our prior covers a broader range than GraphPFN, suggesting that it captures a wider variety of graph structures. Moreover, the degree assortativity coefficient and the global clustering coefficient of our graphs span a wide range, demonstrating that the prior can generate graphs with degree assortativity and triadic closure.
We further visualize graphs sampled from our synthetic prior in Figure 4, with node colors indicating their labels. The prior can generate several graph structures commonly observed in real-world data, including homophilic, heterophilic, and core-periphery graphs [3]. Our synthetic data generation algorithm can further capture a continuous core-periphery structure. For example, in the rightmost graph of the first row and the second graph from the right in the second row, connectivity gradually becomes sparser from the center to the periphery. Together, these results show that our prior can generate complex graphs exhibiting triadic closure, degree assortativity, and continuous core-periphery structure.
5 Related Work
5.1 Graph Foundation Models
GFMs aim to transfer knowledge across graph datasets and generalize to previously unseen graphs and tasks. From an architectural perspective, they can be broadly grouped into GNN-based [15, 51], LLM-based [8], and hybrid GNN+LLM models [30].
GNN-based models. They exploit graph structure through topology-aware inductive biases. For example, GraphAny [51] formulates inference on a new graph as an analytical LinearGNN solution and combines predictions from multiple such solutions using inductive attention. SAMGPT [47] pre-trains a message-passing encoder on text-free graphs from multiple domains, inserting learnable structure tokens into each layer to align topology-dependent aggregation, and adapts the frozen encoder to node classification on an unseen graph with dual structural prompts.
LLM-based models. They incorporate semantic information through natural language processing. InstructGLM [46], for instance, extends the vocabulary of a pre-trained language model by encoding node features as distinct tokens, facilitating cross-modal graph understanding. LLaGA [7] reorganizes the neighborhood of a target node into a structure-aware sequence and maps it into the token embedding space of a frozen language model, which then performs node classification on citation and product graphs.
Hybrid GNN+LLM models. They integrate structural and textual information. For example, OFA [30] aligns textual descriptions of nodes and edges into a shared embedding space through language modeling. GraphGPT [41] pairs this with the opposite interface: a graph encoder produces structural embeddings, a lightweight projector turns them into graph tokens, and two-stage instruction tuning teaches the language model to classify nodes in both supervised and zero-shot settings.
Despite these advances, existing approaches remain constrained by their underlying architectures, including limited pre-training scale [31] and reliance on textual alignment [12, 13].
5.2 Prior-data Fitted Networks
PFNs offer an alternative to conventional pre-training by learning in-context prediction from synthetic tasks sampled from prior distributions over data-generating processes. TabPFN [22, 23] and LimiX [48, 49] have demonstrated strong performance on tabular tasks, while other works, such as TuneTables [14] and BETA [32], have extended PFN approaches to larger and real-world datasets. Recent work has brought this paradigm to graph tasks [12, 13, 33] along two broad directions. The first direction adapts tabular PFNs to graph prediction. For example, G2T-FM [12] and TAG [20] apply tabular PFN approaches to graph tasks. However, these methods rely heavily on hand-crafted features and lack large-scale pre-training on diverse graph data, which limits their ability to capture complex graph patterns [13]. The second direction develops graph-specific priors for multi-domain node classification, as in GraphPFN [13] and NodePFN [9]. Despite these advances, existing methods still encounter severe difficulties in jointly modeling causal relationships within and across node and edge sets, generating diverse graph structures, and designing suitable architectures that can learn from complex synthetic datasets.

Figure 4: Visualizations of synthetic graphs generated by our method.
6 Conclusion
In this work, we propose GSCM-PFN, a graph PFN pre-trained on synthetic data generated from an SCM-based prior that jointly models nodes and graph topology. Our method effectively achieves this goal by integrating three key components, including the joint feature-edge-label SCM, the prior-guided node-edge dependency modeling module, and the feature-permutation-invariant dual-path graph network. Extensive experiments on 23 real-world benchmarks demonstrate that GSCM-PFN outperforms both conventional GFMs and PFN-based GFMs, without utilizing real-world graph data for pre-training.
Ethics and Privacy Statement
This study uses benchmark graph datasets and synthetically generated data and does not involve human participants or the collection of new personal information. We have not identified any specific ethical or privacy concerns arising from this work.
References
[1] Uri Alon and Eran Yahav. 2021. On the Bottleneck of Graph Neural Networks and its Practical Implications. In International Conference on Learning Representations.
[2] Norbert Binkiewicz, Joshua T Vogelstein, and Karl Rohe. 2017. Covariate-assisted spectral clustering. Biometrika 104, 2 (2017), 361–377.
[3] Stephen P Borgatti and Martin G Everett. 2000. Models of core/periphery structures. Social networks 21, 4 (2000), 375–395.
[4] Yann Bramoulle, Habiba Djebbari, and Bernard Fortin. 2009. Identification of peer effects through social networks. Journal of econometrics 150, 1 (2009), 41–55.
[5] Damon Centola. 2010. The spread of behavior in an online social network experiment. science 329, 5996 (2010), 1194–1197.
[6] Jinsong Chen, Kaiyuan Gao, Gaichao Li, and Kun He. 2023. NAGphormer: A Tokenized Graph Transformer for Node Classification in Large Graphs. In The Eleventh International Conference on Learning Representations.
[7] Runjin Chen, Tong Zhao, AJAY KUMAR JAISWAL, Neil Shah, and Zhangyang Wang. 2024. LLaGA: Large Language and Graph Assistant. In Forty-first International Conference on Machine Learning.
[8] Zhikai Chen, Haitao Mao, Hang Li, Wei Jin, Hongzhi Wen, Xiaochi Wei, Shuaiqiang Wang, Dawei Yin, Wenqi Fan, Hui Liu, et al. 2024. Exploring the potential of large language models (llms) in learning on graphs. ACM SIGKDD Explorations Newsletter 25, 2 (2024), 42–61.
[9] Jeongwhan Choi, Jongwoo Kim, Woosung Kang, and Noseong Park. 2026. Learning Posterior Predictive Distributions for Node Classification from Synthetic Graph Priors. In International Conference on Learning Representations.
[10] Fan Chung and Linyuan Lu. 2002. Connected components in random graphs with given expected degree sequences. Annals of combinatorics 6, 2 (2002), 125–145.
[11] PARW ERDdS and A R&wi. 1959. On random graphs I. Publ. math. debrecen 6, 290-297 (1959), 18.
[12] Dmitry Eremeev, Gleb Bazhenov, Oleg Platonov, Artem Babenko, and Liudmila Prokhorenkova. 2026. Turning Tabular Foundation Models into Graph Foundation Models. In ICML Workshop on Graph Foundation Models: A New Era for Graph Machine Learning.
[13] Dmitry Eremeev, Oleg Platonov, Gleb Bazhenov, Artem Babenko, and Liudmila Prokhorenkova. 2026. GraphPFN: A Prior-Data Fitted Graph Foundation Model. In International Conference on Machine Learning.
[14] Benjamin Feuer, Robin T Schirrmeister, Valeria Cherepanova, Chinmay Hegde, Frank Hutter, Micah Goldblum, Niv Cohen, and Colin White. 2024. Tunetables: Context optimization for scalable prior-data fitted networks. Advances in Neural Information Processing Systems 37 (2024), 83430–83464.
[15] Ben Finkelstein, Ismail Ilkan Ceylan, Michael Bronstein, and Ron Levie. 2026. Equivariance everywhere all at once: A recipe for graph foundation models. Advances in Neural Information Processing Systems 38 (2026), 30377–30344.
[16] Luis Antonio Galarraga, Christina Teflioudi, Katja Hose, and Fabian Suchanek. 2013. AMIE: association rule mining under incomplete evidence in ontological knowledge bases. In Proceedings of the 22nd International Conference on World Wide Web. Association for Computing Machinery, New York, NY, USA, 413–422. doi:10.1145/2488388.2488425
[17] Mikhail Galkin, Xinyu Yuan, Hesham Mostafa, Jian Tang, and Zhaocheng Zhu. 2024. Towards foundation models for knowledge graph reasoning. In International Conference on Learning Representations, Vol. 2024. 31598–31619.
[18] Yisen Gao, Jiaxin Bai, Haoyu Huang, Zhongwei Xie, Yufei Li, Hong Ting Tsang, Sirui Han, and Yangqiu Song. 2026. KGPFN: Unlocking the Potential of Knowledge Graph Foundation Model via In-Context Learning. arXiv preprint arXiv:2605.14907 (2026).
[19] Yuqi Gong, Xichen Ding, Yehui Su, Kaiming Shen, Zhongyi Liu, and Guannan Zhang. 2023. An unified search and recommendation foundation model for cold-start scenario. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management. 4595–4601.
[20] Adrian Hayler, Xingyue Huang, Ismail Ilkan Ceylan, Michael Bronstein, and Ben Finkelstein. 2025. Bringing graphs to the table: Zero-shot node classification via tabular foundation models. arXiv preprint arXiv:2509.07143 (2025).
[21] Paul W Holland, Kathryn Blackmond Laskey, and Samuel Leinhardt. 1983. Stochastic blockmodels: First steps. Social networks 5, 2 (1983), 109–137.
[22] Noah Hollmann, Samuel Müller, Katharina Eggensperger, and Frank Hutter. 2022. TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second. In The Eleventh International Conference on Learning Representations.
[23] Noah Hollmann, Samuel Müller, Lennart Purucker, Arjun Krishnakumar, Max Körfer, Shi Bin Hoo, Robin Tibor Schirrmeister, and Frank Hutter. 2025. Accurate predictions on small data with a tabular foundation model. Nature 637, 8045 (2025), 319–326.
[24] Chunyu Hu, Tianyin Liao, Ge Lan, Xingxuan Zhang, Jianxin Li, Peng Cui, and Ziwei Zhang. 2026. Surprisingly Simple and Effective Multi-Domain Graph Foundation Model through Graph-to-Table Alignment. arXiv preprint arXiv:2607.11374 (2026).
[25] Brian Karrer and Mark EJ Newman. 2011. Stochastic blockmodels and community structure in networks. Physical Review E—Statistical, Nonlinear, and Soft Matter Physics 83, 1 (2011), 016107.
[26] Thomas N. Kipf and Max Welling. 2017. Semi-Supervised Classification with Graph Convolutional Networks. In International Conference on Learning Representations.
[27] Dooho Lee, Myeong Kong, Minho Jeong, and Jaemin Yoo. 2026. View Space: Learning Representation across Arbitrary Graphs. In Forty-third International Conference on Machine Learning.
Trovato et al.
[28] Jure Leskovec, Lars Backstrom, Ravi Kumar, and Andrew Tomkins. 2008. Microscopic evolution of social networks. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, 462–470.
[29] Tianyin Liao, Chunyu Hu, Yicheng Sui, Xingxuan Zhang, Peng Cui, Jianxin Li, and Ziwei Zhang. 2026. TFMLinker: Universal Link Predictor by Graph In-Context Learning with Tabular Foundation Models. In ICML Workshop on Graph Foundation Models: A New Era for Graph Machine Learning.
[30] Hao Liu, Jiarui Feng, Lecheng Kong, Ningyue Liang, Dacheng Tao, Yixin Chen, and Muhan Zhang. 2024. One For All: Towards Training One Graph Model For All Classification Tasks. In The Twelfth International Conference on Learning Representations.
[31] Jiawei Liu, Cheng Yang, Zhiyuan Lu, Junze Chen, Yibo Li, Mengmei Zhang, Ting Bai, Yuan Fang, Lichao Sun, Philip S Yu, et al. 2025. Graph foundation models: Concepts, opportunities and challenges. IEEE Transactions on Pattern Analysis and Machine Intelligence 47, 6 (2025), 5023–5044.
[32] Siyang Liu and Han-Jia Ye. 2025. TabPFFN Unleashed: A Scalable and Effective Solution to Tabular Classification Problems. In Forty-second International Conference on Machine Learning.
[33] Yunhui Liu, Tieke He, Yongchao Liu, Can Yi, Hong Jin, and Chuntao Hong. 2026. Tabular Foundation Models are Strong Graph Anomaly Detectors. arXiv preprint arXiv:2601.17301 (2026).
[34] Thomas Nagler. 2023. Statistical foundations of prior-data fitted networks. In International Conference on Machine Learning. PMLR, 25660–25676.
[35] Mark EJ Newman. 2002. Assortative mixing in networks. Physical review letters 89, 20 (2002), 208701.
[36] Mark EJ Newman, Steven H Strogatz, and Duncan J Watts. 2001. Random graphs with arbitrary degree distributions and their applications. Physical review E 64, 2 (2001), 026118.
[37] Oleg Platonov, Denis Kuznedelev, Michael Diskin, Artem Babenko, and Liudmila Prokhorenkova. 2023. A critical look at the evaluation of GNNs under heterophily: Are we really making progress? arXiv preprint arXiv:2302.11640 (2023).
[38] Ladislav Rampásék, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. 2022. Recipe for a general, powerful, scalable graph transformer. Advances in Neural Information Processing Systems 35 (2022), 14501–14515.
[39] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. 2018. Pitfalls of graph neural network evaluation. Relational Representation Learning Workshop, NeurIPS 2018 (2018).
[40] Christian Steglich, Tom AB Snijders, and Michael Pearson. 2010. Dynamic networks and behavior: Separating selection from influence. Sociological methodology 40, 1 (2010), 329–393.
[41] Jiabin Tang, Yuhao Yang, Wei Wei, Lei Shi, Lixin Su, Suqi Cheng, Dawei Yin, and Chao Huang. 2024. Graphptg: Graph instruction tuning for large language models. In Proceedings of the 47th international ACM SIGIR conference on research and development in information retrieval. 491–500.
[42] Jake Topping, Francesco Di Giovanni, Benjamin Paul Chamberlain, Xiaowen Dong, and Michael M. Bronstein. 2022. Understanding over-squashing and bottlenecks on graphs via curvature. In International Conference on Learning Representations.
[43] Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. 2018. Graph Attention Networks. International Conference on Learning Representations (2018).
[44] Xiyuan Wang, Haotong Yang, and Muhan Zhang. 2024. Neural common neighbor with completion for link prediction. In International conference on learning representations, Vol. 2024. 14573–14589.
[45] Zehong Wang, Zheyuan Liu, Tianyi Ma, Jiazheng Li, Zheyuan Zhang, Xingbo Fu, Yiyang Li, Zhengqing Yuan, Wei Song, Yijun Ma, et al. 2025. Graph foundation models: A comprehensive survey. arXiv preprint arXiv:2505.15116 (2025).
[46] Ruosong Ye, Caiqi Zhang, Runhui Wang, Shuyuan Xu, and Yongfeng Zhang. 2024. Language is all a graph needs. In Findings of the association for computational linguistics: EACL 2024. 1955–1973.
[47] Xingtong Yu, Zechuan Gong, Chang Zhou, Yuan Fang, and Hui Zhang. 2025. Samgpt: Text-free graph foundation model for multi-domain pre-training and cross-domain adaptation. In Proceedings of the ACM on Web Conference 2025. 1142–1153.
[48] Xingxuan Zhang, Gang Ren, Han Yu, Hao Yuan, Hui Wang, Jiansheng Li, Jiayun Wu, Lang Mo, Li Mao, Mingchao Hao, et al. 2025. Limix: Unleashing structured-data modeling capability for generalist intelligence. arXiv preprint arXiv:2509.03505 (2025).
[49] Xingxuan Zhang, Gang Ren, Hao Yuan, Hao Zou, Hongze Tan, Hui Wang, Jianhao Song, Jiansheng Li, Jiayao Zhang, Jinghan Zhang, et al. 2026. Limix-2: A contextual mechanism network towards general structured-data intelligence. arXiv preprint arXiv:2609.17488 (2026).
[50] Haiteng Zhao, Shengchao Liu, Ma Chang, Hannan Xu, Jie Fu, Zhihong Deng, Lingpeng Kong, and Qi Liu. 2023. Gimlet: A unified graph-text model for instruction-based molecule zero-shot learning. Advances in neural information processing systems 36 (2023), 5850–5887.
[51] Jianan Zhao, Zhaocheng Zhu, Mikhail Galkin, Hesham Mostafa, Michael Bronstein, and Jian Tang. 2025. Fully-inductive Node Classification on Arbitrary Graphs. International Conference on Learning Representations (2025).
[52] Yun Zhu, Haizhou Shi, Xiaotang Wang, Yongchao Liu, Yaoke Wang, Boci Peng, Chuntao Hong, and Siliang Tang. 2025. Graphclip: Enhancing transferability in graph foundation models for text-attributed graphs. In Proceedings of the ACM on Web Conference 2025. 2183–2197.
A Theory
A.1 Graph Generation Strategy Expressiveness
Let , and index the nodes by and . At each layer , is the variable representing the edges, and is its coordinate on nodes and . Write and . Let collect these coordinates over all layers. The layered assignment updates the variables by Eq. (6). Let be the discrete block assignment of node , and set . For a pair , write . As in the problem formulation, draw and then draw a fully labeled graph from . The initialization of is drawn from an ER or a Bernoulli SBM prior, and the strategy realizes by applying Eq. (7) and then designating the observables. Here Eq. (7) is the decomposition of the layer map into , and .
DEFINITION 1 (INDEPENDENTLY GIVEN DISCRETE BLOCK ASSIGNMENTS). E is drawn independently given discrete block assignments if
almost surely. E is drawn independently when Eq. (16) holds for an almost surely constant b. A constant assignment is the ER model. An assignment for which each edge probability depends on the endpoints only through is the Bernoulli SBM. A distribution p lies in or when the edges of a graph drawn from p are generated by the corresponding model. is the set of distributions p realizable by the SCM-based strategy.
Proposition 1. Assume Eq. (16). For distinct pairs ,
almost surely. The same identity holds for bounded measurable functions of these two coordinates. Thus, for any finite set of pairs, and for a measurable set associated with each pair ,
Each coordinate is then determined by the block assignments of its own endpoints and by a noise variable private to that coordinate. Given b, these private noises are independent.
PROOF. Eq. (16) is a product regular conditional distribution, so Eq. (17) and Eq. (18) hold. Each factor is drawn on its own, which is the private-noise form.
Assumption 1 (Block assignments do not read edges). Each is generated from node-level initial variables. No coordinate of b is a descendant of any coordinate of E.
Assumption 2 (Cross-Edge Path). There exist a layer and distinct nodes u, v, w such that Eq. (6) contains the path
The middle term is the coordinate of on node u. The first arrow is , and the second is at the next layer. No coordinate of b lies on this path.
Assumption 3 (Non-Degenerate Transmission). On a set of mechanism parameters with positive probability, the map in Eq. (19) is non-constant: with b and every exogenous variable that does not feed held fixed, still changes with . When the two maps are differentiable, this is
on a non-null set.
Lemma 1. Under Assumptions 1–3,
on a set of positive probability. Hence, on that set, the edge-related variables are not drawn independently, and they are not drawn independently given discrete block assignments. Their conditional distribution lies outside the ER and Bernoulli SBM priors.
PROOF. Suppose Eq. (16) holds almost surely. For the pairs in Eq. (19), Proposition 1 and Assumption 1 give
Assumption 3 gives a positive-probability set of parameters on which Eq. (20) holds, with b and every exogenous input off fixed. On that set
Hence Eq. (21). The product in Eq. (16) lies in when b is constant, and in when every factor is .
Assumption 4 (The readout preserves the cross-edge effect). The observed adjacency is a measurable function of E. On the positive-probability set of Assumption 3, the observed edges on the pairs in Eq. (19) satisfy
Lemma 2. Under Assumptions 1–4, the edges of the observed graph are not drawn independently, nor independently given discrete block assignments. The induced distribution lies in neither nor .
PROOF. Lemma 1 and Assumption 4 give a positive-probability set on which Eq. (22) holds. Proposition 1 gives that Eq. (16) implies almost surely. Therefore Eq. (16) fails on that set, and
Lemma 3. Suppose that in Eq. (7) each map is the identity on its own variable and does not depend on the other two inputs,
Then at every layer, so equals the distribution of the initialization. An ER initialization gives , and a Bernoulli SBM initialization gives .
PROOF. Eq. (7) and these identities give . With ,
The observables are coordinates of , so is the distribution of . An initialization from an ER prior gives , and an initialization from a Bernoulli SBM prior gives .
Theorem 1 (Graph Generation Strategy Expressiveness). Let be the set of distributions p of graphs realizable by our SCM graph generation strategy, and let and be the sets realizable by ER and Bernoulli SBM priors, respectively. Under Assumptions 1–4, the SCM-based graph generation strategy is more expressive than the ER and Bernoulli SBM priors:
PROOF. Lemma 3 gives
Lemma 2 gives a positive-probability set of mechanisms with
Therefore, .
For the maps in Eq. (6),
which is Eq. (19), so Assumption 2 holds. Since b is node-level initial and no coordinate of b is a descendant of E, Assumption 1 holds. On a positive-probability set of weights of and ,
so Assumption 3 holds and Lemma 1 applies. The observed adjacency keeps a fixed number of edges, selected by the magnitudes of E. On that set Eq. (22) holds, so Assumption 4 and Lemma 2 apply. Under the identities in Lemma 3, . Theorem 1 follows.
A.2 Feature Permutation Invariance
As in Section 2, , where . Nodes in are the context, and nodes in are the queries. With the context placed first, these nodes are and , where and . Dimension of is the label dimension. Let be a permutation of the feature indices . Denote . For , feature dimensions move by and the label dimension stays fixed:
One shared feature encoder is applied to each alone. The message-passing layer MP in Eq. (12) is shared across features and does not read or write dimension . Attention modules do not share parameters. For the feature-attention module in Eq. (9), let be the contribution of key dimension t to query dimension
Trovato et al.
at node . It is determined by , , and the parameters of this module.
Lemma 4 (Feature Attention). FeatureAttn( ) = .
PROOF. Eq. (23) permutes the feature dimensions and leaves dimension fixed. Since does not use the dimension index, for and , , while . Substitute :
The label query is the same sum with replaced by .
Lemma 5 (Remaining Block Maps). LayerNorm, the following MLP, and a residual sum act dimension-wise with parameters independent of j, so each sends feature dimension j of to dimension and leaves dimension fixed. Sample attention is Eq. (10), with weights independent of j on the feature dimensions. For , message passing satisfies Eq. (26).
PROOF. A dimension-wise map reads only , so Eq. (23) permutes its outputs. Eq. (10) depends on dimension only through its rows, and the split after node is fixed. Eq. (26) is Eq. (12) applied to dimension . Dimension is fixed by Eq. (23), so that dimension is unchanged.
Lemma 6 (Feature Cross-Reduction). Let and be the tensors in Eq. (11) and Eq. (12). For each node , is the feature-wise concatenation of and : the first dimensions are , and the last dimensions are . The same order defines from and , where for . Let be the contribution of key dimension of to query dimension , using the parameters of feature cross-reduction in Eq. (13). It is determined by those two dimensions.
For ,
PROOF. In the first block, Eq. (23) permutes the feature keys and leaves the label key fixed. The remaining keys are permuted among themselves. For , substitute and :
The label query is the same sum with replaced by .
Algorithm 1 Prior-Guided Node-Edge Dependency Modeling
Require: Number of prior-guided message-passing layers L
Ensure: Node features X, node labels Y, and adjacency A
1: Draw from a prior combining the ER model and an SBM, and set .
2: for do
3: Update features by feature-to-feature and label-to-feature linear maps with standard or degree-based neighbor aggregation, ; update labels by a feature-to-label linear map, a label residual, and label propagation, ; update edges by a feature-similarity kernel, a label-similarity kernel or a Chung–Lu mechanism, and an adjacency residual, .
4: Sample an activation , apply it to , , and , and inject Gaussian noise.
5: end for
6: Collect every layer as , , , and set .
7: Designate a subset as observables and keep the rest latent: , , .
8: return X, Y, A
Theorem 2 (Feature Permutation Invariance). Let be a permutation of the feature indices . Denote . Then we have:
PROOF. Each node is encoded as feature embeddings and one label embedding. For , dimension is a shared function of alone. For , dimension is a function of . For a query node , dimension does not depend on . Thus . Each block is feature attention, sample attention, message passing, and feature cross-reduction, with pre-normalized residual MLPs. Lemmas 4–6 preserve , so . For and a class , the conditional probability of under depends only on .
B Pseudocode
We provide the pseudocode of the prior-guided node-edge dependency modeling module in Algorithm 1.
C Experimental Details
C.1 Datasets
We evaluate our method on 23 datasets using the data splits of NodePFN [9]. For Chameleon and Squirrel, we use the filtered datasets from [37]. Dataset statistics are reported in Table 3.
C.2 Implementation Details
GSCM-PFN is a 9-layer transformer with embedding dimension 96. When node attributes are present, they are standardized over all nodes, clipped to , and reduced by a randomized SVD to 64 components. Each pre-training graph is drawn from the SCM prior. The node number n is sampled uniformly from 100 to 2000,
Table 3: Statistics of the 23 test datasets. #Edges counts each undirected edge once, with self-loops removed.
| Dataset | #Nodes | #Edges | #Features | #Classes |
|---|---|---|---|---|
| Actor | 7,600 | 26,659 | 932 | 5 |
| AirBrazil | 131 | 1,003 | 131 | 4 |
| AirEU | 399 | 5,993 | 399 | 4 |
| AirUS | 1,190 | 13,599 | 1,190 | 4 |
| Amazon-Comp | 13,752 | 245,861 | 767 | 10 |
| Amazon-Photo | 7,650 | 119,081 | 745 | 8 |
| Amazon-Ratings | 24,492 | 93,050 | 300 | 5 |
| Chameleon | 890 | 8,854 | 2,325 | 5 |
| Citeseer | 3,327 | 4,552 | 3,703 | 6 |
| Coauthor CS | 18,333 | 81,894 | 6,805 | 15 |
| Coauthor Physics | 34,493 | 247,962 | 8,415 | 5 |
| Cora | 2,708 | 5,278 | 1,433 | 7 |
| Cornell | 183 | 277 | 1,703 | 5 |
| DBLP | 17,716 | 52,867 | 1,639 | 4 |
| Deezer | 28,281 | 92,752 | 128 | 2 |
| Minesweeper | 10,000 | 39,402 | 7 | 2 |
| Pubmed | 19,717 | 44,324 | 500 | 3 |
| Questions | 48,921 | 153,540 | 301 | 2 |
| Squirrel | 2,223 | 46,998 | 2,089 | 5 |
| Texas | 183 | 279 | 1,703 | 5 |
| Tolokers | 11,758 | 519,000 | 10 | 2 |
| WikiCS | 11,701 | 215,603 | 300 | 10 |
| Wisconsin | 251 | 450 | 1,703 | 5 |
the number of features from 64 to 256, and the number of classes from 2 to 20. The graph is undirected, with the number of edges drawn uniformly from to . Nodes are randomly permuted, and the number of labeled training nodes is drawn uniformly from to , where is the number of classes. The remaining nodes are the held-out targets. We minimize the mean cross-entropy of the 20-way predictive distribution on those held-out nodes.