EventsThe 1st International Online Conference on Earth Science
Published
This submission belongs to the session S1. AI and Big Data in Earth Science of the event The 1st International Online Conference on Earth Science
Published date
31 Aug, 2026
Academic Editor
author-avatarEliseo Clementini
Citation
Nasir Khan, Allah Bakhsh, Qazi Adnan Ahmad, Asif Zamir, Alex Bernard, ML-Based Forecasting of Primary Energy Consumption in the Middle East: A Comparative Analysis of GRU, LSTM, and XGBoost, in Proceedings of The 1st International Online Conference on Earth Science, 2 September–4 September 2026, MDPI: Basel, Switzerland
Share
Email
Facebook
Twitter
LinkedIn

ML-Based Forecasting of Primary Energy Consumption in the Middle East: A Comparative Analysis of GRU, LSTM, and XGBoost

Allah Bakhsh 2
Alex Bernard 1
1. Department of Mechanical Engineering (Well Engineering), International College of Engineering and Management, P.O. Box 2511, C.P.O Seeb, P.C. 111, Muscat, Oman
2. Department of Petroleum & Gas Engineering, Balochistan university of information Technology Engineering and Management Sciences (BUITEMS), Quetta, Pakistan
3. School of Mines, China University of Mining and Technology, Xuzhou, China
Abstract

Energy consumption is steadily increasing in the Middle East owing to rapid population growth, industrial expansion, and economic development. It is imperative to accurately forecast energy consumption for strategic planning, infrastructure development, and to establish long-term sustainable projects. However, it is challenging to accurately forecast energy consumption due to the nonlinear and complex nature of data. With the advent of Artificial Intelligence across various fields, it is imperative to employ Machine Learning (ML) models, such as Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM), and eXtreme Gradient Boosting (XGBoost), to forecast primary energy consumption in the Middle East over the next decade, from 2025 to 2034. These models used historical data from 538.7785 TWh in 1965 to 11597.1875 TWh in 2024. Metrics such as MAE, MSE, and R2 were used to evaluate the models’ performance. Comparing models’ effectiveness on the training and test datasets using R2, the GRU achieved an optimal balance between accuracy and generalization (0.9905, 0.8127). The LSTM showed stable performance; however, it had comparatively low predictive capability (0.7575, 0.7666). On the contrary, XGBoost was severely overfitted owing to the limited dataset, and it lacked temporal learning capability (0.9999,-5.0394). Additionally, the optimized model (GRU modeling) was trained using window size 5 with 20 hidden units, and a 0.2 dropout rate was applied to enhance generalization. The model used the Adam optimizer and Mean Squared Error (MSE) loss during training. Based on the GRU algorithm, primary energy consumption is forecast to increase from 11,671.0380 TWh in 2025 to 13,427.7031 TWh in 2034, which reflects about 15% growth over the forecasting period. This study will help policymakers and industry stakeholders to make strategic decisions on energy planning and sustainability.

Keywords
Primary Energy Consumption
Machine Learning
Middle East
Gated Recurrent Unit
Taming the Century: A Theoretical Framework for Long-Term Uncertainty Quantification in Hybrid AI-Physics Climate Models
High-Resolution Canopy Nitrogen Retrieval Using a Novel CCC-Based RTM-MLRA Framework