Optimizing LSTM Neural Networks for Resource-Constrained Retail Sales Forecasting: A Model Compression Study
Ravi Teja Pagidoju
TL;DR
This study investigates LSTM model compression for retail sales forecasting under resource constraints using the Kaggle Store Item Demand Forecasting data. By evaluating five LSTM sizes from 128 down to 16 hidden units, the authors find that a 64-unit architecture delivers the best balance of accuracy and efficiency, achieving a MAPE of 12.4% and reducing the model size by about 73% to ~76 KB compared with the 128-unit baseline. The results reveal a U-shaped accuracy–size relationship, with larger models overfitting and smaller models underfitting, and they show statistically significant improvements over the baseline. The work demonstrates practical implications for edge and CPU-based deployment in mid-to-small retailers, providing concrete guidelines for selecting model size and highlighting that well-chosen compression can yield substantial real-world benefits.
Abstract
Standard LSTM(Long Short-Term Memory) neural networks provide accurate predictions for sales data in the retail industry, but require a lot of computing power. It can be challenging especially for mid to small retail industries. This paper examines LSTM model compression by gradually reducing the number of hidden units from 128 to 16. We used the Kaggle Store Item Demand Forecasting dataset, which has 913,000 daily sales records from 10 stores and 50 items, to look at the trade-off between model size and how accurate the predictions are. Experiments show that lowering the number of hidden LSTM units to 64 maintains the same level of accuracy while also improving it. The mean absolute percentage error (MAPE) ranges from 23.6% for the full 128-unit model to 12.4% for the 64-unit model. The optimized model is 73% smaller (from 280KB to 76KB) and 47% more accurate. These results show that larger models do not always achieve better results.
