End-to-end differentiable network traffic simulation with dynamic route choice
Pith reviewed 2026-05-10 15:55 UTC · model grok-4.3
The pith
An end-to-end differentiable traffic simulator using automatic differentiation enables efficient optimization of dynamic congestion tolls on large urban networks.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The paper introduces an end-to-end differentiable simulator based on the Link Transmission Model and Dynamic User Optimum route choice, where piecewise-linear operations admit subgradients and diverge ratios are continuous, thus supporting automatic differentiation for solving large optimization problems such as dynamic toll setting on the Chicago-Sketch network with 2500 links and 15000 variables in 40 minutes.
What carries the argument
Automatic differentiation applied to the Link Transmission Model's piecewise-linear min/max operations and the continuous diverge ratios derived from the Dynamic User Optimum model.
Load-bearing premise
Subgradients of the piecewise-linear min/max operations and the continuous diverge ratios from the DUO model provide sufficiently accurate gradients for stable convergence in gradient-based optimization.
What would settle it
A failure of the proposed simulator to produce a high-quality toll optimization solution on the Chicago-Sketch dataset within 3000 iterations would falsify the claim of its practical effectiveness.
Figures
read the original abstract
Optimization using network traffic models requires computing gradients of objective functions with respect to model parameters. However, derivation of such gradients has often been considered difficult or impractical due to their complexity and size. Conventional approaches rely on numerical differentiation or derivative-free methods that do not scale well with the parameter dimension, or on adjoint methods that require manual derivation for each specific model. This study proposes a novel end-to-end differentiable network traffic flow simulator based on automatic differentiation (AD), employing the Link Transmission Model (LTM) and a Dynamic User Optimum (DUO) route choice model. The LTM operates on continuous aggregate state variables through piecewise-linear min/max operations, which admit subgradients almost everywhere and thus require no smooth relaxation for AD. The DUO is also suitable for AD: although the shortest path search is itself discrete, the resulting diverge ratios at each node are continuous functions of per-destination vehicle counts and are thus differentiable. In order to demonstrate the capability of the proposed model, we solved a dynamic congestion toll optimization problem on the Chicago-Sketch dataset with approximately 2500 links, 1 million vehicles, a 3-hour duration, and 15000 decision variables. The proposed model successfully derived a high-quality solution in 3000 iterations, taking about 40 minutes. The simulator, implemented in Python and JAX, is released as open-source software named UNsim (https://github.com/toruseo/UNsim).
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript proposes an end-to-end differentiable traffic simulator combining the Link Transmission Model (LTM) with piecewise-linear min/max operations and a Dynamic User Optimum (DUO) route-choice model whose diverge ratios are continuous in vehicle counts. Implemented in JAX, the simulator is used to solve a dynamic congestion-toll optimization problem on the Chicago-Sketch network (~2500 links, 1 million vehicles, 3-hour horizon, 15 000 decision variables), reporting a high-quality solution after 3000 iterations in roughly 40 minutes. The code is released as open-source UNsim.
Significance. If the automatically differentiated subgradients prove accurate and stable, the work would enable gradient-based optimization of traffic models at scales that previously required derivative-free or manually derived adjoint methods, representing a practical advance for large-scale transportation network design. The open-source release strengthens reproducibility and potential follow-on use.
major comments (2)
- [Abstract] Abstract: the central claim that LTM min/max operations 'admit subgradients almost everywhere and thus require no smooth relaxation' and that DUO diverge ratios 'are continuous functions of per-destination vehicle counts and are thus differentiable' is load-bearing for the reported 3000-iteration, 15 000-variable convergence. No verification is supplied that JAX's automatic subgradient selection at the non-differentiable loci matches finite-difference gradients or avoids zero-gradient directions and instability when back-propagated through the full network and route-choice layers.
- [Results (Chicago-Sketch toll optimization)] Chicago-Sketch experiment: the statement that a 'high-quality solution' was obtained provides no diagnostics (gradient-norm histories, comparison against a non-differentiable baseline, or sensitivity to subgradient choice) that would confirm the AD gradients, rather than algorithmic heuristics, drove reliable convergence on the 15 000-variable instance.
minor comments (2)
- [Abstract] The abstract and methods should explicitly state the precise form of the toll-optimization objective and any regularization terms applied to the 15 000 decision variables.
- [Figures] Figure captions and axis labels in the results section would benefit from clearer indication of which curves correspond to the differentiable simulator versus any reference methods.
Simulated Author's Rebuttal
We thank the referee for the detailed and constructive report. The two major comments correctly identify that the manuscript currently lacks explicit numerical verification of the automatic-differentiation subgradients and supporting convergence diagnostics. We address both points below and will incorporate the requested material in the revised manuscript.
read point-by-point responses
-
Referee: [Abstract] Abstract: the central claim that LTM min/max operations 'admit subgradients almost everywhere and thus require no smooth relaxation' and that DUO diverge ratios 'are continuous functions of per-destination vehicle counts and are thus differentiable' is load-bearing for the reported 3000-iteration, 15 000-variable convergence. No verification is supplied that JAX's automatic subgradient selection at the non-differentiable loci matches finite-difference gradients or avoids zero-gradient directions and instability when back-propagated through the full network and route-choice layers.
Authors: We agree that direct numerical verification of the subgradients is necessary to support the central claims. In the revised manuscript we will add a dedicated verification subsection (likely in Section 3 or 4) that compares JAX-computed subgradients against central finite-difference approximations on small synthetic networks (both for isolated LTM min/max operations and for the full LTM+DUO pipeline). We will also report the frequency of non-differentiable points encountered during the Chicago-Sketch run and any safeguards (e.g., subgradient selection rules) used by JAX. These additions will be limited to a few pages and will not alter the core algorithmic contribution. revision: yes
-
Referee: [Results (Chicago-Sketch toll optimization)] Chicago-Sketch experiment: the statement that a 'high-quality solution' was obtained provides no diagnostics (gradient-norm histories, comparison against a non-differentiable baseline, or sensitivity to subgradient choice) that would confirm the AD gradients, rather than algorithmic heuristics, drove reliable convergence on the 15 000-variable instance.
Authors: We acknowledge that the current presentation of the Chicago-Sketch results is insufficient to isolate the contribution of the AD gradients. In revision we will augment the results section with (i) a plot of gradient-norm history over the 3000 iterations, (ii) a brief comparison of final objective values obtained with the differentiable simulator versus a derivative-free baseline (e.g., a simple random-search or Nelder-Mead run on a reduced problem), and (iii) a short sensitivity test repeating the optimization with different JAX subgradient modes or with added smoothing. These diagnostics will be presented concisely and will strengthen the claim that the reported convergence is attributable to the end-to-end differentiability. revision: yes
Circularity Check
Differentiability and optimization results follow from model properties and empirical demonstration without circular reduction
full rationale
The paper asserts that LTM piecewise-linear min/max operations admit subgradients almost everywhere (allowing direct AD) and that DUO diverge ratios are continuous functions of per-destination vehicle counts (hence differentiable). These are presented as intrinsic mathematical properties of the selected models rather than results derived from fitted parameters, self-referential definitions, or prior self-citations. The central empirical claim—successful convergence of gradient-based toll optimization on the external Chicago-Sketch network after 3000 iterations—is a reported outcome of running the simulator, not a quantity forced by construction or reduced to the inputs. No load-bearing step in the derivation chain (as described in the abstract) equates a prediction to its own fitted or defined inputs.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption LTM operates on continuous aggregate state variables through piecewise-linear min/max operations, which admit subgradients almost everywhere and thus require no smooth relaxation for AD.
- domain assumption The DUO shortest-path search yields diverge ratios at each node that are continuous functions of per-destination vehicle counts and are thus differentiable.
Reference graph
Works this paper leans on
-
[1]
Towards differentiable agent-based simulation
Andelfinger, P., 2023. Towards differentiable agent-based simulation. ACM Transactions on Modeling and Computer Simulation 33 (1--2), 1--26
work page 2023
- [2]
-
[3]
Baydin, A. G., Pearlmutter, B. A., Radul, A. A., Siskind, J. M., 2018. Automatic differentiation in machine learning: a survey. Journal of Machine Learning Research 18 (153), 1--43
work page 2018
-
[4]
Bellman, R., 1958. On a routing problem. Quarterly of applied mathematics 16 (1), 87--90
work page 1958
-
[5]
Discrete choice methods and their applications to short term travel decisions
Ben-Akiva, M., Bierlaire, M., 1999. Discrete choice methods and their applications to short term travel decisions. In: Hall, R. (Ed.), Handbook of Transportation Science. Springer, pp. 5--33
work page 1999
-
[6]
Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., Zhang, Q., 2018. JAX : composable transformations of Python+NumPy programs. http://github.com/jax-ml/jax
work page 2018
-
[7]
Chen, R. T. Q., Rubanova, Y., Bettencourt, J., Duvenaud, D., 2018. Neural ordinary differential equations. In: Advances in Neural Information Processing Systems (NeurIPS)
work page 2018
-
[8]
A simulation-based optimization algorithm for dynamic large-scale urban transportation problems
Chong, L., Osorio, C., 2018. A simulation-based optimization algorithm for dynamic large-scale urban transportation problems. Transportation Science 52 (3), 637--656
work page 2018
- [9]
- [10]
- [11]
- [12]
- [13]
- [14]
-
[15]
Friesz, T. L., Bernstein, D., Smith, T. E., Tobin, R. L., Wie, B.-W., 1993. A variational inequality formulation of the dynamic network user equilibrium problem. Operations Research 41 (1), 179--191
work page 1993
-
[16]
Managing network congestion with link-based incentives: A surrogate-based optimization approach
Fu, Q., Wu, J., Wu, X., Sun, J., Tian, Y., 2024. Managing network congestion with link-based incentives: A surrogate-based optimization approach. Transportation Research Part A: Policy and Practice 182, 104033
work page 2024
- [17]
-
[18]
Hysteresis phenomena of a macroscopic fundamental diagram in freeway networks
Geroliminis, N., Sun, J., 2011 a . Hysteresis phenomena of a macroscopic fundamental diagram in freeway networks. Transportation Research Part A: Policy and Practice 45 (9), 966--979
work page 2011
-
[19]
Properties of a well-defined macroscopic fundamental diagram for urban traffic
Geroliminis, N., Sun, J., 2011 b . Properties of a well-defined macroscopic fundamental diagram for urban traffic. Transportation Research Part B: Methodological 45 (3), 605--617
work page 2011
-
[20]
Discrete adjoint gradient computation for multiclass traffic flow models on road networks
Goatin, P., Klar, A., Mezquita-Nieto, C., 2026. Discrete adjoint gradient computation for multiclass traffic flow models on road networks. arXiv preprint arXiv:2604.00670
- [21]
-
[22]
Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd Edition
Griewank, A., Walther, A., 2008. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd Edition. SIAM
work page 2008
-
[23]
DiffTaichi : Differentiable programming for physical simulation
Hu, Y., Anderson, L., Li, T.-M., Sun, Q., Carr, N., Ragan-Kelley, J., Durand, F., 2020. DiffTaichi : Differentiable programming for physical simulation. In: International Conference on Learning Representations (ICLR)
work page 2020
-
[24]
Iryo, T., 2013. Properties of dynamic user equilibrium solution: existence, uniqueness, stability, and robust solution methodology. Transportmetrica B: Transport Dynamics 1 (1), 52--67
work page 2013
-
[25]
Kingma, D. P., Ba, J., 2015. Adam: A method for stochastic optimization. In: International Conference on Learning Representations (ICLR)
work page 2015
-
[26]
Dynamic user optimal assignment with physical queues for a many-to-many OD pattern
Kuwahara, M., Akamatsu, T., 2001. Dynamic user optimal assignment with physical queues for a many-to-many OD pattern. Transportation Research Part B: Methodological 35 (5), 461--479
work page 2001
- [27]
-
[28]
Traffic assignment as a differentiable program
Li, J., Nie, M., 2026. Traffic assignment as a differentiable program. Available at SSRN
work page 2026
-
[29]
Lighthill, M. J., Whitham, G. B., 1955. On kinematic waves. II . a theory of traffic flow on long crowded roads. Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences 229 (1178), 317--345
work page 1955
- [30]
-
[31]
An enhanced SPSA algorithm for the calibration of dynamic traffic assignment models
Lu, L., Xu, Y., Antoniou, C., Ben-Akiva, M., 2015. An enhanced SPSA algorithm for the calibration of dynamic traffic assignment models. Transportation Research Part C: Emerging Technologies 51, 149--166
work page 2015
-
[32]
Incorporating graph neural network into route choice model
Ma, Y., Seo, T., 2025. Incorporating graph neural network into route choice model. arXiv preprint arXiv:2503.02315
-
[33]
Mahmassani, H. S., Williams, J. C., Herman, R., 1984. Investigation of network-level traffic flow relationships: some simulation results. Transportation Research Record 971, 121--130
work page 1984
-
[34]
Makigami, Y., Newell, G. F., Rothery, R., 1971. Three-dimensional representation of traffic flow. Transportation Science 5 (3), 302--313
work page 1971
-
[35]
Ultra-fast traffic nowcasting and control via differentiable agent-based simulation
Makinoshima, F., Yamaguchi, Y., Segawa, E., Niinuma, K., Qian, S., 2026. Ultra-fast traffic nowcasting and control via differentiable agent-based simulation. arXiv preprint arXiv: 2603.25068
- [36]
-
[37]
Newell, G. F., 1993 a . A simplified theory of kinematic waves in highway traffic, part I : General theory. Transportation Research Part B: Methodological 27 (4), 281--287
work page 1993
-
[38]
Newell, G. F., 1993 b . A simplified theory of kinematic waves in highway traffic, part II : Queueing at freeway bottlenecks. Transportation Research Part B: Methodological 27 (4), 289--303
work page 1993
-
[39]
Newell, G. F., 1993 c . A simplified theory of kinematic waves in highway traffic, part III : Multi-destination flows. Transportation Research Part B: Methodological 27 (4), 305--313
work page 1993
-
[40]
Osorio, C., Chong, L., 2015. A computationally efficient simulation-based optimization algorithm for large-scale urban transportation problems. Transportation Science 49 (3), 623--636
work page 2015
-
[41]
Dynamic network loading: A stochastic differentiable model that derives link state distributions
Osorio, C., Flotterod, G., Bierlaire, M., 2011. Dynamic network loading: A stochastic differentiable model that derives link state distributions. Transportation Research Part B: Methodological 45 (9), 1410--1423
work page 2011
-
[42]
Traffic simulation with METANET
Papageorgiou, M., Papamichail, I., Messmer, A., Wang, Y., 2010. Traffic simulation with METANET . In: Fundamentals of traffic simulation. Springer, pp. 399--430
work page 2010
-
[43]
Pontryagin, L. S., Boltyanskii, V. G., Gamkrelidze, R. V., Mishchenko, E. F., 1962. The mathematical theory of optimal processes. Interscience Publishers, New York
work page 1962
-
[44]
Poole, A., Kotsialos, A., 2016. Second order macroscopic traffic flow model validation using automatic differentiation with resilient backpropagation and particle swarm optimisation algorithms. Transportation Research Part C: Emerging Technologies 71, 356--381
work page 2016
-
[45]
Python Software Foundation , 2022. The Python Language Reference
work page 2022
-
[46]
Ran, B., Boyce, D. E., LeBlanc, L. J., 1993. A new class of instantaneous dynamic user-optimal traffic assignment models. Operations Research 41 (1), 192--202
work page 1993
-
[47]
L., Krichene, W., Goatin, P., Bayen, A
Reilly, J., Samaranayake, S., Delle Monache, M. L., Krichene, W., Goatin, P., Bayen, A. M., 2015. Adjoint-based optimization on a network of discretized scalar conservation laws with applications to coordinated ramp metering. Journal of optimization theory and applications 167 (2), 733--760
work page 2015
- [48]
-
[49]
Macroscopic Traffic Flow Simulation: Fundamental Mathematical Theory and Python Implementation
Seo, T., 2023. Macroscopic Traffic Flow Simulation: Fundamental Mathematical Theory and Python Implementation. Corona Publishing Co., Ltd., (in Japanese)
work page 2023
-
[50]
UXsim : lightweight mesoscopic traffic flow simulator in pure Python
Seo, T., 2025. UXsim : lightweight mesoscopic traffic flow simulator in pure Python . Journal of Open Source Software 10 (106), 7617
work page 2025
-
[51]
A physics-informed deep learning paradigm for traffic state and fundamental diagram estimation
Shi, R., Mo, Z., Huang, K., Di, X., Du, Q., 2022. A physics-informed deep learning paradigm for traffic state and fundamental diagram estimation. IEEE Transactions on Intelligent Transportation Systems 23 (8), 11688--11698
work page 2022
-
[52]
Enhancing discrete choice models with representation learning
Sifringer, B., Lurkin, V., Alahi, A., 2020. Enhancing discrete choice models with representation learning. Transportation Research Part B: Methodological 140, 236--261
work page 2020
-
[53]
Smits, E.-S., Bliemer, M. C. J., Pel, A. J., van Arem, B., 2015. A family of macroscopic node models. Transportation Research Part B: Methodological 74, 20--39
work page 2015
- [54]
- [55]
-
[56]
Song, W., Han, K., Wang, Y., Friesz, T. L., del Castillo, E., 2017. Statistical metamodeling of dynamic network loading. Transportation Research Part B: Methodological
work page 2017
- [57]
- [58]
- [59]
-
[60]
Tamp \`e re, C. M. J., Corthout, R., Cattrysse, D., Immers, L. H., 2011. A generic class of first order node models for dynamic macroscopic simulation of traffic flows. Transportation Research Part B: Methodological 45 (1), 289--309
work page 2011
-
[61]
Transportation networks for researchAccessed 2021-10-01
Transportation Networks for Research Core Team , 2021. Transportation networks for researchAccessed 2021-10-01
work page 2021
-
[62]
A short note on the link transmission model
Wada, K., Jin, W., 2017. A short note on the link transmission model. Working Paper on ResearchGate
work page 2017
- [63]
-
[64]
The link transmission model for dynamic network loading
Yperman, I., 2007. The link transmission model for dynamic network loading. Ph.D. thesis, Katholieke Universiteit Leuven
work page 2007
-
[65]
Yperman, I., Logghe, S., Tampere, C. M., Immers, B., 2006. The multicommodity link transmission model for dynamic network loading. In: Transportation Research Board 85th Annual Meeting
work page 2006
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.