NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Message Passing Does More with Less for In-Context Learning on Graphs

Dooho Lee, Jinmo Lee, Minho Jeong, Kijung Shin, Jaemin YooarXiv 2026

TL;DR

Ephris is a new graph in-context learner that achieves state-of-the-art node classification performance without any per-dataset training or hyperparameter tuning. By replacing expensive dense attention with efficient sparse message passing, Ephris scales linearly with graph size, making it over 10x faster than previous foundation models while outperforming extensively tuned GNNs.

What Problem Does This Paper Address?

Standard Graph Neural Networks (GNNs) are "specialists": to get good results, you typically have to train a new model and meticulously tune its hyperparameters for every new dataset you encounter. This is time-consuming and computationally expensive.

Graph In-Context Learning (ICL) offers a "generalist" alternative. The idea is to use a single pretrained model that can look at a few labeled "context" nodes in a new, unseen graph and immediately predict labels for the rest. However, existing graph ICL models have a major scalability flaw: they rely on dense attention mechanisms that scale quadratically ($O(N^2)$) with the number of nodes. As graphs grow, these models become prohibitively slow—sometimes even slower than just training a standard GNN from scratch.

Methods

The authors introduce Ephris, a scalable graph in-context learner designed to break the quadratic bottleneck.

1. Sparse Message Passing Architecture

Instead of dense attention, Ephris uses a novel architecture built on sparse message passing. The core is the $MP_{ICL}$ block, which incorporates:

  • Neighborhood-aware attention: Dynamically weights messages from neighbors based on their relevance and the local neighborhood size.
  • Global nodes: A small set of learned nodes that connect to every other node, allowing for efficient long-range communication without all-pairs attention.
  • Linear Scaling: The total complexity is $O(NF + E)$, where $N$ is nodes, $F$ is features, and $E$ is edges. This allows Ephris to handle much larger graphs than its predecessors.
Architecture overview of Ephris, showing the five-stage pipeline from tokenization to prediction.

2. Diverse Synthetic Pretraining

Ephris is trained entirely on 3.84 million synthetic graphs. To ensure it generalizes to the real world, the authors used Structural Causal Models (SCMs) to generate a massive variety of:

  • Topologies: Mixing group-based, degree-heterogeneous, and ordering-based connectivity.
  • Relational Dynamics: Simulating how information flows through a graph (e.g., diffusion vs. cascading effects).
  • Feature Representations: Presenting data as raw tables, dense embeddings, or hybrids.

Datasets

  • Pretraining: A massive library of synthetic tasks generated via SCMs.
  • Evaluation: A rigorous benchmark of 51 real-world node-classification datasets spanning social networks, e-commerce, and road networks. Graphs ranged from a few hundred to over 560,000 nodes.
  • Generalization Tests: The model was also tested on 10 hypergraph datasets (AllSet) and the Graph Out-of-Distribution (GOOD) benchmark to check its robustness to distribution shifts.

Key Insights and Ideas

  • Dense Attention is Overkill: The most significant "aha" moment is that dense, all-pairs attention—the backbone of most Transformers—is not necessary for strong graph ICL. Sparse message passing, when properly designed, captures enough context to match or beat more expensive models.
  • Synthetic Data is a Powerful Prior: By training on a sufficiently diverse set of simulated causal relationships, a model can learn the "language of graphs" well enough to perform zero-shot inference on real-world data it has never seen.
  • The Pareto Frontier Shift: Ephris doesn't just improve accuracy; it fundamentally shifts the performance-runtime trade-off. It occupies a unique spot on the Pareto frontier, offering the best accuracy at a fraction of the time cost of tuned GNNs or previous ICL models.
Figure 1: Performance-runtime Pareto plot across 51 datasets under the 50/25/25 split.

Key Results

  • Ranked #1 Overall: Across 51 datasets, Ephris ranked first in Elo rating, average rank, and accuracy, beating 15 tuned GNN baselines and 6 other graph foundation models.
  • Massive Speedup: Ephris is 13.1x to 16.1x faster than GraphPFN, the previous state-of-the-art ICL model.
  • Efficiency: Its inference cost is comparable to training a single standard GNN once, but it eliminates the need for the hundreds of training runs typically required for hyperparameter tuning.
  • Linear Scaling: Empirical tests confirmed that while competing ICL models scale quadratically, Ephris scales nearly linearly ($\beta = 1.07$), as shown in the runtime analysis.
Inference runtime scaling comparison showing Ephris's near-linear growth vs. the quadratic growth of competitors.

Limitations and Future Work

  • Out-of-Distribution Gaps: Performance degrades on datasets with extremely high-dimensional features (>5,000) or many classes (>10), as these fall outside the range of the synthetic pretraining data.
  • Distribution Shifts: While competitive, Ephris still struggles with certain types of non-random distribution shifts (e.g., temporal shifts in citation networks).
  • Task Scope: The current work focuses exclusively on node classification. Extending this scalable ICL approach to link prediction or graph-level classification is a key next step for creating a truly general-purpose graph foundation model.

Summary updated

BibTeX
@misc{lee2026message,
  author = {Dooho Lee and Jinmo Lee and Minho Jeong and Kijung Shin and Jaemin Yoo},
  title = {{Message Passing Does More with Less for In-Context Learning on Graphs}},
  year = {2026},
  eprint = {2609.37057},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.37057},
}
Figure