LoGIC: Budgeted Context Construction for Node-Level Graph In-Context Learning with Tabular Foundation Models
Summary
LoGIC introduces budgeted context construction for node-level graph in-context learning, optimizing labeled and unlabeled node selection to reduce memory usage and enable scalable inference on large graphs.
View Cached Full Text
Cached at: 09/10/26, 08:29 AM
# Budgeted Context Construction forNode-Level Graph In-Context Learningwith Tabular Foundation Models
Source: [https://arxiv.org/html/2609.05955](https://arxiv.org/html/2609.05955)
## LoGIC: Budgeted Context Construction for Node\-Level Graph In\-Context Learning with Tabular Foundation Models
Zidong GuoJihui Yangand Wenming Zuo††thanks: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\.††thanks:*\(Corresponding author: Wenming Zuo\.\)*††thanks: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\)\.††thanks:Jihui Yang is with the Meta Superintelligence Lab \(e\-mail: jihui@meta\.com\)\.††thanks: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\.
###### 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
## IIntroduction
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](https://arxiv.org/html/2609.05955#bib.bib1),[2](https://arxiv.org/html/2609.05955#bib.bib2)\]\. 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](https://arxiv.org/html/2609.05955#bib.bib3)\]builds these rows from raw attributes, neighborhood feature aggregates, and structural encodings, and subsequently employs a frozen prior\-data fitted network \(PFN\)\[[4](https://arxiv.org/html/2609.05955#bib.bib4),[5](https://arxiv.org/html/2609.05955#bib.bib5)\]for node prediction\. GraphPFN\[[6](https://arxiv.org/html/2609.05955#bib.bib6)\]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](https://arxiv.org/html/2609.05955#bib.bib7)\]\.
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](https://arxiv.org/html/2609.05955#bib.bib6)\], 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](https://arxiv.org/html/2609.05955#bib.bib3)\]\. TAG\[[8](https://arxiv.org/html/2609.05955#bib.bib8)\]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](https://arxiv.org/html/2609.05955#S5.SS3), 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 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](https://arxiv.org/html/2609.05955#bib.bib9),[10](https://arxiv.org/html/2609.05955#bib.bib10),[11](https://arxiv.org/html/2609.05955#bib.bib11)\]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](https://arxiv.org/html/2609.05955#bib.bib12),[13](https://arxiv.org/html/2609.05955#bib.bib13),[14](https://arxiv.org/html/2609.05955#bib.bib14),[15](https://arxiv.org/html/2609.05955#bib.bib15)\]\. In GraphICL’s own ablation, PageRank\-based selection fails to surpass random selection\[[12](https://arxiv.org/html/2609.05955#bib.bib12)\]\. 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](https://arxiv.org/html/2609.05955#S2)examines these directions in detail\.
We formalize context construction as budgeted allocation across two resources:kklabeled context rows andhhunlabeled*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\.
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\.Our experiments on GraphLand\[[16](https://arxiv.org/html/2609.05955#bib.bib16)\]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](https://arxiv.org/html/2609.05955#S1.F1)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 GraphLand datasets and three backbone configurations covering two families, examining predictive performance, efficiency, scalability, and controlled ablations under a consistent and reproducible protocol\.
## IIRelated Work
### II\-ATabular Foundation Models and Context Retrieval
TabPFN\[[4](https://arxiv.org/html/2609.05955#bib.bib4),[5](https://arxiv.org/html/2609.05955#bib.bib5)\]positioned prior\-data fitted networks as a training\-free framework for tabular prediction, and subsequent models including TabICL\[[17](https://arxiv.org/html/2609.05955#bib.bib17)\], LimiX\[[18](https://arxiv.org/html/2609.05955#bib.bib18)\], and TabPFN\-3\[[19](https://arxiv.org/html/2609.05955#bib.bib19)\]have increased the supported context size from thousands to millions of rows\. A complementary research direction examines what should be included in the context\. LoCalPFN\[[9](https://arxiv.org/html/2609.05955#bib.bib9)\]obtains a kNN context for each query and demonstrates on synthetic tables that a local context can surpass the full table when the complete table fits the prompt\. For real tables, however, row\-cap restrictions preclude the equivalent full\-context comparison\. TabDPT\[[10](https://arxiv.org/html/2609.05955#bib.bib10)\]integrates retrieval into pretraining, MixturePFN\[[11](https://arxiv.org/html/2609.05955#bib.bib11)\]directs queries to prompt experts, chunked attention\[[20](https://arxiv.org/html/2609.05955#bib.bib20)\]lowers the cost of long contexts, and CRUMB\[[21](https://arxiv.org/html/2609.05955#bib.bib21)\], concurrent with this work, groups queries into clusters and shares a distribution\-matched context within each cluster\. LimiX further provides a retrieval\-based ensemble, although it continues to pass over every sample\[[18](https://arxiv.org/html/2609.05955#bib.bib18)\]\. These approaches motivate context selection for frozen tabular models, yet their selection signals are tabular: rows are evaluated in feature space or through distributional matching, rather than through graph structure\. In the language\-model setting, demonstration selection is similarly recognized as changing the behavior of frozen models; embedding\-based retrieval\[[22](https://arxiv.org/html/2609.05955#bib.bib22)\], learned prompt retrievers\[[23](https://arxiv.org/html/2609.05955#bib.bib23)\], and an extensive follow\-up literature\[[24](https://arxiv.org/html/2609.05955#bib.bib24)\]document substantial accuracy differences from selection alone\.
Chunked attention and distribution\-matched batching improve how a tabular PFN processes a provided context\[[20](https://arxiv.org/html/2609.05955#bib.bib20),[21](https://arxiv.org/html/2609.05955#bib.bib21)\]\. LoGIC addresses the prior decision: which labeled graph nodes should fill the bounded PFN context, and, for adapter backbones, which unlabeled nodes should maintain local receptive fields\. The resulting context can be processed by a memory\-efficient PFN implementation without modifying LoGIC’s graph\-aware selection interface\.
### II\-BTabular Foundation Models as Graph Foundation Models
G2T\-FM\[[3](https://arxiv.org/html/2609.05955#bib.bib3)\]transforms node prediction into tabular ICL via neighborhood feature aggregation and structural encodings, while GraphPFN\[[6](https://arxiv.org/html/2609.05955#bib.bib6)\]extends a LimiX\-based PFN backbone using pretrained adjacency\-masked graph\-attention adapters\. Subsequent work employs tabular FMs for anomaly detection\[[25](https://arxiv.org/html/2609.05955#bib.bib25)\], link prediction with constructed contexts\[[26](https://arxiv.org/html/2609.05955#bib.bib26)\], and graph tabularization\[[27](https://arxiv.org/html/2609.05955#bib.bib27)\]\. NodePFN alternatively pretrains a graph\-aware PFN with local message passing over synthetic graph priors\[[28](https://arxiv.org/html/2609.05955#bib.bib28)\]\. An independent assessment describes PFN\-based graph FMs as competitive with, and frequently stronger than, tuned GNNs across varied benchmarks\[[7](https://arxiv.org/html/2609.05955#bib.bib7)\]\. These systems demonstrate that tabular FMs can function as graph foundation models, although their standard inference protocols continue to employ the complete training context; GraphPFN additionally identifies whole\-graph processing as its primary limitation\[[6](https://arxiv.org/html/2609.05955#bib.bib6)\]\. TAG\[[8](https://arxiv.org/html/2609.05955#bib.bib8)\]constrains the prompt through class\-balanced random subsampling of labeled rows, offering capacity control but no graph\-aware retrieval policy\. Earlier graph foundation models seek transfer through alternative routes: PRODIGY\[[29](https://arxiv.org/html/2609.05955#bib.bib29)\]pretrains GNNs on prompt\-graph tasks for few\-shot in\-context learning across graphs, whereas cross\-domain models including GFT\[[1](https://arxiv.org/html/2609.05955#bib.bib1)\]and GraphAny\[[2](https://arxiv.org/html/2609.05955#bib.bib2)\]transfer through architectures\. Their context, if present, remains the entire graph\.
### II\-CSelecting Nodes on Graphs
Demonstration selection for graph ICL has been investigated with LLM backbones\. GraphICL\[[12](https://arxiv.org/html/2609.05955#bib.bib12)\]evaluates prompt designs for node classification and ranks demonstrations through random sampling, cosine similarity, or global PageRank centrality with no more than six demonstrations\. It finds that the PageRank variant fails to exceed random selection\. AskGNN\[[13](https://arxiv.org/html/2609.05955#bib.bib13)\]trains a structure\-enhanced retriever over GNN embeddings, GraphPrompter\[[14](https://arxiv.org/html/2609.05955#bib.bib14)\]jointly optimizes prompt generation, selection, and augmentation across stages, GRAIL\[[15](https://arxiv.org/html/2609.05955#bib.bib15)\]obtains top\-kkrelevant nodes via GNN embeddings for LLM in\-context learning, and RAGraph\[[30](https://arxiv.org/html/2609.05955#bib.bib30)\]inserts retrieved subgraphs into a pretrained GNN using a prompt mechanism\.
Selection subject to a node budget also occurs in graph active learning, which selects nodes for annotation using centrality and diversity\[[31](https://arxiv.org/html/2609.05955#bib.bib31)\], feature propagation\[[32](https://arxiv.org/html/2609.05955#bib.bib32)\], partitioning\[[33](https://arxiv.org/html/2609.05955#bib.bib33)\], or influence maximization\[[34](https://arxiv.org/html/2609.05955#bib.bib34)\]\. Regarding scalability, sampling for GNN training\[[35](https://arxiv.org/html/2609.05955#bib.bib35),[36](https://arxiv.org/html/2609.05955#bib.bib36),[37](https://arxiv.org/html/2609.05955#bib.bib37)\]regulates gradient variance across epochs, while graph condensation\[[38](https://arxiv.org/html/2609.05955#bib.bib38)\]generates a compact training set once for each graph\. PPR itself has an extensive history as a propagation operator\[[39](https://arxiv.org/html/2609.05955#bib.bib39),[40](https://arxiv.org/html/2609.05955#bib.bib40)\]\. Label propagation and the label\-as\-feature technique\[[41](https://arxiv.org/html/2609.05955#bib.bib41),[42](https://arxiv.org/html/2609.05955#bib.bib42)\]instead incorporate label information on the feature side\.
Graph samplers including neighborhood sampling and Cluster\-GCN build computational subgraphs for GNN training\[[35](https://arxiv.org/html/2609.05955#bib.bib35),[36](https://arxiv.org/html/2609.05955#bib.bib36)\]\. Their sampled nodes chiefly regulate message\-passing cost; they neither determine which labels should fill a limited PFN prompt nor distinguish labeled evidence from unlabeled structural support\. LoGIC focuses on this frozen\-inference interface\. The mechanisms are nonetheless compatible: a graph partitioner could substitute for RCM in query clustering or supply candidate subgraphs, after which LoGIC would assign its label and halo budgets\.
### II\-DPositioning
Our setting diverges from these research directions in several ways\. In contrast to tabular retrieval methods\[[9](https://arxiv.org/html/2609.05955#bib.bib9),[10](https://arxiv.org/html/2609.05955#bib.bib10)\], our selection signals exploit the graph, and PPR is employed to retrieve from the labeled pool instead of propagating predictions\[[39](https://arxiv.org/html/2609.05955#bib.bib39),[40](https://arxiv.org/html/2609.05955#bib.bib40)\]\. Relative to graph\-ICL methods\[[12](https://arxiv.org/html/2609.05955#bib.bib12),[13](https://arxiv.org/html/2609.05955#bib.bib13),[15](https://arxiv.org/html/2609.05955#bib.bib15)\]and active\-learning methods\[[31](https://arxiv.org/html/2609.05955#bib.bib31),[32](https://arxiv.org/html/2609.05955#bib.bib32),[33](https://arxiv.org/html/2609.05955#bib.bib33)\], our backbone processes thousands of labeled rows simultaneously, the labels are already available, and adapter backbones demand that the retrieved context be delivered as a subgraph\. The halo budget is established for this final requirement\. Graph ICL with tabular FMs is further a setting where the full\-context protocol is standard\[[3](https://arxiv.org/html/2609.05955#bib.bib3),[6](https://arxiv.org/html/2609.05955#bib.bib6)\]and remains executable on smaller benchmarks, allowing the subset\-versus\-full comparison proposed by the tabular direction to be conducted directly; Section[V\-C](https://arxiv.org/html/2609.05955#S5.SS3)presents this comparison under matched backbones\. To the best of our knowledge, budgeted two\-resource context construction for frozen tabular graph FMs has not been examined previously\. TAG’s random subsampling\[[8](https://arxiv.org/html/2609.05955#bib.bib8)\]constitutes the nearest prior mechanism, and we employ feature\-kNN retrieval\[[9](https://arxiv.org/html/2609.05955#bib.bib9),[10](https://arxiv.org/html/2609.05955#bib.bib10)\]as the feature\-space control in the channel ablations\.
A full\-context graph PFN\[[3](https://arxiv.org/html/2609.05955#bib.bib3),[6](https://arxiv.org/html/2609.05955#bib.bib6)\]merges three decisions: which labeled rows support the current queries, how PFN attention arranges those rows, and which nodes and edges stay resident for adapter message passing\. LoGIC handles the first decision and provides a halo budget for the third\. Chunked TabPFN\[[20](https://arxiv.org/html/2609.05955#bib.bib20)\]alters the second, whereas CRUMB\[[21](https://arxiv.org/html/2609.05955#bib.bib21)\]combines query batching with distribution\-matched tabular retrieval; neither exploits graph distance nor builds adapter subgraphs\. By contrast, neighborhood sampling and Cluster\-GCN\[[35](https://arxiv.org/html/2609.05955#bib.bib35),[36](https://arxiv.org/html/2609.05955#bib.bib36)\]decrease graph computation but do not assign a labeled PFN prompt\. These methods are not substitutes for one another, although they can be integrated: memory\-efficient attention can process a LoGIC context, and graph partitioning can substitute for the RCM query order while preserving LoGIC’s labeled\-context and halo allocation\.
This layered perspective also establishes the suitable comparison\. Full\-context and full\-graph runs using the same backbone separate the effect of context construction, whereas fixed PPR, feature\-kNN, and coverage policies separate the selection signal\. An end\-to\-end comparison that simultaneously modifies the attention kernel, query batching rule, graph partition, and retrieved labels would confound these factors\. An integrated system is nonetheless a promising direction: LoGIC can choose the labeled evidence and structural support, after which chunked attention or a distribution\-matched scheduler can process the bounded context\.
## IIIPreliminaries and Problem Statement
### III\-AGraph In\-Context Learning
Let𝒢=\(𝒱,ℰ,X\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\},X\)denote a graph comprising node featuresX∈ℝn×dX\\in\\mathbb\{R\}^\{n\\times d\}, a labeled subsetL⊂𝒱L\\subset\\mathcal\{V\}with targetsyLy\_\{L\}, and a query set𝒬⊆𝒱∖L\\mathcal\{Q\}\\subseteq\\mathcal\{V\}\\setminus L\(transductive node classification or regression\)\. A*tabularized*graph FM transforms every node into a row representationr\(v\)r\(v\)and subsequently applies a frozen PFN backboneffthrough in\-context learning\. In G2T\-FM, the row includes raw attributes, neighborhood feature aggregates, and structural encodings; in GraphPFN, raw features are processed by graph\-attention adapters\. For a query nodevv, the prediction is expressed as
y^v=f\(r\(v\)\|\{\(r\(u\),yu\):u∈𝒮\}\),\\hat\{y\}\_\{v\}\\;=\\;f\\\!\\left\(r\(v\)\\;\\middle\|\\;\\\{\(r\(u\),y\_\{u\}\):u\\in\\mathcal\{S\}\\\}\\right\),\(1\)where𝒮⊆L\\mathcal\{S\}\\subseteq Ldenotes the labeled*context*\. The full\-context G2T\-FM and GraphPFN protocols use𝒮=L\\mathcal\{S\}=L, that is, they present the complete training table to the backbone\. The adapter\-based GraphPFN protocol additionally materializes the whole graph in accelerator memory so that graph\-attention layers can exchange messages across edges\.
### III\-BCost Model and the Memory Wall
A single forward pass over a context of size\|𝒮\|\|\\mathcal\{S\}\|andqqqueries producesΘ\(\|𝒮\|2\+q\|𝒮\|\)\\Theta\(\|\\mathcal\{S\}\|^\{2\}\+q\\,\|\\mathcal\{S\}\|\)attention\-score interactions per layer, orΘ\(\(\|𝒮\|2\+q\|𝒮\|\)d\)\\Theta\(\(\|\\mathcal\{S\}\|^\{2\}\+q\\,\|\\mathcal\{S\}\|\)d\)arithmetic at row widthdd, with activation memory growing correspondingly\. Adapter\-based backbones further retain allnnnode tokens, although their actual VRAM also depends on feature width, edge structure, batching, and implementation details\. Corresponding resource measurements are presented in Section[V\-C](https://arxiv.org/html/2609.05955#S5.SS3)\. The pertinent scaling difference is that whole\-graph input residency increases withnn, while LoGIC limits the materialized input through the labeled, query, and halo budgetskk,qq, andhh\. On the tabular side, the published G2T\-TabPFNv2 protocol employs PCA truncation on two of the eight benchmarks since full\-feature preprocessing exhausts memory\[[3](https://arxiv.org/html/2609.05955#bib.bib3)\]\. For the full\-attention PFN backbones examined here, expanding model capacity alone does not eliminate this bottleneck: the attention cost continues to be quadratic in the prompt size\.
The two budgets regulate separate resources\. The labeled budgetkkgoverns the amount of supervised evidence visible to the PFN and specifies the length of the labeled context\. The halo budgethhregulates label\-masked structural support for graph adapters and consequently the resident subgraph and its message\-passing workload\. Raisinghhdoes not introduce labeled demonstrations\. Raisingkkdoes not inevitably restore missing neighbors for a query or context node, since the chosen labeled nodes need not complete its local receptive field\. Combining the two into one node budget would consequently obscure their distinct statistical and systems roles\.
### III\-CProblem: Budgeted Context Construction
###### Definition 1\(Context construction\)\.
For a query cluster𝒬c⊆𝒬\\mathcal\{Q\}\_\{c\}\\subseteq\\mathcal\{Q\}, a labeled budgetkk, and a halo budgethh, a*context policy*π\\pichooses \(i\) a labeled context𝒮\(𝒬c\)⊆L\\mathcal\{S\}\(\\mathcal\{Q\}\_\{c\}\)\\subseteq Lwith\|𝒮\|≤k\|\\mathcal\{S\}\|\\leq k, and \(ii\) a label\-masked haloℋ\(𝒬c\)⊆𝒱∖\(𝒬c∪𝒮\(𝒬c\)\)\\mathcal\{H\}\(\\mathcal\{Q\}\_\{c\}\)\\subseteq\\mathcal\{V\}\\setminus\(\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\(\\mathcal\{Q\}\_\{c\}\)\)with\|ℋ\|≤h\|\\mathcal\{H\}\|\\leq h; the backbone subsequently predicts on the subgraph induced by𝒬c∪𝒮∪ℋ\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\\cup\\mathcal\{H\}\.
The halo constitutes the graph\-specific component of the policy\. Each halo label is masked, including when the node belongs toL∖𝒮L\\setminus\\mathcal\{S\}, such that a halo node provides features and edges but no supervision and consumes no label capacity\. Its purpose is to complete, or approximate, the receptive fields of context and query tokens for backbones with layers that attend across edges\. The tabular special case \(h=0h\{=\}0, no graph\) corresponds to retrieval\-augmented tabular ICL\[[9](https://arxiv.org/html/2609.05955#bib.bib9),[10](https://arxiv.org/html/2609.05955#bib.bib10)\]\. The graph setting introduces structural retrieval signals, the halo resource, and the cluster\-sharing opportunity employed in Section[IV](https://arxiv.org/html/2609.05955#S4)\.
This definition covers the main comparison protocols as special cases\. In the row\-based setting,h=0h\{=\}0,k=\|L\|k\{=\}\|L\|, and𝒮\(𝒬c\)=L\\mathcal\{S\}\(\\mathcal\{Q\}\_\{c\}\)\{=\}Lreproduce full\-context inference\. Choosing the query\-cluster size asq=1q\{=\}1yields per\-query retrieval, whereasq\>1q\{\>\}1yields a cluster\-shared context\. For an adapter backbone, when𝒬c∪𝒮∪ℋ=𝒱\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\\cup\\mathcal\{H\}\{=\}\\mathcal\{V\}and𝒮=L\\mathcal\{S\}\{=\}L, the materialized input and visible labels correspond to the full\-graph protocol\. Budgeted context construction lies in the intermediate regime: it constrains labeled evidence and, where required, structural support without altering the frozen backbone\.
An effective policy should equal or surpass full\-context accuracy atk≪\|L\|k\\ll\|L\|, constrain peak accelerator memory during backbone inference through the query, context, and halo budgets instead of whole\-graph residency, amortize retrieval and encoding among queries, operate unchanged with both pure\-tabular and adapter\-based backbones, and need no training or tuning beyond standard held\-out model selection\. The following section develops LoGIC according to these requirements\.
## IVLoGIC: Graph\-Aware Context Construction
LoGIC builds a bounded prompt for every graph\-local group of queries\. It initially groups query nodes such that a single retrieved context can support several nearby queries \(Section[IV\-A](https://arxiv.org/html/2609.05955#S4.SS1)\)\. It subsequently fills the labeled budget through one of three retrieval channels \(Section[IV\-B](https://arxiv.org/html/2609.05955#S4.SS2)\) and, for edge\-aware backbones, incorporates unlabeled nodes that maintain local message passing \(Section[IV\-C](https://arxiv.org/html/2609.05955#S4.SS3)\)\. The channel and budget are chosen using held\-out data without test labels \(Section[IV\-D](https://arxiv.org/html/2609.05955#S4.SS4)\)\.
### IV\-AGraph\-Local Query Clustering
LoCalPFN creates an individual local kNN context for every query\[[9](https://arxiv.org/html/2609.05955#bib.bib9)\]\. On graphs, a direct per\-query strategy is costly: every query would need a distinct retrieval step and backbone forward\. LoGIC instead arranges the query nodes according to a reverse Cuthill–McKee \(RCM\) permutation of the adjacency matrix\. RCM is a bandwidth\-reduction heuristic that generally positions graph\-adjacent nodes close to each other in the resulting order\[[43](https://arxiv.org/html/2609.05955#bib.bib43)\]\. We divide this order into clusters containingqqqueries; every cluster obtains one retrieved context and one backbone forward\. This decreases the number of forwards from\|𝒬\|\|\\mathcal\{Q\}\|to⌈\|𝒬\|/q⌉\\lceil\|\\mathcal\{Q\}\|/q\\rceilwhile maintaining graph locality among the queries in a cluster\. The RCM order is calculated once and cached, and any balanced graph partitioner could substitute for the clustering step\. Concurrent tabular research independently introduces cluster\-batched contexts for efficient inference using distribution\-matched retrieval\[[21](https://arxiv.org/html/2609.05955#bib.bib21)\]\. In the graph setting, clustering further specifies the structural center of the retrieval scores in Section[IV\-B](https://arxiv.org/html/2609.05955#S4.SS2)and the subgraph completed through the halo in Section[IV\-C](https://arxiv.org/html/2609.05955#S4.SS3)\.
### IV\-BRetrieval Channels
For a query cluster𝒬c\\mathcal\{Q\}\_\{c\}and labeled budgetkk, LoGIC allocates a score to every labeled node inLLand populates the context from the top of a selected ranking\. The following three channels represent distinct assumptions regarding the location of useful label information\.
PPR channel \(structural locality\)\.The structural channel evaluates a labeled nodeuuusing its personalized PageRank mass relative to the query cluster,
sppr\(u\)=π𝒬c\(u\),\\displaystyle s\_\{\\mathrm\{ppr\}\}\(u\)=\\pi\_\{\\mathcal\{Q\}\_\{c\}\}\(u\),\(2\)π𝒬c=αr𝒬c\+\(1−α\)P⊤π𝒬c\.\\displaystyle\\pi\_\{\\mathcal\{Q\}\_\{c\}\}=\\alpha\\,r\_\{\\mathcal\{Q\}\_\{c\}\}\+\(1\-\\alpha\)\\,P^\{\\\!\\top\}\\pi\_\{\\mathcal\{Q\}\_\{c\}\}\.wherePPdenotes the row\-stochastic transition matrix of𝒢\\mathcal\{G\},r𝒬cr\_\{\\mathcal\{Q\}\_\{c\}\}denotes the uniform distribution over𝒬c\\mathcal\{Q\}\_\{c\}, andα\\alpharepresents the teleport probability governing how frequently the walk restarts from the query cluster\. We obtain the solution to Eq\. \([2](https://arxiv.org/html/2609.05955#S4.E2)\) through power iteration; the iteration count determines the accuracy of the fixed\-point approximation\. The resulting score vector relies solely on the graph and the cluster, and is therefore computed once, cached across policies and budgets, and reused whenever the query cluster remains unchanged\. This channel captures the inductive bias that labels are locally smooth across edges\.
Feature\-kNN channel \(attribute similarity\)\.The attribute channel evaluates a labeled node according to the negative distance from its closest query row,
sknn\(u\)=−minv∈𝒬c∥x~u−x~v∥2,s\_\{\\mathrm\{knn\}\}\(u\)\\;=\\;\-\\min\_\{v\\in\\mathcal\{Q\}\_\{c\}\}\\,\\bigl\\lVert\\tilde\{x\}\_\{u\}\-\\tilde\{x\}\_\{v\}\\bigr\\rVert\_\{2\},\(3\)calculated over the transformed feature rowsx~\\tilde\{x\}processed by the backbone\. This channel directly transfers retrieval\-augmented tabular ICL\[[9](https://arxiv.org/html/2609.05955#bib.bib9),[10](https://arxiv.org/html/2609.05955#bib.bib10)\]to the graph setting, and functions as the feature\-space control in our channel ablations\.
Coverage channel \(global representativeness\)\.The coverage channel employs a seeded uniform sample ofLLas its basic form \(therandomrow of the results tables\)\. Stratified variants sample proportionally across classes, or across target quantiles for regression\. This channel is suitable when global coverage represents the target better than graph locality\. It further explains why a budgeted context may occasionally surpass the full table: uniform sampling retains the label marginal in expectation, stratified sampling explicitly preserves class or target\-quantile coverage, and both may exclude rows unrelated to the current cluster\.
The deployed method and its primary ablations employ these three channels\. When a channel cannot satisfy a cluster’s budget, for instance because PPR mass is restricted to a disconnected component, the coverage channel supplies the remainder\.
### IV\-CThe Unlabeled Halo
For adapter\-based backbones \(GraphPFN\), tokens communicate information across edges in the materialized subgraph\. A context constructed solely from rows shortens the receptive field of every token whose neighbors were not retrieved\. LoGIC consequently incorporates nodes from the 1\-hop closure of𝒬c∪𝒮\(𝒬c\)\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\(\\mathcal\{Q\}\_\{c\}\)as a label\-masked halo, capped athhand sampled uniformly beyond the cap\. Every node in𝒬c∪𝒮∪ℋ\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\\cup\\mathcal\{H\}enters the materialized graph\-adapter subgraph, although the PFN interface handles the three sets differently: only𝒮\\mathcal\{S\}is presented as labeled context, only𝒬c\\mathcal\{Q\}\_\{c\}is gathered as queries, and each node inℋ\\mathcal\{H\}is label\-masked\. This mask remains applied when a halo node belongs toL∖𝒮L\\setminus\\mathcal\{S\}, ensuring that membership in the global labeled pool cannot disclose its target following retrieval\.
Halo nodes consequently use memory but no label capacity\. Their feature rows and induced edges stay resident within the tensors processed by the graph\-adapter blocks, enabling query and context tokens to obtain messages from halo neighbors\. They are never converted into labeled demonstrations and are omitted from evaluation outputs\. The sole path fromℋ\\mathcal\{H\}to a prediction is via feature\- and edge\-dependent adapter messages, rather than a visible label or supervised loss term\. In the halo\-budget ablations, performance rises ashhgrows before reaching saturation\. On tolokers\-2, incorporating the halo lifts the subgraph protocol from substantially below the full\-graph result to parity with it\. On artnet\-exp, Fig\.[5](https://arxiv.org/html/2609.05955#S5.F5)in Section[V\-D](https://arxiv.org/html/2609.05955#S5.SS4)demonstrates that it lifts the subgraph protocol0\.270\.27AP beyond the published full\-graph accuracy\. When the full 1\-hop closure remains withinhh, first\-layer neighborhoods are retained exactly; otherwise the sampled halo provides a bounded approximation\.
One possible explanation is that maintaining local receptive fields in a subgraph whose scale more closely resembles the graphs employed during backbone pretraining yields a more favorable input than whole\-graph inference\.
Algorithm 1LoGIC inferenceInput:graph𝒢\\mathcal\{G\}, labeled setLLwithyLy\_\{L\}, queries𝒬\\mathcal\{Q\}, channelπ\\pi, budgetsk,hk,h, cluster sizeqq, frozen backboneff
1
σ←\\sigma\\leftarrowRCM order of
𝒢\\mathcal\{G\}; partition
𝒬\\mathcal\{Q\}by
σ\\sigmainto clusters
\{𝒬c\}\\\{\\mathcal\{Q\}\_\{c\}\\\}of size
qq;
2foreach*cluster𝒬c\\mathcal\{Q\}\_\{c\}*do
3score
LLby channel
π\\pi\(PPR mass from
𝒬c\\mathcal\{Q\}\_\{c\}/ min feature distance / coverage sampling\);
𝒮←\\mathcal\{S\}\\leftarrowtop\-
kk\(coverage\-filled\);
4
ℋ←\\mathcal\{H\}\\leftarrowlabel\-masked 1\-hop closure of
𝒬c∪𝒮\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}, capped at
hh;//adapter backbones
5
y^𝒬c←f\(rows\(𝒬c\)∣rows\(𝒮\),y𝒮;𝒢\[𝒬c∪𝒮∪ℋ\]\)\\hat\{y\}\_\{\\mathcal\{Q\}\_\{c\}\}\\leftarrow f\\big\(\\text\{rows\}\(\\mathcal\{Q\}\_\{c\}\)\\mid\\text\{rows\}\(\\mathcal\{S\}\),y\_\{\\mathcal\{S\}\};\\ \\mathcal\{G\}\[\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}\\cup\\mathcal\{H\}\]\\big\);
6end foreach
Output:predictions
y^𝒬\\hat\{y\}\_\{\\mathcal\{Q\}\}
### IV\-DChannel and Budget Configuration
The retrieval\-channel comparison in Section[V\-D](https://arxiv.org/html/2609.05955#S5.SS4)demonstrates that no individual channel performs best across all datasets because the channels represent distinct assumptions regarding where label information resides\. For the reported LoGIC configurations, we assess a coarse×4\\times 4budget ladder using held\-out validation data and preserve one \(channel,kk\) pair for each dataset\. The identical runs generate the budget curves; no test labels are employed and no parameters are fitted\. When several candidates lie within one standard deviation of the highest held\-out score, they constitute a tie set\. These ties frequently arise when budgets saturate and channel rankings converge\. We resolve ties through measured edge\-label assortativity: distinctly positive assortativity favors PPR, whereas distinctly negative assortativity favors coverage\. Around zero, or if the favored channel is missing from the tie set, the candidate with the highest score is preserved\. Feature\-kNN thus remains available for selection whenever it achieves the strongest held\-out score, and the tie\-break never supersedes a clear score margin\. Table[V](https://arxiv.org/html/2609.05955#S5.T5)verifies that the highest\-performing fixed channel differs among the eight benchmarks, although held\-out and test rankings may still diverge on particular datasets\.
### IV\-EComplexity Analysis and Implementation
Letnnandmmdenote the numbers of nodes and edges,LLthe labeled pool,𝒬\\mathcal\{Q\}the query set,qqthe cluster size \(thusC=⌈\|𝒬\|/q⌉C=\\lceil\|\\mathcal\{Q\}\|/q\\rceilclusters\),kkthe label budget,hhthe halo cap, andddthe row width\.
Preprocessing consists of one RCM pass over the adjacency \(O\(n\+m\)O\(n\+m\)\) together with, for G2T\-FM featurization, the host system’s own encodings\. Both are calculated once for each graph and stored on disk\. For every cluster, retrieval requires either one batched PPR power iteration \(O\(iters⋅m\)O\(\\text\{iters\}\\cdot m\)\) or one blocked distance scan across the labeled pool \(O\(\|L\|d\)O\(\|L\|\\,d\)\)\. PPR scores are stored across budgets and reused whenever the cluster remains unchanged\. Stratified coverage requires an additionalO\(\|L\|\)O\(\|L\|\)bookkeeping\. Over allCCclusters, the associated retrieval bounds areO\(Citers⋅m\)O\(C\\,\\text\{iters\}\\cdot m\)andO\(C\|L\|d\)O\(C\|L\|d\)\. In implementation, PPR and coverage retrieval execute on the CPU, whereas feature\-kNN employs a blocked scan on the accelerator\. Retrieved induced subgraphs are constructed from cached sparse adjacency data, preventing reconstruction of the entire graph for every cluster\. The context policy stays restricted to the inference path and does not modify backbone parameters\.
The protocols vary primarily in inference cost, as summarized in Table[I](https://arxiv.org/html/2609.05955#S4.T1)\. Under the PFN attention pattern employed by both host systems, theκ\\kappacontext rows attend inside the context and every one of theqqqueries reads the context; queries do not attend to each other\. A forward consequently incursΘ\(\(κ2\+qκ\)d\)\\Theta\(\(\\kappa^\{2\}\+q\\kappa\)d\)\. The full\-context protocol usesκ=\|L\|\\kappa=\|L\|in every one of itsCCforwards, per\-query retrieval uses\|𝒬\|\|\\mathcal\{Q\}\|forwards withκ=k\\kappa=k, and shared contexts need onlyCCforwards withκ=k\\kappa=k\. For a row\-independent backbone, resident rows decrease from\|L\|\+q\|L\|\+qtok\+qk\+q\. The full\-graph adapter protocol further retains allnngraph nodes and their edges, while the retrieved\-subgraph protocol limits resident nodes tok\+q\+hk\+q\+h\. Actual VRAM further depends on induced edges, row width, and model activations; Table[IV](https://arxiv.org/html/2609.05955#S5.T4)measures the resulting decrease relative to whole\-graph inference\.
TABLE I:PFN attention cost and row residency of full\-context, per\-query, and cluster\-shared protocols\.The implementation incorporates the context policies into the evaluation pipelines of the host systems while keeping pretrained checkpoints and training procedures unchanged\. In the full\-context or full\-graph setting, it retains the original preprocessing, ensembling, and evaluation metrics from each host system\.
## VExperiments
We structure the evaluation around three questions\.RQ1contrasts the predictive performance of the deployed LoGIC configuration with per\-dataset trained models and published graph foundation models on GraphLand\.RQ2evaluates efficiency, peak memory, scalability, and cross\-backbone transfer relative to backbone\-matched full\-context or full\-graph systems\.RQ3separates the retrieval channels, budget, halo, and measurable graph properties that explain the conditions under which each component helps\.
### V\-AExperimental Setup
We conduct evaluations on eight GraphLand benchmarks\[[16](https://arxiv.org/html/2609.05955#bib.bib16)\]covering 12k–168k nodes, classification \(AP\) and regression \(R2\), and both assortative and disassortative targets\. An additional 1\.63M\-node pokec\-regions experiment examines scale beyond the primary benchmark suite\. We employ three frozen backbone configurations belonging to two families: pure\-tabular TabPFNv2 and LimiX backbones with the G2T\-FM graph featurization, and the adapter\-based GraphPFN\-1\.3\. The predictive evaluation includes all three configurations, whereas the resource study concentrates on TabPFNv2 and GraphPFN\. The eight GraphLand benchmarks employ graph\-local query clustering, five seeds, and the random\-label \(RL\) splits\. TabPFNv2 experiments preserve complete feature rows except in the avazu\-ctr comparison, which adopts the PCA\-64 preprocessing from the corresponding G2T\-FM protocol\.
TABLE II:GraphLand datasets and RL\-split statistics\.\|ℒ\|\|\\mathcal\{L\}\|denotes the labeled context pool; edges count undirected pairs; Assort\. denotes train\-edge label assortativity\.Budgeted policies reuse preprocessing artifacts via content\-keyed caches, such that comparisons within a backbone modify only the context\. We present mean±\\pmstd across five seeds for the principal predictive and channel comparisons, and employ exact nonparametric tests for seed\-level claims\. Runtime is evaluated end\-to\-end for every inference configuration, and memory refers to peak allocated accelerator memory\. Resource values are contrasted exclusively within backbone\-matched experimental blocks\. Prior to evaluating context policies, we validated both host pipelines on our hardware with locally runnable reference configurations\. Table[III](https://arxiv.org/html/2609.05955#S5.T3)contrasts LoGIC with published predictive baselines, whereas Table[IV](https://arxiv.org/html/2609.05955#S5.T4)provides representative performance and resource comparisons between the original protocols and the respective LoGIC configurations\.
### V\-BPredictive Performance on GraphLand \(RQ1\)
TABLE III:Predictive performance on the GraphLand RL splits \(mean±\\pmstd\)\. Published results are marked by†\\dagger\. Within each backbone\-matched pair, bold marks the higher mean\. The LoGIC configurations are selected without using test labels and report five seeds\.Table[III](https://arxiv.org/html/2609.05955#S5.T3)shows the primary predictive comparison on GraphLand\. The first block lists individually trained LightGBM\-NFA and GNN references from the G2T\-FM evaluation\. The second block positions every full\-context or full\-graph result alongside its backbone\-matched LoGIC configuration, separating the effect of context construction from a backbone change\. For LoGIC\-TabPFNv2, the channel and budget are selected among the structural, feature, and coverage candidates according to Section[IV\-D](https://arxiv.org/html/2609.05955#S4.SS4)\. The candidate set contains a terminal budget that depletes the labeled pool when that pool is smaller than the following budget step\. The LimiX and GraphPFN rows likewise employ LoGIC configurations chosen without test labels\. For LimiX, the candidates comprise the published 10\-member ensemble and a terminal budget that depletes the labeled pool; the chosen terminal\-budget configurations are applied to tolokers\-2, artnet\-views, city\-roads\-M, hm\-prices, and avazu\-ctr\. These rows examine whether the context\-construction interface transfers among backbones instead of conducting a per\-backbone oracle search\. Fixed channels are not shown as independent proposed methods here; RQ3 employs them as controlled ablations\.
With the same TabPFNv2 backbone, LoGIC preserves full\-context accuracy while using a bounded context\. Wherever our full\-context reproduction can run,k=4096k\{=\}4096equals it within run\-to\-run variation or surpasses it\. On artnet\-exp, LoGIC exceeds the published G2T\-TabPFNv2 result, increasing from45\.7345\.73to45\.9445\.94\. The labeled pools for tolokers\-2, artnet\-views, and city\-roads\-M are depleted at the terminal candidate\. For the larger pools, LoGIC surpasses the published G2T\-TabPFNv2 result on twitch\-views and city\-reviews\. On avazu\-ctr, the protocol\-matched PCA\-64 configuration obtains27\.55±0\.0127\.55\{\\pm\}0\.01R2, with a0\.450\.45\-point gap relative to the published ten\-member mean\.
In aggregate, LoGIC\-TabPFNv2 numerically matches or surpasses G2T\-TabPFNv2 on five of the eight datasets\. The residual mean gaps equal0\.210\.21AP on tolokers\-2,0\.380\.38R2on hm\-prices, and0\.450\.45R2on avazu\-ctr\.
The transferred LimiX configurations surpass their published full\-context counterpart on five of eight datasets and match it on avazu\-ctr\. In addition to raising artnet\-exp from48\.4248\.42to48\.8748\.87AP and twitch\-views from71\.3171\.31to74\.1574\.15R2, the chosen configurations attain61\.78±0\.0761\.78\{\\pm\}0\.07R2on artnet\-views,65\.17±0\.0665\.17\{\\pm\}0\.06R2on city\-roads\-M, and76\.20±0\.1476\.20\{\\pm\}0\.14R2on hm\-prices\. The reported avazu\-ctr means coincide at two\-decimal precision \(32\.7032\.70R2\)\. The GraphPFN transfer surpasses the published full\-graph result on artnet\-exp by0\.270\.27AP and marginally surpasses it on tolokers\-2, city\-roads\-M, hm\-prices, and avazu\-ctr\. It remains within0\.140\.14R2on artnet\-views and0\.030\.03AP on city\-reviews, whereas twitch\-views retains a1\.081\.08R2gap\. Collectively, these rows substantiate the conclusion that LoGIC generally maintains the predictive performance of the respective full\-context or full\-graph protocol across backbone families, while surpassing it on multiple datasets\.
The external rows bound the claim\. LoGIC\-TabPFNv2 surpasses the strongest individually trained baseline on tolokers\-2 and artnet\-views, falls within0\.470\.47AP on artnet\-exp, and lags behind the strongest trained result by1\.041\.04R2on city\-roads\-M and0\.990\.99AP on city\-reviews, with wider gaps on hm\-prices, twitch\-views, and avazu\-ctr\. Similarly, full\-graph GraphPFN and G2T\-LimiX lead on multiple datasets when large\-memory inference is accessible\. The contribution consequently does not constitute a universal accuracy substitute for per\-dataset training\. Instead, it is a budgeted frozen\-inference protocol that retains competitive performance while eliminating the full\-context resource constraint, as evaluated next\.
### V\-CEfficiency, Scalability, and Cross\-Backbone Comparison \(RQ2\)
TABLE IV:Performance, inference time, and peak allocated VRAM of the full\-context/full\-graph baselines and deployed LoGIC configurations \(mean±\\pmstd\)\.Table[IV](https://arxiv.org/html/2609.05955#S5.T4)presents local reproductions and resource measurements obtained on our hardware\. With TabPFNv2, LoGIC lowers artnet\-exp end\-to\-end time from117\.78±1\.37117\.78\{\\pm\}1\.37to65\.68±0\.8065\.68\{\\pm\}0\.80seconds per seed and peak VRAM from6\.96\.9to5\.85\.8GB, while marginally increasing AP\.
The transfer to GraphPFN evaluates another bottleneck: full\-graph residency for adapter message passing\. LoGIC processes one retrieved induced subgraph for each query cluster, without altering or retraining the checkpoint\. In the matched local comparison on artnet\-exp, it achieves52\.06±0\.1852\.06\{\\pm\}0\.18AP using 8\.24 GB, versus51\.86±0\.1051\.86\{\\pm\}0\.10AP and 19\.59 GB under full\-graph inference\. On city\-roads\-M, LoGIC attains64\.88±0\.1564\.88\{\\pm\}0\.15R2using 5\.73 GB, versus64\.86±0\.1464\.86\{\\pm\}0\.14R2and 7\.71 GB under full\-graph inference\. Figure[2](https://arxiv.org/html/2609.05955#S5.F2)illustrates how this separation expands with graph size\.
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\.#### Million\-node scale study
Pokec\-regions comprises 1\.63M nodes, 44\.6M directed edges, and 183 classes\. LoGIC predicts 76\.8k cluster\-sampled held\-out queries with36\.3%36\.3\\%accuracy in 40 minutes using 4\.2 GB peak VRAM\. Whole\-graph residency would demand approximately two terabytes at the observed rate\. A random context with the samek=4096k\{=\}4096achieves only8\.6%8\.6\\%, suggesting that retrieval continues to be important even when the labeled budget constitutes merely0\.25%0\.25\\%of the graph\. This experiment serves as a scale demonstration instead of a same\-split SOTA claim\. Posterior calibration is evaluated independently below\.
### V\-DAblation and Mechanistic Analysis \(RQ3\)
#### Retrieval channels
TABLE V:Retrieval\-channel ablation on the GraphLand RL splits using frozen TabPFNv2\. All channels use full\-feature preprocessing andk=4096k\{=\}4096\. Bold marks the best fixed\-channel result per dataset\.Table[V](https://arxiv.org/html/2609.05955#S5.T5)positions the three candidate channels in their designated roles\. PPR represents the graph\-structural channel, feature\-kNN constitutes the retrieval\-based tabular ICL control, and coverage/random serves as the structure\-agnostic control\. No fixed channel performs best across all datasets; the strongest channel varies among datasets\. This finding motivates dataset\-dependent channel selection instead of a single universal retriever\.
Table[VI](https://arxiv.org/html/2609.05955#S5.T6)connects fixed\-channel outcomes with train\-edge label assortativity\. Positive assortativity frequently coincides with a strong PPR result, while the negatively assortative twitch\-views graph prefers coverage/random sampling\. The relationship is empirical rather than deterministic: near\-zero assortativity cannot account for the PPR advantage on artnet\-exp, and strong node attributes render feature\-kNN best on avazu\-ctr\.
TABLE VI:Train\-edge label assortativity and the best fixed retrieval channel atk=4096k\{=\}4096\. Regression uses Spearman correlation; classification uses the same\-class edge rate minus chance\.
#### Retrieved\-context geometry
Figure[3](https://arxiv.org/html/2609.05955#S5.F3)displays what the three fixed channels retrieve for a single deterministically selected artnet\-exp query cluster\. Radius denotes the BFS hop distance from the query cluster; angle denotes a deterministic node hash employed solely to distinguish markers\. The PPR context exhibits greater graph locality, with a median distance of two hops and no retrieved nodes at radius five or above\. Feature\-kNN and random sampling both yield a median distance of three hops and position 1% of their contexts at radius five or above\. This evidence verifies the structural\-locality bias of PPR, although it does not indicate that PPR will constitute the most accurate channel on every graph\.
Fig\. 3:Retrieved\-context geometry for one deterministically selected artnet\-exp query cluster atk=4096k\{=\}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\.
#### Budget regimes
Figure[4](https://arxiv.org/html/2609.05955#S5.F4)demonstrates that every channel deteriorates below approximately 512 rows, while larger budgets reveal dataset\-dependent channel orderings and ultimately approach saturation\. This behavior motivates choosing both the retrieval channel and the context budget\. Table[VII](https://arxiv.org/html/2609.05955#S5.T7)independently alters the PPR teleport probability and query ordering\. artnet\-exp remains stable over the testedα\\alphavalues, whereas city\-reviews shows greater sensitivity to locality; in the reported comparison, RCM ordering further outperforms natural node order\. Consequently, the qualitative channel conclusions are not contingent on a single PPR setting, although retrieval configuration may still be important for individual datasets\.
TABLE VII:Sensitivity of the PPR channel \(k=4096k\{=\}4096\) to teleportα\\alphaunder RCM query ordering, with natural node order as a reference\. Values report test AP \(mean±\\pmstd over five seeds\)\.Fig\. 4:Test performance versus labeled\-context budgetkkfor the three LoGIC channels\. The first seven panels show budgets available for all three channels\. In the avazu\-ctr panel, the final displayed budget\|ℒ\|=7,626\|\\mathcal\{L\}\|\{=\}7\{,\}626is the complete labeled pool; the three channels coincide when the pool is exhausted\.
#### Unlabeled halo
For adapter backbones, a context derived solely from labeled rows shortens the graph\-attention neighborhood\. When the 1\-hop closure of𝒬c∪𝒮\\mathcal\{Q\}\_\{c\}\\cup\\mathcal\{S\}remains within the halo cap, incorporating its label\-masked nodes retains the first\-layer neighborhoods of query and context tokens; a finite cap provides a sampled approximation\. Figure[5](https://arxiv.org/html/2609.05955#S5.F5)quantifies this effect\. On artnet\-exp, enlarging the cap increases AP to52\.06±0\.1852\.06\{\\pm\}0\.18, surpassing the published full\-graph result by0\.270\.27AP\. On tolokers\-2, the respective fixed\-PPR experiment atk=4096k\{=\}4096increases from54\.2054\.20AP without a halo to61\.0961\.09AP after the 1\-hop support is incorporated, a gain of6\.896\.89AP that matches the full\-graph reference\.
Fig\. 5:Halo ablation on artnet\-exp \(GraphPFN\): test AP versus the halo cap, with the published GraphPFN full\-graph score as a reference\.
#### Posterior calibration
Table[VIII](https://arxiv.org/html/2609.05955#S5.T8)contrasts representative full and budgeted contexts through Brier score and adaptive expected calibration error \(ECE\), where smaller values signify better probabilistic predictions\. Brier score quantifies squared probability error, whereas adaptive ECE contrasts confidence with empirical accuracy across 15 equal\-mass bins\. On tolokers\-2, substituting feature\-kNN for the full context shifts Brier score from12\.1712\.17to12\.1512\.15and ECE from1\.601\.60to1\.591\.59\. On artnet\-exp, the PPR context increases AP from45\.6845\.68to45\.9445\.94, while Brier score declines from7\.067\.06to7\.037\.03and ECE from1\.511\.51to0\.850\.85\. Therefore, in these representative settings, the memory reduction achieved through budgeting yields no apparent calibration penalty\. This audit makes no claim of consistent calibration gains across channels or datasets\.
TABLE VIII:Representative posterior calibration results using frozen G2T\-TabPFNv2 \(mean±\\pmstd; adaptive ECE with 15 equal\-mass bins\)\. Lower Brier and ECE are better\.
## VIDiscussion
### VI\-ADeployment Considerations
Our findings indicate several deployment considerations for PFN\-class graph foundation models\.
The initial choice concerns the labeled budget\. When the local full\-context protocol is runnable, budgeted contexts withk=4096k\{=\}4096maintain its performance using bounded memory and comparable or lower latency\. For larger labeled pools, they stay competitive with published full\-context results\. The complete table consequently does not need to serve as the default prompt\. Whether extra rows enhance or diminish performance depends on the dataset\.Figure[4](https://arxiv.org/html/2609.05955#S5.F4)demonstrates this behavior: on artnet\-exp, the bounded context surpasses the locally reproduced full\-context result by0\.260\.26AP\. Budgets beneath the capacity floor \(k0≈512k\_\{0\}\\\!\\approx\\\!512rows for current backbones\) should not be used because every evaluated selection policy performs weakly in this regime\.
The second decision involves the retrieval channel\. Train\-edge label assortativity can be calculated in a single sparse pass and helps guide this decision\. When assortativity is distinctly positive, PPR retrieval provides a strong default, with feature\-kNN as another candidate when raw attributes are informative\. When assortativity is distinctly negative, coverage sampling is typically preferable, since local retrieval may be detrimental at small budgets\. When candidates lie within one standard deviation of the highest held\-out score, the selection rule in Section[IV\-D](https://arxiv.org/html/2609.05955#S4.SS4)employs measured assortativity to resolve the tie without superseding a clear score margin\.
The remaining resource decision relates to structural support\. For adapter backbones, enlarging the label budget does not inevitably enhance performance, whereas assigning memory to the unlabeled halo recovers local receptive fields\. Figure[5](https://arxiv.org/html/2609.05955#S5.F5)demonstrates this effect: the resulting subgraph inference matches full\-graph inference on tolokers\-2, while LoGIC surpasses the published GraphPFN full\-graph result by0\.270\.27AP on artnet\-exp\.
### VI\-BScope and Future Work
The evaluation covers transductive node classification and regression on graphs with tabular node attributes, which is the setting in which the host systems are defined and evaluated\. Retrieval uses the graph neighborhood around each query, and the GraphLand benchmarks make that neighborhood available at inference time\. Inductive and streaming graphs, whose neighborhoods arrive progressively, together with link\- and graph\-level tasks, extend the same two\-resource formulation and are natural next steps\.
The reported configuration keeps one retrieval channel and one context budget per dataset through held\-out model selection, so no test labels enter the procedure\. The three channels are deliberately simple and training\-free, and budgeted contexts bound the input presented to the backbone rather than the total workload, since runtime still grows with the number of query clusters\. For graph\-adapter backbones, the halo restores the 1\-hop neighborhoods of query and context tokens within its cap\. Learned mixtures of retrieval signals, cluster\-adaptive budgets, transfer rules that reuse configurations among graphs, and multi\-hop halos tied to adapter depth could each strengthen this layer while preserving the inference\-only interface of LoGIC\.
More generally, larger backbones may accommodate larger contexts and render the observed capacity floor less restrictive, but an admissible prompt must still contain a specific selection of rows\. We consequently anticipate that context construction will remain pertinent to this model family, together with feature construction and backbone design, and will extend naturally to inductive and dynamically evolving graphs\.
## VIIConclusion
This work identifies context construction as a key inference\-time design problem for node\-level graph ICL with frozen tabular foundation models\. We express the problem as allocation across two bounded resources: labeled evidence for the PFN and label\-masked structural support for graph adapters\. Based on this formulation, LoGIC integrates graph\-local query sharing with complementary structural, feature\-based, and coverage retrieval channels, and chooses a channel–budget configuration without test labels\. The resulting interface keeps the host backbone and its training procedure unchanged while constraining PFN attention and peak input residency, eliminating the need to store the entire labeled pool or the whole graph in accelerator memory\.
Across GraphLand benchmarks and three backbone configurations drawn from two model families, bounded contexts preserve competitive predictive performance while lowering the computational and memory burden associated with full\-context and full\-graph inference, including at million\-node scale\. The experiments further demonstrate that retrieval depends on the graph: structural locality, attribute similarity, and global coverage are beneficial under distinct regimes\. Context construction should consequently adjust to measurable graph properties rather than depend on one retrieval rule across all datasets\. These findings establish context construction as a general modeling and systems layer for graph foundation models\. Future research should examine its interaction with fine\-tuning, learned mixtures of retrieval signals, inductive and streaming graphs, link\- and graph\-level ICL, and halo policies matched to adapter receptive fields\.
## References
- \[1\]Z\. Wang*et al\.*, “GFT: Graph foundation model with transferable tree vocabulary,”*Advances in Neural Information Processing Systems*, 2024\.
- \[2\]J\. Zhao*et al\.*, “Fully\-inductive node classification on arbitrary graphs,” in*International Conference on Learning Representations*, 2025, arXiv:2405\.20445\.
- \[3\]D\. Eremeev*et al\.*, “Turning tabular foundation models into graph foundation models,” in*NeurIPS 2025 Workshop on New Perspectives in Advancing Graph Machine Learning*, 2025, arXiv:2508\.20906\.
- \[4\]N\. Hollmann, S\. Müller, K\. Eggensperger, and F\. Hutter, “TabPFN: A transformer that solves small tabular classification problems in a second,” in*International Conference on Learning Representations*, 2023\.
- \[5\]N\. Hollmann, S\. Müller, L\. Purucker*et al\.*, “Accurate predictions on small data with a tabular foundation model,”*Nature*, vol\. 637, pp\. 319–326, 2025\.
- \[6\]D\. Eremeev*et al\.*, “GraphPFN: A prior\-data fitted graph foundation model,” in*International Conference on Machine Learning*, 2026, arXiv:2509\.21489\.
- \[7\]O\. Platonov, G\. Bazhenov, D\. Eremeev, and L\. Prokhorenkova, “A fair evaluation of graph foundation models for node property prediction,”*ICML Workshop on Graph Foundation Models*, 2026, arXiv:2606\.24509\.
- \[8\]A\. Hayler, X\. Huang, İ\. İ\. Ceylan, M\. Bronstein, and B\. Finkelshtein, “Bringing graphs to the table: Zero\-shot node classification via tabular foundation models,”*arXiv preprint arXiv:2509\.07143*, 2025\.
- \[9\]V\. Thomas, J\. Ma, R\. Hosseinzadeh*et al\.*, “Retrieval & fine\-tuning for in\-context tabular models,” in*Advances in Neural Information Processing Systems*, 2024, arXiv:2406\.05207\.
- \[10\]J\. Ma, V\. Thomas, R\. Hosseinzadeh*et al\.*, “TabDPT: Scaling tabular foundation models on real data,” in*Advances in Neural Information Processing Systems*, 2025, arXiv:2410\.18164\.
- \[11\]D\. Xu*et al\.*, “Mixture of in\-context prompters for tabular PFNs,” in*International Conference on Learning Representations*, 2025\.
- \[12\]Y\. Sun, Z\. Ma, Y\. Fang, J\. Ma, and Q\. Tan, “GraphICL: Unlocking graph learning potential in LLMs through structured prompt design,” in*Findings of the Association for Computational Linguistics: NAACL*, 2025, pp\. 2440–2459\.
- \[13\]Z\. Hu, Y\. Li, Z\. Chen, J\. Wang, H\. Liu, K\. Lee, and K\. Ding, “Let’s ask GNN: Empowering large language model for graph in\-context learning,” in*Findings of the Association for Computational Linguistics: EMNLP*, 2024, pp\. 1396–1409\.
- \[14\]R\. Lv, Z\. Zhang, K\. Zhang, Q\. Liu, W\. Gao, J\. Liu, J\. Yan, L\. Yue, and F\. Yao, “GraphPrompter: Multi\-stage adaptive prompt optimization for graph in\-context learning,” in*IEEE International Conference on Data Engineering \(ICDE\)*, 2025, pp\. 3917–3930\.
- \[15\]C\. Lim, K\.\-H\. Lee, H\. J\. Jeong, and S\. Lim, “GRAIL: Graph retrieval\-augmented in\-context learning for node classification in real\-world textual\-attributed graphs,” in*International Conference on Extending Database Technology \(EDBT\)*, 2025, pp\. 1039–1047\.
- \[16\]G\. Bazhenov, O\. Platonov, and L\. Prokhorenkova, “GraphLand: Evaluating graph machine learning models on diverse industrial data,” in*Advances in Neural Information Processing Systems, Datasets and Benchmarks Track*, vol\. 38, 2025, arXiv:2409\.14500\.
- \[17\]J\. Qu*et al\.*, “TabICL: A tabular foundation model for in\-context learning on large data,” in*International Conference on Machine Learning*, 2025, arXiv:2502\.05564\.
- \[18\]LimiX Team, “LimiX: Unleashing structured\-data modeling capability for generalist intelligence,”*arXiv preprint arXiv:2509\.03505*, 2025\.
- \[19\]Prior Labs, “TabPFN\-3 technical report,”*arXiv preprint arXiv:2605\.13986*, 2026\.
- \[20\]R\. Sergazinov and S\.\-A\. Yin, “Chunked TabPFN: Exact training\-free in\-context learning for long\-context tabular data,”*arXiv preprint arXiv:2509\.00326*, 2025\.
- \[21\]J\. Heredge, M\. J\. Villani, P\. Deshpande, A\. Seshadri, and N\. Kumar, “CRUMB: Efficient prior fitted network inference via distributionally matched context batching,”*arXiv preprint arXiv:2606\.11473*, 2026\.
- \[22\]J\. Liu, D\. Shen, Y\. Zhang, B\. Dolan, L\. Carin, and W\. Chen, “What makes good in\-context examples for GPT\-3?” in*Proceedings of Deep Learning Inside Out \(DeeLIO\): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures*, 2022\.
- \[23\]O\. Rubin, J\. Herzig, and J\. Berant, “Learning to retrieve prompts for in\-context learning,” in*Proceedings of NAACL\-HLT*, 2022\.
- \[24\]Q\. Dong, L\. Li, D\. Dai, C\. Zheng, J\. Ma, R\. Li, H\. Xia, J\. Xu, Z\. Wu, B\. Chang, X\. Sun, L\. Li, and Z\. Sui, “A survey on in\-context learning,” in*Proceedings of EMNLP*, 2024\.
- \[25\]Y\. Liu, T\. He, Y\. Liu, C\. Yi, H\. Jin, and C\. Hong, “Tabular foundation models are strong graph anomaly detectors,” in*Proceedings of the ACM Web Conference*, 2026, arXiv:2601\.17301\.
- \[26\]T\. Liao, C\. Hu, Y\. Sui, X\. Zhang, P\. Cui, J\. Li, and Z\. Zhang, “TFMLinker: Universal link predictor by graph in\-context learning with tabular foundation models,” in*Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining*, 2026, arXiv:2602\.08592\.
- \[27\]J\. Choi, W\. Kang, M\. Kim, J\. Kim, and N\. Park, “Can TabPFN compete with GNNs for node classification via graph tabularization?”*arXiv preprint arXiv:2512\.08798*, 2025\.
- \[28\]J\. Choi, J\. Kim, W\. Kang, and N\. Park, “Learning posterior predictive distributions for node classification from synthetic graph priors,” in*International Conference on Learning Representations*, 2026, arXiv:2604\.19028\.
- \[29\]Q\. Huang, H\. Ren, P\. Chen*et al\.*, “PRODIGY: Enabling in\-context learning over graphs,” in*Advances in Neural Information Processing Systems*, 2023\.
- \[30\]X\. Jiang, R\. Qiu, Y\. Xu, W\. Zhang, Y\. Zhu, R\. Zhang, Y\. Fang, X\. Chu, J\. Zhao, and Y\. Wang, “RAGraph: A general retrieval\-augmented graph learning framework,” in*Advances in Neural Information Processing Systems*, 2024, pp\. 29 948–29 985\.
- \[31\]H\. Cai, V\. W\. Zheng, and K\. C\.\-C\. Chang, “Active learning for graph embedding,”*arXiv preprint arXiv:1705\.05085*, 2017\.
- \[32\]Y\. Wu, Y\. Xu, A\. Singh, Y\. Yang, and A\. Dubrawski, “Active learning for graph neural networks via node feature propagation,”*arXiv preprint arXiv:1910\.07567*, 2019\.
- \[33\]J\. Ma, Z\. Ma, J\. Chai, and Q\. Mei, “Partition\-based active learning for graph neural networks,”*Transactions on Machine Learning Research*, 2023\.
- \[34\]W\. Zhang, Z\. Yang, Y\. Wang, Y\. Shen, Y\. Li, L\. Wang, and B\. Cui, “Grain: Improving data efficiency of graph neural networks via diversified influence maximization,”*Proceedings of the VLDB Endowment*, vol\. 14, no\. 11, pp\. 2473–2482, 2021\.
- \[35\]W\. L\. Hamilton, R\. Ying, and J\. Leskovec, “Inductive representation learning on large graphs,” in*Advances in Neural Information Processing Systems*, 2017\.
- \[36\]W\.\-L\. Chiang, X\. Liu, S\. Si*et al\.*, “Cluster\-GCN: An efficient algorithm for training deep and large graph convolutional networks,” in*KDD*, 2019\.
- \[37\]H\. Zeng, M\. Zhang, Y\. Xia*et al\.*, “Decoupling the depth and scope of graph neural networks,” in*Advances in Neural Information Processing Systems*, 2021\.
- \[38\]W\. Jin, L\. Zhao, S\. Zhang, Y\. Liu, J\. Tang, and N\. Shah, “Graph condensation for graph neural networks,” in*International Conference on Learning Representations*, 2022\.
- \[39\]J\. Klicpera, A\. Bojchevski, and S\. Günnemann, “Predict then propagate: Graph neural networks meet personalized PageRank,” in*International Conference on Learning Representations*, 2019\.
- \[40\]A\. Bojchevski, J\. Klicpera*et al\.*, “Scaling graph neural networks with approximate PageRank,” in*KDD*, 2020\.
- \[41\]Q\. Huang, H\. He, A\. Singh, S\.\-N\. Lim, and A\. Benson, “Combining label propagation and simple models out\-performs graph neural networks,” in*International Conference on Learning Representations*, 2021\.
- \[42\]Y\. Shi, Z\. Huang, S\. Feng*et al\.*, “Masked label prediction: Unified message passing model for semi\-supervised classification,” in*IJCAI*, 2021\.
- \[43\]E\. Cuthill and J\. McKee, “Reducing the bandwidth of sparse symmetric matrices,” in*Proceedings of the 24th National Conference of the ACM*, 1969, pp\. 157–172\.Similar Articles
Belief or Circuitry? Causal Evidence for In-Context Graph Learning
This paper investigates whether LLMs learn in-context through latent structure inference or local pattern matching, using mechanistic interpretability methods like PCA and activation patching on a graph random-walk task.
GraphInfer-Bench: Benchmarking LLM's Inference Capability on Graphs
Introduces GraphInfer-Bench, a benchmark to evaluate whether LLMs can perform graph inference—producing open-ended answers about a node and its neighborhood that cannot be retrieved from a single node or path. Experiments show that even frontier LLMs lag behind plain GNNs on these tasks, revealing a capability gap.
built a token-budget-aware context orchestration for long-horizon LLM agents
ContextOS is an open-source token-budget-aware context orchestration layer for long-horizon LLM agents, using hybrid retrieval and deterministic planning to select memories for context with execution traces for inspection.
When Context Misleads: In-context Learning with Jurisdiction in Large Language Models
This paper introduces FakeContext-bench to evaluate how well large language models distinguish between contextual information and factual knowledge, and proposes Jurisdiction In-Context Learning (J-ICL) to enhance both in-context learning performance and resistance to misleading context.
A Graph Signal Processing Perspective on Numerical Sequence Representations in LLM In-Context Learning
This paper applies graph signal processing to analyze how LLMs internally represent numerical sequences during in-context learning, finding that attention-induced token graphs and hidden-state signals show systematic, context-dependent signatures related to input complexity.