Manuscript Offprint
arXiv:2610.37598GAS-PFN: Graph-Aware Spatiotemporal Prior-Data Fitted Networks for Zero-Shot Traffic Forecasting
Abstract
Traffic forecasting requires modeling both complex temporal dynamics and the spatial dependencies imposed by road topology. Supervised graph-based models achieve strong performance, but are typically trained for a particular dataset and sensor graph, making deployment to new or evolving networks costly. Prior-Data Fitted Networks (PFNs) offer a zero-shot alternative by learning in-context inference from synthetic task priors, which provide an explicit mechanism for encoding domain-specific assumptions. Existing forecasting PFNs, however, do not explicitly represent the graph-structured dependencies governing traffic dynamics.
To combine graph-aware traffic modeling with zero-shot adaptation, we introduce the Graph-Aware Spatiotemporal Prior-Data Fitted Network (GAS-PFN). GAS-PFN incorporates sampled road topology into its synthetic task prior through random-walk diffusion, teaching the model to learn graph-coupled dynamics during pretraining. Its co-designed inference architecture uses two mask-conditioned passes through a shared Transformer backbone to separately model sensor-specific temporal dynamics and spatiotemporal interactions among neighboring sensors before integrating their representations for prediction. This design enables GAS-PFN to use target-network structure and context without parameter updates.
Across six benchmarks at the 90-minute horizon, GAS-PFN reduces MSE by 34.0% on average relative to TimePFN, its closest PFN-based predecessor. It also reduces MSE by 27.7% on average relative to four recent industry-developed general-purpose zero-shot forecasters. In this comparison, all models receive 90 minutes of contiguous recent history, and any additional context is drawn from each dataset's chronological training split. These results indicate that aligning PFN priors and inference architectures with graph structure improves in-context learning for zero-shot traffic forecasting.
Introduction
Traffic conditions evolve over a road network, and congestion on one road can affect connected roads. Road topology shapes these interactions, but the patterns that actually emerge also depend on changing factors such as travel demand, incidents, weather, and human behavior, making them difficult to capture with a fully specified mechanistic model. Deep neural models provide a flexible means of learning these nonlinear spatiotemporal relationships directly from data, and graph neural networks and Transformer-based models have consequently achieved strong forecasting performance (Li et al. 2018; Wu et al. 2020; Jiang et al. 2023; Liu et al. 2023).
Despite their strong performance, these models are typically trained for a particular dataset and sensor graph, requiring substantial data and computation when deployed to a new road network or adapted to changes in an existing one. Prior work reports that training a forecasting model on approximately one third of California's highway network required nearly eight GPU-days (Mallick et al. 2020; Prabowo et al. 2024). Traffic-sensing deployments are also not static: sensors may be added, removed, or relocated, while sensor failures and communication interruptions can break the recent observation history even when older measurements remain available (Zuo et al. 2023). These conditions motivate forecasting methods that can adapt to a target network without repeated parameter optimization or reliance on a long uninterrupted recent history.
Recent time-series foundation models, including Chronos-2, TimesFM-2.5, Moirai-2, and Lag-Llama, address the need for forecasting without task-specific retraining and have demonstrated strong zero-shot performance across heterogeneous datasets (Ansari et al. 2025; Das et al. 2024; Liu et al. 2025; Rasul et al. 2024). However, these models are primarily designed as general-purpose sequence forecasters and do not explicitly incorporate the relational structure of road networks. This leaves a conceptual gap between transferable zero-shot forecasting and graph-aware traffic modeling.
Prior-Data Fitted Networks (PFNs) offer one emerging route toward bridging this gap by framing zero-shot prediction as in-context inference (Müller et al. 2022; Hollmann et al. 2023). During pretraining, PFNs learn from synthetic tasks sampled from a prior to approximate Bayesian posterior predictive inference from context examples and a query. Their synthetic task priors provide an explicit mechanism for representing domain-specific assumptions, while inference-time conditioning enables adaptation without gradient-based optimization (i.e., training or fine-tuning). Recent work has extended this framework to time-series forecasting (Taga, Ildiz, and Oymak 2025); however, existing time-series PFNs do not explicitly incorporate known graph topology into either their synthetic task priors or inference architectures.
Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.
A) Spatiotemporal Prior

B) Mixed Context Memory
C) Token Embedder
D) Dual Mask-Conditioned Backbone

E) Gated Fusion

Figure 1: High-level overview of GAS-PFN. The method constructs graph-structured prior tasks, assembles mixed-context memory, embeds context and query patches as tokens, applies dual mask-conditioned backbone inference, and fuses the branch outputs to produce zero-shot forecasts.
Building on this idea, this work introduces the Graph-Aware Spatiotemporal Prior-Data Fitted Network (GAS-PFN), which proposes PFN-style forecasting for graph-structured traffic signals. GAS-PFN is pretrained on synthetic tasks in which interactions among channels are generated by diffusion over sampled road-network topologies. This exposes the model to spatially coupled temporal processes rather than treating each series as independent or only implicitly related. At inference time, GAS-PFN performs two differently masked passes through a shared Transformer backbone. A sensor-local pass restricts interactions to observations from the same sensor, capturing its intrinsic temporal dynamics. A neighborhood-aware pass allows interactions across both time and neighboring sensors, capturing graph-conditioned spatiotemporal dependencies. The resulting representations are then fused for prediction. By conditioning on both recent measurements and historical examples from the target network, GAS-PFN adapts through in-context learning rather than task-specific parameter updates.
Evaluation across six traffic forecasting benchmarks and three prediction horizons shows that GAS-PFN achieves the strongest overall zero-shot performance under the limited-recent-history protocol. At the 90-minute horizon, it obtains the best MAE and MSE on five of six datasets and achieves lower average MSE than both TimePFN and four recent general-purpose zero-shot forecasters. GAS-PFN also outperforms supervised SCPT when target-road training coverage is limited. These results indicate that encoding graph structure in both the synthetic prior and inference architecture improves zero-shot forecasting under limited recent context.
Contributions. The main contributions are as follows:
• A graph-aware synthetic task prior that uses road-network topology and random-walk diffusion to expose a PFN to graph-coupled spatiotemporal dynamics during pretraining.
• A co-designed inference architecture that separately models sensor-specific temporal dynamics and spatiotemporal interactions among neighboring sensors, enabling the model to exploit its graph-aware prior during zero-shot prediction.
• A comprehensive evaluation across six traffic forecasting benchmarks and three prediction horizons, in which GAS-PFN achieves the best result in 27 of 36 MAE/MSE comparisons and outperforms supervised SCPT when target-road training coverage is limited.
Zero-Shot Time-Series Forecasting
Recent time-series foundation models have demonstrated strong zero-shot forecasting performance across heterogeneous datasets. Chronos-2 uses group attention to support univariate, multivariate, and covariate-informed forecasting within a single pretrained model (Ansari et al. 2025). TimesFM 2.5 builds on a patch-based decoder-only Transformer trained for zero-shot forecasting across domains, horizons, and temporal resolutions (Das et al. 2024). Moirai 2.0 adopts a decoder-only architecture with quantile forecasting and multi-token prediction to improve both forecasting accuracy and inference efficiency (Liu et al. 2025). These models support general-purpose zero-shot forecasting but do not explicitly incorporate known relational structure between channels, such as road-network topology. GAS-PFN instead investigates how such domain structure can be encoded directly into zero-shot pretraining and inference.
Traffic Forecasting and Cross-Network Generalization
Traffic forecasting methods commonly exploit spatial dependencies among sensors through graph-based architectures. DCRNN models traffic propagation as diffusion over a directed graph and combines graph convolution with recurrent temporal modeling (Li et al. 2018). Graph WaveNet introduces adaptive adjacency learning and dilated temporal convolutions to capture spatial relationships and long-range temporal dependencies (Wu et al. 2019). More recent Transformer-based methods include PDFformer, which incorporates propagation-delay-aware spatial attention (Jiang
A) Sample Temporal Base Process:

B) Sample Spatial Graph Prior:
-
Sample city
-
Sample root node
Spatial Graph Prior
- Extract subgraph
C) Graph-Structured Spatiotemporal Process:
-
Replicate Temporal Base across all nodes
-
Node-wise gains (color intensity)
-
Random-Walk Graph Diffusion
-
Graph-correlated noise (black outlines)



Figure 2: Overview of the proposed prior data generation process. (A) A shared temporal base is constructed by composing trend, seasonality, and noise components. (B) A spatial graph prior is sampled from a real-world road network by selecting a root node and extracting a connected subgraph. (C) The temporal base is lifted to all nodes, modulated by node-wise gains, propagated via a random-walk diffusion operator, and perturbed with graph-correlated noise to yield the final spatiotemporal process.
et al. 2023), and STAEformer, which obtains strong performance through learned spatiotemporal embeddings (Liu et al. 2023).
These models achieve strong supervised performance but are generally optimized for a particular dataset and sensor graph. Graph-dependent components such as node embeddings, adjacency representations, and attention masks may therefore be tied to the network observed during training, limiting direct application to altered node sets or unseen road networks. Transfer-oriented methods address this limitation by learning representations intended to generalize beyond the roads observed during training. Mallick et al. transfer a graph neural traffic forecaster between highway networks (Mallick et al. 2020), while SCPT contrastively pretrains a spatial encoder to infer representations for roads excluded from supervised training (Prabowo et al. 2024). These methods learn representations that generalize to new roads, whereas GAS-PFN adapts at inference time through context examples from the target graph.
Prior-Data Fitted Networks
Prior-Data Fitted Networks (PFNs) learn to approximate Bayesian posterior predictive inference by training on synthetic tasks sampled from a predefined prior (Müller et al. 2022; Hollmann et al. 2023). At inference time, predictions are produced by conditioning on observed context examples rather than updating model parameters. ForecastPFN applied this approach to zero-shot forecasting using a fully synthetic time-series distribution (Dooley et al. 2023). LaT-PFN combines PFN-based inference with a joint-embedding predictive architecture, performing in-context learning within a prediction-oriented latent space (Verdenius, Zerio, and Wang 2024). TimePFN extends PFN forecasting to multivariate series through synthetic Gaussian-process tasks and an architecture that models temporal and cross-channel dependencies (Taga, Ildiz, and Oymak 2025), making it the closest PFN-based predecessor to GAS-PFN.
A distinguishing feature of PFNs is that the synthetic task prior constitutes an explicit modeling choice through which domain-specific assumptions can be introduced. Existing forecasting PFNs, however, do not encode graph topology within their synthetic task priors and inference architectures. GAS-PFN addresses this gap by co-designing graph-structured synthetic tasks and graph-aware in-context inference for traffic forecasting.
Method
GAS-PFN combines a graph-aware synthetic task prior with an inference architecture designed to exploit graph-structured context. Figure 1 summarizes the full pipeline. We first formalize the zero-shot PFN setting, then introduce a graph-aware spatiotemporal prior that exposes the model to traffic-like temporal dynamics and graph-coupled interactions, followed by an architecture designed to learn these patterns during pretraining and infer them from context at test time.
Problem Setting and PFN Inference
Consider forecasting over a graph , where each node corresponds to a sensor and denotes the graph signal observed at time . For a node and temporal endpoint , we define a lookback patch and prediction target as
(1)
where L and H are the lookback and forecast lengths.
For each node , let denote the set of context-window endpoints selected for that node. The context set is
At inference time, the model conditions on and a query lookback patch whose target is unobserved. The resulting prediction is
where remains fixed when the model is applied to a target dataset. In this work, zero-shot denotes inference without target-dataset parameter updates; context examples may be drawn from the target dataset's chronological training split.
Following the PFN framework (Müller et al. 2022), is pretrained on synthetic tasks sampled from a prior and learns to approximate the posterior predictive induced by through context rather than task-specific parameter updates. The node-local patch representation keeps token dimensionality independent of , allowing the same model to process sensor graphs of different sizes.
Spatiotemporal Prior
The central prior-design principle is to expose the PFN to temporal processes whose channels interact over realistic road-network structures. Each synthetic task combines a compositional temporal process with a connected graph sampled from a bank of real road networks, as illustrated in figure 2.
The univariate temporal generator adapts the compositional prior used by LaT-PFN, itself derived from ForecastPFN (Verdenius, Zerio, and Wang 2024; Dooley et al. 2023). We modify its composition rule, parameter distributions, and exponential-trend construction, and extend it with road-network sampling and graph-structured spatial perturbations to produce multivariate traffic processes.
A univariate temporal base is formed by composing trend, seasonal, and stochastic components sampled from

Figure 3: Dual mask-conditioned backbone. A shared Transformer backbone evaluates under separate multichannel and self-channel attention masks. Each branch shows the mask and attention biases for the selected query token; gray blocks denote masked keys. Only the resulting query-token representations, and , are retained.
broadly defined distributions. The sampled graph G is obtained by selecting a road network, choosing a root node, and extracting a connected subgraph. Detailed component distributions and graph-sampling procedures are provided in Appendix A.
Let A denote the adjacency matrix of G, and define the random-walk transition matrix
where D is the corresponding degree matrix. We use the lazy random-walk diffusion operator
which locally smooths a graph signal while retaining part of its original value (Shuman et al. 2013; Ortega et al. 2018). This retains an explicit identity contribution while applying one step of neighborhood averaging, limiting potential oversmoothing.
The temporal base is replicated across nodes as
Node-specific gains g introduce local variation,
(7) after which graph propagation produces
We additionally sample Gaussian noise and apply a graph-filtering operator:
where the noise-filtering operator is defined in Appendix A. The final graph signal is
where controls the overall strength of spatial variation and controls graph propagation.
Each sampled task therefore combines shared temporal behavior with node-specific and graph-correlated deviations. By biasing the synthetic task distribution toward graph-coupled functions, this construction is intended to reduce prior mismatch when target traffic dynamics exhibit local road-network dependence, encouraging the PFN to infer both temporal dynamics and spatial interactions from context.
Graph-Aware ICL Architecture
Mixed-context memory and token embedding. For each node, GAS-PFN constructs a mixed-context memory from two equally sized sources of historical context: the K most recent windows from the dataset's chronological training split and K older anchor windows distributed across the remaining training split. Let and denote their respective window endpoints. The per-node context set is
Recent windows use common timestamps across sensors, whereas historical anchors are sampled across chronological strata independently for each node and need not be time-aligned. We use , yielding 32 historical support patches per node.
Let Q denote the set of query-window endpoints. The selected context patches and query windows are embedded as
(12)
where and are learned affine projections. Each token retains its node index and window-end timestamp for attention masking.
Let denote the embeddings of all selected context tokens and the embeddings of the query tokens. The Transformer input is
Dual mask-conditioned backbone. GAS-PFN evaluates the same Transformer backbone under two attention masks:
(14)
The two passes share backbone parameters but impose different structural constraints, as shown in figure 3.
The self mask restricts attention to causally valid tokens from the same sensor and disables query-query attention, thereby modeling sensor-local temporal dynamics. The multi-channel mask permits attention within a selected sensor neighborhood and, in the reported evaluation protocol, allows query-query interactions only among tokens at the same forecast time. Historical anchors retain their original window timestamps, preserving causal ordering even when anchors are not aligned across sensors.
For token pairs permitted by the corresponding mask, the pre-softmax attention logit for a given head and branch is
where when tokens and belong to the same sensor and 0 otherwise. Each head learns its own temporal-distance coefficient and self-channel bias . In the self pass, the self-channel term is constant across all visible keys and therefore cancels under the softmax; in the multi-channel pass, it distinguishes self-channel from neighboring-channel interactions.
Neighborhoods combine known graph connectivity with semantic similarity. Let denote the row-scaled task-local graph-score matrix and the cosine-similarity matrix computed from encoded, aggregated channel representations. We define
where balances the graph-connectivity and semantic-similarity terms. The selected channel neighborhoods are converted into token-level attention constraints for the multi-channel mask. Further details are provided in Appendix B.
Fusion and training objective. A learned gate combines the two query representations:
(17)
where is a shared output projection.
The same projection produces auxiliary predictions and from the individual branch representations.
Training minimizes
where the auxiliary losses keep both branches individually predictive and the entropy term discourages premature gate collapse. At inference time, only the fused prediction is returned.
| Dataset | Horizon | GAS-PFN | Chronos-2 | TimesFM-2.5 | Moirai-2 | Lag-Llama | TimePFN | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | MSE | ||
| METR-LA | 30 min | 3.97±0.05 | 68.31±1.92 | 3.68 | 70.62 | 3.80 | 72.30 | 4.23 | 83.92 | 4.86 | 86.23 | 4.86 | 69.41 |
| 60 min | 4.83±0.06 | 97.61±2.92 | 4.38 | 91.23 | 4.73 | 108.38 | 5.30 | 124.56 | 6.21 | 130.31 | 5.59 | 94.33 | |
| 90 min | 5.50±0.05 | 119.69±4.15 | 4.95 | 107.42 | 5.45 | 136.04 | 6.35 | 163.35 | 7.41 | 178.32 | 6.13 | 112.73 | |
| PEMS-BAY | 30 min | 1.73±0.01 | 14.85±0.09 | 1.61 | 12.90 | 1.65 | 15.01 | 1.74 | 15.53 | 2.60 | 45.83 | 2.41 | 22.35 |
| 60 min | 2.21±0.01 | 25.22±0.09 | 2.24 | 27.25 | 2.18 | 27.70 | 2.36 | 29.99 | 2.99 | 52.64 | 2.85 | 32.51 | |
| 90 min | 2.59±0.01 | 34.45±0.08 | 2.71 | 40.58 | 2.62 | 39.32 | 2.91 | 44.67 | 3.29 | 58.78 | 3.21 | 41.51 | |
| PEMS03 | 30 min | 17.57±0.49 | 749.58±29.82 | 17.74 | 747.80 | 19.52 | 894.14 | 19.64 | 913.24 | 20.23 | 918.27 | 34.50 | 2201.97 |
| 60 min | 21.51±0.75 | 1160.61±56.57 | 23.22 | 1320.70 | 25.26 | 1496.84 | 25.74 | 1646.29 | 27.25 | 1672.31 | 38.46 | 2788.31 | |
| 90 min | 25.97±1.10 | 1740.93±105.99 | 28.98 | 2080.14 | 31.61 | 2357.27 | 32.36 | 2666.41 | 34.66 | 2709.34 | 42.60 | 3417.89 | |
| PEMS04 | 30 min | 22.52±0.23 | 1243.43±10.90 | 24.24 | 1402.54 | 25.25 | 1586.96 | 25.90 | 1518.06 | 27.62 | 1698.79 | 43.19 | 3218.50 |
| 60 min | 27.16±0.34 | 1782.98±21.60 | 31.26 | 2300.66 | 31.77 | 2514.64 | 33.45 | 2523.53 | 38.54 | 3152.43 | 47.91 | 3987.86 | |
| 90 min | 32.32±0.43 | 2517.88±44.66 | 37.92 | 3370.61 | 38.58 | 3708.20 | 41.73 | 3966.89 | 50.72 | 5371.03 | 52.92 | 4841.89 | |
| PEMS07 | 30 min | 25.15±0.44 | 1493.64±27.66 | 25.95 | 1522.69 | 26.25 | 1612.32 | 28.74 | 1858.14 | 29.20 | 1911.20 | 46.42 | 4035.22 |
| 60 min | 30.81±0.61 | 2223.93±45.83 | 32.76 | 2366.80 | 33.96 | 2627.48 | 38.36 | 3342.03 | 39.99 | 3328.94 | 52.46 | 5170.30 | |
| 90 min | 37.15±0.80 | 3239.16±77.26 | 40.01 | 3558.66 | 42.17 | 4053.21 | 48.91 | 5490.79 | 50.77 | 5272.50 | 58.75 | 6523.84 | |
| PEMS08 | 30 min | 17.78±0.15 | 767.87±14.13 | 19.10 | 834.07 | 18.50 | 816.30 | 20.44 | 961.84 | 22.67 | 1121.92 | 26.94 | 1488.01 |
| 60 min | 21.35±0.30 | 1112.37±33.62 | 24.15 | 1305.08 | 23.54 | 1313.15 | 26.77 | 1666.28 | 32.68 | 2297.85 | 31.22 | 2031.89 | |
| 90 min | 25.21±0.38 | 1548.52±58.23 | 29.44 | 1922.89 | 28.60 | 1924.25 | 33.96 | 2695.22 | 43.51 | 4055.36 | 36.54 | 2864.76 | |
| Overall metric wins | 27 | 8 | 1 | 0 | 0 | 0 | |||||||
Table 1: Zero-shot forecasting performance across datasets and prediction horizons. Lower values indicate better performance. Best results are shown in bold and second-best results are underlined. GAS-PFN reports mean standard deviation over three independently trained checkpoints; each baseline uses a single released pretrained checkpoint.
Results
Datasets and metrics. We evaluate GAS-PFN on six widely used traffic forecasting benchmarks, all sampled at five-minute intervals. METR-LA contains traffic-speed measurements from 207 highway sensors in Los Angeles County collected from March through June 2012, while PEMS-BAY contains speed measurements from 325 sensors in the San Francisco Bay Area collected from January through May 2017 (Li et al. 2018). PEMS03, PEMS04, PEMS07, and PEMS08 contain traffic-flow measurements from 358, 307, 883, and 170 sensors, respectively, drawn from the corresponding California Performance Measurement System districts (Chen et al. 2001). Their collection periods span September–November 2018, January–February 2018, May–August 2017, and July–August 2016, respectively (Guo et al. 2019). These benchmarks provide a standard basis for comparison while covering both speed and flow prediction across road networks of different sizes and geographic settings. We use chronological 70%/10%/20% train, validation, and test splits and report MAE and MSE cumulatively at horizons of 6, 12, and 18 steps, corresponding to 30, 60, and 90 minutes; MAE summarizes typical absolute error, whereas MSE places greater weight on large deviations. Following standard traffic-forecasting practice, zero-valued targets are masked when computing the training loss and evaluation metrics, as zero commonly serves as the missing-value marker in these benchmarks (Zuo et al. 2023; Li et al. 2018). More information on datasets and experimental setups is provided in Appendix C.
Zero-shot Benchmarks. Table 1 compares GAS-PFN with PFN-based and general-purpose zero-shot forecasters across six datasets and three prediction horizons. Each baseline is evaluated under two prespecified context regimes. The recent-only regime uses the same 18 most recent observations as GAS-PFN. The history-augmented regime uses the context length specified by the baseline's default configuration, with the final 18 observations drawn from the recent window and any earlier inputs drawn from the dataset's chronological training split. This gives each baseline access to the same recent history and training-split historical data pool as GAS-PFN without imposing a common context length. Table 1 reports, for each baseline and dataset, the regime with lower cumulative 18-step MAE; complete results for both regimes are provided in Appendix D. GAS-PFN uses a fixed mixed-context configuration and the same hyperparameters across all datasets. For PEMS07, the largest sensor network, GAS-PFN uses memory-bounded channel-cohort inference; details are provided in Appendix C.
GAS-PFN achieves the best result in 27 of 36 dataset–horizon–metric comparisons, including the lowest MSE in 14 of 18 settings. At the 90-minute horizon, it obtains the best MAE and MSE on five of six datasets. Its MSE is 34.0% lower than TimePFN on average across the six datasets and 27.7% lower on average across comparisons with four recent industry-developed general-purpose zero-shot forecasters. Additional experiments in Appendix D show that

Figure 4: MAE as a function of the per-source context budget K at the 90-minute horizon. Each setting uses K recent and K historical support patches per node. Values are computed using a single fixed GAS-PFN checkpoint.
GAS-PFN's advantage over TimePFN persists even when TimePFN is fine-tuned on target-domain data while GAS-PFN receives no parameter updates. GAS-PFN outperforms fine-tuned TimePFN across every dataset and horizon under a matched 32-patch historical-data budget and remains stronger in a majority of settings when TimePFN is given 64 patches for fine-tuning, twice GAS-PFN's budget. In addition, ablations in Appendix E provide consistent evidence that the dual-branch architecture, mixed-context support, and hybrid neighborhood routing each contribute to inference-time forecasting performance.
Context budget analysis. Figure 4 varies the number of recent and historical support patches per node. At the 90-minute horizon, increasing the budget from no context to recent and historical patches reduces MAE by 25.4% on average. The improvement is particularly large on PEMS03, PEMS04, PEMS07, and PEMS08, where MAE decreases by 28.5–34.9%, but is smaller on METR-LA and PEMS-BAY, where it decreases by 12.9–13.2%. Beyond , gains become smaller and dataset-dependent, suggesting diminishing returns beyond 32 total support patches per node. The smaller context gains on METR-LA and PEMS-BAY coincide with less consistent advantages over the zero-shot baselines in Table 1.
Cross-road generalization. Figure 5 compares GAS-PFN with SCPT at the 12-step (60-minute) horizon across varying supervised road budgets. This comparison allows each model to operate under its own evaluation paradigm, and favors SCPT in terms of target-specific training: SCPT is trained using the full historical record from the indicated fraction of roads, while forecasts on held-out roads use its maximum lookback of 60 minutes; GAS-PFN performs zero-shot inference without dataset-specific parameter updates. Despite SCPT's access to target-specific training, GAS-PFN

Figure 5: MAE of GAS-PFN and SCPT at the 60-minute horizon as the fraction of roads available for SCPT training varies. Values average three runs with matched road-split and checkpoint seeds.
achieves lower MAE and MSE on all six datasets when SCPT is trained on only 10% of the roads, reducing MSE by 34.7% on average. GAS-PFN remains better on five of six datasets at both the 20% and 30% budgets, with average MSE reductions of 20.0% and 11.1%, respectively. On PEMS08, GAS-PFN matches or outperforms SCPT across all road-training fractions. SCPT generally becomes stronger as its supervised road coverage increases, showing that GAS-PFN is particularly effective when target-network training coverage is limited or unavailable. Complete MAE and MSE results are provided in Appendix D.
Conclusion
We introduced GAS-PFN, a graph-aware Prior-Data Fitted Network for zero-shot traffic forecasting. GAS-PFN codesigns graph-structured synthetic pretraining tasks with mixed-context memory and dual mask-conditioned inference, enabling it to adapt to a target road network without parameter updates and with only 90 minutes of contiguous recent history. Across six traffic benchmarks, GAS-PFN achieves the strongest overall zero-shot performance. It also remains competitive with supervised cross-road forecasting under limited target-road training. These results suggest utility in two deployment settings: forecasting on newly added roads when supervised coverage is limited, and forecasting on existing networks when recent observations are interrupted but older measurements remain available. Conceptually, these results support synthetic task priors as a practical mechanism for introducing domain-specific structure into PFNs, suggesting applications in other structured prediction domains. Disclosure: Generative AI tools assisted with language editing, LATEX formatting, and manuscript review.
References
Ansari, A. F.; Shchur, O.; Küken, J.; Auer, A.; Han, B.; Mercado, P.; Rangapuram, S. S.; Shen, H.; Stella, L.; Zhang, X.; Goswami, M.; Kapoor, S.; Maddix, D. C.; Guerron, P.; Hu, T.; Yin, J.; Erickson, N.; Desai, P. M.; Wang, H.; Rangwala, H.; Karypis, G.; Wang, Y.; and Bohlke-Schneider, M. 2025. Chronos-2: From Univariate to Universal Forecasting. arXiv preprint arXiv:2510.15821.
Chen, C.; Petty, K.; Skabardonis, A.; Varaiya, P.; and Jia, Z. 2001. Freeway Performance Measurement System: Mining Loop Detector Data. Transportation Research Record, 1748(1): 96–102.
Das, A.; Kong, W.; Sen, R.; and Zhou, Y. 2024. A Decoder-Only Foundation Model for Time-Series Forecasting. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, 10148–10167. PMLR.
Dooley, S.; Khurana, G. S.; Mohapatra, C.; Naidu, S. V.; and White, C. 2023. ForecastPFN: Synthetically-Trained Zero-Shot Forecasting. In Advances in Neural Information Processing Systems, volume 36.
Guo, S.; Lin, Y.; Feng, N.; Song, C.; and Wan, H. 2019. Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, 922–929.
Hollmann, N.; Müller, S.; Eggensperger, K.; and Hutter, F. 2023. TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second. In International Conference on Learning Representations.
Jiang, J.; Han, C.; Zhao, W. X.; and Wang, J. 2023. PDFformer: Propagation Delay-Aware Dynamic Long-Range Transformer for Traffic Flow Prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, 4365–4373.
Li, Y.; Yu, R.; Shahabi, C.; and Liu, Y. 2018. Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. In International Conference on Learning Representations.
Liu, C.; Aksu, T.; Liu, J.; Liu, X.; Yan, H.; Pham, Q.; Sahoo, D.; Xiong, C.; Savarese, S.; and Li, J. 2025. Moirai 2.0: When Less Is More for Time Series Forecasting. arXiv preprint arXiv:2511.11698.
Liu, H.; Dong, Z.; Jiang, R.; Deng, J.; Deng, J.; Chen, Q.; and Song, X. 2023. STAEformer: Spatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traffic Forecasting. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management, 4125–4129.
Mallick, T.; Balaprakash, P.; Rask, E.; and Macfarlane, J. 2020. Transfer Learning with Graph Neural Networks for Short-Term Highway Traffic Forecasting. arXiv preprint arXiv:2004.08038.
Müller, S.; Hollmann, N.; Pineda Arango, S.; Grabocka, J.; and Hutter, F. 2022. Transformers Can Do Bayesian Inference. In International Conference on Learning Representations.
Ortega, A.; Frossard, P.; Kovačević, J.; Moura, J. M. F.; and Vandergheynst, P. 2018. Graph Signal Processing: Overview, Challenges, and Applications. Proceedings of the IEEE, 106(5): 808–828.
Prabowo, A.; Xue, H.; Shao, W.; Koniusz, P.; and Salim, F. D. 2024. Traffic Forecasting on New Roads Using Spatial Contrastive Pre-Training (SCPT). Data Mining and Knowledge Discovery, 38: 913–937.
Rasul, K.; Ashok, A.; Williams, A. R.; Ghonia, H.; Bhagwatkar, R.; Khorasani, A.; Darvishi Bayazi, M. J.; Adamopoulos, G.; Riachi, R.; Hassen, N.; Biloš, M.; Garg, S.; Schneider, A.; Chapados, N.; Drouin, A.; Zantedeschi, V.; Nevmyvaka, Y.; and Rish, I. 2024. Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting. arXiv preprint arXiv:2310.08278.
Shuman, D. I.; Narang, S. K.; Frossard, P.; Ortega, A.; and Vandergheynst, P. 2013. The Emerging Field of Signal Processing on Graphs: Extending High-Dimensional Data Analysis to Networks and Other Irregular Domains. IEEE Signal Processing Magazine, 30(3): 83–98.
Taga, E. O.; Ildiz, M. E.; and Oymak, S. 2025. TimePFN: Effective Multivariate Time Series Forecasting with Synthetic Data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, 20761–20769.
Verdenius, S.; Zerio, A.; and Wang, R. L. M. 2024. LaT-PFN: A Joint Embedding Predictive Architecture for In-Context Time-Series Forecasting. arXiv preprint arXiv:2405.10093.
Wu, Z.; Pan, S.; Long, G.; Jiang, J.; Chang, X.; and Zhang, C. 2020. Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 753–763.
Wu, Z.; Pan, S.; Long, G.; Jiang, J.; and Zhang, C. 2019. Graph WaveNet for Deep Spatial-Temporal Graph Modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 1907–1913.
Zuo, J.; Zeitouni, K.; Taher, Y.; and Garcia-Rodriguez, S. 2023. Graph Convolutional Networks for Traffic Forecasting with Missing Values. Data Mining and Knowledge Discovery, 37: 913–947.
Supplementary Material for “GAS-PFN: Graph-Aware Spatiotemporal Prior-Data Fitted Networks for Zero-Shot Traffic Forecasting”
Anonymous submission
A Additional Synthetic Prior Details
The synthetic prior used for pretraining was generated offline and stored as a frozen bank. Construction proceeded in two stages. First, a bank of univariate temporal base series was generated from compositional trend, seasonal, and stochastic components. Each base series was then lifted to a sampled road subgraph and modified using node-specific gains, random-walk diffusion, and graph-correlated process noise. The resulting bank contains one million multivariate series of length .
Temporal Base Generator
The univariate temporal component builds on the compositional synthetic priors introduced by ForecastPFN and subsequently adapted by LaT-PFN (Dooley et al. 2023; Verdenius, Zerio, and Wang 2024). GAS-PFN modifies this temporal base and extends it with road-network sampling and graph-structured spatial perturbations to produce multivariate traffic processes. The precise modifications and parameter distributions are documented below.
Let index a univariate series and index its stored time points. Several hyperparameters are shared by series generated together in a vectorized generator call. We denote by the index set of series produced in one such call and state explicitly when a sampled quantity is shared within . Unless noted otherwise, the underlying random draws are independent.
Synthetic time coordinate. A temporal resolution is sampled once per generator call as
The corresponding coordinate span and time coordinate are
The coordinate is measured in nominal days for the purpose of constructing weekly, monthly, and annual seasonal phases. It does not represent a real calendar timestamp.
This is an anonymized submission for review purposes only. Distribution, citation, or public sharing of this manuscript is strictly prohibited. Copyright and publication details will appear in the final version if accepted.
Trend component. For each series , the raw linear slope is sampled as
Here, and are independent. Slopes generated in the same call are aligned to the sign of their median:
The linear offset is sampled independently for each series:
For the exponential component, let
The raw exponential base is
As with the linear slope, deviations from one are aligned to a common sign within the generator call:
The exponential offset and lower-bounded base are
Combining the linear and exponential components gives the total trend factor
(10)
The lower bound in Eq. (9) applies only to the base of the exponential component; the resulting trend and final temporal series are not clipped.
Seasonal component. Let
index the annual, monthly, and weekly seasonal families. For a cycle length and bin width , define
and
The seasonal phases are
For each series, the corresponding seasonal amplitudes are
(15)
where
with independent draws across series and seasonal families. Because Gaussian perturbations are added after the Beta-scaled draws, the displayed endpoint values are not strict support bounds.
The number of harmonics for each seasonal family is sampled independently and uniformly:
Each is shared by the series in the same generator call. For series , family , and harmonic , raw sine and cosine coefficients are sampled independently as
The coefficients for each seasonal family are normalized jointly over the series and harmonic dimensions of the generator call. Define
The normalized coefficients are
The Fourier component for seasonal family j is
The complete seasonal factor is
No clipping or positivity constraint is imposed on the individual seasonal factors or their product.
Stochastic component and composition. The Weibull shape parameter is sampled independently for each series:
Once per generator call, a noise-amplitude interval is selected as
Conditional on this shared interval, the series-level noise amplitude is sampled independently as
Let
denote a unit-scale Weibull realization sampled independently over series and time. Its median-rescaled form is
for which median . The resulting multiplicative stochastic factor is
An overall amplitude is sampled independently for each series:
The composition branch and additive-branch trend weight are sampled once per generator call:
where selects additive composition and selects multiplicative composition.
The stored univariate temporal base is
Equation (31) makes the final trend multiplication explicit: after the additive or multiplicative composition is formed, it is multiplied by and . The multiplicative branch therefore contains . No normalization, standardization, clipping, discretization, zero inflation, non-negativity transformation, or acceptance–rejection step is applied to the resulting temporal base series.
Road-Graph Bank and Subgraph Sampling
Graph-bank construction procedure. The road-graph bank was constructed from OpenStreetMap drive networks obtained through OSMnx. It contains networks for 20 U.S. metropolitan areas: Atlanta, Austin, Boston, Chicago, Dallas, Denver, Houston, Los Angeles, Miami, Minneapolis, New York, Philadelphia, Phoenix, Portland, Sacramento, San Diego, San Francisco, San Jose, Seattle, and Washington, DC.
For each metropolitan area, the road topology was simplified and its largest weakly connected component was retained. Networks containing more than 512 nodes were reduced to 512 nodes by breadth-first expansion from a maximum-degree node in an undirected view of the graph.
The OpenStreetMap data accessed through OSMnx are used only to define road connectivity and direction; no traffic measurements or spatiotemporal observations from the benchmark datasets enter synthetic-prior generation. For a sampled graph with N nodes, let denote its directed adjacency matrix. For nodes and ,
where is the indicator function and denotes a directed road edge. Parallel edges between the same ordered pair are collapsed to one binary entry. The corresponding undirected adjacency is
where the indicator is applied elementwise. Road length, geographic distance, speed, road class, geometry, coordinates, and other edge attributes are not used as adjacency or diffusion weights.
Subgraph-sampling procedure. The multivariate bank is divided into 50 shards. Target subgraph sizes cycle through 24, 36, 48, and 60 nodes across successive shards. For each shard, one eligible metropolitan network is selected uniformly. A connected component large enough to contain the target number of nodes is selected, a root node is sampled within that component, and a connected subgraph of the target size is extracted by breadth-first expansion with randomized neighbor order. The 50 shards use seeds 42–91 for network and subgraph sampling. Metropolitan networks are sampled independently across shards, so repeated selections are allowed.
Realized graph bank. One sampled subgraph is fixed for each shard and shared by all 20,000 multivariate series in that shard. The frozen bank used in the reported experiments therefore contains 50 fixed graph configurations: 13 with 24 nodes, 13 with 36 nodes, 12 with 48 nodes, and 12 with 60 nodes.
Graph-Structured Multivariate Process
Fix a temporal base series generated by Eq. (31) and a sampled graph , where and are its node and edge sets and . We omit the temporal-series index in the remainder of this section.
For , where and denote the undirected and directed graphs, respectively, define
Here, is the identity matrix, is the -dimensional all-ones vector, and denotes the -dimensional zero vector. The sampled subgraphs used in the reported frozen bank contained no diagonal adjacency entries before was added, so each node receives one explicit self-loop.
Both and are row-stochastic random-walk matrices. Under the directed convention in Eq. (32), row of averages node with its outgoing road neighbors. For a graph signal , define the one-step lazy random-walk operator
The graph-diffusion operator P used in the main-paper overview is the undirected operator used here.
The temporal base is replicated across graph nodes as
Node-specific gains are sampled once per multivariate series and remain fixed over time:
where denotes elementwise multiplication and .
The deterministic graph-propagated signal is
Equivalently,
Thus, deterministic propagation of the temporal signal uses only the undirected road topology. The remaining weight is an identity contribution, not a directed-transport term.
For the process-noise component, a Gaussian vector is sampled independently at each time and independently of the node gains:
The same realization is filtered through both graph operators. Following the notation in the main paper, we absorb the process-noise scale into :
(41)
The final multivariate signal is
(42)
For reference, the complete process-noise contribution after applying the outer scale is
The directed adjacency enters through the graph-correlated process-noise component, whereas deterministic propagation uses the undirected road topology.
B Additional Method Details
This section provides additional details on pretraining-task sampling, context construction, tokenization, neighborhood routing, attention masking, and the training objective. The synthetic spatiotemporal prior is described separately in Appendix A.
Pretraining Task Construction
Each pretraining task begins with one multivariate realization and its associated graph , where and . The lookback and forecast lengths are fixed to
Temporal partition. Let
Eligible context and query endpoints are
and
Every context target therefore ends at or before the temporal split, while every query lookback begins at or after it.
Context and query sampling. The number of raw context patches is sampled as
and the number of query patches is
For each context occurrence , an endpoint is sampled uniformly from and a node is sampled uniformly from V. Query occurrences are sampled analogously from and V. Sampling is performed with replacement.
For each node v, let
denote its raw context-endpoint collection, and let
denote its query-endpoint collection. These collections are treated as multisets during pretraining because duplicate node–endpoint draws are possible. A task need not contain every node in the stored graph. The task-local graph is restricted to the distinct nodes represented by at least one context or query occurrence.
For a node v and endpoint , the node-local lookback and target patches are
and
Overlapping windows and exact duplicate patches are permitted.
Task-level scaling. A shared normalizer is computed from all scalar values in the sampled context lookbacks. Let and denote their mean and median, respectively, and define
Every context and query lookback and target is transformed elementwise as
No missing-value or zero-target mask is synthesized during pretraining.
Tokenization and Sequence Assembly
Let and denote the normalized lookback and target patches under the active preprocessing pipeline. During pretraining, these are obtained using Eq. (55); benchmark preprocessing is described in Appendix C.
Context and query patches are embedded by separate affine projections:
and
where
, and is the H-dimensional zero vector. The two projections have independent parameters and contain no additional normalization, activation, or hidden layer.
Each token retains its node v, endpoint , and context/query role as separate metadata. These metadata are used to construct attention masks, temporal attention terms, and routed neighborhoods; they are not added to the token value. The architecture contains no node embedding, timestamp embedding, context/query type embedding, or absolute sequence-position embedding.
After context construction, let denote the retained context endpoints for node v. The Transformer input is assembled as
(59) where
All retained context occurrences precede all query occurrences. Context tokens are globally ordered by endpoint before the query block is appended. Chronology enters the model through endpoint metadata and attention constraints rather than absolute sequence position.
Context Construction
The reported checkpoints and target-dataset evaluations use different context-assembly procedures. During pretraining, a larger randomly sampled context is reduced using recent raw tokens, historical raw tokens, and attention-pooled memory tokens. During reported zero-shot evaluation, the pooling module is bypassed and each node receives recent and historical raw support patches.
Pretraining Context Construction Each pretraining task initially samples between 64 and 768 context patches. The context is capped at 16 tokens per represented sensor, comprising up to eight recent raw patches, four older raw patches, and four pooled summaries of the remaining older context. Sensors with fewer sampled patches contribute fewer tokens. The resulting retained context endpoints are denoted by .
At target-dataset inference, GAS-PFN instead uses the fixed raw-support context described below.
Target-Dataset Mixed Context Let
denote the endpoints of all stride-one windows from the target dataset's chronological training split, ordered by time. The recent endpoint set is
The same recent endpoints are used for every node, preserving temporal alignment across sensors.
Historical anchors are drawn from
To prefer windows with informative targets, define
where is the original-scale target associated with training window , selects forecast step , and denotes the indicator function. The preferred historical indices are
For each node v, eight anchors are first drawn across equal-count chronological strata of . If fewer than eight preferred indices are available, all available preferred indices are retained and the remaining positions are filled by stratified sampling from F. After removing the first group, eight additional anchors are drawn across equal-count chronological strata of the remaining historical indices.
Let
.
(66)
Anchor selection is performed independently for each node, so historical anchors need not align across sensors. Selected anchor indices are unique within a node, although their lookback or target windows may overlap.
The retained target-domain context endpoints are
Historical anchors retain their original training-window endpoints. The context is selected once and reused for all test queries and all three reported checkpoints. No attention-pooled memory tokens are supplied during target-dataset evaluation.
Graph-Representation Neighborhood Routing
The multi-channel branch uses a hard router that combines target-graph connectivity with content-derived representation similarity. Let denote the graph-score matrix restricted to . Before routing, its diagonal is set to one. The matrix is not otherwise symmetrized, binarized, or degree-normalized; its stored directionality and weights are retained.
Each graph-score row is independently min-max scaled:
Content-derived representations. A fixed, seed-initialized MLP is applied to the learned patch-token embeddings:
where LN denotes layer normalization, , and . Dropout is disabled during evaluation.
For each represented node, define the multiset of its context and query endpoints as
where denotes multiset union. Its encoded summary is
When multiple token occurrences share the same metadata, each occurrence contributes separately to the sum.
The summary is normalized as
and semantic similarity is
The hybrid routing score is
For each node v, the routed neighborhood is
Selection is performed independently by row and is not symmetrized. Self-membership is determined by the score rather than imposed separately.
The hard TopK indices are converted directly into a Boolean attention mask; the continuous routing scores are not passed to the Transformer. The routing path therefore provides no forecasting-loss gradient to or to its inputs, and remains at its seed-specific initialization. The patch-token embeddings supplied to the router are nevertheless learned through the ordinary forecasting path, so the resulting neighborhoods remain content-dependent and may change during pretraining. This construction avoids requiring a continuous relaxation or surrogate-gradient estimator for discrete neighborhood selection.
Neighborhoods are recomputed once for each branch forward from the current token sequence. The resulting Boolean neighborhood mask is shared across all Transformer layers.
Exact Attention Constraints
A token is identified by its node and endpoint pair together with its position in the token multiset. Duplicate occurrences sharing the same metadata obey the same attention conditions but remain separate sequence elements. Context and query endpoint collections are disjoint in the executed pretraining and evaluation protocols.
Let
indicate whether token may attend to key/value token in branch .
Self branch. The self-branch mask is
Both context and query tokens therefore attend only to causal context from the same node. Context-to-query and query-to-query attention are disabled, including query-token self-attention.
Multi-channel branch. For the reported target-dataset evaluation,
(78)
Context-to-query attention remains blocked. Query-to-query attention is permitted only among selected nodes at the same forecast origin. Here, “same forecast time” means equality of query-window endpoints; one query token predicts all H future steps.
During checkpoint pretraining, the query-key case instead uses
allowing a query token to attend to same-time and earlier query tokens inside its selected neighborhood. The self branch uses Eq. (77) during both pretraining and evaluation.
Attention logits. At a given Transformer layer and attention head h, let and denote the query and key vectors for tokens and . The layer index is omitted for clarity. With hidden dimension and eight heads, the head dimension is
The unmasked attention score is
(81)
The attention mask is then applied as
Each head learns its own temporal-distance coefficient , initialized to
The coefficients are shared across the two branches and all Transformer layers. The self-channel coefficient is learned separately for each head and branch and is shared across layers. In the self branch, the self-channel term is constant over every visible key and therefore cancels under the softmax. In the multi-channel branch, it distinguishes same-node from neighboring-node interactions.
The two branches otherwise use the same patch projections, Transformer backbone, query/key/value projections, layer normalizations, and feed-forward parameters.
Fusion and Pretraining Objective
For a query token with , let
denote the two retained backbone representations. A scalar gate is computed as
where , , and is the sigmoid function. There is one scalar gate per query token, broadcast across all latent features.
The fused representation is
Larger gate values therefore assign greater weight to the multi-channel representation.
A shared affine prediction head produces
(87)
Let
denote the multiset of query-token occurrences, so that . For , the forecast loss is
No missing-value or zero-target mask is applied during synthetic pretraining.
For numerical stability, define
The mean binary gate entropy is
(91)
The pretraining objective is
The auxiliary losses keep both branches individually predictive, while the negative entropy term discourages premature gate saturation. At inference time, only is returned.
C Additional Experimental Details Datasets, Splits, and Preprocessing
We evaluate on METR-LA and PEMS-BAY (Li et al. 2018) and on PEMS03, PEMS04, PEMS07, and PEMS08 (Chen et al. 2001; Guo et al. 2019). All series are treated as having nominal five-minute resolution. The executed preprocessing retains every loaded sensor and time point and performs no interpolation, resampling, deduplication, gap filling, or missing-value imputation. METR-LA and PEMS-BAY use all non-timestamp columns from their CSV files. For PEMS03, PEMS04, and PEMS08, preprocessing extracts feature index zero from the public time-by-sensor-by-feature tensors and stores the resulting time-by-sensor matrices. For PEMS07, the tensor representation is retained, and feature index zero is selected during evaluation. Calendar and timestamp features are not supplied to GAS-PFN.
Chronological splits. For a dataset containing time points, the split sizes are
and
The intervals are contiguous and ordered as training, validation, and test. Sliding windows are constructed separately for each split. Validation and test targets remain entirely within their respective intervals, while the first lookback in each of those intervals uses the final 18 observations immediately preceding it.
All benchmark windows use , , and stride one. Reported horizons are cumulative: each result aggregates forecast leads rather than only lead .
Normalization. Let denote the sensor set of dataset . For each , GAS-PFN fits a separate standardizer from the training rows:
and
The same sensor-specific transformation is applied to training supports and test queries. Predictions and targets are inverse-transformed before metric computation. The synthetic task-level robust scaling in Eq. (55) is not applied to benchmark data, and no output clipping is performed.
Dataset graph inputs. GAS-PFN consumes the stored adjacency matrix associated with each benchmark. Its diagonal is set to one before neighborhood routing; the matrix is not otherwise symmetrized, binarized, thresholded, or degree-normalized.
The METR-LA and PEMS-BAY matrices are weighted and numerically asymmetric. PEMS03, PEMS04, and PEMS08 use symmetric binary connectivity; available edge attributes beyond connectivity are not used. For PEMS07, an undirected edge with positive recorded cost cost( ) is assigned
where is the standard deviation of the retained positive edge costs. Parallel entries retain their maximum weight, and no threshold is applied. These stored graph matrices are distinct from the row-scaled graph scores in Eq. (68).
Evaluation Metrics
Let denote the number of test windows for dataset . Let and denote the original-scale prediction and ground truth for test window , forecast lead , and sensor .
For cumulative horizon h, define
The reported metrics are
and
Table 1: Dataset dimensions, chronological splits, and graph inputs. The row counts refer to raw time points. Test windows use an 18-step forecast horizon and stride one.
| Dataset | Signal | Time points | Sensors | Train / val. / test rows | Test windows | Graph input |
|---|---|---|---|---|---|---|
| METR-LA | Speed | 34,272 | 207 | 23,990 / 3,428 / 6,854 | 6,837 | Weighted, asymmetric |
| PEMS-BAY | Speed | 52,116 | 325 | 36,481 / 5,212 / 10,423 | 10,406 | Weighted, asymmetric |
| PEMS03 | Flow | 26,208 | 358 | 18,345 / 2,622 / 5,241 | 5,224 | Binary, symmetric |
| PEMS04 | Flow | 16,992 | 307 | 11,894 / 1,700 / 3,398 | 3,381 | Binary, symmetric |
| PEMS07 | Flow | 28,224 | 883 | 19,756 / 2,824 / 5,644 | 5,627 | Weighted cost kernel, symmetric |
| PEMS08 | Flow | 17,856 | 170 | 12,499 / 1,786 / 3,571 | 3,554 | Binary, symmetric |
The zero comparison is exact and is applied to raw ground truth after inverse transformation. For each dataset, MAE and MSE are computed by pooling errors across all valid test windows, forecast steps 1, ..., h, and sensors. Cross-dataset averages are unweighted arithmetic means of the six dataset-level metrics.
Zero masking in Eqs. (100) and (101) applies to benchmark evaluation. GAS-PFN's synthetic pretraining objective does not use a benchmark zero-value mask.
GAS-PFN Configuration and Evaluation
Hyperparameters governing synthetic-prior generation are reported in Appendix A. Table 2 summarizes the architecture, optimization, and target-evaluation settings.
The three primary GAS-PFN checkpoints are independently pretrained with seeds 42, 43, and 44. Each checkpoint is the terminal state after one million optimizer steps. The frozen synthetic bank is shared across runs, while task sampling and optimization are independently seeded.
Target-domain context. For each sensor , the main zero-shot evaluation uses the retained endpoint set defined in Eq. (67): 16 aligned recent supports and 16 sensor-specific historical anchors. The context is reconstructed identically for each checkpoint and cached for every test query. No attention-pooled memory tokens are used during benchmark evaluation.
Full-channel and PEMS07 inference. METR-LA, PEMS-BAY, PEMS03, PEMS04, and PEMS08 are evaluated with all sensors present in each forward pass. PEMS07 uses memory-bounded channel-cohort inference, while the other five datasets use full-channel inference. For the channel cohort strategy, target sensors are grouped in sets of at most 50, and each group's active context pool contains the union of the targets' selected one-hop channel neighborhoods. The groups are assigned via a greedy algorithm designed to minimize repeated processing of the same channels for context. Every active sensor retains all 32 raw context patches.
This fallback preserves the complete selected context and planned context neighborhood of each target sensor. Query tokens are retained only for the cohort's target sensors, and representations and routing are recomputed within the reduced token universe. The reported PEMS07 results therefore use cohort inference; the other five datasets use full-channel inference.
Checkpoint aggregation. Let denote a metric obtained from checkpoint seed . The primary GAS-PFN table reports
Zero-Shot Baseline Configuration
Chronos-2 (Ansari et al. 2025), TimesFM-2.5 (Das et al. 2024), Moirai-2 (Liu et al. 2025), Lag-Llama (Rasul et al. 2024), and TimePFN (Taga, Ildiz, and Oymak 2025) are each evaluated under a recent-only and a history-augmented context regime. Except for model-specific input requirements described below, the recent-only regime uses the 18 observations immediately preceding each forecast origin. The history-augmented regime concatenates a contiguous prefix from the end of the training split with the same 18 recent observations. The training prefix and recent window are disjoint.
For each baseline and dataset, both regimes are rescored using Eqs. (100) and (101). We report the regime with lower cumulative 18-step test MAE and use that single regime for every reported horizon and both metrics. The lower-MAE regime is selected once per baseline and dataset and is then used for every reported horizon and both metrics. GAS-PFN uses one fixed 32-patch support configuration.
Chronos-2 is evaluated through its multivariate data-frame interface without exogenous covariates. TimesFM-2.5 is applied independently to each sensor with its native input normalization and positive-output configuration. Moirai-2 is also applied independently by sensor, without static or dynamic covariates, and its median quantile is used as the point forecast. TimePFN is evaluated as a multivariate model over contiguous sensor blocks of at most 161 channels, with predictions restored to the original sensor order. All external prediction arrays are inverse-transformed by their corresponding wrappers and rescored using the common raw-scale metric implementation.
The external pretrained checkpoints use deterministic inference paths and are therefore reported as single values. Chronos-2, TimesFM-2.5, and Moirai-2 use their 0.5-quantile forecasts, Lag-Llama uses its analytic predictive
Table 2: GAS-PFN architecture, pretraining, and evaluation hyperparameters.
| Category | Setting | Value |
|---|---|---|
| Architecture | Lookback / forecast length | 18/18 |
| Architecture | Transformer blocks / attention heads | 10/8 |
| Architecture | Hidden / feed-forward dimension | 512/2048 |
| Architecture | Attention-head dimension | 64 |
| Architecture | Dropout | 0.1 |
| Architecture | Temporal-distance initialization | |
| Architecture | Router mixture | 0.6/0.4 |
| Architecture | Routed neighborhood | Up to 7 selected channels |
| Architecture | Fusion | Scalar gate per query token |
| Architecture | Model parameters | 32,100,395 |
| Pretraining | Context cap per represented sensor | 8 recent raw +4 older raw +4 pooled memory |
| Pretraining | Optimizer | AdamW |
| Pretraining | Learning rate / weight decay | |
| Pretraining | AdamW () | |
| Pretraining | Learning-rate schedule | 50,000-step warmup, then cosine decay to |
| Pretraining | Meta-task batch / gradient accumulation | 1/none |
| Pretraining | Gradient clipping | Global norm 1.0 |
| Pretraining | Training length | 1,000,000 steps (400 epochs × 2,500 tasks) |
| Pretraining | Precision | Float32 |
| Pretraining | Reported checkpoint | Terminal state at step 1,000,000 (epoch 400) |
| Evaluation | Target-domain support per sensor | 16 recent raw +16 historical raw patches |
| Evaluation | Query batch size | 4 consecutive forecast origins |
| Evaluation | Multi-branch query attention | Same forecast origin only |
mean, and TimePFN uses its direct point output; repeated executions produced byte-identical predictions.
Lag-Llama context handling. Lag-Llama constructs its inputs using a fixed set of lagged values. Accordingly, we preserve the released model's native lag-feature construction by providing the additional historical buffer required to instantiate those lags. Its recent-only and history-augmented configurations therefore consume 1,110 and 1,124 raw observations, respectively, even though their designated model-context lengths are 18 and 32 and the contiguous recent window remains 18 observations. This preserves the released model's native lag-feature construction without modifying its architecture.
Additional Comparison Protocols
TimePFN fine-tuning. The TimePFN fine-tuning comparison uses labeled-window budgets of 32 and 64 on METR-LA, PEMS-BAY, PEMS03, PEMS04, and PEMS08; PEMS07 is excluded because the registered fine-tuning configuration exceeded available GPU memory. Budgets are nested, and the same sampled window indices are shared across the two TimePFN context variants for each seed.
All TimePFN parameters are updated using AdamW with learning rate , weight decay 0.01, batch size 16, and at most eight epochs. The learning rate is halved after each epoch, early-stopping patience is three epochs, and checkpoint selection uses validation performance. Training and validation minimize original-scale, exact-zero-masked MAE. Results are aggregated over seeds 42, 43, and 44.
SCPT selected-road evaluation. The cross-road experiment uses SCPT (Prabowo et al. 2024) with a 12-step lookback and an 18-step output. For each dataset, the fraction of roads available for SCPT training ranges from to ; of roads are reserved for validation, and the remaining roads form the unseen test set. Seeds 42, 43, and 44 define independent road permutations. Each GAS-PFN result is paired with the checkpoint having the same seed, while SCPT is trained separately for that road partition.
SCPT retains its native preprocessing, which computes one scalar mean and standard deviation over the complete time-by-road matrix before the temporal and road splits. GAS-PFN instead uses the train-only sensor-specific scaling in Eqs. (95)–(97). For the final comparison, both methods are inverse-transformed, aligned to the same raw target tensor, and rescored using the identical exact-zero mask.
The selected-road results report the arithmetic mean and sample standard deviation over the three paired model and road-partition seeds. This variation therefore includes both independently pretrained GAS-PFN checkpoints and different supervised-road partitions.
D Additional Benchmark Results
Additional Zero-shot Results
Table 4 reports both evaluated context regimes for every external baseline across all datasets and forecast horizons. “Recent 18” uses a contiguous recent window of 18 observations, while “Recent + prefix” additionally supplies a contiguous tail from the training split. The Total column reports raw temporal input per channel. For Lag-Llama, marked by , this total also includes the longer raw-history buffer required
Table 3: External zero-shot baseline implementations and context regimes. “Training tail” denotes observations drawn contiguously from the end of the 70% training split. For Lag-Llama, the raw-history totals include the additional buffer required to construct its fixed lag features.
| Model | Implementation | Recent-only regime | History-augmented regime |
|---|---|---|---|
| Chronos-2 | amazon/chronos-2;chronos-forecasting 2.2.2 | 18 recent observations | 8,174 training-tail +18 recent = 8,192 |
| TimesFM-2.5 | google/timesfm-2.5-200m-pytorch;timesfm 2.0.0 | 18 recent observations | 78 training-tail +18 recent = 96 |
| Moirai-2 | Salesforce/moirai-2.0-R-small;uni2ts 2.0.0 | 18 recent observations | 1,662 training-tail +18 recent = 1,680 |
| Lag-Llama | Released lag-llama.ckpt | Nominal context: 18 recent;1,110 raw observations including lag buffer | Nominal context: 14 training-tail +18 recent = 32; 1,124 raw observations including lag buffer |
| TimePFN | Released TimePFN checkpoint with benchmark adapters | 18 recent observations, left-padded to length 96 | 78 training-tail +18 recent = 96 |
by its native lag features, as detailed in Appendix C. GAS-PFN's total counts 18 recent values together with 32 support patches of 36 scalar values each, yielding 1,170 scalar input slots.
These expanded results reinforce the main-paper observation that more contiguous history is not uniformly beneficial: the effect of adding a training-tail prefix varies substantially across models and datasets. GAS-PFN instead uses one fixed graph-aware mixed-context construction, supporting the claim that the organization and use of historical context matter in addition to its raw quantity.
Computing infrastructure. All experiments were run as single-GPU jobs on a server equipped with eight NVIDIA A100-SXM4-80GB GPUs, AMD EPYC 7742 processors, and approximately 1.97 TiB of system memory. The server ran Ubuntu 24.04.4 LTS. GAS-PFN training and evaluation used CPython 3.12.3 and PyTorch 2.6.0+cu124 with CUDA 12.4.
TimePFN Fine-Tuning Comparison
Table 5 compares zero-shot GAS-PFN with TimePFN after target-specific fine-tuning using 32 or 64 labeled patches. For TimePFN, “Recent 18” uses only the 18 observations immediately preceding each forecast origin, while “Recent + prefix” also supplies a contiguous tail from the training split. GAS-PFN instead uses its fixed mixed-context configuration and performs no target-specific parameter updates. Across the five evaluated datasets, GAS-PFN achieves the best mean result in 27 of the 30 dataset–horizon–metric comparisons. Fine-tuning TimePFN with 64 patches narrows the gap and yields the best 90-minute MSE on PEMS03, PEMS04, and PEMS08, but does not otherwise surpass GAS-PFN. These results reinforce that the graph-aware prior and in-context architecture remain competitive even against limited target-domain parameter adaptation.
Full SCPT Comparison
Table 6 expands the main-paper cross-road comparison by reporting complete MAE and MSE results at the cumulative 30-, 60-, and 90-minute horizons. SCPT12 is trained separately for each road split using the full historical record from the indicated fraction of roads, with 10% reserved for validation and the remaining roads held out for testing. GAS-PFN instead performs zero-shot inference without target-specific parameter updates. The 60-minute results reproduce the main-paper finding that GAS-PFN is strongest when supervised road coverage is limited: it outperforms SCPT12 on all six datasets at the 10% budget and on five of six datasets at both 20% and 30%. The additional horizons show the same broad pattern, while SCPT12 generally becomes more competitive as its access to supervised roads increases. Full preprocessing and split details are provided in Appendix C.
E Ablation Tests
Table 7 presents targeted frozen-checkpoint ablations of three components: dual-branch fusion, mixed-context support, and hybrid neighborhood routing. Across the resulting 36 dataset–horizon–metric settings, the full learned mixture achieves the best mean in 23 cases and ranks among the top two in 35. It outperforms both individual experts in 34 settings, while either learned or fixed equal fusion is best in 32, supporting the use of complementary self-channel and multichannel representations. Removing the historical supports degrades performance in all 36 settings, indicating that the trained model makes effective use of its mixed-context memory. The hybrid router also outperforms graph-only routing in 33 settings, although these gains are generally smaller and remain dataset-dependent. Because these variants use frozen checkpoints, they isolate the inference-time contribution of each component.
AI-use disclosure. Generative AI tools were used for language editing, LATEX formatting assistance, and manuscript review. The authors verified and take responsibility for all content.
Table 4: Zero-shot MAE and MSE under recent-only and history-augmented context regimes at cumulative 30-, 60-, and 90-minute horizons. Lower is better. Bold and underlined values denote the best and second-best results, respectively, using unrounded values.
| Model | Context | Total | 30 min | 60 min | 90 min | |||
|---|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | |||
| METR-LA | ||||||||
| GAS-PFN | Mixed | 1,170 | ||||||
| Chronos-2 | Recent 18 | 18 | 4.31 | 91.60 | 5.74 | 152.61 | 6.66 | 193.68 |
| Recent + prefix | 8,192 | 3.68 | 70.62 | 4.38 | 91.23 | 4.95 | 107.42 | |
| TimesFM-2.5 | Recent 18 | 18 | 4.10 | 86.15 | 5.19 | 133.05 | 6.06 | 171.30 |
| Recent + prefix | 96 | 3.80 | 72.30 | 4.73 | 108.38 | 5.45 | 136.04 | |
| Moirai-2 | Recent 18 | 18 | 4.23 | 83.92 | 5.30 | 124.56 | 6.35 | 163.35 |
| Recent + prefix | 1,680 | 4.25 | 77.87 | 5.63 | 123.07 | 6.53 | 154.96 | |
| Lag-Llama | Recent 18 | 1,110 | 4.86 | 86.23 | 6.21 | 130.31 | 7.41 | 178.32 |
| Recent + prefix | 1,124 | 6.69 | 230.75 | 7.42 | 255.05 | 8.02 | 277.87 | |
| TimePFN | Recent 18 | 18 | 5.84 | 77.06 | 6.59 | 102.16 | 7.16 | 118.44 |
| Recent + prefix | 96 | 4.86 | 69.41 | 5.59 | 94.33 | 6.13 | 112.73 | |
| PEMS-BAY | ||||||||
| GAS-PFN | Mixed | 1,170 | ||||||
| Chronos-2 | Recent 18 | 18 | 1.77 | 16.28 | 2.50 | 35.14 | 2.98 | 49.30 |
| Recent + prefix | 8,192 | 1.61 | 12.90 | 2.24 | 27.25 | 2.71 | 40.58 | |
| TimesFM-2.5 | Recent 18 | 18 | 1.78 | 18.20 | 2.40 | 34.61 | 2.88 | 49.03 |
| Recent + prefix | 96 | 1.65 | 15.01 | 2.18 | 27.70 | 2.62 | 39.32 | |
| Moirai-2 | Recent 18 | 18 | 1.74 | 15.53 | 2.36 | 29.99 | 2.91 | 44.67 |
| Recent + prefix | 1,680 | 1.85 | 17.52 | 2.66 | 40.00 | 3.17 | 55.69 | |
| Lag-Llama | Recent 18 | 1,110 | 2.58 | 41.38 | 3.01 | 48.85 | 3.35 | 55.81 |
| Recent + prefix | 1,124 | 2.59 | 45.83 | 2.99 | 52.64 | 3.29 | 58.78 | |
| TimePFN | Recent 18 | 18 | 2.62 | 22.67 | 3.03 | 32.66 | 3.37 | 40.82 |
| Recent + prefix | 96 | 2.41 | 22.35 | 2.85 | 32.51 | 3.21 | 41.51 | |
| PEMS03 | ||||||||
| GAS-PFN | Mixed | 1,170 | ||||||
| Chronos-2 | Recent 18 | 18 | 19.11 | 923.53 | 25.46 | 1696.22 | 31.02 | 2510.18 |
| Recent + prefix | 8,192 | 17.74 | 747.80 | 23.22 | 1320.70 | 28.98 | 2080.14 | |
| TimesFM-2.5 | Recent 18 | 18 | 19.54 | 937.01 | 25.82 | 1699.79 | 31.91 | 2638.02 |
| Recent + prefix | 96 | 19.52 | 894.14 | 25.26 | 1496.84 | 31.61 | 2357.27 | |
| Moirai-2 | Recent 18 | 18 | 19.64 | 913.24 | 25.74 | 1646.29 | 32.35 | 2666.41 |
| Recent + prefix | 1,680 | 22.44 | 1135.31 | 32.96 | 2457.30 | 41.67 | 3812.48 | |
| Lag-Llama | Recent 18 | 1,110 | 20.79 | 993.79 | 29.50 | 2006.43 | 39.31 | 3556.25 |
| Recent + prefix | 1,124 | 20.23 | 918.27 | 27.25 | 1672.31 | 34.66 | 2709.34 | |
| TimePFN | Recent 18 | 18 | 34.50 | 2201.97 | 38.46 | 2788.31 | 42.60 | 3417.89 |
| Recent + prefix | 96 | 39.47 | 2742.86 | 43.29 | 3366.56 | 48.19 | 4240.31 | |
Table 4 continued
| Model | Context | Total | 30 min | 60 min | 90 min | |||
|---|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | |||
| PEMS04 | ||||||||
| GAS-PFN | Mixed | 1,170 | 22.52 ± 0.28 | 1243.43 ± 13.35 | 27.16 ± 0.41 | 1782.98 ± 26.45 | 32.32 ± 0.53 | 2517.88 ± 54.69 |
| Chronos-2 | Recent 18 | 18 | 24.23 | 1402.54 | 31.26 | 2300.66 | 37.92 | 3370.61 |
| Recent + prefix | 8,192 | 25.61 | 1402.39 | 32.89 | 2266.07 | 40.67 | 3466.71 | |
| TimesFM-2.5 | Recent 18 | 18 | 25.33 | 1491.79 | 32.81 | 2476.17 | 40.18 | 3712.61 |
| Recent + prefix | 96 | 25.25 | 1586.96 | 31.77 | 2514.64 | 38.58 | 3708.20 | |
| Moirai-2 | Recent 18 | 18 | 25.90 | 1518.06 | 33.45 | 2523.53 | 41.73 | 3966.89 |
| Recent + prefix | 1,680 | 28.88 | 1734.25 | 40.59 | 3390.69 | 52.15 | 5730.72 | |
| Lag-Llama | Recent 18 | 1,110 | 27.62 | 1698.79 | 38.54 | 3152.43 | 50.72 | 5371.03 |
| Recent + prefix | 1,124 | 33.65 | 2411.36 | 54.64 | 6231.24 | 74.20 | 11249.26 | |
| TimePFN | Recent 18 | 18 | 43.19 | 3218.50 | 47.91 | 3987.86 | 52.92 | 4841.89 |
| Recent + prefix | 96 | 61.26 | 7452.77 | 66.46 | 8623.08 | 73.41 | 10500.47 | |
| PEMS07 | ||||||||
| GAS-PFN | Mixed | 1,170 | 25.15 ± 0.54 | 1493.64 ± 33.87 | 30.81 ± 0.75 | 2223.93 ± 56.13 | 37.15 ± 0.98 | 3239.16 ± 94.62 |
| Chronos-2 | Recent 18 | 18 | 26.69 | 1726.37 | 35.12 | 3000.69 | 42.82 | 4450.07 |
| Recent + prefix | 8,192 | 25.95 | 1522.68 | 32.76 | 2366.80 | 40.01 | 3558.66 | |
| TimesFM-2.5 | Recent 18 | 18 | 27.95 | 1838.07 | 37.16 | 3274.80 | 46.14 | 5088.31 |
| Recent + prefix | 96 | 26.25 | 1612.32 | 33.96 | 2627.48 | 42.16 | 4053.21 | |
| Moirai-2 | Recent 18 | 18 | 28.74 | 1858.14 | 38.36 | 3342.03 | 48.91 | 5490.79 |
| Recent + prefix | 1,680 | 31.90 | 2371.38 | 47.45 | 5832.52 | 61.01 | 9626.35 | |
| Lag-Llama | Recent 18 | 1,110 | 31.03 | 2071.72 | 44.76 | 4168.11 | 59.52 | 7317.76 |
| Recent + prefix | 1,124 | 29.20 | 1911.20 | 39.99 | 3328.94 | 50.77 | 5272.50 | |
| TimePFN | Recent 18 | 18 | 50.69 | 4168.78 | 56.65 | 5309.43 | 62.77 | 6544.13 |
| Recent + prefix | 96 | 46.42 | 4035.22 | 52.46 | 5170.30 | 58.75 | 6523.84 | |
| PEMS08 | ||||||||
| GAS-PFN | Mixed | 1,170 | 17.78 ± 0.19 | 767.87 ± 17.31 | 21.35 ± 0.36 | 1112.37 ± 41.18 | 25.21 ± 0.47 | 1548.52 ± 71.32 |
| Chronos-2 | Recent 18 | 18 | 19.66 | 938.59 | 25.87 | 1634.48 | 31.55 | 2393.38 |
| Recent + prefix | 8,192 | 19.10 | 834.07 | 24.15 | 1305.08 | 29.44 | 1922.89 | |
| TimesFM-2.5 | Recent 18 | 18 | 20.41 | 983.52 | 26.94 | 1715.18 | 33.37 | 2620.24 |
| Recent + prefix | 96 | 18.50 | 816.30 | 23.54 | 1313.15 | 28.60 | 1924.25 | |
| Moirai-2 | Recent 18 | 18 | 20.44 | 961.84 | 26.77 | 1666.28 | 33.96 | 2695.22 |
| Recent + prefix | 1,680 | 24.60 | 1400.30 | 35.85 | 3230.58 | 45.13 | 5152.02 | |
| Lag-Llama | Recent 18 | 1,110 | 22.67 | 1121.92 | 32.68 | 2297.85 | 43.51 | 4055.36 |
| Recent + prefix | 1,124 | 26.21 | 1392.03 | 40.16 | 3152.78 | 53.65 | 5579.32 | |
| TimePFN | Recent 18 | 18 | 36.59 | 2299.04 | 40.71 | 2861.44 | 45.09 | 3500.04 |
| Recent + prefix | 96 | 26.94 | 1488.01 | 31.22 | 2031.89 | 36.54 | 2864.76 | |
Table 5: Comparison of zero-shot GAS-PFN with TimePFN fine-tuned using 32 or 64 target-domain patches. Results are mean ± sample standard deviation over seeds 42, 43, and 44. Lower is better; bold and underlined values denote the best and second-best means, respectively, using unrounded results.
| Model | Budget Context | 30 min | 60 min | 90 min | ||||
|---|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | |||
| METR-LA | ||||||||
| GAS-PFN – | Mixed | 3.97 ± 0.07 | 68.31 ± 2.35 | 4.83 ± 0.07 | 97.61 ± 3.58 | 5.50 ± 0.06 | 119.69 ± 5.08 | |
| TimePFN | FT-32 | Recent 18 | 5.12 ± 0.67 | 112.67 ± 24.70 | 6.07 ± 0.62 | 155.51 ± 26.45 | 6.78 ± 0.56 | 186.47 ± 29.54 |
| Recent + prefix | 5.14 ± 0.50 | 107.27 ± 16.52 | 6.06 ± 0.48 | 149.42 ± 19.17 | 6.76 ± 0.43 | 181.29 ± 21.37 | ||
| FT-64 | Recent 18 | 4.68 ± 0.21 | 97.01 ± 7.15 | 5.58 ± 0.16 | 134.08 ± 10.82 | 6.33 ± 0.13 | 163.68 ± 14.66 | |
| Recent + prefix | 4.64 ± 0.10 | 91.68 ± 3.27 | 5.57 ± 0.08 | 127.98 ± 4.02 | 6.31 ± 0.07 | 157.84 ± 5.35 | ||
| PEMS-BAY | ||||||||
| GAS-PFN – | Mixed | 1.73 ± 0.01 | 14.85 ± 0.12 | 2.21 ± 0.02 | 25.22 ± 0.11 | 2.59 ± 0.01 | 34.45 ± 0.09 | |
| TimePFN | FT-32 | Recent 18 | 1.89 ± 0.02 | 17.55 ± 0.52 | 2.34 ± 0.04 | 28.70 ± 1.29 | 2.71 ± 0.04 | 38.29 ± 2.05 |
| Recent + prefix | 1.93 ± 0.03 | 17.44 ± 0.49 | 2.39 ± 0.05 | 28.48 ± 1.42 | 2.78 ± 0.05 | 38.23 ± 1.90 | ||
| FT-64 | Recent 18 | 1.79 ± 0.01 | 15.87 ± 0.05 | 2.24 ± 0.03 | 26.15 ± 0.15 | 2.61 ± 0.04 | 35.30 ± 0.46 | |
| Recent + prefix | 1.82 ± 0.02 | 15.83 ± 0.21 | 2.28 ± 0.02 | 26.20 ± 0.12 | 2.66 ± 0.02 | 35.59 ± 0.16 | ||
| PEMS03 | ||||||||
| GAS-PFN – | Mixed | 17.57 ± 0.60 | 749.58 ± 36.52 | 21.51 ± 0.92 | 1160.61 ± 69.29 | 25.97 ± 1.35 | 1740.93 ± 129.80 | |
| TimePFN | FT-32 | Recent 18 | 21.09 ± 0.20 | 1094.25 ± 25.23 | 25.70 ± 0.40 | 1677.81 ± 69.23 | 30.19 ± 0.43 | 2298.73 ± 101.94 |
| Recent + prefix | 22.38 ± 0.45 | 1166.82 ± 38.88 | 26.93 ± 0.71 | 1759.91 ± 95.60 | 31.39 ± 0.75 | 2437.39 ± 131.64 | ||
| FT-64 | Recent 18 | 19.74 ± 0.44 | 929.47 ± 41.18 | 23.04 ± 0.60 | 1311.65 ± 76.47 | 26.52 ± 0.72 | 1740.50 ± 98.80 | |
| Recent + prefix | 19.61 ± 0.25 | 877.52 ± 21.51 | 22.72 ± 0.22 | 1215.10 ± 18.20 | 26.09 ± 0.12 | 1640.43 ± 7.27 | ||
| PEMS04 | ||||||||
| GAS-PFN – | Mixed | 22.52 ± 0.28 | 1243.43 ± 13.35 | 27.16 ± 0.41 | 1782.98 ± 26.45 | 32.32 ± 0.53 | 2517.88 ± 54.69 | |
| TimePFN | FT-32 | Recent 18 | 27.00 ± 1.28 | 1538.41 ± 83.40 | 31.26 ± 0.81 | 2085.04 ± 63.11 | 35.92 ± 0.52 | 2720.01 ± 86.17 |
| Recent + prefix | 27.57 ± 0.44 | 1712.73 ± 38.58 | 32.81 ± 0.63 | 2454.12 ± 74.49 | 38.33 ± 0.74 | 3404.70 ± 108.27 | ||
| FT-64 | Recent 18 | 25.04 ± 0.57 | 1389.74 ± 52.50 | 28.68 ± 0.68 | 1828.83 ± 88.27 | 32.74 ± 0.72 | 2343.80 ± 110.14 | |
| Recent + prefix | 25.57 ± 0.34 | 1528.04 ± 48.25 | 30.39 ± 0.52 | 2186.02 ± 86.02 | 35.64 ± 0.61 | 3044.37 ± 118.65 | ||
| PEMS08 | ||||||||
| GAS-PFN – | Mixed | 17.78 ± 0.19 | 767.87 ± 17.31 | 21.35 ± 0.36 | 1112.37 ± 41.18 | 25.21 ± 0.47 | 1548.52 ± 71.32 | |
| TimePFN | FT-32 | Recent 18 | 21.71 ± 1.09 | 1013.32 ± 57.76 | 25.56 ± 0.63 | 1418.37 ± 31.71 | 29.79 ± 0.37 | 1892.39 ± 56.39 |
| Recent + prefix | 21.54 ± 0.70 | 998.85 ± 51.57 | 24.61 ± 0.85 | 1326.38 ± 78.51 | 28.43 ± 1.15 | 1768.08 ± 119.92 | ||
| FT-64 | Recent 18 | 20.43 ± 0.59 | 914.07 ± 49.24 | 23.86 ± 0.66 | 1269.17 ± 71.42 | 27.72 ± 0.61 | 1708.48 ± 79.46 | |
| Recent + prefix | 19.60 ± 0.12 | 864.92 ± 9.32 | 22.39 ± 0.14 | 1151.18 ± 19.03 | 25.69 ± 0.26 | 1532.11 ± 45.59 | ||
Table 6: Cross-road comparison of zero-shot GAS-PFN and SCPT12 across supervised road fractions and cumulative 30-, 60-, and 90-minute horizons. Results are mean ± sample standard deviation over paired seeds 42, 43, and 44. Lower is better; bold denotes the lower unrounded mean within each road fraction, horizon, and metric.
| Train roads Model | 30 min | 60 min | 90 min | ||||
|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | ||
| METR-LA | |||||||
| 10% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 20% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 30% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 40% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 50% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 60% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 70% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 80% | GAS-PFN | ||||||
| SCPT12 | |||||||
| PEMS-BAY | |||||||
| 10% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 20% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 30% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 40% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 50% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 60% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 70% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 80% | GAS-PFN | ||||||
| SCPT12 | |||||||
Table 6 continued
| Train roads Model | 30 min | 60 min | 90 min | ||||
|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | ||
| PEMS03 | |||||||
| 10% | GAS-PFN | 17.64 ± 0.69 | 753.83 ± 49.48 | 21.58 ± 1.02 | 1167.46 ± 95.74 | 26.05 ± 1.46 | 1751.57 ± 173.62 |
| SCPT12 | 23.76 ± 2.41 | 1474.14 ± 269.95 | 30.43 ± 4.14 | 2443.89 ± 623.04 | 36.68 ± 5.58 | 3559.57 ± 1016.24 | |
| 20% | GAS-PFN | 17.80 ± 0.61 | 762.80 ± 46.22 | 21.77 ± 0.90 | 1181.56 ± 91.13 | 26.27 ± 1.31 | 1771.99 ± 165.93 |
| SCPT12 | 22.57 ± 2.96 | 1305.09 ± 301.00 | 28.30 ± 4.85 | 2095.35 ± 735.58 | 34.13 ± 7.00 | 3121.79 ± 1310.33 | |
| 30% | GAS-PFN | 17.77 ± 0.35 | 757.35 ± 34.66 | 21.72 ± 0.55 | 1171.21 ± 74.17 | 26.20 ± 0.85 | 1754.35 ± 137.57 |
| SCPT12 | 19.07 ± 1.69 | 952.62 ± 58.43 | 23.37 ± 3.05 | 1410.53 ± 130.50 | 27.82 ± 5.05 | 1994.66 ± 355.93 | |
| 40% | GAS-PFN | 17.62 ± 0.46 | 747.38 ± 42.85 | 21.55 ± 0.64 | 1155.99 ± 85.87 | 26.00 ± 0.92 | 1732.82 ± 152.98 |
| SCPT12 | 16.92 ± 0.96 | 798.44 ± 194.74 | 19.92 ± 1.39 | 1084.35 ± 268.59 | 23.00 ± 1.45 | 1417.65 ± 301.37 | |
| 50% | GAS-PFN | 17.67 ± 0.43 | 748.69 ± 47.63 | 21.62 ± 0.57 | 1160.46 ± 95.33 | 26.08 ± 0.78 | 1740.03 ± 167.95 |
| SCPT12 | 16.09 ± 0.36 | 748.79 ± 167.27 | 18.90 ± 0.53 | 999.71 ± 140.97 | 21.82 ± 1.19 | 1301.00 ± 73.33 | |
| 60% | GAS-PFN | 17.75 ± 0.80 | 751.35 ± 72.78 | 21.73 ± 1.01 | 1166.89 ± 133.32 | 26.24 ± 1.31 | 1752.80 ± 226.64 |
| SCPT12 | 16.73 ± 0.71 | 895.80 ± 272.09 | 19.61 ± 1.16 | 1176.12 ± 350.13 | 22.59 ± 1.53 | 1499.05 ± 426.91 | |
| 70% | GAS-PFN | 17.79 ± 0.17 | 753.31 ± 15.29 | 21.77 ± 0.23 | 1168.44 ± 38.69 | 26.28 ± 0.35 | 1752.22 ± 76.11 |
| SCPT12 | 16.04 ± 0.27 | 767.52 ± 324.62 | 18.37 ± 0.45 | 997.21 ± 394.86 | 20.79 ± 0.67 | 1261.68 ± 452.70 | |
| 80% | GAS-PFN | 17.02 ± 0.27 | 673.95 ± 43.09 | 20.86 ± 0.37 | 1054.08 ± 102.41 | 25.24 ± 0.55 | 1595.88 ± 203.21 |
| SCPT12 | 16.24 ± 0.61 | 585.95 ± 3.48 | 19.12 ± 0.64 | 835.66 ± 23.90 | 21.94 ± 0.78 | 1120.94 ± 46.64 | |
| PEMS04 | |||||||
| 10% | GAS-PFN | 22.53 ± 0.52 | 1250.46 ± 30.00 | 27.15 ± 0.73 | 1787.00 ± 50.78 | 32.28 ± 0.92 | 2516.84 ± 88.98 |
| SCPT12 | 36.13 ± 15.56 | 3029.26 ± 2380.93 | 45.05 ± 22.39 | 4600.27 ± 4015.58 | 53.35 ± 28.57 | 6399.14 ± 5932.10 | |
| 20% | GAS-PFN | 22.75 ± 0.57 | 1268.18 ± 40.49 | 27.39 ± 0.75 | 1813.71 ± 49.37 | 32.56 ± 0.89 | 2557.23 ± 67.91 |
| SCPT12 | 29.56 ± 3.96 | 1809.83 ± 327.14 | 35.69 ± 4.77 | 2581.80 ± 343.00 | 42.21 ± 5.71 | 3666.12 ± 451.95 | |
| 30% | GAS-PFN | 22.67 ± 0.25 | 1259.84 ± 4.94 | 27.30 ± 0.45 | 1799.57 ± 15.85 | 32.46 ± 0.67 | 2536.79 ± 62.14 |
| SCPT12 | 25.75 ± 1.37 | 1479.77 ± 47.21 | 32.39 ± 2.62 | 2278.99 ± 148.44 | 39.02 ± 3.91 | 3326.64 ± 335.14 | |
| 40% | GAS-PFN | 22.59 ± 0.38 | 1245.65 ± 25.52 | 27.20 ± 0.59 | 1782.38 ± 52.47 | 32.35 ± 0.87 | 2518.22 ± 114.79 |
| SCPT12 | 22.59 ± 0.29 | 1191.91 ± 38.32 | 26.27 ± 0.66 | 1570.22 ± 72.18 | 30.00 ± 1.39 | 2024.34 ± 121.34 | |
| 50% | GAS-PFN | 22.20 ± 0.33 | 1198.10 ± 18.90 | 26.80 ± 0.52 | 1729.92 ± 50.51 | 31.95 ± 0.78 | 2459.15 ± 115.93 |
| SCPT12 | 21.69 ± 0.72 | 1109.04 ± 58.69 | 25.33 ± 1.18 | 1482.22 ± 125.65 | 29.23 ± 1.61 | 1949.34 ± 186.84 | |
| 60% | GAS-PFN | 22.79 ± 0.29 | 1258.91 ± 31.33 | 27.47 ± 0.43 | 1810.84 ± 59.39 | 32.69 ± 0.62 | 2562.43 ± 109.23 |
| SCPT12 | 22.36 ± 0.15 | 1145.27 ± 15.29 | 25.64 ± 0.11 | 1482.25 ± 40.99 | 28.96 ± 0.27 | 1889.31 ± 99.03 | |
| 70% | GAS-PFN | 22.88 ± 0.91 | 1273.32 ± 153.18 | 27.53 ± 0.95 | 1828.01 ± 199.31 | 32.70 ± 1.14 | 2581.52 ± 265.26 |
| SCPT12 | 22.69 ± 1.13 | 1197.25 ± 138.11 | 26.18 ± 1.38 | 1581.78 ± 199.02 | 29.77 ± 1.78 | 2056.09 ± 306.52 | |
| 80% | GAS-PFN | 22.02 ± 0.55 | 1170.51 ± 53.70 | 26.58 ± 0.52 | 1703.73 ± 73.83 | 31.70 ± 0.61 | 2430.69 ± 144.66 |
| SCPT12 | 22.97 ± 2.82 | 1193.95 ± 169.60 | 28.14 ± 5.41 | 1778.84 ± 479.19 | 32.90 ± 7.47 | 2447.87 ± 803.34 | |
Table 6 continued
| Train roads Model | 30 min | 60 min | 90 min | ||||
|---|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | ||
| PEMS07 | |||||||
| 10% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 20% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 30% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 40% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 50% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 60% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 70% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 80% | GAS-PFN | ||||||
| SCPT12 | |||||||
| PEMS08 | |||||||
| 10% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 20% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 30% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 40% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 50% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 60% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 70% | GAS-PFN | ||||||
| SCPT12 | |||||||
| 80% | GAS-PFN | ||||||
| SCPT12 | |||||||
Table 7: Frozen-checkpoint ablations of branch fusion, context construction, and neighborhood routing across six datasets and cumulative 30-, 60-, and 90-minute horizons. Results are mean ± sample standard deviation over seeds 42, 43, and 44. Lower is better; bold and underlined values denote the best and second-best unrounded means, respectively.
| Variant | 30 min | 60 min | 90 min | |||
|---|---|---|---|---|---|---|
| MAE | MSE | MAE | MSE | MAE | MSE | |
| METR-LA | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
| PEMS-BAY | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
| PEMS03 | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
| PEMS04 | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
| PEMS07 | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
| PEMS08 | ||||||
| Learned mixture (full model) | ||||||
| Self expert only | ||||||
| Multi expert only | ||||||
| Fixed equal fusion | ||||||
| Recent context only | ||||||
| Graph similarity only | ||||||
References
Ansari, A. F.; Shchur, O.; Küken, J.; Auer, A.; Han, B.; Mercado, P.; Rangapuram, S. S.; Shen, H.; Stella, L.; Zhang, X.; Goswami, M.; Kapoor, S.; Maddix, D. C.; Guerron, P.; Hu, T.; Yin, J.; Erickson, N.; Desai, P. M.; Wang, H.; Rangwala, H.; Karypis, G.; Wang, Y.; and Bohlke-Schneider, M. 2025. Chronos-2: From Univariate to Universal Forecasting. arXiv preprint arXiv:2510.15821.
Chen, C.; Petty, K.; Skabardonis, A.; Varaiya, P.; and Jia, Z. 2001. Freeway Performance Measurement System: Min-
ing Loop Detector Data. Transportation Research Record, 1748(1): 96–102.
Das, A.; Kong, W.; Sen, R.; and Zhou, Y. 2024. A Decoder-Only Foundation Model for Time-Series Forecasting. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, 10148–10167. PMLR.
Dooley, S.; Khurana, G. S.; Mohapatra, C.; Naidu, S. V.; and White, C. 2023. ForecastPFN: Synthetically-Trained Zero-Shot Forecasting. In Advances in Neural Information Processing Systems, volume 36.
Guo, S.; Lin, Y.; Feng, N.; Song, C.; and Wan, H. 2019. Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, 922–929.
Li, Y.; Yu, R.; Shahabi, C.; and Liu, Y. 2018. Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting. In International Conference on Learning Representations.
Liu, C.; Aksu, T.; Liu, J.; Liu, X.; Yan, H.; Pham, Q.; Sahoo, D.; Xiong, C.; Savarese, S.; and Li, J. 2025. Moirai 2.0: When Less Is More for Time Series Forecasting. arXiv preprint arXiv:2511.11698.
Prabowo, A.; Xue, H.; Shao, W.; Koniusz, P.; and Salim, F. D. 2024. Traffic Forecasting on New Roads Using Spatial Contrastive Pre-Training (SCPT). Data Mining and Knowledge Discovery, 38: 913–937.
Rasul, K.; Ashok, A.; Williams, A. R.; Ghonia, H.; Bhagwatkar, R.; Khorasani, A.; Darvishi Bayazi, M. J.; Adamopoulos, G.; Riachi, R.; Hassen, N.; Biloš, M.; Garg, S.; Schneider, A.; Chapados, N.; Drouin, A.; Zantedeschi, V.; Nevmyvaka, Y.; and Rish, I. 2024. Lag-Llama: Towards Foundation Models for Probabilistic Time Series Forecasting. arXiv preprint arXiv:2310.08278.
Taga, E. O.; Ildiz, M. E.; and Oymak, S. 2025. TimePFN: Effective Multivariate Time Series Forecasting with Synthetic Data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, 20761–20769.
Verdenius, S.; Zerio, A.; and Wang, R. L. M. 2024. LaT-PFN: A Joint Embedding Predictive Architecture for In-Context Time-Series Forecasting. arXiv preprint arXiv:2405.10093.