IDEAS home Printed from https://ideas.repec.org/a/gam/jeners/v18y2025i6p1468-d1613979.html
   My bibliography  Save this article

Deep Learning Framework Using Transformer Networks for Multi Building Energy Consumption Prediction in Smart Cities

Author

Listed:
  • Samuel Moveh

    (Engineering Faculty, Transport and Telecommunication Institute, 1019 Riga, Latvia)

  • Emmanuel Alejandro Merchán-Cruz

    (Engineering Faculty, Transport and Telecommunication Institute, 1019 Riga, Latvia)

  • Maher Abuhussain

    (Department of Civil and Environmental Engineering, College of Engineering and Computing in Al-Qunfudhah, Umm Al-Qura University, Mecca 24221, Saudi Arabia)

  • Yakubu Aminu Dodo

    (Architectural Engineering Department, College of Engineering, Najran University, Najran 66426, Saudi Arabia)

  • Saleh Alhumaid

    (Department of Mechanical Engineering, University of Hail, Hail 81481, Saudi Arabia)

  • Ali Hussain Alhamami

    (Civil Engineering Department, College of Engineering, Najran University, Najran 66454, Saudi Arabia)

Abstract

The increasing complexity of urban building energy systems necessitates advanced prediction methods for efficient energy management. Urban buildings account for approximately 40% of global energy consumption, making accurate prediction crucial for sustainability goals. This research develops a novel transformer-based deep learning framework for multi-building energy consumption forecasting. Despite recent advances in energy prediction techniques, existing models struggle with multi-building scenarios due to limited ability to capture cross-building correlations, inadequate integration of diverse data streams, and poor scalability when deployed at urban scale—gaps this research specifically addresses. The study implemented a modified transformer architecture with hierarchical attention mechanisms, processing data from 100 commercial buildings across three climate zones over three years (2020–2023). The framework incorporated weather parameters, occupancy patterns, and historical energy consumption data through multi-head attention layers, employing a 4000-step warm-up period and adaptive regularization techniques. The evaluation included a comparison with the baseline models (ARIMA, LSTM, GRU) and robustness testing. The framework achieved a 23.7% improvement in prediction accuracy compared to traditional methods, with a mean absolute percentage error of 3.2%. Performance remained stable across building types, with office complexes showing the highest accuracy (MAPE = 2.8%) and healthcare facilities showing acceptable variance (MAPE = 3.5%). The model-maintained prediction stability under severe data perturbations while demonstrating near-linear computational scaling. The transformer-based approach significantly enhances building energy prediction capabilities, enabling more effective demand-side management strategies, though future research should address long-term adaptability.

Suggested Citation

  • Samuel Moveh & Emmanuel Alejandro Merchán-Cruz & Maher Abuhussain & Yakubu Aminu Dodo & Saleh Alhumaid & Ali Hussain Alhamami, 2025. "Deep Learning Framework Using Transformer Networks for Multi Building Energy Consumption Prediction in Smart Cities," Energies, MDPI, vol. 18(6), pages 1-22, March.
  • Handle: RePEc:gam:jeners:v:18:y:2025:i:6:p:1468-:d:1613979
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1996-1073/18/6/1468/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1996-1073/18/6/1468/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Hu, Yuqing & Cheng, Xiaoyuan & Wang, Suhang & Chen, Jianli & Zhao, Tianxiang & Dai, Enyan, 2022. "Times series forecasting for urban building energy consumption based on graph convolutional network," Applied Energy, Elsevier, vol. 307(C).
    2. Anujin Bayasgalan & Yoo Shin Park & Seak Bai Koh & Sung-Yong Son, 2024. "Comprehensive Review of Building Energy Management Models: Grid-Interactive Efficient Building Perspective," Energies, MDPI, vol. 17(19), pages 1-25, September.
    3. Jumaboev Sherozbek & Jaewoo Park & Mohammad Shaheer Akhtar & O-Bong Yang, 2023. "Transformers-Based Encoder Model for Forecasting Hourly Power Output of Transparent Photovoltaic Module Systems," Energies, MDPI, vol. 16(3), pages 1-11, January.
    4. Feifan Ji & Chenglong Huang & Tong Wang & Yanjun Li & Shuwen Pan, 2024. "Enhanced Thermal Modeling of Electric Vehicle Motors Using a Multihead Attention Mechanism," Energies, MDPI, vol. 17(12), pages 1-17, June.
    5. Hu, Zehuan & Gao, Yuan & Ji, Siyu & Mae, Masayuki & Imaizumi, Taiji, 2024. "Improved multistep ahead photovoltaic power prediction model based on LSTM and self-attention with weather forecast data," Applied Energy, Elsevier, vol. 359(C).
    6. Zheng, Peijun & Zhou, Heng & Liu, Jiang & Nakanishi, Yosuke, 2023. "Interpretable building energy consumption forecasting using spectral clustering algorithm and temporal fusion transformers architecture," Applied Energy, Elsevier, vol. 349(C).
    7. Hanif, M.F. & Mi, J., 2024. "Harnessing AI for solar energy: Emergence of transformer models," Applied Energy, Elsevier, vol. 369(C).
    8. M. Usman Saleem & Mustafa Shakir & M. Rehan Usman & M. Hamza Tahir Bajwa & Noman Shabbir & Payam Shams Ghahfarokhi & Kamran Daniel, 2023. "Integrating Smart Energy Management System with Internet of Things and Cloud Computing for Efficient Demand Side Management in Smart Grids," Energies, MDPI, vol. 16(12), pages 1-21, June.
    9. Lu, Xiangdong & Zhao, Jianhui & Markov, Vladimir & Wu, Tianyu, 2024. "Study on precise fuel injection under multiple injections of high pressure common rail system based on deep learning," Energy, Elsevier, vol. 307(C).
    10. Gonçalves, Juliana E. & Montazeri, Hamid & van Hooff, Twan & Saelens, Dirk, 2021. "Performance of building integrated photovoltaic facades: Impact of exterior convective heat transfer," Applied Energy, Elsevier, vol. 287(C).
    11. Long Li & Shuqi Wang & Shengxi Zhang & Ding Liu & Shengbin Ma, 2023. "The Hydrogen Energy Infrastructure Location Selection Model: A Hybrid Fuzzy Decision-Making Approach," Sustainability, MDPI, vol. 15(13), pages 1-20, June.
    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. Hu, Zehuan & Gao, Yuan & Sun, Luning & Mae, Masayuki & Imaizumi, Taiji, 2024. "Self-learning dynamic graph neural network with self-attention based on historical data and future data for multi-task multivariate residential air conditioning forecasting," Applied Energy, Elsevier, vol. 364(C).
    2. Chankook Park & Wan Gyu Heo & Myung Eun Lee, 2024. "Study on Consumers’ Perceived Benefits and Risks of Smart Energy System," International Journal of Energy Economics and Policy, Econjournals, vol. 14(3), pages 288-300, May.
    3. Andreas Lenk & Marcus Vogt & Christoph Herrmann, 2024. "An Approach to Predicting Energy Demand Within Automobile Production Using the Temporal Fusion Transformer Model," Energies, MDPI, vol. 18(1), pages 1-34, December.
    4. Eduardo Luiz Alba & Gilson Adamczuk Oliveira & Matheus Henrique Dal Molin Ribeiro & Érick Oliveira Rodrigues, 2024. "Electricity Consumption Forecasting: An Approach Using Cooperative Ensemble Learning with SHapley Additive exPlanations," Forecasting, MDPI, vol. 6(3), pages 1-25, September.
    5. Hafize Nurgul Durmus Senyapar & Ramazan Bayindir, 2023. "The Research Agenda on Smart Grids: Foresights for Social Acceptance," Energies, MDPI, vol. 16(18), pages 1-31, September.
    6. Liu, Mingzhe & Guo, Mingyue & Fu, Yangyang & O’Neill, Zheng & Gao, Yuan, 2024. "Expert-guided imitation learning for energy management: Evaluating GAIL’s performance in building control applications," Applied Energy, Elsevier, vol. 372(C).
    7. Pei, Jingyin & Dong, Yunxuan & Guo, Pinghui & Wu, Thomas & Hu, Jianming, 2024. "A Hybrid Dual Stream ProbSparse Self-Attention Network for spatial–temporal photovoltaic power forecasting," Energy, Elsevier, vol. 305(C).
    8. Mehmet Das & Erhan Arslan & Sule Kaya & Bilal Alatas & Ebru Akpinar & Burcu Özsoy, 2024. "Performance Evaluation of Photovoltaic Panels in Extreme Environments: A Machine Learning Approach on Horseshoe Island, Antarctica," Sustainability, MDPI, vol. 17(1), pages 1-34, December.
    9. Xu Liang & Huifang Kang & Rui Zeng & Yue Pang & Yun Yang & Yunlu Qiu & Yuanxu Tao & Jun Shen, 2024. "Impact of the Structural Parameters on the Performance of a Regenerative-Type Hydrogen Recirculation Blower for Vehicular Proton Exchange Membrane Fuel Cells," Sustainability, MDPI, vol. 16(5), pages 1-28, February.
    10. Qing Yin & Chunmiao Han & Ailin Li & Xiao Liu & Ying Liu, 2024. "A Review of Research on Building Energy Consumption Prediction Models Based on Artificial Neural Networks," Sustainability, MDPI, vol. 16(17), pages 1-30, September.
    11. Khan, Zulfiqar Ahmad & Khan, Shabbir Ahmad & Hussain, Tanveer & Baik, Sung Wook, 2024. "DSPM: Dual sequence prediction model for efficient energy management in micro-grid," Applied Energy, Elsevier, vol. 356(C).
    12. Gong, Bin & An, Aimin & Shi, Yaoke & Guan, Haijiao & Jia, Wenchao & Yang, Fazhi, 2024. "An interpretable hybrid spatiotemporal fusion method for ultra-short-term photovoltaic power prediction," Energy, Elsevier, vol. 308(C).
    13. Dongsu Kim & Jongman Lee & Sunglok Do & Pedro J. Mago & Kwang Ho Lee & Heejin Cho, 2022. "Energy Modeling and Model Predictive Control for HVAC in Buildings: A Review of Current Research Trends," Energies, MDPI, vol. 15(19), pages 1-30, October.
    14. Sohani, Ali & Cornaro, Cristina & Shahverdian, Mohammad Hassan & Moser, David & Pierro, Marco & Olabi, Abdul Ghani & Karimi, Nader & Nižetić, Sandro & Li, Larry K.B. & Doranehgard, Mohammad Hossein, 2023. "Techno-economic evaluation of a hybrid photovoltaic system with hot/cold water storage for poly-generation in a residential building," Applied Energy, Elsevier, vol. 331(C).
    15. Vasileios Laitsos & Georgios Vontzos & Paschalis Paraschoudis & Eleftherios Tsampasis & Dimitrios Bargiotas & Lefteri H. Tsoukalas, 2024. "The State of the Art Electricity Load and Price Forecasting for the Modern Wholesale Electricity Market," Energies, MDPI, vol. 17(22), pages 1-37, November.
    16. Haitao Wang & Fanghao Wu & Ning Lu & Jianfeng Zhai, 2023. "Comprehensive Research on the Near-Zero Energy Consumption of an Office Building in Hefei Based on a Photovoltaic Curtain Wall," Sustainability, MDPI, vol. 15(15), pages 1-17, July.
    17. Yiling Fan & Zhuang Ma & Wanwei Tang & Jing Liang & Pengfei Xu, 2024. "Using Crested Porcupine Optimizer Algorithm and CNN-LSTM-Attention Model Combined with Deep Learning Methods to Enhance Short-Term Power Forecasting in PV Generation," Energies, MDPI, vol. 17(14), pages 1-17, July.
    18. Saini, Krishna Kumar & Sharma, Pavitra & Mathur, Hitesh Datt & Gautam, Aditya R. & Bansal, Ramesh C., 2024. "Techno-economic and reliability assessment of an off-grid solar-powered energy system," Applied Energy, Elsevier, vol. 371(C).
    19. Wang, Xinyu & Ma, Wenping, 2024. "A hybrid deep learning model with an optimal strategy based on improved VMD and transformer for short-term photovoltaic power forecasting," Energy, Elsevier, vol. 295(C).
    20. Wu, Binrong & Yu, Sihao & Peng, Lu & Wang, Lin, 2024. "Interpretable wind speed forecasting with meteorological feature exploring and two-stage decomposition," Energy, Elsevier, vol. 294(C).

    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:jeners:v:18:y:2025:i:6:p:1468-:d:1613979. 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.