Graph-to-Table Foundation Model (G2T-FM)
- Graph-to-Table Foundation Model (G2T-FM) is a paradigm that converts node-level prediction on graphs into a tabular learning problem via feature augmentation and structural encoding.
- It leverages powerful off-the-shelf tabular foundation models, enabling both zero-shot in-context learning and fine-tuning, often surpassing specialized graph neural networks.
- Empirical results show that careful ensemble aggregation and calibration in G2T-FM lead to significant performance improvements across varied benchmarks and tasks.
The Graph-to-Table Foundation Model (G2T-FM) is a family of methodologies designed to bridge graph machine learning and tabular foundation model architectures. By systematically recasting node-level prediction on graphs as tabular learning problems, G2T-FM enables the use of powerful off-the-shelf tabular models such as TabPFNv2 for zero-shot and fine-tuned prediction tasks, often outperforming purpose-built graph neural networks (GNNs) and public graph foundation models (GFMs) (Hayler et al., 8 Sep 2025, Eremeev et al., 28 Aug 2025). The core innovation is a mapping from graphs to tables via node feature augmentation and structural encoding, followed by in-context learning or supervised fine-tuning with a tabular backbone.
1. Formal Problem Definition and Conceptual Framework
Let denote a graph with nodes, edges , node feature matrix (or ), and label assignment for multiclass settings. The objective of G2T-FM is to transform the node-level prediction task—classification or regression—into a standard tabular supervised learning problem where each node (row) is represented by a fixed-length feature vector incorporating both attribute and structural information, and the node label (if available).
This design enables direct application of tabular foundation models (TFMs) such as TabPFNv2, either via in-context learning (ICL), in which the model uses a labeled context to predict labels of query nodes with no parameter updates, or through fine-tuning, where model parameters are updated based on the provided task data.
2. Node Feature and Structural Encoding
2.1. Node Feature Augmentation
Each node ’s final representation is a concatenation of:
- Raw features: directly from .
- Neighborhood feature aggregation (NFA): For numeric attributes, coordinate-wise permutation-invariant statistics over the 1-hop neighborhood 0 are computed: mean 1, max, and min per feature dimension 2, forming 3. For categorical features, a one-hot neighbor mean aggregation is performed.
- Smoothed features: In some implementations, 4-hop smoothed features are defined as 5 for 6, where 7 is the symmetrically normalized adjacency matrix.
- Optional outputs from fixed encoders: E.g., outputs from LinearGNN/least-squares aggregators.
2.2. Structural Embeddings
To inject structural (positional) context beyond feature aggregation, classical training-free encoders are used:
- Degree and PageRank: Scalar metrics quantifying the node’s local connectivity and centrality.
- Spectral encodings: Top-8 Laplacian eigenvector coordinates, 9 where 0 is the graph Laplacian and 1 its eigenvectors.
- RandomWalkPE: Random-walk–based positional encodings.
- Pretrained message-passing embeddings: Optionally, fixed embeddings from models such as GPSE or PEARL can be concatenated, with or without fine-tuning.
2.3. Table Formation
All node representations 2 are concatenated to form a matrix 3. The columns may combine raw, aggregated, and structural features, subject to the maximum column constraint of TabPFNv2 (4 columns per batch).
3. Tabular Foundation Model Integration and Learning Workflows
3.1. In-Context Learning (ICL)
The context set 5 is formed from labeled 6 rows. All context rows and their labels are fed into TabPFNv2 as a prompt; test/query nodes 7 are provided as feature-only rows. TabPFNv2 predicts the distribution 8 for each query, with no parameter updates during evaluation.
When the table exceeds TabPFNv2's model capacity (10,000 rows/500 columns), the full table is subsampled 9 times. Each subsample includes all queries, a class-balanced subset of labeled context rows (02,500), and a random subset of columns (e.g., 300 feature and 100 structural). Prediction is performed separately on each subsample.
3.2. Fine-Tuning
For further performance, TabPFNv2 can be fine-tuned (full model, including PEARL blocks if present) using standard loss objectives:
- Classification: cross-entropy, 1.
- Regression: mean squared error, 2.
Full model fine-tuning is empirically superior to PEFT or prompt-tuning on these tasks.
3.3. Equivariance Considerations
For multiclass settings, label ID shuffling is employed during in-context learning to enforce permutation equivariance, minimizing the risk of the model exploiting arbitrary label ordering.
4. Ensemble Aggregation and Calibration
When employing subsampling for large graphs, predictions from each subsampled table (3) are aggregated using an ensemble selection scheme:
- Hold-Out Calibration: A holdout 4 is separated to calibrate ensemble weights. Each model 5 provides prediction scores on 6.
- Weight Optimization: Greedy forward selection identifies the optimal mixture 7 of ensemble members to maximize accuracy on 8, 9.
- Final Prediction: For the queries, 0.
Auxiliary LinearGNN classifiers trained on individual encoders can be included as additional ensemble members. Their predicted probabilities are calibrated and mixed analogously.
5. Empirical Results and Comparative Evaluations
Experimental evaluation of G2T-FM models has been conducted on diverse benchmarks:
- Zero-shot node classification (ICL): On 28 real-world graphs spanning hundreds to 170,000 nodes and 2–70 classes each, G2T-FM achieves mean accuracy of 73.10%, exceeding GAT (66.55%) and public GFMs GraphAny (65.56%) and TS-Mean (65.78%) (Hayler et al., 8 Sep 2025). When TS-Mean is trained on 9 graphs and evaluated on 20, it achieves 68.57% versus G2T-FM’s 74.39%.
- Ablation on ensemble size: Performance rises monotonically in the number of TFM ensemble members 1 (e.g., 2 with only LinearGNNs at 69.74%, versus 3 with full ensemble at 73.26%).
- Tabular–feature graphs: On GraphLand-style datasets (binary classification or regression), in-context G2T-FM outperforms previously published GFMs and matches or beats well-tuned GNNs (ICL average rank 4.38 vs GAT’s 3.50); after fine-tuning, G2T-FM has mean rank 2.00, surpassing GNNs (Eremeev et al., 28 Aug 2025).
- Text-attributed graphs: In ICL mode, G2T-FM lags text-specialized GNNs due to out-of-domain tabular pretraining, but fine-tuning closes the gap and achieves best mean rank.
- Metrics: Evaluation covers accuracy (multiclass), average precision (binary), and 4 (regression), depending on the dataset.
6. Limitations and Open Challenges
- Feature engineering dependency: Current approaches rely on hand-crafted, closed-form encoders and inject no new graph priors; adaptation to automatically learned encoders or synthetic graph-specific pretraining is a suggested extension (Hayler et al., 8 Sep 2025).
- Model capacity constraints: G2T-FM inherits the hard limits of TabPFNv2 (maximum 510,000 rows, 6500 columns, 710 output classes per model), necessitating subsampling and error-correcting code (ECOC) decomposition for multi-class problems.
- Task scope: Present methodology addresses only node classification; extension to link prediction or whole-graph tasks implies redesigning the tabular mapping (e.g., edges or graphs as rows).
- Structural richness: Aggregation is fundamentally 1-hop in primary instantiations, and does not yet exploit richer multi-hop or subgraph motifs.
- Scaling and downstream tasks: Achieving scalability to million-node graphs, dynamic or temporal graphs, and cross-graph transfer requires methodical advances.
- Inference latency: The ensemble approach increases inference time linearly in 8, although individual TFM forward passes remain efficient for small tables.
7. Significance and Outlook
The G2T-FM paradigm demonstrates that casting graph problems as tabular tasks and leveraging state-of-the-art TFMs yields a competitive, generalizable foundation model for graphs. Direct utilization of arbitrary feature spaces (numerical, categorical), fidelity to tabular and graph structure, and compatibility with both in-context and full fine-tuning regimes enable G2T-FM models to unify methodological advances across domains. Future progress will likely include expanded encoder design, relaxation of TFM context size limitations (e.g., via newer models like TabICL or factorized attention TFMs), and broader benchmarking across graph ML tasks beyond node classification (Hayler et al., 8 Sep 2025, Eremeev et al., 28 Aug 2025).