Explainable Anomaly Detection in Retail Perpetual Inventory Systems Using Shap-Enhanced Isolation Forests
-
https://doi.org/10.14419/5csy6a64
Received date: September 11, 2025
Accepted date: December 24, 2025
Published date: December 26, 2025
-
Retail Inventory; Anomaly Detection; Explainable AI; SHAP Values; Isolation Forest; Perpetual Inventory; Supply Chain Analytics -
Abstract
The systems that rely on correct data can also be afflicted with anomalies related to crime, barcode scan problems, user error, and process difficulties that, if not detected can lead to financial losses and disruptions to supply chains. Traditional anomaly detection systems identify potentially fraudulent records but have little accountability through transparency. As such, managers have little trust in the "black-box" results generated. This study provides one way of applying current ability in isolating the best anomalies - isolation forests, one of the leading anomaly detection strategies, and SHAP (SHapley Additive exPlanations), one of the premier explainable AI. They demonstrate not only that the isolation forest aims to estimate the likelihood that a record is anomalous, they make clear the factors within the records that contribute to each violation - whether that is increased sales from promotions, negative value inventory, or promoting unusual sequences of transactions. Our datasets consist of real retail inventory records, which shows how well an isolation forest + SHAP framework performs compared to other models well known to anomaly detection. By making these models explainable, they not only become more effective, the new situates them under a decision support system given their manageria1 trustworthiness to reduce shrinkage, and provide greater operational resiliency to retail firms.
-
References
- DeHoratius, N., & Raman, A. (2008). Inventory record inaccuracy: An empirical analysis. Management science, 54(4), 627-641. https://doi.org/10.1287/mnsc.1070.0789.
- Caridi, M., Crippa, L., Perego, A., Sianesi, A., & Tumino, A. (2010). Do virtuality and complexity affect supply chain visibility?. International Journal of Production Economics, 127(2), 372-383. https://doi.org/10.1016/j.ijpe.2009.08.016.
- Rekik, Y., Oliva, R., Glock, C., & Syntetos, A. (2025). Inventory record inaccuracy in grocery retailing: Impact of promotions and product perishabil-ity, and targeted effect of audits. arXiv preprint arXiv:2506.05357.
- Herreros-Martínez, A., Magdalena-Benedicto, R., Vila-Francés, J., Serrano-López, A. J., & Pérez-Díaz, S. (2024). Applied machine learning to anom-aly detection in enterprise purchase processes. arXiv preprint arXiv:2405.14754.
- Liu, F. T., Ting, K. M., & Zhou, Z. H. (2008, December). Isolation forest. In 2008 eighth ieee international conference on data mining (pp. 413-422). IEEE. https://doi.org/10.1109/ICDM.2008.17.
- Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. Advances in neural information processing systems, 30.
- Montgomery, D. C. (2007). Introduction to statistical quality control (6th ed.). Wiley.
- Chandola, V., Banerjee, A., & Kumar, V. (2009). Anomaly detection: A survey. ACM computing surveys (CSUR), 41(3), 1-58. https://doi.org/10.1145/1541880.1541882.
- Al Jallad, K., Aljnidi, M., & Desouki, M. S. (2020). Anomaly detection optimization using big data and deep learning to reduce false-positive. Journal of Big Data, 7(1), 68. https://doi.org/10.1186/s40537-020-00346-1.
- Bandara, K., Bergmeir, C., & Smyl, S. (2020). Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach. Expert systems with applications, 140, 112896. https://doi.org/10.1016/j.eswa.2019.112896.
- Chalapathy, R., & Chawla, S. (2019). Deep learning for anomaly detection: A survey. arXiv preprint, arXiv:1901.03407. https://doi.org/10.1016/j.elerap.2021.101034.
- Laidroo, L., Koroleva, E., Kliber, A., Rupeika-Apoga, R., & Grigaliuniene, Z. (2021). Business models of FinTechs–Difference in similarity?. Elec-tronic Commerce Research and Applications, 46, 101034. https://doi.org/10.1016/j.elerap.2021.101034.
- Kerdprasop, N., Chansilp, K., Kerdprasop, K., & Chuaybamroong, P. (2019, June). Anomaly detection with machine learning technique to support smart logistics. In International Conference on Computational Science and Its Applications (pp. 461-472). Cham: Springer International Publishing. https://doi.org/10.1007/978-3-030-24289-3_34.
- Hofmeister, M. (2024). A Dynamic Knowledge Graph Approach to Creating Interoperability in Smart Cities Selected Case Studies Towards Holistic Flood Impact Assessments and District Heating Operations (Doctoral dissertation, University of Cambridge (United Kingdom)).
- Villegas-Ch, W., Jaramillo-Alcazar, A., Navarro, A. M., & Mera-Navarrete, A. (2025). Integrating Explainable Artificial Intelligence in Anomaly De-tection for Threat Management in E-Commerce Platforms. IEEE Access. https://doi.org/10.1109/ACCESS.2025.3541979.
- Rekik, Y., Sahin, E., & Dallery, Y. (2009). Inventory inaccuracy in retail stores due to theft: an analysis of the benefits of RFID. International Journal of Production Economics, 118(1), 189-198. https://doi.org/10.1016/j.ijpe.2008.08.048.
- Tonekaboni, S., Joshi, S., McCradden, M. D., & Goldenberg, A. (2019). What clinicians want: contextualizing explainable machine learning for clini-cal end use. In Machine Learning for Healthcare Conference (pp. 359–380). PMLR.
- Gaur, V., & Fisher, M. L. (2004). A periodic inventory routing problem at a supermarket chain. Operations Research, 52(6), 813–822. https://doi.org/10.1287/opre.1040.0150.
- Chakradhar, B. S., Vijey, M., & Tunk, S. Synthetic Data Generation for Marketing Insights. In Predictive Analytics and Generative AI for Data-Driven Marketing Strategies (pp. 195–215). Chapman & Hall/CRC. https://doi.org/10.1201/9781003472544-17.
- Batista, G. E., & Monard, M. C. (2003). An analysis of four missing data treatment methods for supervised learning. Applied Artificial Intelligence, 17(5–6), 519–533. https://doi.org/10.1080/713827181.
- Jain, A. K., Duin, R. P. W., & Mao, J. (2000). Statistical pattern recognition: A review. IEEE TPAMI, 22(1), 4–37. https://doi.org/10.1109/34.824819.
- Micci-Barreca, D. (2001). A preprocessing scheme for high-cardinality categorical attributes. ACM SIGKDD Explorations, 3(1), 27–32. https://doi.org/10.1145/507533.507538.
- Hyndman, R. J., & Athanasopoulos, G. (2018). Forecasting: Principles and practice (2nd ed.). OTexts. https://doi.org/10.32614/CRAN.package.fpp2.
- Davis, J., & Goadrich, M. (2006). The relationship between Precision–Recall and ROC curves. ICML, 233–240. https://doi.org/10.1145/1143844.1143874.
- Saito, T., & Rehmsmeier, M. (2015). The precision–recall plot is more informative than the ROC plot. PLoS ONE, 10(3), e0118432. https://doi.org/10.1371/journal.pone.0118432.
- Yeh, C. K., Hsieh, C. Y., Suggala, A., Inouye, D. I., & Ravikumar, P. K. (2019). On the (in)fidelity and sensitivity of explanations. NeurIPS, 32.
- Begum, N., & Ali, M. M. (2023). Leveraging business analytics for strategic merchandising decisions in fashion retail.
- Barbosa, A. F. C. (2025). Solving Dynamic Inventory-Routing Problems Through Supervised Learning.
- Iqbal, A., & Amin, R. (2025). Time series forecasting and anomaly detection using explainable AI. Journal of Supercomputing, 81(4), 523. https://doi.org/10.1007/s11227-025-07040-0.
- Acuna, E., & Rodriguez, C. (2004). The treatment of missing values and its effect on classifier accuracy. In Classification, Clustering, and Data Min-ing Applications (pp. 639–647). Springer. https://doi.org/10.1007/978-3-642-17103-1_60.
- Jain, Y. K., & Bhandare, S. K. (2011). Min–max normalization based data perturbation for privacy protection. IJCC, 2(8), 45–50.
- DeHoratius, N., & Raman, A. (2008). Inventory record inaccuracy: An empirical analysis. Management Science, 54(4), 627–641. https://doi.org/10.1287/mnsc.1070.0789.
- Pedregosa, F. et al. (2011). Scikit-learn: Machine learning in Python. JMLR, 12, 2825–2830.
- Nvidia Corporation. (2021). NVIDIA RTX 3080 GPU architecture. NVIDIA Technical Brief.
- Liu, F. T., Ting, K. M., & Zhou, Z. H. (2008). Isolation Forest. ICDM, 413–422. https://doi.org/10.1109/ICDM.2008.17.
- Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. NeurIPS, 30, 4765–4774.
- Kohavi, R. (1995). Cross-validation and bootstrap for accuracy estimation. IJCAI, 1137–1145.
- Fiorini, P. M., Saccani, N., & Caniato, F. (2023). Retail inventory shrinkage: A review. JRCS, 71, 103239.
- Rekik, Y., Sahin, E., & Dallery, Y. (2025). Proactive vs reactive interventions in retail inventory inaccuracy. IJPE, 260, 109442.
- Raman, A., & DeHoratius, N. (2022). The impact of data accuracy on retail supply chain performance. MSOM, 24(4), 1823–1841.
- Choi, T. M., Wallace, S. W., & Wang, Y. (2023). Big data analytics in operations management. POM, 32(3), 1021–1039.
- Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. NeurIPS, 4765–4774.
- Molnar, C. (2022). Interpretable Machine Learning (2nd ed.). Leanpub.
- Tsang, Y. P. et al. (2023). Explainable AI for anomaly detection in retail ERP systems. ESWA, 218, 119542.
- Barredo Arrieta, A. et al. (2020). Explainable AI: Concepts and challenges. Information Fusion, 58, 82–115. https://doi.org/10.1016/j.inffus.2019.12.012.
- Stadtler, H. (2022). Multi-echelon inventory management in supply chains. EJOR, 302(2), 325–339.
- Wang, X., Gunasekaran, A., Ngai, E. W. T., & Papadopoulos, T. (2023). Big data analytics in logistics & SCM. IJPR, 61(12), 3887–3906.
- Rekik, Y., Thomas, D., & Van Delft, C. (2025). Cross-regional retail datasets for inventory analytics. EJOR (In press).
- Bandara, K., Bergmeir, C., & Smyl, S. (2021). Time series forecasting across multiple regions. ESWA, 171, 114529.
- Lundberg, S. M. et al. (2020). From local explanations to global understanding with explainable AI. Nature Machine Intelligence, 2, 252–259. https://doi.org/10.1038/s42256-019-0138-9.
- Molnar, C., Casalicchio, G., & Bischl, B. (2020). SHAP and computational efficiency. arXiv:2010.03599.
- Akoglu, L., Tong, H., & Koutra, D. (2015). Graph-based anomaly detection in social networks. ACM CS, 47(3), 1–38.
- Xu, H., & Akoglu, L. (2018). Temporal anomaly detection in dynamic graphs. IEEE TKDE, 30(5), 1002–1015.
- Suresh, H. et al. (2021). Stakeholders of interpretable ML: A framework. CHI 2021.
- Lu, S., Yu, M., & Wang, H. (2023). Short video user engagement model. ESWA, 218, 119542. https://doi.org/10.1016/j.eswa.2023.119542.
- Cohn, D. A., Ghahramani, Z., & Jordan, M. I. (1996). Active learning with statistical models. JAIR, 4, 129–145. https://doi.org/10.1613/jair.295.
- Gama, J. et al. (2014). A survey on concept drift adaptation. ACM CS, 46(4), 1–37. https://doi.org/10.1145/2523813.
-
Downloads
-
How to Cite
Ramavath, S. K. . (2025). Explainable Anomaly Detection in Retail Perpetual Inventory Systems Using Shap-Enhanced Isolation Forests. International Journal of Basic and Applied Sciences, 14(8), 551-561. https://doi.org/10.14419/5csy6a64
