Abstract
Accurate demand prediction and early detection of anomalies are essential for efficiency, costs and users' satisfaction in supply chain. Due to enormous growth, the retail systems have become more complicated and there is need for more advanced and intelligent systems for optimal management. The application of artificial intelligence (AI) to the retail systems provides solutions for capturing nonlinear patterns, seasonality, and exogenous factors which traditional statistical models cannot handle. In this paper, we propose a dual-head system that consists of one head for forecasting and one head for anomaly detection, where both are based on Long Short-Term Memory (LSTM) networks and Autoencoders, respectively, serving to increase the predictive accuracy and robustness against outliers. The proposed architecture is also enriched by feature engineering techniques derived through feature selection, which ensures that the model can capture temporal dependencies and hidden structural patterns. A thorough empirical study is performed on standard M5 Forecasting dataset covering three evaluation perspectives (a) error-based measures (b) accuracy-based measures and (c) prediction interval performance. Experimental results show that the model has substantially improved results as compared to baseline of deep learning models with 9.4% relative improvement and has lower error rates of 10.84 RMSE to ensure robust interval coverage with low MPIW of 5.2. Moreover, the model is made transparent with Saliency maps, SHAP values and LIME explanations, providing a visual interpretation for feature importance and decision logic to forecasting and anomaly detection in supply chain management.