IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v12y2024i17p2728-d1468554.html
   My bibliography  Save this article

Evaluating the Effectiveness of Time Series Transformers for Demand Forecasting in Retail

Author

Listed:
  • José Manuel Oliveira

    (Faculty of Economics, University of Porto, Rua Dr. Roberto Frias, 4200-464 Porto, Portugal
    Institute for Systems and Computer Engineering, Technology and Science, Campus da FEUP, Rua Dr. Roberto Frias, 4200-465 Porto, Portugal
    These authors contributed equally to this work.)

  • Patrícia Ramos

    (Institute for Systems and Computer Engineering, Technology and Science, Campus da FEUP, Rua Dr. Roberto Frias, 4200-465 Porto, Portugal
    CEOS.PP, ISCAP, Polytechnic of Porto, Rua Jaime Lopes Amorim s/n, 4465-004 São Mamede de Infesta, Portugal
    These authors contributed equally to this work.)

Abstract

This study investigates the effectiveness of Transformer-based models for retail demand forecasting. We evaluated vanilla Transformer, Informer, Autoformer, PatchTST, and temporal fusion Transformer (TFT) against traditional baselines like AutoARIMA and AutoETS. Model performance was assessed using mean absolute scaled error (MASE) and weighted quantile loss (WQL). The M5 competition dataset, comprising 30,490 time series from 10 stores, served as the evaluation benchmark. The results demonstrate that Transformer-based models significantly outperform traditional baselines, with Transformer, Informer, and TFT leading the performance metrics. These models achieved MASE improvements of 26% to 29% and WQL reductions of up to 34% compared to the seasonal Naïve method, particularly excelling in short-term forecasts. While Autoformer and PatchTST also surpassed traditional methods, their performance was slightly lower, indicating the potential for further tuning. Additionally, this study highlights a trade-off between model complexity and computational efficiency, with Transformer models, though computationally intensive, offering superior forecasting accuracy compared to the significantly slower traditional models like AutoARIMA. These findings underscore the potential of Transformer-based approaches for enhancing retail demand forecasting, provided the computational demands are managed effectively.

Suggested Citation

  • José Manuel Oliveira & Patrícia Ramos, 2024. "Evaluating the Effectiveness of Time Series Transformers for Demand Forecasting in Retail," Mathematics, MDPI, vol. 12(17), pages 1-28, August.
  • Handle: RePEc:gam:jmathe:v:12:y:2024:i:17:p:2728-:d:1468554
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/12/17/2728/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/12/17/2728/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Hyndman, Rob J. & Koehler, Anne B. & Snyder, Ralph D. & Grose, Simone, 2002. "A state space framework for automatic forecasting using exponential smoothing methods," International Journal of Forecasting, Elsevier, vol. 18(3), pages 439-454.
    2. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    3. Wellens, Arnoud P. & Boute, Robert N. & Udenio, Maximiliano, 2024. "Simplifying tree-based methods for retail sales forecasting with explanatory variables," European Journal of Operational Research, Elsevier, vol. 314(2), pages 523-539.
    4. Hyndman, Rob J. & Koehler, Anne B., 2006. "Another look at measures of forecast accuracy," International Journal of Forecasting, Elsevier, vol. 22(4), pages 679-688.
    5. Gneiting, Tilmann & Raftery, Adrian E., 2007. "Strictly Proper Scoring Rules, Prediction, and Estimation," Journal of the American Statistical Association, American Statistical Association, vol. 102, pages 359-378, March.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Makridakis, Spyros & Spiliotis, Evangelos & Assimakopoulos, Vassilios & Chen, Zhi & Gaba, Anil & Tsetlin, Ilia & Winkler, Robert L., 2022. "The M5 uncertainty competition: Results, findings and conclusions," International Journal of Forecasting, Elsevier, vol. 38(4), pages 1365-1385.
    2. Makridakis, Spyros & Hyndman, Rob J. & Petropoulos, Fotios, 2020. "Forecasting in social settings: The state of the art," International Journal of Forecasting, Elsevier, vol. 36(1), pages 15-28.
    3. Makridakis, Spyros & Spiliotis, Evangelos & Assimakopoulos, Vassilios, 2020. "The M4 Competition: 100,000 time series and 61 forecasting methods," International Journal of Forecasting, Elsevier, vol. 36(1), pages 54-74.
    4. Kang, Yanfei & Cao, Wei & Petropoulos, Fotios & Li, Feng, 2022. "Forecast with forecasts: Diversity matters," European Journal of Operational Research, Elsevier, vol. 301(1), pages 180-190.
    5. Wang, Xiaoqian & Kang, Yanfei & Hyndman, Rob J. & Li, Feng, 2023. "Distributed ARIMA models for ultra-long time series," International Journal of Forecasting, Elsevier, vol. 39(3), pages 1163-1184.
    6. Spiliotis, Evangelos & Assimakopoulos, Vassilios & Makridakis, Spyros, 2020. "Generalizing the Theta method for automatic forecasting," European Journal of Operational Research, Elsevier, vol. 284(2), pages 550-558.
    7. Fotios Petropoulos & Enno Siemsen, 2023. "Forecast Selection and Representativeness," Management Science, INFORMS, vol. 69(5), pages 2672-2690, May.
    8. Posch, Konstantin & Truden, Christian & Hungerländer, Philipp & Pilz, Jürgen, 2022. "A Bayesian approach for predicting food and beverage sales in staff canteens and restaurants," International Journal of Forecasting, Elsevier, vol. 38(1), pages 321-338.
    9. Kourentzes, Nikolaos & Petropoulos, Fotios & Trapero, Juan R., 2014. "Improving forecasting by estimating time series structural components across multiple frequencies," International Journal of Forecasting, Elsevier, vol. 30(2), pages 291-302.
    10. Alysha M De Livera, 2010. "Automatic forecasting with a modified exponential smoothing state space framework," Monash Econometrics and Business Statistics Working Papers 10/10, Monash University, Department of Econometrics and Business Statistics.
    11. Hyndman, Rob J. & Khandakar, Yeasmin, 2008. "Automatic Time Series Forecasting: The forecast Package for R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 27(i03).
    12. Meira, Erick & Cyrino Oliveira, Fernando Luiz & de Menezes, Lilian M., 2022. "Forecasting natural gas consumption using Bagging and modified regularization techniques," Energy Economics, Elsevier, vol. 106(C).
    13. Kang, Yanfei & Hyndman, Rob J. & Smith-Miles, Kate, 2017. "Visualising forecasting algorithm performance using time series instance spaces," International Journal of Forecasting, Elsevier, vol. 33(2), pages 345-358.
    14. Huber, Jakob & Stuckenschmidt, Heiner, 2020. "Daily retail demand forecasting using machine learning with emphasis on calendric special days," International Journal of Forecasting, Elsevier, vol. 36(4), pages 1420-1438.
    15. Bergmeir, Christoph & Hyndman, Rob J. & Benítez, José M., 2016. "Bagging exponential smoothing methods using STL decomposition and Box–Cox transformation," International Journal of Forecasting, Elsevier, vol. 32(2), pages 303-312.
    16. Spiliotis, Evangelos & Petropoulos, Fotios, 2024. "On the update frequency of univariate forecasting models," European Journal of Operational Research, Elsevier, vol. 314(1), pages 111-121.
    17. Winita Sulandari & Yudho Yudhanto & Sri Subanti & Crisma Devika Setiawan & Riskhia Hapsari & Paulo Canas Rodrigues, 2023. "Comparing the Simple to Complex Automatic Methods with the Ensemble Approach in Forecasting Electrical Time Series Data," Energies, MDPI, vol. 16(22), pages 1-16, November.
    18. Thiyanga S Talagala & Rob J Hyndman & George Athanasopoulos, 2018. "Meta-learning how to forecast time series," Monash Econometrics and Business Statistics Working Papers 6/18, Monash University, Department of Econometrics and Business Statistics.
    19. Evangelos Spiliotis & Fotios Petropoulos & Vassilios Assimakopoulos, 2023. "On the Disagreement of Forecasting Model Selection Criteria," Forecasting, MDPI, vol. 5(2), pages 1-12, June.
    20. Athanasopoulos, George & Hyndman, Rob J. & Song, Haiyan & Wu, Doris C., 2011. "The tourism forecasting competition," International Journal of Forecasting, Elsevier, vol. 27(3), pages 822-844.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jmathe:v:12:y:2024:i:17:p:2728-:d:1468554. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.