A differentiable model of supply-chain shocks

Saad Hamid [email protected], José Moran [email protected], Luca Mungo [email protected], Arnau Quera - Bofarull [email protected], Sebastian Towers [email protected] · 2025

Read A differentiable model of supply-chain shocks by Saad Hamid [email protected], José Moran [email protected], Luca Mungo [email protected], Arnau Quera - Bofarull [email protected], Sebastian Towers [email protected] (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-05231.txt.

Introduction

Saad Hamid and co-authors show how to calibrate agent-based models of supply chains far faster by making them differentiable and running them on graphics chips. Such models can trace how shocks spread through supply nets, a need made clear by COVID-19 and the war in Ukraine.

Calibration of these models is the hard part. With automatic differentiation, the authors report speed gains of more than a thousandfold over non-differentiable baselines in their tests. That jump opens the door to supply models at a scale that was out of reach, where each firm's links and buffers can be fit to data.

Catalog record

CREATORSaad Hamid [email protected], José Moran [email protected], Luca Mungo [email protected], Arnau Quera - Bofarull [email protected], Sebastian Towers [email protected]
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE14 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2511-05231

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

A differentiable model of supply-chain shocks Saad Hamid [email protected], José Moran [email protected], Luca Mungo [email protected], Arnau Quera - Bofarull [email protected], Sebastian Towers [email protected] Abstract Modelling how shocks propagate in supply chains is an increasingly important challenge in economics. Its relevance has been highlighted in recent years by events such as Covid-19 and the Russian invasion of Ukraine. Agent-based models (ABMs) are a promising approach for this problem. However, calibrating them is hard. We show empirically that it is possible to achieve speed ups of over 3 orders of magnitude when calibrating ABMs of supply networks by running them on GPUs and using automatic differentiation, compared to non-differentiable baselines. This opens the door to scaling ABMs to model the whole global supply network. \workshoptitle Differentiable Systems and Scientific Machine Learning (EurIPS) 1 Introduction Supply-chain disruptions cause macroeconomic damages 7 , and yet, despite an established research tradition 17 ; 1 ; 4 , they remain difficult to model realistically 9 . This challenge arises from fundamental limitations in existing approaches. Traditional economic models rely on comparative statics and cannot capture the explicitly dynamical phenomena that characterize disruption propagation through supply networks. Many modern machine-learning methods are similarly constrained by data scarcity: the historical record contains only a few disruptions (e.g., pandemics or natural disasters) on which to train, making it difficult to generalize across different types of shocks or network structures. Agent-based models (ABMs) ( 2 ) offer a promising alternative to these limitations. ABMs are a computational paradigm where a collection of agents and their interactions are modelled explicitly in a simulator. Unlike statistical methods, ABMs provide mechanistic models that recover macroscopic quantities from the bottom-up through emergent processes. ABMs are therefore a natural choice for modelling supply chains disruptions, by capturing the micro-dynamics of each firm’s production and inventory management ( 12 ; 13 ; 14 ) . However, ABMs are hard to calibrate. These models contain latent parameters that must be calibrated to match real-world observations according to some preferred metric. For example, firm productivity may not be directly observable and must be inferred from macroscopic quantities. Calibration requires evaluating the simulator at multiple points in parameter space — potentially thousands or millions of times — incurring very high computational costs when the simulator is slow to run. Furthermore, the intractable likelihood function of ABMs prevents straightforward application of Bayesian calibration methods, hindering proper uncertainty quantification. Several approaches have emerged to mitigate these calibration challenges. These range from developing surrogate methods that mimic ABM outputs at greater speed ( 10 ; 25 ) , to neural-based approaches that directly learn likelihood or posterior distributions ( 11 ) . There has also been significant effort in tensorizing ABMs to leverage GPU acceleration, achieving substantial speedups ( 8 ) . Furthermore, applying automatic differentiation to ABMs enables fast sensitivity analyses that can greatly accelerate calibration methods ( 8 ; 24 ) . In this work, we present a supply chain ABM implemented in JAX ( 6 ) , a differentiable programming, high-performance numerical computing framework for Python. We demonstrate how supply chain models can be made amenable to tensorization across thousands of firm agents, achieving substantial speed-ups compared to traditional implementations. Furthermore, by leveraging JAX ’s automatic differentiation (AD) capabilities and its probabilistic programming library Numpyro ( 20 ) , we apply generalized variational inference to perform efficient ABM calibration with proper uncertainty quantification over thousands of parameters. 2 Background and Related Work Attempts to model production networks date back to Leontief’s Input-Output framework 17 , later extended to dynamic and firm-level contexts by Long and Plosser 18 , Acemoğlu et al. 1 , and Baqaee and Farhi 4 ; 3 . These models, widely used in the mainstream economic literature, study shock propagation through comparative statics : they compute equilibrium allocations before and after an exogenous productivity shocks, and compare outcomes such as aggregate output. While useful to understand the effects of network topology on shock propagation, this approach misses dynamical features like inventory adjustment or time-dependent recovery. To overcome this, researchers have turned to agent-based models (ABMs) which model supply-chain dynamics from the bottom-up. Building on the ARIO model of Hallegatte 12 ; 13 , recent work has replicated real-world shock propagation such as the 2011 Tohoku earthquake 14 , the effect of the Covid-19 lockdowns in the UK’s economy 22 or the effect on the Austrian economy of an embargo on Russian gas 21 . However, none of these works attempted a serious calibration of their models beyond parameter exploration. Parameter estimation in ABMs has traditionally relied on Approximate Bayesian computation (ABC) methods, which sidestep intractable likelihood computation by matching summary statistics between simulated and observed data. While this approach provides a general framework for ABM calibration, it suffers from sensitivity to summary statistic selection and poor scaling in high-dimensional parameter spaces ( 23 ) . These limitations have motivated the development of more sophisticated methodological approaches. One prominent strategy develops surrogate models that approximate ABM behavior while maintaining computational tractability and differentiability. By replacing the original ABM with these more amenable representations, researchers can apply established parameter estimation techniques, including Markov Chain Monte Carlo and gradient-based variational inference 25 ; 10 ; 19 ; 16 . Neural methods represent another paradigm, directly learning the mapping from simulator parameters to posterior distributions ( 11 ; 5 ) . These approaches offer compelling advantages through amortized inference—once trained, they provide immediate posterior estimates for new observations without retraining. However, their inability to exploit gradient information limits efficiency in high-dimensional parameter spaces. Most recently, advances in differentiable programming have enabled a third approach that exploits the inherent computational structure of ABMs. Network-based ABMs in epidemiology have demonstrated high degrees of tensorization, achieving substantial GPU acceleration ( 8 ) . By applying relaxation techniques to discrete randomness and control flow structures, these methods integrate ABMs directly into AD frameworks, enabling end-to-end optimization without the approximation errors of surrogate models or the gradient limitations of neural approaches ( 24 ) . 3 Methods 3.1 Model Figure 1: A : We model a directed production network where firms produce to serve demand from other firms, households, government, and foreign customers. B : In each period, an exogenous shock may limit each firm’s capacity to produce, then firms receive and place orders, produce subject to input inventories and a capacity limit, and update inventories. We model a directed production network of M firms, where each firm i produces one good to serve demand from other firms (intermediate demand) as well as households, government, and foreign customers (final demand, d_{i} ). Time is discrete: in each period, firms receive and place orders, produce subject to input inventories and a capacity limit, and update inventories; at the beginning of each period, an exogenous shock can decrease the maximum output that they can produce. Input requirements are encoded by a technical-coefficient matrix \mathbf{A} (entries A_{ij} are units of input j required to produce one unit of output i ), and inputs and outputs are tied by the formula f\left(S_{ij}\right)=z_{i}\min\frac{S_{ij}}{A_{ij}} , where z_{i} is the productivity and set to z_{i}=1 in absence of a shock. Firms try to maintain a target inventory S^{\text{target}}_{ij}=n_{i}S_{ij}(0) , enough to produce

Read the complete text