acceptodds
Under review as a conference paper at ICLR 2027

Graft: In-Context Classification and Regression at Node, Edge and Graph Level

Abstract

A single pretrained model can now match graph neural networks trained on the same labels, at the node, edge and graph levels and for classes or values. We show this with Graft, a 27M-parameter in-context model and the first to answer all six graph task types. Given labeled examples from a graph, it predicts every query with no gradient step or dataset-specific head. Graft accepts arbitrary feature columns through an exchangeable tokenizer, turns every target (a node, a pair of nodes, a whole graph) into a row over the nodes it spans, and treats classification as a special case of regression. Pretraining combines sixteen families of random graphs with random labeling functions and 59 real datasets. Across 49 dataset–task pairs, frozen Graft matches or beats the better of GCN and GIN trained on the labels in its prompt on 45 of them at a standard label budget per task, including every link-prediction and every regression benchmark, and it has the best average rank among all same-label methods on five of the six task types. The gap is widest in regression, where networks trained on few labels often fall below the mean predictor. Graft stays stable on prompts sixteen times longer than any it saw in pretraining. It also generalizes beyond its pretraining data: on dataset families withheld entirely, classification is nearly unchanged from the model that saw them, and fine-tuning on the dataset's labels recovers much of the regression loss.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.