Exact Interfaces, Learned Bulk: Stable Neural Rollouts for Traffic with Moving Bottlenecks and Pipe Networks with Junctions

Learned simulators for traffic and gas networks usually fail at the same few points: a slow vehicle that caps how much traffic can pass it, or a pipe junction where three flows must agree on a shared pressure. At these points the governing equations need an extra rule to have a unique answer, and the true solution is often a sharp jump. When a neural network predicts the next state from its own previous prediction, a small error at such a point does not stay small. A slightly misplaced jump produces an error of order one in density over the misplaced distance. If the slow vehicle's speed is read from that wrong density, the vehicle moves to the wrong place, and the next prediction starts further off. Our proposal is a surrogate in which the network learns only the numerical fluxes inside each road or pipe segment. Every constrained interface, meaning the moving bottleneck and the network junction, is resolved at every step by a small exact local solver that takes the network's one-sided states as input. The claim we will test is that this split removes the main source of compounding error in these systems, and that it does so at a cost close to that of a purely learned model.

The setting matters because both communities now want fast, differentiable, data-calibrated simulators. Traffic engineers want them to plan autonomous-vehicle control, as in the 100-vehicle CIRCLES field test on I-24. Pipeline operators want them for network forecasting. Yet the literature contains no neural surrogate for systems where a moving vehicle constrains the flow, and none for pipe networks with junction coupling conditions. Existing remedies for autoregressive drift, which is the build-up of error when a model repeatedly consumes its own outputs, either assume smooth Gaussian-like errors or correct the trajectory only after it has already drifted.

Core Claim

The physics has two ingredients we need to name. A moving bottleneck is a slow vehicle at position $y(t)$ that limits the traffic flux passing it, measured relative to the vehicle. The constraint is $f(\rho) - \dot y\,\rho \le F_{\max}(\dot y)$, where $\rho$ is traffic density and $f$ is the flux. Density drops sharply across the vehicle. Classical entropy rules would reject such a downward jump, so it is called a non-classical shock, yet here it is physically correct (Modeling of moving bottlenecks in traffic flow: a PDE-ODE model with moving density constraints). The vehicle's speed obeys an ordinary differential equation driven by the density just downstream of it, $\dot y = \min\{V, v(\rho(y^+))\}$. The model is therefore a small hybrid multi-scale system: one or more discrete agents embedded in a continuum. At a pipe junction, the analogous extra rule is the equal-pressure coupling condition. Pressure is continuous across all branches at the junction, and Coupling conditions for gas networks governed by the isothermal Euler equations shows that this choice, unlike a simpler subsonic constraint, avoids non-physical pressure jumps.

Our mechanistic hypothesis is that rollout error in these systems is dominated by a feedback loop running through the interfaces. To first order,

$$\|\rho - \hat\rho\|_{L^1} \approx \text{(bulk error)} + |\Delta\rho|\,|y - \hat y|, \qquad \frac{d}{dt}|y-\hat y| \lesssim |v'|\,|\rho(y^+) - \hat\rho(y^+)|.$$

Here $\Delta\rho$ is the jump height and $v'$ is the slope of the speed–density law. The first relation holds because a displaced step contributes its height times the displacement. The second holds because the vehicle's speed error is driven by the density error at its downstream trace. A surrogate that smears the jump corrupts $\hat\rho(y^+)$ exactly where the agent reads it, and this closes the loop. If the trace is instead computed by an exact constrained Riemann solve, the loop is cut at the second relation. What remains is ordinary bulk error, which conservative flux-based networks already keep bounded. The same reasoning applies at junctions, where the network's one-sided states enter an equal-pressure half-Riemann problem rather than a learned trace.

The design is new in where it places the boundary between learned and exact computation. Neural finite-volume models learn every flux. Hybrid correction schemes call an exact solver for whole timesteps. We keep exactness at a fixed and very small set of locations: one cell per agent and one node per junction, at every step.

Research Program

The surrogate builds on the Neural Finite Volume (NFV) design from A Tutorial on Neural Network-Based Solvers for Hyperbolic Conservation Laws. That work has a network output interface fluxes $F_{i+1/2}$, updates cells by $u_i^{n+1} = u_i^n - \tfrac{\Delta t}{\Delta x}(F_{i+1/2}^n - F_{i-1/2}^n)$, and so conserves mass exactly. It also reports the gap we fill: NFV has no way to enforce a moving inequality constraint. We supply that mechanism by borrowing the fixed-grid reconstruction of A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem. In the cell containing the vehicle, that scheme reconstructs the sub-grid jump position and the constrained left and right states, then replaces the two adjacent fluxes with constrained ones. In our version, the learned left and right states feed this reconstruction. The constrained fluxes go into the conservative update, and the agent ODE is integrated from the reconstructed downstream state rather than from a cell average.

For several interacting vehicles, the single-vehicle reconstruction is replaced by the Constrained Riemann Solver of Interacting moving bottlenecks in traffic flow. That solver handles vehicles switching between active (constraining) and inactive (free-flowing) states. Its reported spurious oscillations come from the bulk discretization, and we will test whether learned bulk fluxes reduce them.

Junctions on the gas side are handled by the half-Riemann coupling used in An Asymptotic-Preserving Scheme for Isentropic Flow in Pipe Networks, with the equal-pressure condition. For traffic networks we use the Priority-based Riemann solver for traffic flow on networks. A central scheme for coupled hyperbolic systems constrains our design: coupling conditions imposed naively on transformed variables produce spikes and boundary layers that accumulate over time. Our coupling therefore always acts on the physical one-sided states, never on network latents.

Training uses multi-step unrolled losses with gradients passed through the exact interface solvers. These solvers are piecewise smooth. Where they switch branches, such as a bottleneck becoming active, we use one-sided gradients. Wherever a closed form exists, we use analytical gradients in the style of Differentiable Hybrid Traffic Simulation. That paper bridges continuum and agents for signal control but models neither moving bottlenecks nor junction pressure conditions.

The analysis component asks whether the error decomposition above actually describes the observed error. We will split rollout $L^1$ error into a part due to jump displacement, $|\Delta\rho|\,|y-\hat y|$, and a residual bulk part. The test is whether interface exactness changes the growth rate of the first part from superlinear to bounded while leaving the second part roughly unchanged.

Baselines

The naive reference is a classical Godunov scheme with the Chalons–Delle Monache–Goatin reconstruction, run at the same coarse resolution as the surrogate. The point of a learned bulk is accuracy at coarse resolution and on real data, not raw speed in 1D. This reference therefore tells us whether learning helps at all. A conservative scheme for non-classical solutions to a strongly coupled PDE-ODE problem reports convergence between $\mathcal{O}(\Delta x^{0.8})$ and $\mathcal{O}(\Delta x^{1.5})$ on its synthetic Riemann Cases 0–IV, and a fine-grid run of this same scheme serves as ground truth. The gas analogue is the asymptotic-preserving scheme. It reports first-order accuracy in time and second-order in space, and runs about 140 times faster than an explicit scheme at Mach parameter 0.001. We use it both as ground truth and as the coarse classical reference.

The strongest learned competitor is a plain NFV that receives the vehicle position and speed as extra input channels and is trained with the same unrolled loss. On classical Burgers problems, NFV reports up to 10× lower $L_2$ error than Godunov and Lax–Friedrichs (A Tutorial on Neural Network-Based Solvers for Hyperbolic Conservation Laws). We found no reported result on Lacuna for any neural surrogate on moving-bottleneck or equal-pressure junction problems, so every number in this regime will be new. This baseline is also the key ablation: it isolates whether exact interfaces, rather than architecture or training, account for any gain.

We also include an integral-loss Fourier neural operator, following Fourier neural operator for learning solutions to macroscopic traffic flow models. That paper reports MAE under 2.30 veh/km on pNeuma and roughly 50% error reduction over a physics-blind FNO. On the correction side we include HyPER (Model-Agnostic Knowledge Guided Correction for Improved Neural Surrogate Rollout), which reports a 68.3% average reduction in cumulative rollout error on 2D Navier–Stokes while calling the solver on about 30% of steps. We give HyPER our classical scheme as its simulator and the plain NFV as its surrogate.

All learned models share the same training trajectories, parameter count to within 10%, and unroll length, plus an equal hyperparameter search budget of 30 trials. They are compared at equal wall-clock per rollout, with HyPER's simulator calls included in its cost. Our method beats the field if it reduces jump-displacement error growth and long-horizon $L^1$ error relative to the plain NFV at equal cost, and if it matches or beats HyPER while using no full-step solver calls.

Why not just…?

Why not just run the classical reconstruction scheme, since 1D traffic is cheap? For speed alone this is a real threat, and we do not claim speed in 1D. The case for learning rests on two points. First, learned fluxes reach fine-grid accuracy on coarse grids, which matters for differentiable control over long horizons. Second, they can be calibrated to field data: on I-24, NFV outperformed calibrated classical models over a four-hour horizon. If the coarse classical reference matches our surrogate on the field data, we will report that the learned bulk adds nothing in this regime.

Why not just give a standard NFV the vehicle state as input and let it learn the constraint? This is the main ablation. The tutorial paper notes that the conservative stencil has no mechanism for an inequality constraint. A learned approximation may still be good enough on in-distribution Riemann data, so the decisive test is out-of-distribution: unseen ratios of vehicle speed to capacity, and more vehicles than seen in training. In that setting the feedback loop should expose any small trace bias.

Why not just correct drift after the fact with HyPER, a closed-loop observer, or a Thermalizer? HyPER resets whole states and needs thousands of training rollouts. The observer in Closed-Loop Neural Operator-Based Observer of Traffic Density needs live sensors and was shown only on a ring road. Thermalizer: Stable autoregressive neural emulation of spatiotemporal chaos assumes Gaussian-like drift, which the file notes breaks down at discontinuous shocks, so we do not expect it to transfer. Our method prevents the interface error from arising rather than repairing it, and the two approaches are compatible. We will also test our model with the observer added, to check whether the gains stack.

Proposed Experiments

The first experiment uses the synthetic Riemann Cases 0–IV and the four-vehicle queuing and overtaking scenarios. We train on short horizons, roll out 20 times longer, and report $L^1$ error, jump-position error $|y-\hat y|$, the rate of capacity-constraint violations, and spurious oscillation amplitude near the vehicles.

The second experiment uses gas T-junctions, both 1-to-2 and 2-to-1, at low Mach number under the isothermal and isentropic Euler equations. We report the pressure mismatch across junction branches, mass and momentum conservation error, and long-horizon $L^1$ error. A comparison then uses the same mechanism with a subsonic-constraint junction in place of equal pressure, to check that the surrogate inherits the physical advantage reported by the isothermal coupling paper.

The third experiment, on field data, trains on I-24 MOTION density fields. Where CIRCLES vehicle trajectories are available, it inserts those vehicles as moving constraints, and it reports 4-hour wave formation and dissipation error against the plain NFV. This would also be the first comparison of a moving-bottleneck model with large-scale trajectory data, a gap noted in the moving-bottleneck literature.

The decisive check is the error decomposition. If interface exactness is the cause of stability, the displacement term should stay bounded for our model and grow for the plain NFV, with similar bulk residuals for both. If both terms grow equally, the hypothesis is wrong. In that case we will report the method only as a constraint-satisfaction device, not as a remedy for compounding error.