Abstract
Short-term load forecasting (STLF) is critical for power grid management but remains challenging due to the non-linear nature of electricity demand and the influence of diverse exogenous variables. This paper introduces ANLF (Attention-based Neural Load Forecasting), a deep learning framework that integrates a Bi-directional Long Short-Term Memory (BiLSTM) backbone with a dual-attention mechanism. The model employs a Dynamic Feature Selection layer in the encoder to weight input features across the entire sequence and a Hierarchical Temporal Attention layer in the decoder to identify relevant historical patterns. Evaluated on the GEFCom2014 dataset, ANLF achieves a Mean Absolute Percentage Error (MAPE) of 1.93%, outperforming both classical machine learning models and standard recurrent neural networks.
Introduction
Short-term load forecasting (STLF) is the backbone of modern power grid management, influencing everything from real-time power dispatch to market clearing. However, it is a notoriously difficult "multi-horizon" problem. Electricity demand is highly non-linear and influenced by a complex mix of variables, including weather conditions, holidays, and historical usage patterns.
Existing models often suffer from two major gaps:
- Feature Noise: Models struggle to distinguish between critical drivers (like temperature) and irrelevant noise across an entire time sequence.
- Temporal Context: While "similar day" analysis is a common heuristic, most neural networks lack a systematic way to "soft-select" relevant historical moments during the decoding process.
Methodology
The proposed ANLF framework utilizes an encoder-decoder architecture based on Bi-directional Long Short-Term Memory (BiLSTM) networks, enhanced by two novel attention layers designed to address the aforementioned gaps.
Dynamic Feature Selection (Encoder)
Unlike previous methods that only look at the most recent time step to weight features, this layer evaluates the importance of each input (e.g., humidity vs. hour of the day) based on the entire input sequence. It assigns a weight ($\alpha$) to each feature before it enters the BiLSTM, allowing the model to adaptively prioritize relevant drivers.
Hierarchical Temporal Attention (Decoder)
This layer acts as an integrated "similar day" selector. It calculates the dissimilarity between the current forecast day's features and historical days. By re-evaluating the importance of historical hidden states at each time step, the model focuses on the most relevant past information to generate the future forecast.
BiLSTM Backbone
A BiLSTM is employed to capture information from both the past and the "future" (within a fixed window), providing a more complete context than standard unidirectional LSTMs.
Experimental Setup
The model was evaluated using the Global Energy Forecasting Competition 2014 (GEFCom2014-E) dataset, which includes 9 years of hourly load data (2006–2014), temperature, and timestamps. Data from 2010–2012 was used for training, 2013 for validation, and 2014 for testing. Inputs included historical load, temperature, holiday indicators, and one-hot encoded temporal data.
Results and Discussion
The ANLF model was tested against nine competitors, including Gradient Boosting Machines (GBM), Support Vector Regression (SVR), and standard Encoder-Decoder LSTMs.
Quantitative Performance
ANLF achieved the lowest error across all metrics. Specifically, it reached a Mean Absolute Percentage Error (MAPE) of 1.93%, compared to 2.15% for the best classical model (GBM) and 2.26% for a standard LSTM. The model also showed a significant reduction in Root Mean Square Error (RMSE), hitting 86.74, while the next best non-attention deep learning model (EDBiLSTM) was at 92.94.
Visual Analysis
Detailed forecasting plots over a 3-day window demonstrate that ANLF tracks the "Actual Load" curve much more tightly than baselines. As shown in the performance plots, ANLF maintains a lower and more stable relative error, particularly during peak demand periods where traditional models often deviate.
Conclusion
The ANLF framework demonstrates that integrating dynamic feature selection and hierarchical temporal attention into a BiLSTM architecture significantly enhances STLF accuracy. By adaptively weighting features and historical context, the model effectively mitigates noise and captures complex temporal dependencies. Future work may explore computational optimizations for longer historical windows and testing the model's generalization across different geographic regions.
Summary updated