VICON: Patch-Based In-Context Learning for Fluid Dynamics
Published:
Paper: Yadi Cao, Yuxuan Liu, Liu Yang, Rose Yu, Hayden Schaeffer, and Stanley Osher. VICON: Vision In-Context Operator Networks for Multi-Physics Fluid Dynamics Prediction, TMLR, 2026. This chapter uses the accepted arXiv v5. Full text · Code.
Yadi Cao, Yuxuan Liu, Liu Yang, Rose Yu, Hayden Schaeffer, Stanley Osher
Read the paper (PDF)
Architecture and evidence
VICON embeds patches from condition/output frame pairs, adds spatial and pair-role information, and uses block-causal attention. Predictions are decoded from condition positions into output patches. Shared normalization within a prompt preserves a consistent input–output mapping. Training samples temporal strides; inference can form suitable pairs from available frames.
Across three fluid benchmarks, the accepted paper reports average last-step rollout-error reductions of 37.9% against DPOT and 44.7% against MPP, using 72.5% and 34.8% of their inference times, respectively. These aggregate comparisons depend on the reported workloads, baselines, and measurement protocol. Method and results.
Worked example: token arithmetic
Take a hypothetical \(128\times128\) scalar field. Pointwise tokenization uses 16,384 tokens per field. Splitting it into \(8\times8\)-pixel patches gives \(16\times16=256\) tokens. With three demonstrated pairs and one query field, seven fields are represented:
| Representation | Tokens for seven fields |
|---|---|
| One token per pixel | 114,688 |
| One token per 8 × 8 patch | 1,792 |
For full attention at fixed width, the score matrix scales quadratically with token count. The nominal score-count ratio is therefore \(64^2=4096\). This arithmetic is an illustrative comparison, not VICON’s measured speedup or its exact published patch configuration. Projection layers, embeddings, decoding, masks, and hardware all affect actual runtime.
Patchification also creates a representation tradeoff. A patch embedding must retain enough information to reconstruct fine structure. Reducing the sequence length does not make small eddies, discontinuities, or boundary details irrelevant.
Why normalization must preserve the task
Consider the toy mapping \(v=2u+10\). Normalize inputs and outputs with the same affine transform \(N(z)=(z-10)/2\). Writing \(u'=N(u)\) gives \(u=2u'+10\), so
\[v'=N(v)=2u'+10.\]The expression changes, but all examples still describe one well-defined transformed map. The output must then be converted back with \(N^{-1}\).
If each frame receives unrelated statistics, amplitude and offset differences may disappear independently. The pairs can cease to provide a consistent description of the original operator. This is why preprocessing is part of the numerical problem, rather than merely a convenience before a transformer.
Missing frames and valid strides
Suppose measurements are available at times \(0,2,5,7\). The pairs \((u_0,u_2)\) and \((u_5,u_7)\) both demonstrate a two-unit evolution. The pair \((u_2,u_5)\) demonstrates a three-unit evolution. Combining them without distinguishing their meanings asks the network to infer inconsistent tasks.
An operator-based interface is useful because a prompt can be rebuilt from compatible pairs. It still needs enough informative observations and an operator within the model’s usable regime. It cannot manufacture missing physical information.
What I would measure next
For a new dataset, report rollout error at several horizons, inference time including preprocessing, and errors per physical channel. Compare multiple patch sizes under equal compute. Inspect conserved quantities where relevant, since a low average norm error can hide a systematic drift.
VICON’s regular-grid representation motivates the next chapter: GICON uses graphs for irregular measurement locations.
