arXiv:2609.05955cs.LGSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.05955

LoGIC: Budgeted Context Construction for Node-Level Graph In-Context Learning with Tabular Foundation Models

Mingqi Yang, Zidong Guo, Jihui Yang, Wenming Zuo

Mingqi Yang, Zidong Guo, Jihui Yang, and Wenming Zuo

Abstract—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.

Index Terms—Graph foundation models, in-context learning, tabular foundation models, context retrieval, graph machine learning, scalability

I. INTRODUCTION

FOUNDATION models pretrained on extensive data have transformed natural language processing and computer vision, and graph learning has sought a comparable modeling paradigm. Graphs render this transfer challenging: datasets across different domains seldom share feature spaces, degree distributions, or label semantics, and cross-graph transfer continues to be difficult [1], [2]. Tabular foundation models,

pretrained for in-context learning (ICL) on synthetic tables, have become effective graph learners when every node is encoded as a feature row. G2T-FM [3] builds these rows from raw attributes, neighborhood feature aggregates, and structural encodings, and subsequently employs a frozen prior-data fitted network (PFN) [4], [5] for node prediction. GraphPFN [6] alternatively enhances the tabular backbone with pretrained graph-attention adapters. Across varied industrial benchmarks, PFN-based graph models have been shown to equal or surpass well-tuned GNNs on multiple datasets [7].

The prompt employed by these systems has received less consideration than the row representation or the backbone. In ICL, the labeled rows within the prompt provide the model's supervision during inference, but both G2T-FM and GraphPFN employ the entire training table as context. GraphPFN observes that its "current implementation requires processing the entire dataset at once, which leads to significant memory consumption" [6], and lists subgraph sampling as future work. G2T-TabPFNv2 encounters a similar limitation: practical memory consumption increases with both context size and feature width, and the published GraphLand protocol consequently uses PCA when full-feature preprocessing surpasses available memory [3]. TAG [8] limits the prompt by randomly subsampling labeled rows, although random subsampling regulates capacity without determining which rows are pertinent to the current queries.

The full-table default is likewise costly. Attention across the context scales quadratically with the number of labeled rows, and an identical cost reappears for every prediction batch. For adapter-based backbones, peak memory additionally covers the resident graph tokens, meaning that it depends on the graph, its features, and the execution configuration rather than solely on node count. In the matched local measurements presented in Section V-C, whole-graph GraphPFN consumes 19.59 GB on the 50k-node artnet-exp graph and 7.71 GB on the 57k-node city-roads-M graph, whereas the respective LoGIC configurations consume 8.24 GB and 5.73 GB. The concern is thus not a constant node-count threshold. Rather, full-graph residency is linked to the input graph, while a retrieved-subgraph interface links residency to explicit query, labeled-context, and halo budgets. This difference becomes increasingly important as graph size expands.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

(Corresponding author: Wenming Zuo.)

Mingqi Yang, Zidong Guo, and Wenming Zuo are with the Department of Electronic Business, South China University of Technology, Guangzhou, Guangdong 510006, China (e-mail: yangmq@scut.edu.cn; 202520158576@mail.scut.edu.cn; wmzuo@scut.edu.cn).

Jihui Yang is with the Meta Superintelligence Lab (e-mail: jihui@meta.com).

This work was supported in part by the National Natural Science Foundation of China under Grant 62506134, in part by the Guangdong–Hong Kong–Macao Applied Mathematics Center Project under Grant 2026A1515060008, and in part by the Guangdong Natural Science Foundation under Grant 2026A1515010171.

This paper consequently asks: given a frozen tabular backbone and a budget, which labeled nodes, and which auxiliary unlabeled nodes, should constitute the prompt for a specified set of queries?

Current selection techniques do not directly address this question. Retrieval-augmented tabular ICL ranks rows in feature space [9]–[11] and disregards graph structure. Demonstration selection for graph ICL has been investigated primarily with LLM backbones, frequently employing only a small number of demonstrations chosen through global centrality, learned retrieval, or query-dependent neighborhoods [12]–[15]. In GraphICL's own ablation, PageRank-based selection fails to surpass random selection [12]. Neither research direction encompasses PFN-based graph FMs, in which the context may include thousands of labeled rows and, for adapter backbones, has to be provided as a subgraph instead of an unordered collection of rows. Section II examines these directions in detail.

We formalize context construction as budgeted allocation across two resources: kk labeled context rows and hh unlabeled halo nodes. The labeled budget governs the supervised evidence, whereas the halo provides unlabeled nodes for adapter message passing without using label capacity. We subsequently introduce LoGIC (locally clustered graph in-context construction), a retrieval approach with three scoring channels: personalized-PageRank locality, feature-space similarity, and coverage sampling. LoGIC shares each retrieved context among all queries in a graph-local cluster, thereby amortizing retrieval and encoding over several queries. The retrieval channel and context budget are regarded as configuration choices and are chosen without test labels. This design complements advances in graph tabular foundation models: it neither replaces nor retrains the backbone, but offers a shared inference interface that bounds the labeled context and, where necessary, the supporting subgraph.

Our experiments on GraphLand [16] encompass three backbone configurations from the pure-tabular and graph-adapter families, three retrieval channels, and budgets spanning hundreds to tens of thousands of rows. The highest-performing channel differs across datasets. Graph-local retrieval tends to achieve the best performance when labels are smooth over edges, while coverage sampling is preferred when edge-label assortativity is distinctly negative. These findings suggest that the suitable retrieval channel depends on both the graph and the accessible context budget. Since peak accelerator memory during backbone inference is constrained mainly by the query, labeled-context, and halo budgets, the same construction supports configurations unavailable under the respective full-context or full-graph protocols: full-feature inference where the official protocol needs PCA truncation, GraphPFN inference that surpasses its published full-graph accuracy with bounded subgraph residency, and frozen graph ICL on a 1.6-million-node graph. Figure 1 compares the two protocols, and the experiments associate retrieval-channel behavior with the context budget and measurable graph properties.

The primary contributions of this paper are summarized as follows:

  • We recognize and formulate context construction for node-level graph ICL as a budgeted allocation problem involving two resources, labeled context rows and unlabeled halo nodes.

  • We introduce LoGIC, a context-construction framework developed to accommodate multiple graph tabular foundation model inference interfaces, incorporating multi-channel retrieval, cluster-shared contexts, and an unlabeled halo for graph-adapter backbones. It modifies neither backbone parameters nor training and is implemented for both row-based and graph-adapter inference.

  • We empirically connect retrieval-channel behavior to the context budget and measurable graph properties.

  • We perform an extensive evaluation across eight Graph-Land datasets and three backbone configurations covering two families, examining predictive performance, efficiency, scalability, and controlled ablations under a consistent and reproducible protocol.

References (43)