Interpolating a spatial field, such as daily maximum temperature, from sparse, irregularly located observations recurs across the environmental and health sciences. Standard Gaussian-process kriging refits hyperparameters and solves an O(N3) system for every new field. When many related fields are observed, such as daily maps from one sensor network, neural processes (NPs) instead learn the interpolation map from past fields and predict a new field in one forward pass. Joint-predictive variants, which sample whole fields rather than independent per-location values, typically use self-attention over context and query points, costing O(K2) in the combined point count K and limiting practical use to a few thousand points. State-space models offer a linear-time alternative, but a direct state-space adaptation compresses the context into one hidden state before reading queries, reducing what the decoder sees. We propose MambaFlowNP, a linear-compute joint-predictive NP trained with conditional flow matching. A multi-directional Mamba-2 scan reads context and query tokens in one shared sequence, so each query's velocity is read from its own scan position rather than a compressed context summary, and because queries only read the scan state, predictions are consistent across query sets. MambaFlowNP is competitive with the strongest attention-based joint-predictive baselines on synthetic Matérn Gaussian-process benchmarks, and on regional to continental-scale NOAA temperature interpolation it attains the lowest RMSE and CRPS and near-nominal coverage on every tier, while running 114--784× faster than the strongest joint-predictive baseline. A single forward pass scales to 106 points on one NVIDIA L40S GPU in under a second. This makes joint prediction feasible for continental-scale, irregularly sampled sensor networks; predictive quality is evaluated up to K=5,580.
Figures & tables
Figure 1: MFNP parametrises the velocity field vθ(Yt,t,c) of § 2.2 in four stages. The stages are tokenisation of context values and the noisy query slice Yt with frozen Random Fourier Feature (RFF) coordinate embeddings; multi-directional Hilbert routing under Π={π1,π1rev,π2,π2rev} ; distance-aware Mamba-2 scans modulated by an adaLN-Zero flow-time embedding et ; and inverse-permutation fusion to per-query velocities. Trained with LCFM , reflow-distilled to a one-step Euler student, and CRPS fine-tuned. Full pipeline in Appendix B , Algorithm 1 .
Figure 2: Per-episode latency vs. RMSE (left) and CRPS (right) on continental US NOAA ( K=5,580 ). Means ±1 SE over 10 seeds at Nsamples=128 ; the hatched staircase is the empirical Pareto frontier. TNPA exceeds the per-cell budget (§ 5.3 ); Utah and California frontiers in Appendix F .
Figure 3: End-to-end sampling latency vs. K (log–log) on 2D Gaussian Matérn- \nicefrac32 , batch =1 , Nsamples=1 (1-NFE Euler for MFNP; published step count per baseline). Colour gives the model class; a short dashed line through a curve’s last point means the next K runs out of memory. Numbers in Table 8 .
Figure 4: Continental US ( K=5,580 ) posterior on a held-out date, 10%/90% context/query split. Top, truth and MFNP posterior mean (red dots are context stations), interpolated for display. Bottom, MFNP absolute error averaged over the query stations in each ∼110 km hexagon (grey hexagons hold none), with the per-station histogram as legend and the RMSE dashed. Population-averaged accuracy in Figure 5 .
Predictive Quality
Calibration Quality
Model
MSE ↓
CRPS ↓
C2ST →0.5
Cov-95 →0.95
Time (ms) ↓
1D Gaussian – Matérn- \nicefrac32 ( K=128 )
Joint predictives, quadratic-time
TNPA
0.0110±0.0003
0.0367±0.0004
0.499±0.003
0.946±0.001
735.7±0.4
NDP
0.1720±0.0028
0.2508±0.0014
0.688±0.018
0.996±0.000
(2.174±0.004)×103
FNP
0.0107±0.0002
0.0398±0.0004
0.532±0.011
0.752±0.001
(1.253±0.001)×103
Table 1: 1D and 2D Gaussian Matérn- \nicefrac32 ( K=128 , 256 ). MSE, CRPS ( ↓ ); C2ST (target 0.5 ); 95% coverage (target nominal); time = per-episode ms, MFNP and baselines on one NVIDIA L40S. Mean ± SE over 10 evaluation seeds; bold = best per column (within 1 SE). † our method; full kernel sweep in Appendix D .
Predictive Quality
Calibration
Model
MSE (°C) 2 ↓
RMSE (°C) ↓
CRPS (°C) ↓
Cov-95 →0.95
Time (ms) ↓
NOAA Utah ( K=222 )
Joint predictives, quadratic-time
TNPA
2.524±0.007
1.589±0.002
0.783±0.001
0.846±0.000
(4.923±0.004)×103
NDP
4.665±0.012
2.160±0.003
1.221±0.002
0.742±0.000
(2.414±0.004)×103
FNP
2.712±0.007
1.647±0.002
0.853±0.001
0.730±0.000
(3.071±0.003)×103
Table 2: NOAA temperature interpolation on Utah ( K=222 ), California ( K=486 ), and the continental US ( K=5,580 ); joint-predictive baselines only (full table with factorised baselines in Table 9 ). MSE (°C) 2 , RMSE, CRPS °C ( ↓ ); Cov-95 (target 0.95 ); C2ST omitted (no tractable reference posterior on real fields); time = per-episode ms on one NVIDIA L40S. Mean ± SE over 10 evaluation seeds, denormalised scale; bold = best per column within tier (within 1 SE). † our method.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Architecture
Training
Inference
Model
dmodel
dstate/lat
L
h/Fϕ
dff
η
∣B∣
steps
TNFE
gscale
1D Gaussian – RBF ( K=128 )
Factorised predictives
CNP
256
–
–
–
–
2.6×10−3
64
100 k
–
–
NP
256
256
–
–
–
2.2×10−3
64
100 k
–
–
ANP
256
128
–
–
–
3.0×10−4
64
100 k
–
–
Appendix
Table 3: Best per-cell hyperparameters on the 1D synthetic Gaussian tasks ( K=128 ). Architecture. dmodel hidden width; dstate/lat Mamba state / NP latent width; L blocks; h/Fϕ transformer heads or MFNP RFF frequencies; dff transformer FFN width. Training. AdamW lr η , batch ∣B∣ , optimiser steps (CFM teacher + reflow for MFNP). Inference. TNFE integration / diffusion steps; gscale NDP guidance scale (jointly tuned with architecture in BO on synthetic tasks, and set by a post-hoc grid sweep on a fixed checkpoint on NOAA, selected to minimise validation MSE). Dashes mark N/A. † our method.
Architecture
Training
Inference
Model
dmodel
dstate/lat
L
h/Fϕ
dff
η
∣B∣
steps
TNFE
gscale
2D Gaussian – Matérn- \nicefrac32 ( K=256 )
Joint predictives, quadratic-time
TNPA
128
–
6
4
512
4.6×10−4
64
100 k
–
–
NDP
256
–
4
4
256
4.3×10−4
32
100 k
100
6,500
FNP
64
–
6
8
256
7.4×10−4
32
100 k
100
–
Appendix
Table 4: Best per-cell hyperparameters on the 2D synthetic Gaussian Matérn- \nicefrac32 task ( K=256 ). Column conventions as in Table 3 ; factorised baselines are not reported on this task. † our method.
Architecture
Training
Inference
Model
dmodel
dstate/lat
L
h/Fϕ
dff
η
∣B∣
steps
TNFE
gscale
NOAA Utah ( K=222 )
Factorised predictives
CNP
256
–
–
–
–
1.9×10−3
8
100 k
–
–
NP
256
64
–
–
–
3.7×10−3
8
100 k
–
–
ANP
128
64
–
–
–
1.2×10−3
4
100 k
–
–
Appendix
Table 5: Best per-cell hyperparameters on the three NOAA tiers (Utah K=222 ; California K=486 ; continental US K=5,580 ). Column conventions as in Table 3 . TNPA exceeds the per-cell compute budget on the US tier (§ 5.3 ) and is omitted there. MFNP uses 4 Mamba-2 heads and a scan chunk length of 64 . † our method.
Standalone sort
Share of MFNP inference
K
Identity ( μ s)
Sort ( μ s)
Kernel ( μ s)
MFNP total (ms)
Sort fraction
128
41.8
44.4
2.6
3.41
1.30%
256
37.9
35.4
≈0
3.50
1.01%
512
41.3
45.3
4.0
3.61
1.26%
1,024
41.4
44.2
2.7
3.72
1.19%
2,048
35.9
58.0
22.1
3.87
1.50%
Appendix
Table 6: Sort scaling and its share of MFNP inference (NVIDIA L40S, JAX 0.9.0.1, CUDA 12). Identity is a same-shape no-op baseline; kernel is sort total minus identity. MFNP wall-clock is per-forward at the same K on 2D Matérn- \nicefrac32 (1-NFE Euler, batch =1 , Nsamples=1 , headline checkpoint).
Predictive Quality
Calibration Quality
Model
MSE ↓
CRPS ↓
C2ST →0.5
Cov-95 →0.95
Time (ms) ↓
1D Gaussian – RBF ( K=128 )
Factorised predictives
CNP
0.0285±0.0008
0.0666±0.0009
0.673±0.020
0.941±0.002
0.40±0.02
NP
0.0388±0.0010
0.0906±0.0014
0.753±0.029
0.474±0.003
0.58±0.00
ANP
0.0026±0.0001
0.0255±0.0002
0.691±0.008
0.091±0.001
1.31±0.01
Appendix
Table 7: Full 1D matched-regime results at Kmax=128 , all three kernels (RBF, Matérn- \nicefrac32 , Matérn- \nicefrac52 ). Baselines are grouped by predictive class into factorised ( O(K) pooling or O(NM) cross-attention with per-query Gaussian head), joint / quadratic ( O(K2) self-attention), joint / linear ( O(K) Mamba-2 scan). MSE, CRPS ( ↓ ); C2ST (target 0.5 ); 95% coverage (target nominal); time = per-episode ms, MFNP and baselines on one NVIDIA L40S. Mean ± SE over 10 evaluation seeds; bold = best per column (within 1 SE). † our method.
Model
16
256
4,096
16,384
65,536
1,048,576
Joint predictives, quadratic-time
TNPA
10.7
151
1.2×105
7.4×106
oom
oom
NDP
315
317
1.5×103
oom
oom
oom
FNP
124.0
122.6
1.07×104
oom
oom
oom
Joint predictives, linear-time
MFNP †
3.51
3.63
4.82
14.74
61.88
913.86
Appendix
Table 8: End-to-end sampling latency (ms) for joint-predictive NPs vs. total sequence length K on 2D Gaussian Matérn- \nicefrac32 on one NVIDIA L40S, batch =1 , Nsamples=1 (one full posterior draw per pass, with 1-NFE Euler for MFNP and the published step count for each baseline). Median of 5 reps after 3 warm-ups; relative SE <5% on every completing cell. Values ≥103 in scientific notation, rounded to 2 – 3 sig figs. oom = out of memory. Bold = best per column. † our method.
Figure 5: MFNP predictive accuracy as a function of context fraction N/K on the three NOAA tiers (Utah K=222 ; California K=486 ; continental US K=5,580 ), averaged over 1,024 random (date, station-partition) draws per fraction. Red (left axis) shows RMSE and blue (right axis) shows CRPS, both in °C.
Predictive Quality
Calibration
Model
MSE (°C) 2 ↓
RMSE (°C) ↓
CRPS (°C) ↓
Cov-95 →0.95
Time (ms) ↓
NOAA Utah ( K=222 )
Factorised predictives
CNP
4.230±0.010
2.057±0.002
1.075±0.001
0.930±0.000
0.46±0.02
NP
6.196±0.017
2.489±0.003
1.551±0.002
0.481±0.000
0.75±0.00
ANP
3.653±0.010
1.911±0.003
1.246±0.002
0.268±0.000
1.34±0.06
Appendix
Table 9: Full NOAA temperature interpolation on Utah ( K=222 ), California ( K=486 ), and the continental US ( K=5,580 ); baselines grouped by predictive class as in Table 7 . MSE (°C) 2 , RMSE, CRPS °C ( ↓ ); Cov-95 (target 0.95 ); C2ST omitted (no tractable reference posterior on real fields); time = per-episode ms on one NVIDIA L40S. Mean ± SE over 10 evaluation seeds, denormalised scale; bold = best per column within tier (within 1 SE). † our method.
Model
MSE (°C) 2 ↓
RMSE (°C) ↓
CRPS (°C) ↓
Cov-95 →0.95
NOAA Utah ( K=222 )
Exact GP
16.240±0.034
3.936±0.004
2.246±0.002
0.916±0.000
SGPR
16.501±0.073
3.965±0.007
2.277±0.004
0.936±0.001
Nearest-neighbour GP
16.255±0.065
3.937±0.007
2.239±0.004
0.916±0.000
MFNP †
2.464±0.016
1.570±0.005
0.767±0.002
0.940±0.000
NOAA California ( K=486 )
Appendix
Table 10: Gaussian-process references on NOAA. MSE (°C) 2 , RMSE, CRPS °C ( ↓ ); Cov-95 (target 0.95 ). Mean ± SE over evaluation seeds ( 10 for MFNP and the nearest-neighbour GP; 10 , 10 and 8 for the exact GP; 4 , 4 and 3 for SGPR). SGPR uses 64 inducing points on Utah and California and 512 on the US. † our method.
Figure 6: Per-episode latency (x, log) versus RMSE (left panel) and CRPS (right panel) on NOAA Utah ( K=222 ). Conventions as in Figure 2 .
Figure 7: Per-episode latency (x, log) versus RMSE (left panel) and CRPS (right panel) on NOAA California ( K=486 ). Conventions as in Figure 2 .
Figure 8: NOAA Utah ( K=222 ) posterior on a held-out date, 25%/75% context/query split. Panels as in Figure 4 , with ∼50 km hexagons.
Figure 9: NOAA California ( K=486 ) posterior on a held-out date, 25%/75% context/query split. Panels as in Figure 4 , with ∼70 km hexagons. Five coastal stations outside the state outline are omitted.
Predictive Quality
Calibration Quality
Variant
MSE ↓
CRPS ↓
C2ST →0.5
Cov-95 →0.95
Time (ms) ↓
1D Gaussian – Matérn- \nicefrac32 ( K=128 )
Single direction
0.0471±0.0012
0.0860±0.0010
0.661±0.012
0.893±0.002
8.0±0.1
Two directions
0.0101±0.0002
0.0373±0.0004
0.515±0.003
0.936±0.001
13.3±0.1
Random order
0.0191±0.0004
0.0552±0.0005
0.619±0.017
0.922±0.001
28.8±0.3
Single hidden state
0.0122±0.0002
0.0425±0.0004
0.562±0.007
0.926±0.001
10.1±0.5
Appendix
Table 11: Architectural ablations on MambaFlowNP. MSE/CRPS on each task’s native scale (dimensionless synthetic; (°C) 2 /°C NOAA). Mean ± SE over 10 evaluation seeds at Nsamples=128 on a single training checkpoint per variant; bold = best per column within block (within 1 SE); times on one NVIDIA L40S. C2ST omitted on NOAA tiers (no tractable reference posterior on real fields), shown as -- . † our method.
Ordering
MSE / Hilbert ↓
CRPS / Hilbert ↓
Hilbert
1.00
1.00
Morton
0.96
0.98
Lexicographic
0.91
1.16
Random
1.18
1.11
Appendix
Table 12: Point orderings on 2D Gaussian Matérn- \nicefrac32 ( K=256 ). Each ordering is retrained with the same budget and one training seed; the random row is the random-order run of Table 11 . MSE and CRPS relative to the Hilbert run, mean over 10 evaluation seeds at Nsamples=128 .
Predictive Quality
Calibration Quality
Config
MSE ↓
CRPS ↓
C2ST →0.5
Cov-95 →0.95
Time (ms) ↓
1D Gaussian – Matérn- \nicefrac32 ( K=128 )
Teacher (pre-distillation)
Euler 1-step
0.0112±0.0003
0.0506±0.0006
0.621±0.005
0.302±0.002
28.5±0.1
Euler 15-step
0.0111±0.0003
0.0397±0.0004
0.536±0.005
0.903±0.001
298.9±0.3
Euler 30-step
0.0111±0.0003
0.0396±0.0004
0.533±0.005
0.923±0.001
585.4±0.3
Appendix
Table 13: Solver sweep on the reflow-distilled MFNP student and the matched CFM-only teacher (same architecture, hyperparameters, and evaluation; no reflow). Heun uses 2 network function evaluations per step; time = per-episode ms, on one NVIDIA L40S. Mean ± SE over 10 evaluation seeds; bold = best per column within model block (within 1 SE). C2ST undefined on NOAA.
Figure 10: Time per forward pass vs. total sequence length K (log–log), 2D Gaussian Matérn- \nicefrac32 , batch =1 , 1-NFE for all models and matched ∼600 k parameters with random initialisation. We plot per-call latency rather than the time per joint predictive draw because at 1-NFE only MFNP produces a usable sample; NDP and FNP need their full solver budget to be sampled from in practice. A short dashed line through a curve’s last point means the next K runs out of memory. With reflow’s NFE budget equalised, NDP and FNP collapse onto MFNP’s latency at K≤1,024 and diverge only once attention’s K2 cost dominates; FNP exhausts memory at K=16,384 and NDP at K=65,536 .
Model
Boundary MSE ↓
Interior MSE ↓
Ratio [95% CI]
Pearson r
Spearman ρ
2D Gaussian – Matérn- \nicefrac32 ( K=256 )
FNP
0.0189
0.0063
3.00[2.40,3.77]
0.070∗∗∗
0.123∗∗∗
MFNP †
0.0267
0.0077
3.48[2.74,4.30]
0.064∗∗∗
0.130∗∗∗
NOAA Utah ( K=222 )
FNP
0.0308
0.0200
1.54[1.18,1.99]
0.028∗∗∗
0.075∗∗∗
MFNP †
0.0260
0.0185
1.40[1.07,1.82]
0.012
0.059∗∗∗
Appendix
Table 14: Boundary-adjacency diagnostic. Boundary and interior MSE are the top and bottom deciles of query targets ranked by isolation score (distance to the two Hilbert-sort neighbours). NOAA values are on the quantile-normalised target scale, so are not comparable to the (°C) 2 MSE values in Table 2 ; the 2D Matérn- \nicefrac32 values are on the native model output scale. Ratios are dimensionless; 95% CIs are from 2,000 bootstrap resamples. Correlations are per-point squared error against isolation; ∗p<0.05 , ∗∗p<0.01 , ∗∗∗p<0.001 . † our method.
Department of Statistics, The Ohio State University, Columbus OH 43210, USA · Department of Statistics, University of Wisconsin–Madison, Madison WI 53706, USA