Traffic flow forecasting with explicit priors and prior-conditioned adaptive fusion
Abstract
Accurate multi-step traffic flow forecasting requires jointly modeling rapidly varying historical observations, relatively stable road-network structure, and recurring intra-day patterns. Existing methods often encode these heterogeneous signals within a shared backbone or fuse them directly, obscuring their distinct predictive roles. We propose a traffic flow forecasting framework with explicit spatiotemporal priors and Prior-Conditioned Adaptive Fusion (PCAF). A dynamic observation encoder learns short-term traffic dynamics solely from historical sequences. In parallel, a fixed Laplacian spectral basis provides a topology-derived spatial prior, while sample-specific first-and second-harmonic time-of-day encoding forms an intra-day temporal prior. The two priors are projected into a unified spatiotemporal context. PCAF jointly uses this context and the dynamic representation to generate a prior-conditioned candidate representation and an element-wise allocation coefficient, enabling adaptive fusion across samples, nodes, and latent dimensions. Unlike ordinary gated interpolation, PCAF constructs the candidate from the joint representation of the dynamic features and context before allocating information between the original and candidate representations. Experiments on PEMS03, PEMS04, PEMS07, and PEMS08 show that, under a unified controlled protocol, the proposed method obtains the lowest error in 10 of the 12 dataset–metric comparisons and the lowest MAE on all four datasets. Relative to the dynamic-only variant, it reduces average MAE and RMSE by 5.37% and 6.49%, respectively. Topology-specific controls show that the spatial gains cannot be explained solely by additional projection parameters or arbitrary node-specific vectors. Fusion and temporal-encoding