SpinFlow: A Physics-Informed Spin Field Framework for Traffic Phase Inference and Transition Detection
Authors: Haopeng Deng, Fucheng Zheng, Xinhai Xia
Organizations: School of Future Transportation, Guangzhou Maritime University, Guangzhou, China
Abstract
Active traffic management (ATM) is frequently hindered by traditional macroscopic models and rigid empirical thresholds that fail to capture metastable phase precursors, resulting in delayed, reactive interventions. To address this, we propose SpinFlow, a physics-informed spin-field framework unifying Kerner's three-phase theory with statistical physics for continuous macroscopic traffic phase inference. Inspired by the Heisenberg model, SpinFlow parametrizes spatially varying phase weights via a latent spin vector and a competitive-equilibrium mapping, allowing synchronized flow to emerge naturally. A physics-regularized Expectation-Maximization algorithm inverts this latent structure from high-resolution trajectories, jointly optimizing the spin field while softly enforcing mass conservation and spatial smoothness. We introduce the Phase Equilibrium Degree (PED) to quantify structural alignment and topologically localize phase-transition points. Across four real-world trajectory datasets, SpinFlow achieves Rq2 up to 0.940, PED drops of 94.9-100%, and interpretable phase maps that outperform three heterogeneous baselines on forward accuracy, physics consistency, and bottleneck localization. SpinFlow pinpoints congestion nucleation without prior network topology, yielding a data-driven, physics-consistent trigger for ATM.
We propose a method for estimating time-varying traffic flow patterns from sparse aggregated vehicle counts. The method partitions the study area into spatial regions, constructs a set of feasible region-to-region routes, and solves a weighted least-squares optimization problem to determine the number of vehicles to allocate on each route. A weighted contribution matrix encodes sensor coverage, steering the optimizer toward flow configurations that are directly observable by sensors. Edge-level trajectories are then derived by scoring candidate routes against the temporal and volumetric profiles of aggregated regional sensor counts. The method is evaluated on the Brussels road network using real and synthetic traffic data. Results show that the proposed approach reproduces the daily traffic profile in the input data and outperforms the baseline methods at a fraction of the computational cost.
Traffic flow prediction is a core supporting technology for intelligent transportation systems. It uses historical data to infer future traffic dynamics in specific areas, thereby helping to alleviate congestion and improve resource allocation efficiency. Traditional neural networks struggle to break through accuracy limits due to their reliance on singular feature modeling, while large language models (LLMs) suffer from insufficient capture of spatial topological information and mining spatiotemporal correlation. This study proposes a Dynamic Fusion Large Language Model (DF-LLM) for traffic flow prediction. The model incorporates three core components: spatiotemporal embedding module, spatiotemporal fusion module, and LLM backbone. The spatiotemporal embedding module enables synergistic representation of multi-scale spatiotemporal features. The spatiotemporal fusion module integrates spatial topology and dynamic dependencies via graph convolution. The LLM backbone adopts a differentiated parameter adaptation strategy to balance training efficiency and traffic data adaptability. Additionally, it introduces a context aggregation attention module to strengthens global dependencies. More importantly, the LLM backbone takes the residual connections to mitigate the gradient vanishing in deep networks. Experiments show that DF-LLM has achieved better performance by comparing the metrics on all the four datasets.
Traffic state estimation from sparse fixed sensors is challenging because physics-informed neural networks (PINNs) tend to over-smooth sharp transitions admitted by the Lighthill-Whitham--Richards (LWR) model. This study proposes Two-Stage Domain Decomposition Physics-Informed Neural Networks (TSDD-PINN), an observation-aligned framework for LWR-based offline speed-field reconstruction. The framework supports spatial, temporal, and space--time refinement. Matched direction analysis shows that spatial refinement has the lowest mean error and less than half the training time of space--time refinement in the tested setting, while temporal refinement is faster. A global parent PINN is first trained. In the controlled spatial implementation, its residual profile guides a deterministic partition for warm-started child networks. An optional operational safeguard retains Stage~1 when the prespecified screen does not activate. The primary I-24 MOTION evaluation spans five days, five sensor configurations, and ten seeds per configuration, yielding 1{,}500 runs. Controlled TSDD-PINN attains the lowest relative L2 error in 18 of 25 configurations and 14 of 15 sparse-sensing cases, while training 2.4 times faster than the extended PINN (XPINN) baseline under the evaluated implementations and training budgets. Non-neural comparisons show that the advantage over interpolation is concentrated under sparse sensing, whereas dense sensing often favors interpolation. A separate 250-run operational evaluation finds infrequent activation and motivates the Stage-1-preserving safeguard. The residual is treated as an indicator of model difficulty rather than a validated shock detector. The evidence supports a sensing-density-dependent operating range rather than uniform improvement.