TransGridForecaster: A Transformer-Based Framework for Stress-Tested Energy Consumption Prediction in Smart Buildings
DOI:
https://doi.org/10.21015/vtse.v14i4.2612Abstract
Accurate building-energy forecasting is essential for demand management, operational scheduling, and energy-efficient smart-grid coordination. This study presents TransGridForecaster, a Transformer-based framework for one-hour-ahead electricity-consumption forecasting using the Building Data Genome Project 2 (BDG2) dataset. The framework integrates temporal self-attention, building-metadata-based spatial correlation, hybrid temporal encoding, a flexible forecasting head, and a trend–seasonality–residual decomposition. Unlike conventional models that treat building series independently, the proposed architecture jointly represents temporal context and inter-building similarity. The primary evaluation uses a chronological 70%/15%/15% split and therefore measures temporal and stratified performance on buildings represented in the overall dataset rather than true unseen-building transfer. The model is compared with ARIMA, LSTM, GRU, Temporal CNN, and Informer using MAE, RMSE, MAPE, sMAPE, R^2, and Peak Load Error (PLE). TransGridForecaster achieves an overall RMSE of 4.11 kWh, MAE of 2.98 kWh, MAPE of 6.7%, sMAPE of 7.3%, R^2 of 0.93, and PLE of 9.2%. Removing positional encoding increases RMSE by 15.1%, while removing spatial correlation increases RMSE by 9.7%, demonstrating that both components contribute materially but to different extents. Under simulated missing-data rates up to 30% and input-noise levels up to 20%, performance degrades progressively. Monte Carlo dropout is retained as an optional uncertainty-estimation mechanism; the reported 95% intervals in this study are run-level confidence intervals rather than per-forecast prediction intervals. The work therefore provides an integrated computer-science framework for building-energy forecasting while clearly separating validated findings from future deployment-oriented extensions.
References
[1] R. Mathumitha, P. Rathika, and K. Manimala, "Intelligent deep learning techniques for energy consumption forecasting in smart buildings: a review," Artificial Intelligence Review, vol. 57, no. 2, p. 35, 2024, doi: 10.1007/s10462-023-10660-8. DOI: https://doi.org/10.1007/s10462-023-10660-8
[2] T. Jing and Y. Zhao, "Optimizing energy consumption in smart buildings: A model for efficient energy management and renewable integration," Energy and Buildings, vol. 323, p. 114754, 2024, doi: 10.1016/j.enbuild.2024.114754. DOI: https://doi.org/10.1016/j.enbuild.2024.114754
[3] M. Jayashankara, A. Sharma, A. K. Singh, P. Chanak, and S. K. Singh, "A novel intelligent modeling and prediction of heat energy consumption in smart buildings," Energy and Buildings, vol. 310, p. 114105, 2024, doi: 10.1016/j.enbuild.2024.114105. DOI: https://doi.org/10.1016/j.enbuild.2024.114105
[4] Z. Ni, C. Zhang, M. Karlsson, and S. Gong, "A study of deep learning-based multi-horizon building energy forecasting," Energy and Buildings, vol. 303, p. 113810, 2024, doi: 10.1016/j.enbuild.2023.113810. DOI: https://doi.org/10.1016/j.enbuild.2023.113810
[5] J. L. Hernández, I. de Miguel, F. Vélez, and A. Vasallo, "Challenges and opportunities in European smart buildings energy management: A critical review," Renewable and Sustainable Energy Reviews, vol. 199, p. 114472, 2024, doi: 10.1016/j.rser.2024.114472. DOI: https://doi.org/10.1016/j.rser.2024.114472
[6] C. Zhao, X. Wu, P. Hao, Y. Wang, and X. Zhou, "Machine learning for optimal net-zero energy consumption in smart buildings," Sustainable Energy Technologies and Assessments, vol. 64, p. 103664, 2024, doi: 10.1016/j.seta.2024.103664. DOI: https://doi.org/10.1016/j.seta.2024.103664
[7] M. Poyyamozhi, B. Murugesan, N. Rajamanickam, M. Shorfuzzaman, and Y. Aboelmagd, "IoT—A promising solution to energy management in smart buildings: A systematic review, applications, barriers, and future scope," Buildings, vol. 14, no. 11, p. 3446, 2024, doi: 10.3390/buildings14113446. DOI: https://doi.org/10.3390/buildings14113446
[8] F. Ibude, A. Otebolaku, J. E. Ameh, and A. Ikpehai, "Multi-timescale energy consumption management in smart buildings using hybrid deep artificial neural networks," Journal of Low Power Electronics and Applications, vol. 14, no. 4, p. 54, 2024, doi: 10.3390/jlpea14040054. DOI: https://doi.org/10.3390/jlpea14040054
[9] M. Huotari, A. Malhi, and K. Främling, "Machine learning applications for smart building energy utilization: a survey," Archives of Computational Methods in Engineering, vol. 31, no. 5, pp. 2537–2556, 2024, doi: 10.1007/s11831-023-10054-7. DOI: https://doi.org/10.1007/s11831-023-10054-7
[10] I. A. Hernández-Robles, X. González-Ramírez, and J. A. Álvarez-Jaime, "Effectiveness of forecasters based on neural networks for energy management in zero energy buildings," Energy and Buildings, vol. 316, p. 114372, 2024, doi: 10.1016/j.enbuild.2024.114372. DOI: https://doi.org/10.1016/j.enbuild.2024.114372
[11] D. Kim, G. Seomun, Y. Lee, H. Cho, K. Chin, and M.-H. Kim, "Forecasting building energy demand and on-site power generation for residential buildings using long and short-term memory method with transfer learning," Applied Energy, vol. 368, p. 123500, 2024, doi: 10.1016/j.apenergy.2024.123500. DOI: https://doi.org/10.1016/j.apenergy.2024.123500
[12] A. Zouhri, A. Ez-Zahout, S. Chakouk, and M. El Mallahi, "A numerical analysis based internet of things (IOT) and big data analytics to minimize energy consumption in smart buildings," Journal of Automation Mobile Robotics and Intelligent Systems, vol. 18, 2024, doi: 10.14313/JAMRIS/2-2024/12. DOI: https://doi.org/10.14313/JAMRIS/2-2024/12
[13] A. Vaswani, N. Shazeer, N. Parmar, et al., "Attention is all you need," Advances in Neural Information Processing Systems, vol. 30, 2017.
[14] M. Anan, K. Kanaan, D. Benhaddou, N. Nasser, B. Qolomany, H. Talei, and A. Sawalmeh, "Occupant-aware energy consumption prediction in smart buildings using a LSTM model and time series data," 2024. DOI: https://doi.org/10.3390/en17246451
[15] A. Ntafalias, P. Papadopoulos, A. P. Ramallo-González, A. F. Skarmeta-Gómez, J. Sánchez-Valverde, M. C. Vlachou, ... and S. Wright, "Smart buildings with legacy equipment: A case study on energy savings and cost reduction through an IoT platform in Ireland and Greece," Results In Engineering, vol. 22, p. 102095, 2024, doi: 10.1016/j.rineng.2024.102095. DOI: https://doi.org/10.1016/j.rineng.2024.102095
[16] R. Singh, K. R. Utkurovich, A. Alkhayyat, G. Saritha, R. Jayadurga, and K. B. Waghulde, "Machine learning applications in energy management systems for smart buildings," in E3S Web of Conferences, vol. 540, p. 08002, EDP Sciences, 2024, doi: 10.1051/e3sconf/202454008002. DOI: https://doi.org/10.1051/e3sconf/202454008002
[17] H. Lu, J. Wu, Y. Ruan, F. Qian, H. Meng, Y. Gao, and T. Xu, "A multi-source transfer learning model based on LSTM and domain adaptation for building energy prediction," International Journal of Electrical Power & Energy Systems, vol. 149, p. 109024, 2023, doi: 10.1016/j.ijepes.2023.109024. DOI: https://doi.org/10.1016/j.ijepes.2023.109024
[18] A. Mishra, H. R. Lone, and A. Mishra, "DECODE: Data-driven energy consumption prediction leveraging historical data and environmental factors in buildings," Energy and Buildings, vol. 307, p. 113950, 2024, doi: 10.1016/j.enbuild.2024.113950. DOI: https://doi.org/10.1016/j.enbuild.2024.113950
[19] R. Wang, L. Bai, R. Rayhana, and Z. Liu, "Personalized federated learning for buildings energy consumption forecasting," Energy and Buildings, vol. 323, p. 114762, 2024, doi: 10.1016/j.enbuild.2024.114762. DOI: https://doi.org/10.1016/j.enbuild.2024.114762
[20] R. Spencer, S. Ranathunga, M. Boulic, A. H. van Heerden, and T. Susnjak, "Transfer learning on transformers for building energy consumption forecasting—A comparative study," Energy and Buildings, vol. 336, p. 115632, 2025, doi: 10.1016/j.enbuild.2025.115632. DOI: https://doi.org/10.1016/j.enbuild.2025.115632
[21] J. Liu, F. Yang, K. Yan, and L. Jiang, "Household energy consumption forecasting based on adaptive signal decomposition enhanced iTransformer network," Energy and Buildings, vol. 324, p. 114894, 2024, doi: 10.1016/j.enbuild.2024.114894. DOI: https://doi.org/10.1016/j.enbuild.2024.114894
[22] Y. Lu, V. Vijayananth, and T. Perumal, "Smart home energy prediction framework using temporal Kolmogorov-Arnold transformer," Energy and Buildings, vol. 335, p. 115529, 2025, doi: 10.1016/j.enbuild.2025.115529. DOI: https://doi.org/10.1016/j.enbuild.2025.115529
[23] S. Moveh, E. A. Merchán-Cruz, M. Abuhussain, Y. A. Dodo, S. Alhumaid, and A. H. Alhamami, "Deep Learning Framework Using Transformer Networks for Multi Building Energy Consumption Prediction in Smart Cities," Energies, vol. 18, no. 6, p. 1468, 2025, doi: 10.3390/en18061468. DOI: https://doi.org/10.3390/en18061468
[24] Y. Cai, D. Liao, and B. Liu, "Explainable Smart-Building Energy Consumption Forecasting and Anomaly Diagnosis Framework Based on Multi-Head Transformer and Dual-Stream Detection," Applied Sciences, vol. 16, no. 8, p. 3836, 2026, doi: 10.3390/app16083836.
[25] G. Antonesi, T. Cioara, I. Anghel, I. Papias, V. Michalakopoulos, and E. Sarmas, "Hybrid transformer model with liquid neural networks and learnable encodings for buildings' energy forecasting," Energy and AI, vol. 20, p. 100489, 2025, doi: 10.1016/j.egyai.2025.100489. DOI: https://doi.org/10.1016/j.egyai.2025.100489
[26] C. Zhang, J. Zhang, Y. Zhao, and J. Lu, "Automated data-driven building energy load prediction method based on generative pre-trained transformers (GPT)," Energy, vol. 318, p. 134824, 2025, doi: 10.1016/j.energy.2025.134824. DOI: https://doi.org/10.1016/j.energy.2025.134824
[27] C. Miller, A. Kathirgamanathan, B. Picchetti, P. Arjunan, J. Y. Park, Z. Nagy, P. Raftery, B. W. Hobson, Z. Shi, and F. Meggers, "The Building Data Genome Project 2, energy meter data from the ASHRAE Great Energy Predictor III competition," Scientific Data, vol. 7, p. 368, 2020, doi: 10.1038/s41597-020-00712-x. DOI: https://doi.org/10.1038/s41597-020-00712-x
Downloads
Published
How to Cite
Issue
Section
License
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC-By) that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
This work is licensed under a Creative Commons Attribution License CC BY