The model addresses the challenge of integrating heterogeneous event data, which includes textual descriptions, numerical indicators, and categorical attributes, into spatio-temporal forecasting. By converting these diverse data types into a unified textual representation, the system aims to improve the predictability and resilience of e-commerce logistics systems that are increasingly integrated into smart urban infrastructure.
The study, published in the Journal of King Saud University Computer and Information Sciences, focuses on the complex interactions between demand and supply within Warehouse-Distribution Integration (WDI) systems. In these networks, topological relationships are influenced not only by economic factors but also by consumer behavior in response to daily events such as weather conditions, epidemics, and promotional activities. The authors argue that previous methods often treated demand and supply sequences independently or failed to capture the dynamic, non-linear interactions driven by these exogenous events.
The core innovation of D2TST is its Data2Text mechanism, which transforms structured event data into natural language descriptions. This approach allows a pre-trained language model to process heterogeneous signals that would otherwise be difficult to align. The framework consists of three main components: a Textual Event Encoder (TEE), a spatio-temporal encoder block, and a multi-step demand-supply decoder. The TEE uses a fine-tuned DeBERTa-v3 model to extract semantic information from the generated event texts, creating a common latent space for different types of event data.
To handle the spatial and temporal dimensions of the problem, the researchers developed a Graph-Aware Recurrent Cell (GARC). This component integrates a Relational Graph Mixer (RGM) into the update and reset gates of a Gated Recurrent Unit (GRU). The RGM captures spatial dependencies using multi-view graphs that represent distance, neighbor relationships, functional type similarity, and crowd similarity. By incorporating these graph structures directly into the recurrent cell, the model can account for how events propagate across different regions of the supply chain network.
The model was evaluated on two real-world datasets from JD Logistics, covering Shanghai and Zhengzhou. The Shanghai dataset includes 282 delivery stations and data from 2021 to 2022, while the Zhengzhou dataset covers 71 stations over a similar period. Together, the datasets encompass 339.24 million orders and 25.7 million users. The event data includes emergent events like public health emergencies and weather changes, as well as periodic events such as festivals and promotions, which are recorded in various formats including text, numbers, and categories.
In the experimental setup, the model uses a sliding window approach with a history length of seven days to predict the next seven days of demand and supply. The training process involves fine-tuning the textual encoder on a specific event dataset from 2020 to align the language model with the demand-supply forecasting task. During inference, the parameters of the textual encoder are frozen to ensure stable representation of event impacts. The model is trained using an L1 loss function that balances the prediction errors for both demand and supply.
The results demonstrate that D2TST consistently outperforms state-of-the-art baselines across multiple metrics, including Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Symmetric Mean Absolute Percentage Error (sMAPE). On the Shanghai dataset, D2TST achieved a 10.46% improvement in demand prediction and an 18.21% improvement in supply prediction compared to the MulSTE baseline. In Zhengzhou, the improvements were even more pronounced, with 30.84% and 31.47% gains in demand and supply prediction, respectively. These findings suggest that the unified representation of heterogeneous events significantly enhances the model’s ability to capture event-driven dynamics.
Ablation studies further highlight the importance of each component in the framework. Removing the Supply-Demand Bridging Attention (SDBA) module, which models the interaction between demand and supply states, led to a significant degradation in performance. Similarly, replacing the GRU-based cells with LSTM or the GCN-based graph aggregation with Graph Attention Networks resulted in higher prediction errors. The controlled comparison of event representation strategies showed that the Data2Text approach achieved the lowest mean MAE compared to alternatives like concatenation fusion or late fusion, validating the effectiveness of the textual transformation.
The analysis of attention weights revealed that different graph views contribute differently to the learning process. For supply representation, the crowd-similarity graph received high weights when learning long-term information, while the type-similarity graph was more important for short-term learning. For demand representation, the weight distributions were nearly opposite between the update and reset gates, indicating that multi-view regional graphs play distinct roles in encoding long- and short-term dependencies. The adaptive graph learned by the model also showed strong agreement with high-risk areas during the COVID-19 outbreak, providing visual evidence of the model’s interpretability.
The study acknowledges certain limitations, particularly in the handling of emergent events like pandemics, which can cause supply paralysis and subsequent decreases in purchase demand. The model tends to balance the error rates between demand and supply prediction, which may lead to slightly weaker performance in specific scenarios where one side is disproportionately affected. However, the authors note that this gap can be compensated by adjusting the loss ratio between the two tasks. The framework is designed to be scalable and can be extended to other event-related multi-variable spatio-temporal prediction tasks beyond e-commerce logistics.
This research contributes to the field of spatio-temporal prediction by demonstrating the utility of large language models in processing heterogeneous event data for supply chain management. By bridging the gap between textual semantics and numerical forecasting, D2TST offers a robust solution for maintaining dynamic demand-supply balance in urban networks. The findings have implications for improving operational stability and socio-economic resilience in logistics systems that are increasingly exposed to diverse exogenous shocks.
The authors suggest that future work could explore the application of this framework in other domains where demand and supply are interrelated and affected by external events. The ability to integrate multi-source heterogeneous data through a unified textual interface provides a new perspective on how to leverage foundation models for time-series forecasting. As urban logistics continue to evolve into highly interconnected spatial networks, such data-driven approaches will be essential for managing the complexities of modern supply chains.
To capture the contextual drivers behind sudden order fluctuations, the data pipeline integrated heterogeneous records from several civic and meteorological sources alongside commercial logistics data. The researchers gathered 13,130 news headlines from the Shanghai municipal portal using targeted keywords such as epidemic, lockdown, resumption, and masks, pairing them with daily counts of public health outbreak and risk zones. External environmental inputs included official three-hour temperature and precipitation measurements converted into daily averages, alongside 31 recurring calendar events comprising 20 traditional festivals and 11 platform promotional campaigns. These records enabled the model to account for sudden behavioral shifts, such as pluvial shocks where heavy rainfall induces consumer risk aversion and transit congestion, triggering simultaneous declines in order placement and station dispatch capacity.
The linguistic adaptation of the event encoder relies on an auxiliary masked language modeling task designed around operational equilibrium rather than generic semantic prediction. A directional calculator assigned trend tokens, labeling non-increasing imbalance as an operational advantage and growing divergence as a disadvantage, to guide the DeBERTa encoder.
Within the spatio-temporal architecture, station relationships are formalized through four specialized graph perspectives combined with an adaptive adjacency matrix. A residual non-graph learning branch captures localized variations that bypass network topology, ensuring that regional anomalies are not forced into structural assumptions. When combining these spatial embeddings across time, the bridging attention module uses continuous sigmoid gating derived from event hidden states. This soft modulation retains equal contributions from self-attention and cross-attention even during periods lacking recorded event activity, avoiding artificial hard thresholds.
The end-to-end framework was executed in PyTorch on a single workstation equipped with 24 gigabytes of graphics memory, processing batches of 16 sliding windows over training runs capped at 200 epochs. Optimization utilized the Adam algorithm with an initial learning rate of 0.001 that decayed tenfold after 150 steps, with early stopping triggered after ten non-improving epochs. Evaluation across strictly partitioned seven-to-two-to-one training, validation, and testing splits confirmed that an intermediate hidden embedding dimension of 64 yielded peak forecasting accuracy.
Subject of Research: Spatio-temporal prediction of supply chain demand and supply using Data2Text-based heterogeneous event representation
Article Title: D2TST: Data2Text-based heterogeneous event representation for spatio-temporal prediction on supply chain networks
Article References: Lin, L., Lin, Z., Feng, J., Xia, K., & Zhang, Q. (2026). D2TST: Data2Text-based heterogeneous event representation for spatio-temporal prediction on supply chain networks. Journal of King Saud University Computer and Information Sciences, 38(10), Article 1070. https://doi.org/10.1007/s44443-026-01487-8
Image Credits: AI Generated
DOI: 10.1007/s44443-026-01487-8
Keywords: supply chain prediction, spatio-temporal forecasting, Data2Text, heterogeneous event data, logistics networks, DeBERTa-v3, Graph-Aware Recurrent Cell, demand-supply interaction, JD Logistics, urban resilience, e-commerce logistics, multi-view graphs, event-driven forecasting, machine learning, supply chain management
Cite Scienmag News
Denise Maddox. (November 26, 2026). Text-based model predicts supply chain demand and supply. Scienmag. https://scienmag.com/text-based-model-predicts-supply-chain-demand-and-supply/
Denise Maddox. "Text-based model predicts supply chain demand and supply." Scienmag, 26 November 2026, https://scienmag.com/text-based-model-predicts-supply-chain-demand-and-supply/. Accessed 26 November 2026.
Denise Maddox. "Text-based model predicts supply chain demand and supply." Scienmag. November 26, 2026. https://scienmag.com/text-based-model-predicts-supply-chain-demand-and-supply/








