Learning production functions for supply chains with graph neural networks
Serina Chang, Zhiyin Lin, Benjamin Yan, Swapnil Bembde, Qi Xiu, Chi Heem Wong, Yu Qin, Frank Kloster, Alex Luo, Raj Palleti, Jure Leskovec
TL;DR
This work defines temporal production graphs (TPGs) where unobserved production functions inside firms govern the flow from inputs to outputs and external transactions form time-evolving hyperedges. The authors propose a class of models that jointly learn production functions via an inventory module and forecast future transactions by coupling this module with extended temporal GNNs (SC-TGN, SC-GraphMixer), capable of handling hyperedges and predicting edge weights. They introduce a trainable inventory-based attention mechanism, a specialized inventory loss, and a two-stage decoder, enabling both production-function inference (MAP) and transaction forecasting (MRR, RMSE). The approach is validated on real transaction-level data and on SupplySim-generated data that mimics real-world properties and shocks, showing substantial improvements over strong baselines in both production-function learning (up to 50% MAP gains) and edge forecasting (up to 62% improvement). The work advances supply-chain ML and temporal graph learning by providing open-source tooling (SupplySim) and demonstrating practical applicability to demand forecasting, risk detection, and inventory optimization in production networks.
Abstract
The global economy relies on the flow of goods over supply chain networks, with nodes as firms and edges as transactions between firms. While we may observe these external transactions, they are governed by unseen production functions, which determine how firms internally transform the input products they receive into output products that they sell. In this setting, it can be extremely valuable to infer these production functions, to improve supply chain visibility and to forecast future transactions more accurately. However, existing graph neural networks (GNNs) cannot capture these hidden relationships between nodes' inputs and outputs. Here, we introduce a new class of models for this setting by combining temporal GNNs with a novel inventory module, which learns production functions via attention weights and a special loss function. We evaluate our models extensively on real supply chains data and data generated from our new open-source simulator, SupplySim. Our models successfully infer production functions, outperforming the strongest baseline by 6%-50% (across datasets), and forecast future transactions, outperforming the strongest baseline by 11%-62%
