Large-Scale Time-Series Forecasting for Supply Chain Optimization Using Temporal Fusion Transformers
Large-Scale Time-Series Forecasting for Supply Chain Optimization Using Temporal Fusion Transformers
Authors:
Dr. Rajanikanta Mohanty
Dept. of Computer Science and Engineering
JAIN (Deemed to-be University)
Bengaluru, India
Sohan Saha
Dept. of Computer Science and Engineering(AI and DE)
JAIN (Deemed to-be University)
Bengaluru, India
Khushal Donga
Dept. of Computer Science and Engineering (AI and DE)
JAIN (Deemed to-be University)
Bengaluru, India
Krish Dodhia
Dept. of Computer Science and Engineering(AI and DE)
JAIN (Deemed to-be University)
Bengaluru, India
Abstract—Modern retail companies dealing with hundreds of SKUs from various categories need proper, timely inventory planning to avoid stock-outs and overstock costs. Rule-based inventory and classical forecast models like ARIMA and moving average techniques cannot accommodate the dynamic nature of retail data with respect to seasonality, event-based, and non-linear demand changes. This paper introduces StoreStock, a complete AI-based retail inventory management system with built-in customized Temporal Fusion Transformer (TFT) machine learning model for demand and revenue forecast. It uses ReactJS Progressive Web Application framework as its frontend interface coupled with the offline rule-based forecast model and optional TFT AI forecast engine with the help of FastAPI backend server coded in Python. The machine learning algorithm is developed using pure PyTorch with no dependencies on pytorch-forecasting library, which can run successfully on PyTorch 2.x version. Model architecture features Gated Residual Network (GRN), Variable Selection Network (VSN), LSTM encoder-decoder network, Multi-head attention, and Static Embedding per product. This project demonstrates 92% model accuracy with MAPE score at 8.2% when evaluated against a set of 50,000 transaction records from 45 different products under 8 categories.
Keywords—Temporal Fusion Transformer, Supply Chain Optimization, Time-Series Forecasting, Inventory Management, Deep Learning, Demand Forecasting, React, FastAPI