Abstract
Time series forecasting is an important task in many fields ranging from supply chain management to weather forecasting. Recently, Transformer neural network architectures have shown promising results in forecasting on common time series benchmark datasets. However, application to supply chain demand forecasting, which can have challenging characteristics such as sparsity and cross-series effects, has been limited. In this work, we explore the application of Transformer-based models to supply chain demand forecasting. In particular, we develop a new Transformer-based forecasting approach using a shared, multi-task per-time series network with an initial component applying attention across time series, to capture interactions and help address sparsity. We provide a case study applying our approach to successfully improve demand prediction for a medical device manufacturing company. To further validate our approach, we also apply it to public demand forecasting datasets as well and demonstrate competitive to superior performance compared to a variety of baseline and state-of-the-art forecast methods across the private and public datasets.
Introduction
Demand forecasting within supply chains presents a unique set of challenges that distinguish it from traditional time series tasks like weather or electricity load prediction. Retail and manufacturing data are frequently characterized by extreme sparsity—where many time periods record zero sales—and complex cross-series effects, such as product cannibalization or promotional synergy. Furthermore, supply chains must often manage "cold starts," where new products lack the historical data necessary for traditional univariate forecasting methods.
While Transformer architectures have set new benchmarks in sequence modeling, their application to supply chain demand has been constrained. Most existing models focus on temporal dependencies within a single series, treating different products as independent entities or attempting to model them globally in ways that risk overfitting. This paper introduces the Inter-Series Transformer, a novel architecture designed to explicitly model the relationships between products to overcome data sparsity and improve forecast accuracy.
Methodology
The Inter-Series Transformer architecture deviates from standard Transformer designs through four strategic modifications tailored for supply chain dynamics:
1. Inter-Series Attention Layer
The core innovation is an initial attention mechanism that operates across different product series before temporal processing begins. By using a target product's history as a query and the histories of other products as keys and values, the model can "borrow" information from high-volume "anchor" products. This is particularly effective for sparse or new items that lack sufficient individual signal.
2. Multi-task, Shared Backbone
Following the inter-series step, the data is processed by a Transformer network with parameters shared across all products. This multi-task approach effectively pools the training data, allowing the model to learn generalized patterns that individual series models might miss, thereby improving overall robustness.
3. High-Dimensional Feature Projection
To handle the heterogeneous nature of retail data, the model maps categorical identifiers (e.g., location, product ID) and real-valued features (e.g., price, promotions) into high-dimensional spaces independently. These projections are then concatenated, preserving the unique signals of different data types more effectively than simple embeddings.
4. Date-Based Temporal Features
Interestingly, the authors found that standard sinusoidal positional encodings were less effective for retail data. Instead, the model utilizes raw date-time features—such as month, year, and day of the week—as direct inputs, providing better stability for seasonal demand patterns.
Experimental Results
The model was evaluated against state-of-the-art baselines using both private industrial data and public benchmarks.
Private Medical Device Dataset
Tested on two subsets of monthly data from a medical device manufacturer, the Inter-Series Transformer excelled in short-to-medium-term horizons. For 1–3 month forecasts, it achieved a 14.7% wMAPE, significantly outperforming the business baseline (21.7%) and established models like DeepAR (37.6%) and PatchTST (16.5%).
Public Benchmarks (Walmart M5 and Store Sales)
On the Walmart M5 dataset—a gold standard for granular retail forecasting—the model achieved a top-tier RMSSE of 0.809, surpassing DLinear (0.956) and the Temporal Fusion Transformer (1.083). On the Walmart Store Sales dataset, it remained highly competitive, ranking second only to PatchTST.
Discussion and Insights
A key finding of this research is that sparsity can be mitigated by leveraging cross-series relationships. The attention mechanism allows the model to identify stable, high-volume products to inform the forecasts of more volatile ones. Furthermore, by isolating cross-product interactions to the initial layer, the model maintains computational efficiency while providing interpretability; the resulting attention heatmaps allow supply chain managers to visualize product correlations.
However, the model's advantage is most pronounced in short-term forecasting. For longer horizons (13–24 months), the performance gap narrows, as models like PatchTST or TFT, which prioritize long-range temporal dependencies, occasionally perform better.
Conclusion
The Inter-Series Transformer demonstrates that explicitly modeling product interactions is a powerful strategy for supply chain forecasting. By combining inter-series attention with a shared multi-task backbone, the architecture successfully addresses the challenges of sparse data and cross-series dependencies. Future work will explore extending this attention mechanism to include the features of neighboring products and increasing the depth of inter-series layers to capture more complex, non-linear interactions.
Summary updated