Abstract:
The accuracy of short-term building energy consumption forecasting directly affects the effectiveness of demand response strategies and the optimization potential of building energy-saving systems. The Transformer model demonstrates unique advantages in capturing long-range temporal dependencies through its self-attention mechanism. However, its original architecture exhibits limitations when dealing with local fluctuations in building energy data, such as insufficient positional awareness and high computational cost. To address these issues, this study proposes an improved Transformer architecture from the perspective of structural optimization, integrating locally sensitive positional encoding and a hierarchical sparse attention mechanism. A learnable temporal pattern embedding is designed to enhance the model’s ability to capture periodic features, while segmented sparse attention is employed to reduce computational complexity and focus on critical temporal segments. Experimental results on real-world building energy datasets show that the optimized model significantly outperforms the standard Transformer as well as commonly used methods such as LSTM and CNN-LSTM in both prediction accuracy and computational efficiency, validating the effectiveness of the proposed optimization strategies.