Energy demand forecasting using deep models and autoencoder- transformer

Authors

  • Zohreh Dorrani Department of Electrical Engineering, Payame Noor University, Tehran 19395–4697, Iran
Article ID: 533
13 Views

DOI:

https://doi.org/10.18686/cest533

Keywords:

autoencoder; deep learning; energy demand; GRU; LSTM; transformer

Abstract

This study evaluates five prominent deep learning models—CNN-LSTM, Bidirectional LSTM, GRU, Transformer, and the proposed Deep Autoencoder-Transformer for the task of energy demand forecasting. Accurate prediction of energy demand is essential for optimizing consumption and maintaining power grid stability amidst increasing complexity and multivariate data characteristics. While previous research has predominantly assessed more traditional models such as LSTM and GRU, this research fills an important gap by thoroughly comparing these with the Transformer and a novel hybrid autoencoder-Transformer model. The models were systematically trained on multivariate inputs after comprehensive preprocessing and evaluated using statistical metrics including MAE, RMSE, MAPE, and coefficient of determination (R2). The findings demonstrate that the Deep Autoencoder-Transformer model outperforms all other architectures, achieving the lowest error rates (MAE = 8.5, RMSE = 10.75, MAPE = 3.46%) and highest explanatory power (R2 = 0.991). The Transformer also achieves strong performance (MAE = 10.14, R2 = 0.988), reflecting its ability to model long-term dependencies effectively. GRU and Bidirectional LSTM models follow, balancing accuracy and computational efficiency, while CNN-LSTM, despite its combined spatial and temporal feature extraction abilities, shows comparatively lower precision likely due to architectural limitations with long-range temporal modeling. This study highlights the superior capability of attention-based Transformer architectures, especially when combined with deep autoencoding, to capture complex temporal patterns in multivariate energy data. It offers a scalable and systematic framework for benchmarking deep learning models applicable to energy demand forecasting. These insights are valuable to energy system operators and policymakers for selecting appropriate machine learning models, with the hybrid Deep Autoencoder-Transformer emerging as a promising solution for more accurate, long-horizon, multi-step forecasting in intelligent energy systems.

Downloads

Published

2026-01-05

How to Cite

Dorrani, Z. (2026). Energy demand forecasting using deep models and autoencoder- transformer. Clean Energy Science and Technology, 4(2), 533. https://doi.org/10.18686/cest533

Issue

Section

Article

References

1. Jiehui Z, Su Y, Wang W, et al. Hydrogen-electricity coupling energy storage systems: Models, applications, and deep reinforcement learning algorithms. Clean Energy Science and Technology. 2024; 2(1): 96. doi: 10.18686/cest.v2i1.96 DOI: https://doi.org/10.18686/cest.v2i1.96

2. Yang W. Preface to Clean Energy Science and Technology. Clean Energy Science and Technology. 2023; 1(1). doi: 10.18686/cest.v1i1.57 DOI: https://doi.org/10.18686/cest.v1i1.57

3. Khodadadi M, Riazi L, Yazdani S. A Novel Ensemble Deep Learning Model for Building Energy Consumption Forecast. International Journal of Engineering. 2024; 37(6): 1067–1075. doi: 10.5829/ije.2024.37.06c.03 DOI: https://doi.org/10.5829/IJE.2024.37.06C.03

4. Feng L, Tung F, Hajimirsadeghi H, et al. Attention as an RNN. Arxiv preprint Arxiv. 2024; doi: 10.48550/arXiv.2405.13956

5. Chavosh N, Emadi S. Improving Sentence Polarity Determination in Sentiment Analysis based on RNN and LSTM Deep Learning Algorithm. Applied and basic Machine intelligence research. 2022; 1(1): 108–115.

6. Roknaldini M, Noroozi E. Presenting A Hybrid Method of Deep Neural Networks to Prevent Intrusion in Computer Networks. Intelligent Multimedia Processing and Communication Systems (IMPCS). 2023; 4(4): 57–65.

7. Optimization of Photonic Nanocrystals for Invisibility Using Artificial Intelligence. Journal of Advanced Materials in Engineering. 2025; 44(1). doi: 10.47176/jame.44.1.1088 DOI: https://doi.org/10.47176/jame.44.1.1088

8. Dorrani Z. Anomaly Detection in Emerging Crimes with Deep Autoencoder Architecture. Contributions of Science and Technology for Engineering. 2025; 2(3): 45–56.

9. Image Edge Detection with Fuzzy Ant Colony Optimization Algorithm. International Journal of Engineering. 2020; 33(12). doi: 10.5829/ije.2020.33.12c.05 DOI: https://doi.org/10.5829/ije.2020.33.12c.05

10. Dorrani Z. Speech-to-text with artificial intelligence: Improving accuracy using Fuzzy ResNet and SqueezeNet. Journal of Information and Communication Technology in Policing. 2025; 55–65. doi: 10.22034/pitc.2025.1282622.1344 DOI: https://doi.org/10.58496/BJAI/2025/005

11. Dorrani Z. Road Detection with Deep Learning in Satellite Images. Majlesi Journal of Telecommunication Devices. 2023; 12(1). doi: 10.30486/mjtd.2023.1979006.1024

12. Dorrani Z, Abadi H. a. Neural Network Design for Energy Estimation in Surge Arresters. Majlesi Journal of Telecommunication Devices. 2024; 13(4): 229–237. doi: 10.71822/mjtd.2024.1130109

13. Dorrani Z, Farsi H, Mohamadzadeh S. Deep Learning in Vehicle Detection Using ResUNet-a Architecture. Jordan Journal of Electrical Engineering. 2022; 8(2): 165. doi: 10.5455/jjee.204-1638861465 DOI: https://doi.org/10.5455/jjee.204-1638861465

14. Dorrani Z, Farsi H, Mohamadzadeh S. Shadow Removal in Vehicle Detection Using ResUNet-a. Iranian Journal of Energy and Environment. 2023; 14(1): 87–95. doi: 10.5829/ijee.2023.14.01.11 DOI: https://doi.org/10.5829/IJEE.2023.14.01.11

15. Dorrani Z. Traffic scene analysis and classification using deep learning. International Journal of Engineering. 2023. doi: 10.5829/ije.2024.37.03c.06 DOI: https://doi.org/10.5829/IJE.2024.37.03C.06

16. Han K, Xiao A, Wu E, et al. Transformer in transformer. Advances in neural information processing systems. 2021; 34: 15908–15919.

17. Mahjoub S, Chrifi-Alaoui L, Marhic B, et al. Predicting Energy Consumption Using LSTM, Multi-Layer GRU and Drop-GRU Neural Networks. Sensors. 2022; 22(11): 4062. doi: 10.3390/s22114062 DOI: https://doi.org/10.3390/s22114062

18. Biswal B, Deb S, Datta S, et al. Review on smart grid load forecasting for smart energy management using machine learning and deep learning techniques. Energy Reports. 2024; 12: 3654–3670. doi: 10.1016/j.egyr.2024.09.056 DOI: https://doi.org/10.1016/j.egyr.2024.09.056

19. Quan SJ. Comparing hyperparameter tuning methods in machine learning based urban building energy modeling: A study in Chicago. Energy and Buildings. 2024; 317: 114353. doi: 10.1016/j.enbuild.2024.114353 DOI: https://doi.org/10.1016/j.enbuild.2024.114353

20. Li Z, Fang C, Wu Q, et al. Rotation-based heat transfer enhancement for shell-and-tube latent thermal energy storage systems: From mechanisms to applications. Clean Energy Science and Technology. 2024; 2(4): 237. doi: 10.18686/cest237 DOI: https://doi.org/10.18686/cest237

21. Zhang J, Zhang H, Ding S, et al. Power Consumption Predicting and Anomaly Detection Based on Transformer and K-Means. Frontiers in Energy Research. 2021; 9. doi: 10.3389/fenrg.2021.779587 DOI: https://doi.org/10.3389/fenrg.2021.779587

22. Saad Saoud L, Al-Marzouqi H, Hussein R. Household Energy Consumption Prediction Using the Stationary Wavelet Transform and Transformers. IEEE Access. 2022; 10: 5171–5183. doi: 10.1109/access.2022.3140818 DOI: https://doi.org/10.1109/ACCESS.2022.3140818

23. Yang X, Wang R, Zhang Z, et al. Optimal control method for flexible loads in thermally activated buildings. Clean Energy Science and Technology. 2025; 3(1): 334. doi: 10.18686/cest334 DOI: https://doi.org/10.18686/cest334

24. Chan JW, Yeo CK. A Transformer based approach to electricity load forecasting. The Electricity Journal. 2024; 37(2): 107370. doi: 10.1016/j.tej.2024.107370 DOI: https://doi.org/10.1016/j.tej.2024.107370

25. McKenna E, Thomson M. High-resolution stochastic integrated thermal–electrical domestic demand model. Applied Energy. 2016; 165: 445–461. doi: 10.1016/j.apenergy.2015.12.089 DOI: https://doi.org/10.1016/j.apenergy.2015.12.089

26. Roslidar R, Brilianty N, Alhamdi MJ, et al. Improving Bi-LSTM for High Accuracy Protein Sequence Family Classifier. Indonesian Journal of Electrical Engineering and Informatics (IJEEI). 2024; 12(1). doi: 10.52549/.v12i1.4732 DOI: https://doi.org/10.52549/.v12i1.4732

27. Li P, Luo A, Liu J, et al. Bidirectional Gated Recurrent Unit Neural Network for Chinese Address Element Segmentation. ISPRS International Journal of Geo-Information. 2020; 9(11): 635. doi: 10.3390/ijgi9110635 DOI: https://doi.org/10.3390/ijgi9110635

28. Moustati I, Gherabi N. Unveiling the Potential of Transformer-Based Models for Efficient Time-Series Energy Forecasting. Journal of Advances in Information Technology. 2025; 16(5): 623–631. doi: 10.12720/jait.16.5.623-631 DOI: https://doi.org/10.12720/jait.16.5.623-631