GICON: Spatial Message Passing Meets Contextual Attention
Published:
Paper: Chenghan Wu, Zongmin Yu, Boai Sun, and Liu Yang, Graph In-Context Operator Networks for Generalizable Spatiotemporal Prediction, 2026. Preprint v3 · Full text.
Chenghan Wu, Zongmin Yu, Boai Sun, Liu Yang
Read the paper (PDF)
What GICON contributes
Each layer combines spatial graph message passing with per-node attention over contextual examples. Content-derived example biases and key/value role offsets distinguish demonstrations without depending only on fixed sequence positions. Historical examples are retrieved by similarity. On air-quality datasets from two Chinese regions, the paper compares contextual and single-operator models under the same training data and steps. It reports spatial transfer and evaluation with up to 100 examples after training with at most five. Architecture and controlled experiments.
Two axes, two jobs
Use an illustrative tensor \(H\in\mathbb{R}^{N\times S\times d}\), where \(N\) is the number of stations and \(S=2m+1\) represents interleaved example inputs, outputs, and a query.
A schematic spatial update is
\[\widetilde h_{v,s}=\phi\left(h_{v,s},\sum_{w\in\mathcal{N}(v)}\psi(h_{v,s},h_{w,s},e_{vw})\right).\]It answers: what is happening around this station in this example? A contextual update then operates along the sequence at a fixed station:
\[h'_{v,:}=\operatorname{Attention}(\widetilde h_{v,:};M,B).\]It answers: which demonstrated relationships help predict this station’s query? Here \(M\) is an information-flow mask and \(B\) a bias. These equations illustrate the decomposition; they omit residual paths, normalizers, and implementation details.
A jointly flattened attention layer would consider \((NS)^2\) token pairs. Per-node contextual attention considers \(NS^2\) pairs, while the graph stage introduces its own edge-dependent cost. This factorization changes the computation and the inductive bias: spatial influence travels through graph updates rather than arbitrary all-token attention.
Worked example: a three-station network
Imagine stations A, B, and C arranged along a prevailing wind direction, with edges A–B and B–C. Context examples show earlier pollution histories and later concentrations. At C, local attention can compare C’s present history to C’s histories in the demonstrations. A spatial update also supplies information from B.
Repeated layers can make an upstream event at A relevant to C. Without edges, the representation loses that pathway. Without contextual pairs, it loses the demonstrated relationship between a history and its later state. The two components provide different information, so neither ablation substitutes for the other.
This is a hypothetical example; an edge in a learned predictor is not automatically evidence of a causal transport mechanism.
More context is not automatically more evidence
Duplicating one observation 100 times does not create 100 independent measurements. Highly correlated histories can dominate attention while adding little new information. Increasing context length also changes memory use and retrieval cost.
A careful experiment varies both the number and the diversity of examples. Compare relevant, random, and mismatched pairs, keeping the query and target split fixed. For forecasting, a retrieved pair is eligible only once its output has been observed; retrieving a “past input” whose associated future output lies after the query time leaks information.
Reading the transfer claim
Changing a graph’s node count and geometry tests representation transfer. Changing the prediction horizon tests an operator change. Using longer prompts tests cardinality behavior. These should remain separate result columns.
GICON is especially relevant when the measurements naturally form an irregular graph. UNICON extends the shared numerical-context idea across disciplines, while Chain of Operators asks what an external numerical program can add around a frozen model.
