A dual-stream multitask deep learning model for supply chain demand forecasting with statistically derived early-warning signals
DOI:
https://doi.org/10.15837/ijccc.2026.6.7694Keywords:
Supply Chain Management (SCM), Anomaly Detection, Long Short-Term Memory (LSTM), Transformer Encoder, Early-warningAbstract
Accurate demand forecasting is crucial in supply chain management (SCM) as global supply networks become increasingly complex and exposed to disruptions. Traditional models that rely mainly on historical sales may miss demand shifts driven by heterogeneous auxiliary signals and often do not provide explicit early warning of abnormal events. This study proposes a dual-stream multitask deep-learning model that integrates demand forecasting and statistically derived earlywarning signal estimation within a unified framework. The model adopts a dual-input architecture: (i) an LSTM branch that captures temporal dynamics from historical sales sequences and (ii) a Transformer encoder branch that models supplementary auxiliary features and statistically derived anomaly signals computed from that same sales series, including STL residual–based indicators, change-point flags, and calendar variables. The fused representation is jointly optimized to predict both the demand two days ahead of the input window and the probability of a statistically defined anomaly event on that day. Experiments are conducted on the public Kaggle Store Item Demand Forecasting dataset (10 stores, 50 items, daily sales from 2013 to 2017), using the most recent 90 days in each series for validation and synthetic anomaly labels derived from statistical residual analysis. Compared with a unimodal LSTM baseline, the proposed model reduces RMSE by approximately 7.23% and MAE by approximately 6.86%, and the bootstrap confidence intervals of both gaps exclude zero. Under an identical evaluation protocol the model also outperforms a naive forecast, a seasonal naive model and AutoARIMA, whereas a global gradient-boosted tree baseline attains a slightly lower point error (RMSE 0.5574 versus 0.5798). Because ground-truth incident labels are unavailable for this dataset, the classification task is supervised by weak labels derived from the residuals of the same series; the resulting discrimination is limited (ROC–AUC between 0.578 and 0.589 and PR–AUC between 0.126 and 0.141 against a positive rate of 0.100), and the anomaly head is therefore presented as a calibrated, cost-aware screening signal rather than as a validated anomaly detector. Under a 5:1 false-negative-to-false-positive cost ratio the proposed model attains the lowest expected cost among the configurations compared, and temperature scaling yields well-calibrated alert probabilities, so that a single multitask model can support both replenishment decisions and screening-level early warning.
References
Baltrušaitis, T., Ahuja, C., Morency, L.-P. (2019). Multimodal machine learning: A survey and taxonomy, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 41, No. 2, 423-443. https://doi.org/10.1109/TPAMI.2018.2798607
Baryannis, G., Dani, S., Antoniou, G. (2019). Predicting supply chain risks using machine learning: The trade-off between performance and interpretability, Future Generation Computer Systems, Vol. 101, 993-1004, https://doi.org/10.1016/j.future.2019.07.059
Bergmeir, C., Benítez, J.M. (2012). On the use of cross-validation for time series predictor evaluation, Information Sciences, Vol. 191, 192-213. https://doi.org/10.1016/j.ins.2011.12.028
Caruana, R. (1997). Multitask learning, Machine Learning, Vol. 28, No. 1, 41-75. https://doi.org/10.1023/A:1007379606734
Chandola, V., Banerjee, A., Kumar, V. (2009). Anomaly detection: A survey, ACM Computing Surveys, Vol. 41, No. 3, 1-58. https://doi.org/10.1145/1541880.1541882
Chen, T., Guestrin, C. (2016). XGBoost: A scalable tree boosting system, In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, USA, 785-794. https://doi.org/10.1145/2939672.2939785
Chen, Z., Badrinarayanan, V., Lee, C.-Y., Rabinovich, A. (2018). GradNorm: Gradient normalization for adaptive loss balancing in deep multitask networks, In: Proceedings of the 35th International Conference on Machine Learning, Stockholm, Sweden, Proceedings of Machine Learning Research, Vol. 80, 794-803.
Cleveland, R.B., Cleveland, W.S., McRae, J.E., Terpenning, I. (1990). STL: A seasonal-trend decomposition procedure based on Loess, Journal of Official Statistics, Vol. 6, No. 1, 3-73.
de la Cruz Madrigal, V.H., Avelar Sosa, L., Mejía-Muñoz, J.M., García Alcaraz, J.L., Jiménez Macías, E. (2025). Dynamical system modeling for disruption in supply chain and its detection using a data-driven deep learning-based architecture, Logistics, Vol. 9, No. 2, Article No. 51. https://doi.org/10.3390/logistics9020051
DeLong, E.R., DeLong, D.M., Clarke-Pearson, D.L. (1988). Comparing the areas under two or more correlated receiver operating characteristic curves: A nonparametric approach, Biometrics, Vol. 44, No. 3, 837-845. https://doi.org/10.2307/2531595
Douaioui, K., Oucheikh, R., Benmoussa, O., Mabrouki, C. (2024). Machine learning and deep learning models for demand forecasting in supply chain management: A critical review, Applied System Innovation, Vol. 7, No. 5, Article No. 93. https://doi.org/10.3390/asi7050093
Efron, B., Tibshirani, R. (1997). Improvements on cross-validation: The .632+ bootstrap method, Journal of the American Statistical Association, Vol. 92, No. 438, 548-560. https://doi.org/10.1080/01621459.1997.10474007
Fu, Y., Fisher, M.L. (2023). The value of social media data in fashion forecasting, Manufacturing & Service Operations Management, Vol. 25, No. 3, 1136-1154. https://doi.org/10.1287/msom.2023.1193
Guo, C., Pleiss, G., Sun, Y., Weinberger, K.Q. (2017). On calibration of modern neural networks, In: Proceedings of the 34th International Conference on Machine Learning, Sydney, Australia, 1321-1330.
Hochreiter, S., Schmidhuber, J. (1997). Long short-term memory, Neural Computation, Vol. 9, No. 8, 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735
Hundman, K., Constantinou, V., Laporte, C., Colwell, I., Soderstrom, T. (2018). Detecting spacecraft anomalies using LSTMs and nonparametric dynamic thresholding, In: Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 387-395. https://doi.org/10.1145/3219819.3219845
Hyndman, R.J., Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R, Journal of Statistical Software, Vol. 27, No. 3, 1-22. https://doi.org/10.18637/jss.v027.i03
Kaggle. Demand forecasting - Store item demand forecasting challenge (Kernels only), from https://www.kaggle.com/c/demand-forecasting-kernels-only/data, accessed December 10, 2025.
Kendall, A., Gal, Y., Cipolla, R. (2018). Multi-task learning using uncertainty to weigh losses for scene geometry and semantics, In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, USA, 7482-7491. https://doi.org/10.1109/CVPR.2018.00781
Khedr, A.M., Rani, S. (2024). Enhancing supply chain management with deep learning and machine learning techniques: A review, Journal of Open Innovation: Technology, Market, and Complexity, Vol. 10, No. 4, Article No. 100379. https://doi.org/10.1016/j.joitmc.2024.100379
Lim, B., Arık, S.Ö., Loeff, N., Pfister, T. (2021). Temporal fusion transformers for interpretable multi-horizon time series forecasting, International Journal of Forecasting, Vol. 37, No. 4, 1748-1764. https://doi.org/10.1016/j.ijforecast.2021.03.012
Lim, B., Zohren, S. (2021). Time-series forecasting with deep learning: A survey, Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, Vol. 379, No. 2194, Article No. 20200209. https://doi.org/10.1098/rsta.2020.0209
Lin, T.-Y., Goyal, P., Girshick, R., He, K., Dollár, P. (2017). Focal loss for dense object detection, In: Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 2999-3007. https://doi.org/10.1109/ICCV.2017.324
Liu, Z., Zhao, N., Kim, S.H., Tadres, K., Dejanov, N., Rasasane, N. (2025). Integrative framework to enhance supply chain resilience through advanced forecasting, anomaly detection, and optimized resource allocation, Preprints. https://doi.org/10.20944/preprints202505.0049.v1
Lundberg, S.M., Lee, S.-I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems, Vol. 30, 4765-4774.
Makridakis, S., Spiliotis, E., Assimakopoulos, V. (2018). Statistical and machine learning forecasting methods: Concerns and ways forward, PLOS ONE, Vol. 13, No. 3, Article No. e0194889. https://doi.org/10.1371/journal.pone.0194889
Makridakis, S., Spiliotis, E., Assimakopoulos, V. (2022). M5 accuracy competition: Results, findings, and conclusions, International Journal of Forecasting, Vol. 38, No. 4, 1346-1364. https://doi.org/10.1016/j.ijforecast.2021.11.013
Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., Shroff, G. (2016). LSTMbased encoder-decoder for multi-sensor anomaly detection. arXiv preprint, arXiv:1607.00148.
Moradi, F., Tarif, M., Homaei, M. (2025). Semi-supervised supply chain fraud detection with unsupervised pre-filtering, arXiv preprint arXiv:2508.06574. https://doi.org/10.1109/ICCKE68588.2025.11273335
Nguyen, H.D., Tran, K.P., Thomassey, S., Hamad, M. (2021). Forecasting and anomaly detection approaches using LSTM and LSTM autoencoder techniques with the applications in supply chain management, International Journal of Information Management, Vol. 57, Article No. 102282. https://doi.org/10.1016/j.ijinfomgt.2020.102282
Ni, S., Peng, Y., Liu, Z. (2022). Logistics demand forecast of fresh food e-commerce based on Bi-LSTM model, Journal of Computer and Communications, Vol. 10, No. 9, 51-65. https://doi.org/10.4236/jcc.2022.109004
Nie, Y., Nguyen, N.H., Sinthong, P., Kalagnanam, J. (2023). A time series is worth 64 words: Long-term forecasting with transformers. In: The Eleventh International Conference on Learning Representations (ICLR 2023), Kigali, Rwanda.
Salinas, D., Flunkert, V., Gasthaus, J., Januschowski, T. (2020). DeepAR: Probabilistic forecasting with autoregressive recurrent networks, International Journal of Forecasting, Vol. 36, No. 3, 1181- 1191. https://doi.org/10.1016/j.ijforecast.2019.07.001
scikit-learn developers. Post-tuning the decision threshold for cost-sensitive learning, from https://scikit-learn.org/stable/auto_examples/model_selection/plot_cost_sensitive_lear ning.html, accessed December 10, 2025.
Seman, L.O., Scapinello Aquino, L., Stefenon, S.F., Yow, K.-C., Mariani, V.C., dos Santos Coelho, L. (2025). Simultaneously anomaly detection and forecasting for predictive maintenance using a zero-cost differentiable architecture search-based network, Computers & Industrial Engineering, Vol. 208, Article No. 111412. https://doi.org/10.1016/j.cie.2025.111412
Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., Wojna, Z. (2016). Rethinking the Inception architecture for computer vision, In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, USA, 2818-2826. https://doi.org/10.1109/CVPR.2016.308
Tang, H., Yuan, Y., Gong, T. (2023). Industrial chain disruption events monitoring with deep learning methods: A practical application in China, International Journal of Intelligent Systems, Vol. 2023, Article No. 3338184. https://doi.org/10.1155/2023/3338184
Tashman, L.J. (2000). Out-of-sample tests of forecasting accuracy: An analysis and review, International Journal of Forecasting, Vol. 16, No. 4, 437-450. https://doi.org/10.1016/S0169-2070(00)00065-0
Truong, C., Oudre, L., Vayatis, N. (2020). Selective review of offline change point detection methods, Signal Processing, Vol. 167, Article No. 107299. https://doi.org/10.1016/j.sigpro.2019.107299
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., Polosukhin, I. (2017). Attention is all you need, Advances in Neural Information Processing Systems, Vol. 30, 5998-6008.
Wang, Y., Ma, X., Chen, Z., Luo, Y., Yi, J., Bailey, J. (2019). Symmetric cross entropy for robust learning with noisy labels, In: Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Korea, 322-330. https://doi.org/10.1109/ICCV.2019.00041
Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Yu, P.S. (2021). A comprehensive survey on graph neural networks, IEEE Transactions on Neural Networks and Learning Systems, Vol. 32, No. 1, 4-24. https://doi.org/10.1109/TNNLS.2020.2978386
Xu, W., Cao, Y., Chen, R. (2024). A multimodal analytics framework for product sales prediction with the reputation of anchors in live streaming e-commerce, Decision Support Systems, Vol. 177, Article No. 114104. https://doi.org/10.1016/j.dss.2023.114104
Zeng, A., Chen, M., Zhang, L., Xu, Q. (2023). Are transformers effective for time series forecasting?, Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 37, No. 9, 11121-11128. https://doi.org/10.1609/aaai.v37i9.26317
Zhang, A., Lipton, Z.C., Li, M., Smola, A.J. (2023). Dive into deep learning, Cambridge University Press, Cambridge, UK.
Zhang, X., Guo, C. (2024). Research on multimodal prediction of e-commerce customer satisfaction driven by big data, Applied Sciences, Vol. 14, No. 18, Article No. 8181. https://doi.org/10.3390/app14188181
Additional Files
Published
Issue
Section
License
Copyright (c) 2026 Kyoungjong Park

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
ONLINE OPEN ACCES: Acces to full text of each article and each issue are allowed for free in respect of Attribution-NonCommercial 4.0 International (CC BY-NC 4.0.
You are free to:
-Share: copy and redistribute the material in any medium or format;
-Adapt: remix, transform, and build upon the material.
The licensor cannot revoke these freedoms as long as you follow the license terms.
DISCLAIMER: The author(s) of each article appearing in International Journal of Computers Communications & Control is/are solely responsible for the content thereof; the publication of an article shall not constitute or be deemed to constitute any representation by the Editors or Agora University Press that the data presented therein are original, correct or sufficient to support the conclusions reached or that the experiment design or methodology is adequate.






