Organizations: Department of Electronic Business, South China University of Technology, Guangzhou, Guangdong 510006, China · Meta Superintelligence Lab
Tabular foundation models have become powerful graph learners. Systems such as G2T-FM and GraphPFN encode each node as a feature row and make predictions through in-context learning (ICL), with labeled rows serving as the prompt. Current protocols employ the complete training table as context, causing attention to scale quadratically with the labeled pool and introducing preprocessing and memory bottlenecks. We investigate context construction for node-level graph ICL: which labeled nodes and auxiliary unlabeled nodes should constitute the prompt for specified queries. We formulate this allocation in terms of two resources: a labeled-context budget for predictive evidence and an unlabeled-halo budget for adapter message passing without using label capacity. We present LoGIC, which retrieves labeled nodes via structural, feature-based, and coverage channels, shares each context across the queries in a graph-local cluster, incorporates an unlabeled halo for adapter backbones, and chooses the channel and context budget without test labels. Across three backbone configurations drawn from two model families on GraphLand, budgeted contexts maintain locally runnable full-context performance, stay competitive with published large-dataset results, and markedly lower peak memory requirements compared with full-context and whole-graph inference. They further permit frozen graph ICL on million-node graphs without retraining. Our analysis identifies when retrieval channels work best and connects their behavior with graph properties.
Figures & tables
Fig. 1: Full-context graph ICL (a) versus budgeted context construction (b). LoGIC retrieves a labeled context per graph-local query cluster through three channels and adds an unlabeled halo for adapter backbones.
Protocol
Forwards
Attention / forward
Peak residency
Full context / graph
C
Θ((∣L∣2+q∣L∣)d)
∣L∣+q
Per-query retrieval
∣Q∣
Θ((k2+k)d)
k+1
LoGIC (shared)
C
Θ((k2+qk)d)
k+q
TABLE I: PFN attention cost and row residency of full-context, per-query, and cluster-shared protocols.
TABLE III: Predictive performance on the GraphLand RL splits (mean ± std). Published results are marked by † . Within each backbone-matched pair, bold marks the higher mean. The LoGIC configurations are selected without using test labels and report five seeds.
Backbone
Dataset
Method
Performance
Time
Peak VRAM
TabPFNv2
tolokers-2
G2T-TabPFNv2 (full context)
60.04±0.07 AP
6.84±0.70 s
4.10 GB
LoGIC (ours)
60.18±0.15 AP
7.66±0.89 s
2.20 GB
artnet-exp
G2T-TabPFNv2 (full context)
45.68±0.03 AP
117.78±1.37 s
6.90 GB
LoGIC (ours)
45.94±0.04 AP
65.68±0.80 s
5.80 GB
GraphPFN
artnet-exp
GraphPFN (full graph)
51.86±0.10 AP
39.65±0.16 s
19.59 GB
LoGIC (ours)
52.06±0.18 AP
30.49±0.49 s
8.24 GB
TABLE IV: Performance, inference time, and peak allocated VRAM of the full-context/full-graph baselines and deployed LoGIC configurations (mean ± std).
Fig. 2: Peak VRAM of whole-graph GraphPFN inference versus LoGIC subgraph contexts. Whole-graph values use local measurements where available (tolokers-2, artnet-exp, city-roads-M, and city-reviews) and per-node extrapolation for the remaining scale cases; LoGIC values are measured.
Variant
tolokers-2
artnet-exp
artnet-views
city-roads-M
hm-prices
twitch-views
city-reviews
avazu-ctr
Coverage/random only
60.22
45.44
59.33
60.11
65.37
72.00
74.25
23.42
Feature channel only
60.20
44.81
59.36
60.11
65.43
68.95
71.67
24.37
Structural (PPR) only
60.20
45.94
59.48
60.14
65.32
70.20
75.28
23.96
TABLE V: Retrieval-channel ablation on the GraphLand RL splits using frozen TabPFNv2. All channels use full-feature preprocessing and k=4096 . Bold marks the best fixed-channel result per dataset.
Dataset
Assort.
Best fixed channel
tolokers-2
−0.057
coverage/random
artnet-exp
+0.007
PPR
artnet-views
+0.228
PPR
city-roads-M
+0.583
PPR
hm-prices
+0.139
feature-kNN
twitch-views
−0.388
coverage/random
TABLE VI: Train-edge label assortativity and the best fixed retrieval channel at k=4096 . Regression uses Spearman correlation; classification uses the same-class edge rate minus chance.
Fig. 3: Retrieved-context geometry for one deterministically selected artnet-exp query cluster at k=4096 . Radius is BFS hop distance from the query cluster; angle is a deterministic node hash used only to separate markers. Color denotes the context label and the central marker denotes the query cluster.
α=0.15 (def.)
α=0.05
α=0.30
α=0.50
nat. order
artnet-exp
45.94 ± 0.04
46.00 ± 0.06
45.93 ± 0.05
45.91 ± 0.06
45.93 ± 0.03
city-reviews
75.28 ± 0.05
74.95 ± 0.04
75.77 ± 0.01
75.90 ± 0.04
74.38 ± 0.02
TABLE VII: Sensitivity of the PPR channel ( k=4096 ) to teleport α under RCM query ordering, with natural node order as a reference. Values report test AP (mean ± std over five seeds).
Fig. 4: Test performance versus labeled-context budget k for the three LoGIC channels. The first seven panels show budgets available for all three channels. In the avazu-ctr panel, the final displayed budget ∣L∣=7,626 is the complete labeled pool; the three channels coincide when the pool is exhausted.
Fig. 5: Halo ablation on artnet-exp (GraphPFN): test AP versus the halo cap, with the published GraphPFN full-graph score as a reference.
Dataset
Context
AP
Brier ×100
ECE ×100
tolokers-2
Full context
60.04±0.07
12.17±0.02
1.60±0.01
Feature-kNN
60.10±0.10
12.15±0.01
1.59±0.20
artnet-exp
Full context
45.68±0.03
7.06±0.00
1.51±0.03
PPR
45.94±0.04
7.03±0.01
0.85±0.06
TABLE VIII: Representative posterior calibration results using frozen G2T-TabPFNv2 (mean ± std; adaptive ECE with 15 equal-mass bins). Lower Brier and ECE are better.
Achieving strong performance with graph neural networks (GNNs) typically requires training and hyperparameter tuning for each dataset, incurring repeated costs and effort. Graph in-context learning (ICL) avoids this by using a single pretrained model to predict unknown node labels directly from labeled context nodes. Existing approaches, however, rely on dense attention across nodes, making inference increasingly expensive as graphs grow. In this work, we present Ephris, a new graph in-context learner built on sparse message passing, scaling linearly with the number of node-feature entries and graph edges. Ephris is pretrained entirely on synthetic graphs generated from structural causal models with diverse graph structures and relational dynamics, exposing the model to varied dependencies among topology, features, and labels. We evaluate Ephris on 51 node-classification datasets against 15 extensively tuned GNNs and existing graph ICL methods under both high- and low-label train/validation/test splits. Across both settings, Ephris ranks first on all four aggregate measures: Elo, improvability, average rank, and accuracy. Its inference cost remains comparable to training a single GNN once, while being over 10 times faster than previous graph ICL models. Together, these results advance the performance-runtime Pareto frontier, demonstrating that strong graph ICL does not require dense attention. Code and model weights are available at https://github.com/nums-ai/ephris.
Tabular foundation models perform in-context learning (ICL) by conditioning predictions on labeled training examples provided as context. Unlike traditional models that separate training from inference, these models must process all training examples in every forward pass, making each prediction expensive. Restricting the number of training examples reduces this cost but substantially degrades performance. Instead of discarding context, we propose activation alignment, a method that leverages the full context to teach a model how to behave when seeing only a subset. This is achieved by training a lightweight linear transformation on synthetic unlabeled data to map the intermediate activations of a data-constrained "student" (using partial context) toward those of a full-context "teacher" (using all data). Training the aligner requires no GPU and converges in seconds to minutes on commodity hardware. We evaluate on 38 classification datasets from the TabArena benchmark using the leading two tabular foundation models, TabPFN-3 and TabFM. Across all context budgets, the aligned student yields broad, statistically significant improvements over the unaligned baseline for both models. In low-data regimes, alignment recovers nearly half of the teacher's predictive advantage. The method provides a practical, low-overhead approach to achieving the inference speed of compact contexts while closing a significant fraction of the performance gap to the full-context teacher.
Graph foundation models face several fundamental challenges including transferability across diverse domains and data scarcity, which calls into question the very feasibility of creating such models. However, despite similar challenges, the tabular domain has recently witnessed the emergence of the first successful foundation models such as TabPFN. These models are based on the prior-data fitted networks (PFN) framework, in which models are pretrained on carefully designed synthetic datasets to make predictions in an in-context learning setting. Recently, G2T-FM, a framework that converts graph node-level tasks into tabular tasks, has made the first step towards adopting PFNs for graphs, yet it is limited to hand-crafted features and was never pretrained on graph data. In this work, we make the next step by proposing GraphPFN, a PFN-based model designed and pretrained specifically for graph node-level tasks. Following the PFN framework, we first design a prior distribution of synthetic attributed graphs by using a novel combination of multi-level stochastic block models and a preferential attachment process for structure generation and graph-aware structured causal models for attribute generation. Then, we augment the tabular foundation model LimiX with attention-based graph neighborhood aggregation layers and train it on millions of synthetic graphs sampled from our prior. On diverse real-world graph datasets with node-level tasks, GraphPFN achieves state-of-the-art results in both in-context learning and finetuning regimes, outperforming G2T-FM, prior GFMs, and task-specific GNNs trained from scratch. More broadly, GraphPFN shows the potential of PFN-based models for building graph foundation models.