Explainable Smart-Building Energy Consumption Forecasting and Anomaly Diagnosis Framework Based on Multi-Head Transformer and Dual-Stream Detection
Source abstract
Abstract
Fine-grained energy management in smart-campus buildings requires accurate load forecasting together with reliable and interpretable anomaly diagnosis. This study presents an integrated forecasting–diagnosis framework for building energy systems. Hourly energy demand is modeled using a Transformer-based sequence-to-sequence architecture, in which a domain-aware attention mechanism is introduced to separately represent historical consumption dynamics, environmental influences, and temporal regularities commonly observed in building energy use. Anomaly diagnosis is conducted through a dual-scale strategy that supports both the timely detection of abrupt abnormal events and the identification of gradual performance degradation. Short-term anomalies are detected from forecasting residuals using adaptive thresholds, while long-term anomalies are identified by comparing current residual patterns with same-season historical baselines and validating multi-window trends over a 48 h horizon. The two detection streams are jointly used to distinguish point, pattern, and composite anomalies. To support practical operation and maintenance, SHAP-based explanations are provided to interpret both energy predictions and detected anomalies. Case studies on two educational buildings from the Building Data Genome Project 2 demonstrate that the proposed framework achieves the best overall forecasting performance against both conventional baselines and stronger recent Transformer-based models, with mean absolute percentage errors of approximately 3%. The results indicate that the proposed framework provides a practical solution for data-driven energy monitoring and decision support in smart buildings.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Building Energy and Comfort Optimization · Smart Grid Energy Management · Energy Load and Power Forecasting
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
School of Physics and Optoelectronics, Xiangtan University, Xiangtan 411105, China
School of Automation and Electronic Information, Xiangtan University, Xiangtan 411105, China
References (21)
Show source-provided references
1. United Nations Environment Programme (UNEP), and Global Alliance for Buildings and Construction (GlobalABC) (2025). Not Just Another Brick in the Wall: The Solutions Exist—Scaling Them Will Build on Progress and Cut Emissions Fast, United Nations Environment Programme. Global Status Report for Buildings and Construction 2024/2025.
2. Data-driven methods and their applications to building HVAC energy consumption prediction: A review10.1016/j.jobe.2025.114612 ↗
3. Successful application of predictive information in deep reinforcement learning control: A case study based on an office building HVAC system10.1016/j.energy.2024.130344 ↗
4. Cavus, M., Ayan, H., Dissanayake, D., Sharma, A., Deb, S., and Bell, M. (2025). Forecasting Electric Vehicle Charging Demand in Smart Cities Using Hybrid Deep Learning of Regional Spatial Behaviours. Energies, 18.10.3390/en18133425 ↗
5. A systematic review for transformer-based long-term series forecasting10.1007/s10462-024-11044-2 ↗
6. FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
7. A survey of transformer networks for time series forecasting10.1016/j.cosrev.2025.100883 ↗
8. Interpretable building energy consumption forecasting using spectral clustering algorithm and temporal fusion transformers architecture10.1016/j.apenergy.2023.121607 ↗
9. Short-term load forecasting based on LSTM networks considering attention mechanism10.1016/j.ijepes.2021.107818 ↗
10. Moveh, S., Merchán-Cruz, E.A., Abuhussain, M., Dodo, Y.A., Alhumaid, S., and Alhamami, A.H. (2025). Deep Learning Framework Using Transformer Networks for Multi Building Energy Consumption Prediction in Smart Cities. Energies, 18.10.3390/en18061468 ↗
11. Isolation-based anomaly detection10.1145/2133360.2133363 ↗
12. Artificial intelligence based anomaly detection of energy consumption in buildings: A review, current trends and new perspectives10.1016/j.apenergy.2021.116601 ↗
13. Deep anomaly detection for time series: A survey10.1016/j.cosrev.2025.100787 ↗
14. A review of computing-based automated fault detection and diagnosis of heating, ventilation and air conditioning systems10.1016/j.rser.2022.112395 ↗
15. Seasonal threshold to reduce false positives for prediction-based outlier detection in building energy data10.1016/j.jobe.2024.108539 ↗
16. XDL-Energy: Explainable hybrid deep learning framework for smart campus energy forecasting and anomaly justification using DPU-ALDOSKI dataset10.1016/j.enbuild.2025.116305 ↗
17. Explainable deep learning combined attention-based LSTM for building energy prediction: A framework from the perspective of supply side10.1016/j.enbuild.2025.116638 ↗
18. Explainable AI framework for reliable and transparent automated energy management in buildings10.1016/j.enbuild.2025.116246 ↗
19. Optimizing indoor environmental prediction in smart buildings: A comparative analysis of deep learning models10.1016/j.enbuild.2024.115086 ↗
20. Advanced fault detection, diagnosis and prognosis in HVAC systems: Lifecycle insight, key challenges, and promising approaches10.1016/j.rser.2025.115867 ↗
21. The Building Data Genome Project 2, energy meter data from the ASHRAE Great Energy Predictor III competition10.1038/s41597-020-00712-x ↗