Abstract
Power load forecasting is a core technical component for achieving safe, stable, and economic operation in smart grids. This paper proposes a hybrid BiLSTM–Transformer forecasting method based on a Dynamic Adaptive Fusion (DAF) module. The core of this method involves utilizing the DAF module to adaptively weight different feature channels to highlight key influencing factors, while simultaneously employing a temporal attention mechanism to capture the contributions of various time steps. Building on this, the model effectively combines the strengths of BiLSTM networks in capturing bidirectional dependencies with the capability of Transformer models to extract global contextual features, thereby achieving a multi-level dynamic fusion of load characteristics. Experiments on real-world grid datasets demonstrate that the proposed method achieves a significant performance improvement over traditional models, particularly in terms of load peak prediction accuracy and stability. This provides effective technical support for the refined scheduling of power systems.
1. Introduction
With the acceleration of the energy transition and the development of smart grids, power load forecasting has emerged as a core technology for ensuring the safe and economic operation of power systems [1]. Its accuracy directly impacts dispatch efficiency and energy utilization [2]. Under the “Dual Carbon” strategy, the large-scale integration of renewable energy has increased load volatility, exposing the insufficient precision and poor adaptability of traditional forecasting methods [3]. Studies indicate that for every 1% reduction in forecasting error, reserve capacity requirements can be decreased by approximately 3%, potentially yielding economic benefits of over ten million for the grid [4]. Therefore, developing high-precision load forecasting models holds significant theoretical and practical value.
Current research on load forecasting primarily focuses on the optimization of deep learning models. Temporal models, represented by LSTM, effectively capture the temporal dependencies of load data but suffer from gradient vanishing issues when dealing with long-term dependencies. The Transformer model breaks through sequence length limitations via its self-attention mechanism but exhibits deficiencies in local feature extraction [5]. Hybrid models like CNN-LSTM combine spatiotemporal features, yet their feature fusion methods are often coarse, making it difficult to adaptively identify complex correlations between multi-source heterogeneous features. Recent studies suggest that the feature selection capability of attention mechanisms can significantly enhance forecasting accuracy; however, existing methods mostly employ static or single-dimensional fusion, failing to achieve dynamic collaborative optimization between feature channels and time steps [6].
To address these issues, this paper proposes a BiLSTM–Transformer hybrid forecasting method based on a Dynamic Adaptive Fusion (DAF) module. The core innovations are as follows: (1) Constructing a Dynamic Adaptive Fusion (DAF) module that utilizes a multi-dimensional adaptive weighting mechanism to dynamically measure the importance of different feature channels and time nodes, achieving precise extraction of key information; (2) Designing a BiLSTM–Transformer cascaded architecture, where the BiLSTM extracts local bidirectional temporal features [7] and the Transformer captures global long-range dependencies; (3) Developing a multi-scale feature interaction enhancement strategy to resolve prediction distortions in load mutation regions. Compared to existing research, this method achieves dynamic modeling of feature importance through the DAF module, effectively eliminating redundant information and establishing a more robust feature fusion system.
The remainder of this paper is organized as follows: Section 2 systematically analyzes the technical bottlenecks of traditional load forecasting methods; Section 3 elaborates on the theoretical architecture of the hybrid forecasting model based on Dynamic Adaptive Fusion; Section 4 designs a multi-model comparative experimental scheme and presents the results; finally, Section 5 summarizes the research findings.
2. Traditional Load Forecasting Model
As a core technology in smart grid operations, power load forecasting plays a critical role, with its accuracy directly influencing the quality of dispatching decisions. However, current mainstream forecasting methods face significant technical limitations [8]. This section systematically analyzes the shortcomings of four typical models, highlighting their inadequate adaptability in complex load scenarios.
The convolutional neural network model extracts local spatial features through convolution kernels, and its core calculation can be expressed as the convolution operation of feature maps:
This calculation process achieves local feature extraction through the sliding operation of the convolution kernel on the input feature map. Here, represents the weight matrix of the convolution kernel, is the activation function, and is the bias term [9]. This spatial feature extraction mechanism is highly effective when dealing with static correlated features such as temperature field distribution and humidity gradient, which are two-dimensional spatial data. However, this spatial-oriented design concept makes it difficult to model the temporal dynamic characteristics of load [10]. Load data is essentially a dynamic sequence with strong temporal dependence, and its change pattern not only depends on the current state but is also closely related to historical states.
The Long Short-Term Memory (LSTM) network model addresses the problem of vanishing gradients through a gating mechanism, and its core computation involves cell state update:
In this formula, ft represents the forgetting gate that controls the degree of retaining historical information, it represents the input gate that controls the intensity of updating new information, and is the candidate cell state. This gating design enables it to effectively capture the short-term dependencies of the load sequence [11], such as the daily load fluctuation patterns. However, when it comes to long-term pattern learning, the performance of LSTM is still not satisfactory. This problem becomes particularly prominent when dealing with load pattern switching scenarios, such as during holidays. For example, before the Spring Festival, as factories gradually shut down and residents’ electricity consumption patterns change, the load curve exhibits a unique “stepwise decline” feature. The traditional LSTM model, due to its lack of pattern recognition mechanism, often continues the daily prediction mode in the three days before the festival [12], resulting in a prediction error that increases to 22.4%. Grid operation data shows that when the prediction period exceeds 24 h, the memory decay rate of LSTM is as high as 40%, which means that the model has a blurry memory of key historical patterns from one week ago or even earlier. This prediction lag phenomenon may cause serious consequences in grid dispatching.
The Transformer model overcomes the limitation of sequence length through the self-attention mechanism, and its core calculation is scaled dot-product attention:
In this formula, represents the query matrix, represents the key matrix, represents the value matrix, and represents the dimension of the key vector. Figure 1 shows the structure of the Transformer encoder. This design enables the model to establish global dependencies, demonstrating unique advantages when dealing with long-term patterns such as monthly load cycles [13]. However, this global perspective is achieved at the cost of sacrificing local details. In scenarios where load fluctuations occur due to fluctuations in photovoltaic output, the prediction results of the Transformer model exhibit abnormal fluctuations, exceeding ±15%. The reason for this is that the self-attention mechanism is less sensitive to local mutation features during the process of global feature extraction. When a photovoltaic power station experiences a sudden drop in output due to cloud cover, the load in the associated area will increase sharply, and this mutation feature is diluted in the global attention weight distribution [14], resulting in a sluggish model response. More seriously, the computational complexity of the Transformer increases quadratically with the sequence length. When processing long-term historical data, the consumption of computing resources increases exponentially.
Figure 1.
Structure Diagram of Transformer.
To overcome the shortcomings of a single model, researchers proposed a CNN-LSTM hybrid architecture. This model combines spatial feature extraction and temporal modeling:
This formula describes the cascaded computing process: The input data first undergoes spatial feature extraction through the CNN module, and then is input into the LSTM module for temporal modeling [15]. Figure 2 shows the typical architecture of CNN-LSTM. Theoretically, this design should be able to simultaneously capture the spatiotemporal characteristics of the load. However, in practical applications, this mechanical concatenation exposes a series of problems. The most fundamental defect lies in the overly simplistic and crude feature fusion mechanism. Spatial features and temporal features have essential differences in dimension and scale, and direct concatenation leads to severe distortion in the information transmission process [16]. Experimental data show that the information loss rate during feature transmission is as high as 25%, especially when converting spatial features to temporal features, there is a serious dimension mismatch. For example, the high-dimensional feature map output by the convolution layer needs to be flattened into a one-dimensional vector before being input into the LSTM, which results in the loss of spatial structure information. In extreme weather scenarios such as typhoon passage, the prediction error of this hybrid model still increases by more than 30%.
Figure 2.
Architecture of CNN-LSTM Model.
Through a systematic analysis of the above model, three common technical bottlenecks can be summarized. Firstly, there is a fundamental defect in the feature fusion mechanism [17]. Traditional methods mostly adopt feature concatenation or simple weighting methods, and this rigid fusion leads to an increase of more than 50% in the prediction distortion rate in the load sudden change area. Secondly, the dynamic adaptability is seriously insufficient. Traditional models have difficulty responding in real time to the changes in load characteristics, and the prediction error increases by 22% when the holiday mode is switched. Finally, the problem of decoupling of spatial and temporal features is prominent. The time-dependent and spatial features are processed separately. The temporal and spatial coupling characteristics of the load are ignored [18]. Studies have shown that the correlation coefficient between temperature and load is 0.83, and the correlation coefficient between humidity and load is 0.76, but traditional methods failed to effectively utilize these strong correlated features.
In summary, traditional load forecasting models have systematic flaws in complex scenarios: the CNN model shows a significant increase in prediction deviation during load fluctuations, the LSTM model experiences a noticeable increase in error during mode transitions, and the Transformer model demonstrates severe instability when dealing with fluctuations in new energy sources [19]. These typical problems fully reveal the fundamental limitations of traditional methods, such as insufficient adaptability and poor robustness. In-depth research has found that the technical bottlenecks mainly lie in the structural defects of the feature fusion mechanism, the severe lack of dynamic adaptability, and the inefficiency of the coordination of spatial and temporal features [20]. Especially in key scenarios such as load fluctuations, mode transitions, and fluctuations in new energy sources, the prediction accuracy of traditional methods shows a systematic decline. Therefore, it is urgent to break through the limitations of traditional architectures and develop new predictive models with dynamic environmental perception capabilities and strong robustness, to provide reliable technical support for the safe and economic operation of smart grids.
3. New Methods in Load Forecasting
To address the technical limitations of traditional load forecasting models in multi-source feature fusion, dynamic temporal adaptation [21], and the coordination of long- and short-term dependencies, this paper proposes a BiLSTM–Transformer hybrid model based on Dynamic Adaptive Fusion (DAF), denoted as DAF-BT. Through multi-level structural innovations, this model aims to overcome the limitations of low feature utilization in complex grid environments and achieve highly accurate and robust load forecasting. This chapter details the overall architecture of the proposed model and the theoretical principles underlying its core innovative components.
3.1. BiLSTM–Transformer–DAF Hybrid Architecture
The DAF-BT model incorporates two primary architectural innovations: the BiLSTM–Transformer cascaded temporal modeler and the Dynamic Adaptive Fusion (DAF) module [22]. Adopting an end-to-end design, the architecture establishes a structured workflow that progresses from multi-source feature input to cascaded temporal extraction, dynamic adaptive fusion, and prediction output. As illustrated in Figure 3, the model’s workflow exhibits a clear hierarchical structure: input data is first mapped into a high-dimensional space via an N-space transformer to uncover latent feature correlations; it is then fed into the cascaded temporal modeling module, where a Bidirectional Long Short-Term Memory (BiLSTM) network captures the bidirectional short-term dependencies of the load sequence, followed by a Transformer layer—optimized with a spatial transformation network—to model global long-range patterns and periodic regularities [23]. Subsequently, temporal features from different levels are aggregated in the core DAF module for adaptive weighting and coordination. By dynamically measuring the contributions of various feature channels and time steps, this module achieves precise reinforcement of key information while suppressing redundant noise. Finally, the model integrates all high-level features to generate the final load forecasting values. This design, centered on cascaded modeling and dynamic fusion, ensures efficient synergy between feature extraction and information integration, laying a solid structural foundation for the model’s high performance in handling complex load fluctuations.
Figure 3.
BiLSTM–Transformer–DAF Flowchart.
3.2. BiLSTM–Transformer Coupled Sequential Modeling
The temporal feature extraction adopts a BiLSTM–Transformer cascaded structure to effectively address the balance issue of long-term and short-term dependencies in the load sequence. This module first uses BiLSTM to capture the bidirectional short-term dependency relationships of the sequence:
In this formula, represents the input from the spatial feature extraction module, and the BiLSTM () operation simultaneously combines the outputs of the forward and backward LSTM units [24]. Specifically, the forward LSTM unit processes the sequence from front to back, capturing the dependency patterns from the past to the current moment; the backward LSTM unit processes the sequence from back to front, learning the potential correlations from the future to the current moment in an inverse manner [25]. The hidden states of the two are concatenated at each step, thereby simultaneously utilizing the context information from the past and the future, effectively alleviating the memory decay problem caused by the one-way information flow in traditional unidirectional LSTM. Subsequently, the Transformer layer is introduced to capture longer-term pattern dependencies [26]. To avoid the problem in the standard Transformer where the global self-attention mechanism has high computational cost on long sequences and may ignore local correlations, this model introduces a local enhanced attention mechanism:
Here, represents the query matrix, represents the key matrix, represents the value matrix, and represents the dimension of the key vector [27]. This mechanism uses a local mask matrix to force the model to prioritize the consideration of feature correlations among neighboring time steps when calculating the attention weights [28]. It is worth noting that the window size of the local mask matrix is designed as a tunable hyperparameter correlated with the data sampling rate. To ensure the model captures consistent local physical patterns across datasets with different resolutions, the dimension of should be adjusted to cover an equivalent physical time horizon. This design allows the model to explicitly focus on the most relevant recent history regardless of the sampling frequency. This approach not only reduces computational complexity but also enhances the model’s ability to capture local mutation patterns (such as rapid load climbing). In practical tests, this design significantly reduced the fluctuation amplitude of the prediction results from ±15% in traditional models to ±6% in scenarios with drastic fluctuations in photovoltaic output, demonstrating its ability to model temporal features.
3.3. Dynamic Adaptive Fusion Module
The Dynamic Adaptive Fusion (DAF) module is designed to address the limitations of traditional fusion methods, such as simple concatenation or static weight allocation, which often struggle to efficiently eliminate redundancy when processing multi-source heterogeneous data [29]. As illustrated in Figure 4, the DAF module adopts a dual-path parallel architecture, consisting of a Feature Channel Adaptive Unit and a Temporal Contribution Evaluation Unit.
Figure 4.
Principle Diagram of DAF Module.
To enhance model reproducibility and clarify the learning process, the detailed mathematical workflow is formulated as follows. The Feature Channel Adaptive Unit dynamically evaluates the importance of different feature channels (e.g., meteorological factors, date attributes). It performs global statistical feature compression on the input using Global Average Pooling (GAP), followed by a multi-layer perceptron (MLP) to generate the channel weight matrix :
where denotes the channel features, and are learnable weight matrices for dimensionality reduction and restoration, represents the ReLU activation function, and is the Sigmoid function.
Simultaneously, the Temporal Contribution Evaluation Unit utilizes a lightweight 1D convolutional network to pinpoint critical time nodes of load fluctuations, generating the temporal weight matrix :
where represents the temporal features extracted by the BiLSTM–Transformer.
Crucially, unlike existing attention mechanisms (e.g., CBAM or traditional self-attention) that typically process spatial/channel and temporal features orthogonally through simple sequential addition or matrix multiplication, the DAF module introduces a deep-level synergistic fusion mechanism [30]. To achieve this, we design the following dynamic weighted fusion equation:
In this formula, denotes element-wise multiplication with broadcasting, and represents the Hadamard product. The distinct innovation lies in the nonlinear interaction term . Instead of being a static hyperparameter, the interaction coefficient is dynamically learned from the concatenated context of both feature spaces.
This specific architectural advantage allows the model to capture the deep cross-dimensional coupling between environmental shifts and temporal load behaviors. For example, rather than merely identifying that “temperature is important” or “a specific morning load trend is important,” the interaction term explicitly learns “which historical load patterns are most valuable under specific external environmental profiles.” Experimental results demonstrate that this dynamic adaptive design increases the information retention rate in load mutation regions to 92%. Compared to traditional static fusion methods, the feature utilization efficiency is improved by approximately 37%, significantly enhancing the model’s forecasting robustness and precision under complex operating conditions.
4. Experimental Design and Results Analysis
Following the theoretical formulation and design of the BiLSTM–Transformer–DAF hybrid architecture, this section presents a systematic experimental study based on a real-world power load dataset to comprehensively evaluate its practical performance. Specifically, this section details the data sources, preprocessing methods, evaluation metrics, and experimental settings. Through quantitative comparisons with multiple baseline models and qualitative analysis of the prediction curves, we evaluate the effectiveness and competitive performance of the proposed model.
4.1. Experimental Data and Preprocessing
The experimental data are sourced from full-year historical power load records of a typical non-residential commercial complex (comprising office buildings and retail spaces) in a temperate climate zone. The dataset covers 1 January to 31 December 2016, with 0.5 h sampling intervals, yielding a total of 17,516 samples. While sourced from a single site, the selected complex features typical load profiles shaped by standard business schedules and seasonal retail activities, making it representative of a wide range of urban commercial infrastructure. Thus, while the model’s specific parameters are tuned to this dataset, the proposed architecture is designed to capture the universal temporal dependencies and nonlinear characteristics inherent in commercial power consumption. This endows the methodology with potential transferability to other non-residential facilities or regions, provided local historical data is available for model retraining or fine-tuning. Future work will further validate the model’s robustness across diverse climate zones and building types. In addition to load values, the original dataset includes key environmental parameters such as temperature and wind speed. To ensure data quality, a rigorous preprocessing pipeline was implemented: first, erroneous observations significantly deviating from the normal range were eliminated; second, sliding average smoothing was applied exclusively to temperature data to suppress measurement noise, while raw power load data remained unprocessed to preserve high-frequency fluctuations; third, continuous features were normalized using the Z-score method, while temporal features were cosine-encoded to capture periodic patterns; finally, missing data were filled using linear interpolation.
4.2. Experimental Setup and Evaluation Metrics
The experimental setup closely adhered to time series forecasting standards, partitioning the full dataset into training, validation, and testing sets in a 7:1:2 ratio based on chronological order. This setup simulates the progressive forecasting requirements of models on future data in real-world scenarios. To ensure the fairness and reproducibility of the comparative experiments, all models were implemented on the same hardware platform and deep learning framework. A unified training strategy was applied across all baseline and proposed models to minimize performance differences caused by environmental factors. The detailed experimental environment and common hyperparameter settings, including learning rate and training epochs, are listed in Table 1.
Table 1.
Experimental Environment and Common Parameter Settings.
To ensure a fair and rigorous evaluation, while the foundational training environment (hardware, framework, and base optimizer) was unified across all models as listed in Table 1, the model-specific hyperparameters for all baseline models were systematically optimized rather than relying on arbitrary default values. Specifically, we employed a Grid Search strategy on the validation set to determine the optimal configuration for each individual architecture. For instance, the kernel sizes and dilation rates for CNN and TCN models, the number of attention heads for the Transformer baseline, and the exact hidden state dimensions for the RNN-based models (LSTM and GRU) were individually tuned to maximize their respective representation capabilities.
Furthermore, to address the varying convergence speeds of different model architectures and prevent overfitting, an Early Stopping mechanism was implemented uniformly across all training procedures. Training was halted if the validation loss did not improve for 15 consecutive epochs, ensuring that the final evaluated weights reflected the optimal generalization state of each model. Additionally, a dynamic learning rate optimization strategy (ReduceLROnPlateau) was applied to all models. The learning rate was halved when validation metric improvements stagnated for 5 epochs. These rigorous tuning and optimization procedures help ensure that the performance gaps observed in the comparative experiments are fundamentally derived from architectural innovations rather than inadequate baseline training.
To comprehensively evaluate the model performance from multiple dimensions, the experiment selected Mean Absolute Percentage Error (), Mean Absolute Error (), Root Mean Square Error (), and the Coefficient of Determination () as performance metrics. The specific calculation formulas are as follows:
where represents the mean absolute error, which reflects the average deviation between the predicted value and the actual value. The unit is MW, and the smaller the value, the higher the prediction accuracy.
represents the root mean square error, which measures the dispersion between the predicted values and the actual values. It is more sensitive to larger errors and is expressed in units of MW.
stands for Mean Absolute Percentage Error. It is used to assess the level of relative error and eliminate the influence of units. The lower the percentage value, the better.
is the coefficient of determination, which is used to indicate the explanatory power of the model. Its value ranges from 0 to 1, and the closer it is to 1, the better the fitting effect.
4.3. Analysis of Experimental Results
4.3.1. Comparative Analysis of Integrated Forecasting Performance
To systematically assess the effectiveness and competitive performance of the proposed BiLSTM–Transformer–DAF model in power load forecasting tasks, this section selects eight mainstream methods as benchmarks, including single deep learning models (CNN, LSTM, GRU, TCN, Transformer) and hybrid models (CNN-LSTM, TCN–GRU, TCN–LSTM–Attention). We conduct an in-depth analysis from multiple dimensions. Combined with quantitative evaluation metrics, a systematic comparative assessment of the integrated forecasting performance of each model is performed.
To visually assess the capability of different models in capturing the temporal features of power loads, Figure 5 illustrates the fitting comparison between the single-step prediction results of nine models and the actual load curves on the test set. By observing the individual fitting curves of each model, it can be found that basic single deep learning models, such as CNN and LSTM, although capable of outlining the overall profile of load variations, tend to show some deviations at the peaks and valleys of load fluctuations. Specifically, the CNN model exhibits certain local oscillations, while the LSTM model shows a certain phase lag, which presents challenges in strictly tracking instantaneous changes in load.
Figure 5.
Fitting Performance of Different Models Against Actual Load Profiles.
In contrast, with the introduction of architectures like TCN and GRU and the application of hybrid models, the smoothness and alignment of the prediction curves gradually improve. Notably, the BiLSTM–Transformer–DAF model proposed in this paper shows a prediction curve that closely aligns with the actual load curve. Even at turning points where load data undergoes rapid transitions, it maintains stable tracking capabilities without the noise typically caused by overfitting. This provides preliminary verification of the model’s effectiveness in extracting complex temporal features.
To provide a more intuitive demonstration of relative performance between the proposed method and other mainstream models, Figure 6 presents a direct comparison in a single coordinate system, featuring the BiLSTM–Transformer–DAF model alongside representative models such as CNN, Transformer, CNN-LSTM, and TCN–LSTM–Attention. By overlaying multiple curves, the degree of alignment between each model and the actual load curve can be visually compared.
Figure 6.
Comparison of Representative Forecasting Models Against Actual Load Profiles.
As observed, the CNN model exhibits noticeable deviation from the other curves and displays a distinctly oscillatory pattern. While baseline models like the Transformer improve trend-following capabilities, visible gaps still exist between their predictions and the actual values at peaks and valleys. In contrast, the prediction trajectory of the proposed model shows improved robustness, more closely aligning with the actual load curve across most of the duration. This visual comparison indicates that the proposed method offers enhanced overall fitting accuracy and trend-tracking capability relative to the selected baselines.
The quantitative evaluation metrics for each model, detailed in Table 2, further support the aforementioned analytical observations from a statistical perspective. Data shows that the standalone CNN model exhibits the highest prediction error among the tested models, with a MAPE of 4.23%, due to its inherent difficulty in capturing long-distance temporal dependencies.
Table 2.
Comparative Analysis of Model Predictive Accuracy Metrics.
With the integration of Recurrent Neural Network (RNN) components—such as LSTM and GRU—and TCN structures, the error metrics for hybrid models exhibit various degrees of decline; for instance, the MAPE of the TCN–GRU model decreases to 2.20%. Among all competing models, the proposed BiLSTM–Transformer–DAF model demonstrates the most competitive forecasting performance, with its MAE, RMSE, and MAPE reduced to 4.560 MW, 5.925 MW, and 1.58%, respectively, while the R2 improves to 0.983.
Compared to the best-performing baseline, the TCN–LSTM–Attention model, our method further reduces the MAPE by approximately 12.7%. These results indicate that by incorporating BiLSTM to capture bidirectional dependencies, combining it with Transformer for global feature extraction, and optimizing with the DAF module, the model’s capability to characterize complex nonlinear power load patterns is effectively improved.
4.3.2. Load Forecasting Performance Across Different Time Scales
The comprehensive comparative analysis in the previous section demonstrated the improved statistical performance of the BiLSTM–Transformer–DAF model across the entire test set. However, power load exhibits multi-periodicity, encompassing both daily patterns based on a 24 h cycle and weekly patterns influenced by the distinction between workdays and weekends. To further verify the model’s generalization capability and robustness across different time scales, this section selects typical daily and weekly load sequences from the test set. A detailed comparison is conducted between the proposed method and the most competitive baselines, specifically the TCN–LSTM–Attention and TCN–GRU models.
The comparative performance illustrated in Figure 7 highlights observable differences in how different deep learning architectures handle the nonlinear dynamics of short-term power load. The BiLSTM–Transformer–DAF model demonstrates the capability to closely track the “ground truth”, particularly during the initial volatility phase and the peak plateau. Unlike its counterparts, this model helps mitigate the “lag effect” common in time series forecasting. By integrating the DAF mechanism with the BiLSTM–Transformer backbone, the model captures both the long-range temporal dependencies and the local mutational features of the load curve. This results in a trajectory that maintains a close alignment with the actual values even during the rapid ascent between time steps 4 and 8, where traditional recursive models often encounter challenges with gradient vanishing or insufficient feature extraction.
Figure 7.
Comparison of Daily Load Forecasting Curves for Representative Models.
Furthermore, the stability of the models during the “post-peak” transition reveals the robustness of the proposed approach against stochastic noise. While the TCN–LSTM–Attention model exhibits some fluctuations and over-corrections during the gradual descent, the BiLSTM–Transformer–DAF maintains a relatively smooth and precise fit. The TCN–GRU model tends to yield lower predictions, often underestimating the peak and lagging behind the trend, which suggests that its simplified gating mechanism may have limited representational power to handle the high-frequency components of 30 min resolution data. The proposed model’s improved tracking of both the peak magnitude and the subsequent “valleys” indicates its efficacy in high-fidelity forecasting, providing reliable data support for real-time grid dispatching and energy management.
To validate the aforementioned visual observations from a rigorous quantitative perspective, Figure 8 provides a comparative analysis of the error evaluation metrics for this typical daily forecasting task. The data intuitively demonstrates that the proposed BiLSTM–Transformer–DAF model yields the most favorable results across all performance indicators. Specifically, our method achieves an MAE of 3.7323 and an MAPE of only 1.27%, representing a notable reduction in prediction error compared to the TCN–LSTM–Attention (MAE 5.2353, MAPE 1.77%) and TCN–GRU (MAE 5.3193, MAPE 1.91%) models. This sharp decline in MAPE is particularly significant for grid operations, as it suggests that the integration of the DAF module effectively suppresses the “prediction overshoot” and “under-fitting” issues that frequently plague traditional hybrid architectures during rapid load transitions.
Figure 8.
Quantitative Error Metrics for Representative Models on the Daily Load Profile.
Furthermore, the statistical reliability of the model is confirmed by the coefficient of determination (R2), which reaches a value of 0.9848. This indicates that the proposed architecture can explain over 98.4% of the complex load fluctuations within a single day, leaving a negligible margin for unexplained variance. The consistent performance across both absolute (MAE/RMSE) and relative (MAPE/R2) metrics suggests conclusive evidence that our method is more than just an incremental improvement; it represents a robust technical solution capable of meeting the stringent precision requirements for modern real-time power scheduling. By successfully capturing local detailed features that often challenge baseline models, the BiLSTM–Transformer–DAF framework demonstrates its reliability for high-fidelity energy management.
To examine the model’s capability in capturing long-term dependencies and special date patterns, such as the “weekend effect,” Figure 9 presents the load forecasting curves over a continuous seven-day horizon. The load profile exhibits a clear cyclical rhythm, where the weekend period (highlighted by the grey shaded area) shows a significant reduction in overall load levels due to the decline in industrial and social activities. In this long-sequence forecasting task, competing models reveal certain deviations. The TCN–GRU model tends to underpredict the peaks on Saturday, showing difficulty in fully adapting to the magnitude shifts caused by the transition from workday to rest-day cycles. Meanwhile, the TCN–LSTM–Attention model exhibits slight fluctuations at the load valley on Sunday; its prediction curve fluctuates more visibly around the ground truth, suggesting that its attention mechanism may be overly sensitive to minor workday residuals rather than recognizing the broader low-load weekend pattern.
Figure 9.
Comparison of Weekly Load Forecasting Curves for Representative Models.
In comparison, the proposed BiLSTM–Transformer–DAF model demonstrates improved spatiotemporal adaptability throughout the entire weekly cycle. It not only maintains a closer alignment with the peaks and valleys of consecutive workdays from Monday to Friday but also captures the downward trend and the flattened profile of the weekend relatively well. This stability during the transition between heterogeneous load patterns can be attributed to the synergy between the BiLSTM’s bidirectional memory and the Transformer’s global attention. While the BiLSTM helps extract the local “climb-and-fall” characteristics of each day, the Transformer identifies the long-range weekly periodicity. Most importantly, the Dynamic Adaptive Fusion (DAF) module serves as a bridge, allowing the model to selectively weigh features that define the weekend transition. This helps mitigate the “phase lag” often seen in long-sequence forecasting and indicates the model’s competitive generalization and tracking capability across diverse day types.
Figure 10 illustrates the quantitative error metrics for the weekly forecasting task, providing a rigorous statistical foundation for the model’s robustness over extended time scales. While the cumulative error naturally increases compared to single-day forecasting due to the expanded prediction horizon, the proposed BiLSTM–Transformer–DAF model consistently maintains slight advantage across all indicators. The bar charts reveal that the weekly average MAE is controlled at 4.4404, with an RMSE of 5.8835 and a MAPE of 1.55%—all of which represent the lowest values among the three models. These results highlight the model’s ability to better mitigate error accumulation, a common challenge in multi-step time series forecasting, thereby ensuring reliable performance even as the temporal distance from the input data increases.
Figure 10.
Quantitative Error Metrics for Representative Models on the Weekly Load Profile.
Furthermore, the model achieves a competitive R2 of 0.9772 across the one-week span, indicating that it can explain over 97.7% of the complex variance in the weekly load profile. This performance stems from the synergistic integration of the Transformer’s long-distance dependency modeling and the DAF module’s adaptive feature selection. By accurately identifying the underlying weekly periodicity and distinguishing between workday and weekend patterns, the model helps alleviate the “drift” often seen in recurrent networks like TCN–GRU. This high degree of statistical fit confirms that the BiLSTM–Transformer–DAF architecture is well-suited for medium-to-long-term power load planning, offering the precision and stability required for sophisticated grid management and energy optimization.
4.3.3. Ablation Study Analysis
To evaluate the individual contributions of the key components (BiLSTM module and DAF module) within the proposed BiLSTM–Transformer–DAF model to the overall forecasting performance, this section presents the design of ablation experiments. Using the standard Transformer model as the baseline, we constructed three variants: BiLSTM–Transformer, Transformer–DAF, and the full BiLSTM–Transformer–DAF model. Comparative tests were then conducted on the same dataset.
Figure 11 presents a comparative visualization of the load forecasting results across four distinct ablation variants: the baseline Transformer, the BiLSTM-enhanced model, the DAF-enhanced model, and the proposed integrated architecture. A detailed examination of the sub-figures reveals that the baseline Transformer exhibits certain fitting deviations and noticeable phase lags, particularly during the high-volatility transitions at load peaks and valleys. Upon the introduction of the BiLSTM module, there is a noticeable improvement in waveform alignment. By leveraging its bidirectional memory structure to capture both past and future temporal dependencies, the BiLSTM variant helps mitigate the “delay effect” seen in the baseline, allowing the model to track the general direction of load fluctuations with improved fidelity.
Figure 11.
Individual Load Fitting Curves for Different Ablation Study Variants.
The performance is further refined with the introduction of the DAF module, which provides further enhancement in both smoothness and precision. Unlike the BiLSTM’s focus on temporal memory, the DAF module adaptively reweights feature channels, which assists in filtering out stochastic noise and reduces the erratic oscillations typically observed at extreme power consumption points. Ultimately, the complete model, which integrates both the BiLSTM and DAF components, achieves the optimal fitting performance. Its prediction trajectory demonstrates a better overlap with the ground truth curve, maintaining exceptional stability through both rapid spikes and subtle valleys. This progression clearly validates that the synergistic combination of bidirectional temporal extraction and adaptive feature fusion allows the hybrid architecture to partially address the individual limitations of each module, resulting in an incremental improvement in forecasting accuracy.
To provide a direct comparison of the impact of different modules on local details, Figure 12 presents an overlay of the prediction curves from the four model variants within a single coordinate system.
Figure 12.
Combined Comparison of Overlaid Prediction Trajectories for Ablation Variants.
The figure clearly reflects that while the baseline Transformer model exhibits significant deviations at the peaks, the BiLSTM–Transformer model corrects part of the trend but remains somewhat coarse in handling details. In contrast, the Transformer–DAF model shows a relatively more prominent corrective effect, following the actual value trajectory more closely. This suggests that the DAF module, through refined feature-weighted fusion, plays a more critical role in enhancing model robustness than the BiLSTM module alone. Ultimately, the complete model maintains the highest tracking precision across all intervals, further confirming the complementarity of the two mechanisms.
The quantitative error metrics detailed in Table 3 provide a clear evaluation of the individual contributions of each module. To strictly verify the necessity of the Transformer architecture, we extended the comparative analysis to include standalone Recurrent Neural Network (RNN) variants (BiLSTM and BiLSTM–DAF). The data reveals that while the BiLSTM model yields a MAPE of 2.85%, which is an improvement over standard LSTMs, it still lags behind the Transformer baseline (2.34%), justifying the selection of the Transformer as the primary global feature extractor. Crucially, the comparison between the “BiLSTM–DAF” and “Transformer–DAF” variants demonstrates the importance of the Transformer component. Although the integration of the DAF module enhances the BiLSTM’s accuracy (reducing MAPE to 2.18%), it remains significantly inferior to the Transformer–DAF model (MAPE 1.74%). This 0.44% performance gap confirms that the Transformer’s ability to model long-range global dependencies provides a unique contribution that cannot be compensated for by simply enhancing an RNN with attention mechanisms. Furthermore, the fact that Transformer–DAF (1.74%) outperforms BiLSTM–Transformer (2.04%) indicates that an effective feature fusion mechanism is more critical than merely stacking temporal layers. Ultimately, the complete BiLSTM–Transformer–DAF model integrates all strengths to further compress the MAE to 4.560 and the MAPE to 1.58%, achieving a further improvement in forecasting precision.
Table 3.
Quantitative Performance Metrics for Ablation Study Variants.
4.3.4. Complexity and Efficiency Analysis
While the introduction of the Dynamic Adaptive Fusion (DAF) module is a key component for enhancing accuracy, it is critical to evaluate its specific computational overhead. To thoroughly discuss the complexity of the DAF structure, we compared the number of parameters, training time, and inference time of the proposed model against the baseline BiLSTM–Transformer (without DAF) and other representative models. The detailed comparison is presented in Table 4.
Table 4.
Comparison of Computational Complexity and Time Costs.
As shown in the table, compared to the backbone BiLSTM–Transformer model, the integration of the DAF module introduces a manageable increase in computational cost. Specifically, the number of parameters increases by approximately 0.12 million, and the inference time per sample rises by only 1.8 ms (from 10.6 ms to 12.4 ms). This indicates that the DAF module is structurally lightweight and does not rely on stacking excessive depth to achieve performance gains.
Although the total training time is slightly longer than simple models like LSTM, the inference latency of 12.4 ms appears to meet the real-time requirements of power grid dispatching systems. Considering the observed reduction in MAPE (from 2.04% to 1.58% as shown in the ablation study), the slight additional computational cost of the DAF module represents a reasonable trade-off for the substantial improvement in forecasting precision.
4.4. Discussion of Experimental Results
The comprehensive experimental results demonstrate that the BiLSTM–Transformer–DAF model proposed in this study exhibits advantages in the field of power load forecasting, outperforming mainstream hybrid models across the dimensions of prediction accuracy, scenario adaptability, and structural effectiveness. In terms of quantitative metrics, the model leads comprehensively across four core indicators—MAE, RMSE, MAPE, and R2.
Specifically, in the daily forecasting task, it achieves an exceptional R2 value of 0.9848, while maintaining a high R2 of 0.9772 even across a continuous weekly scale. This performance indicates that the model can explain over 97% of the variability in load patterns, validating the innovative value of the Dynamic Adaptive Fusion (DAF) mechanism in refined feature weighting. Regarding scenario adaptability, the model demonstrates remarkable stability under complex conditions such as load peaks and the “weekend effect”. While competing models like TCN–GRU and TCN–LSTM–Attention exhibit fitting deviations or phase lags during rapid fluctuations, the proposed model maintains high tracking precision. Its capability to precisely capture both consecutive workday peaks and weekend downward trends reflects the advantage of combining BiLSTM’s temporal memory with Transformer’s long-range dependency modeling. Furthermore, the ablation study detailed provides decisive support for the architectural design. The integration of the DAF module resulted in a significant drop in MAPE from 2.04% to 1.58%, proving that effective feature fusion is more critical for accuracy than simply increasing model depth. This consistency across individual and overlaid fitting curves confirms the model’s reliability and generalization, providing a robust and high-precision technical solution for the refined operation of modern smart grids.
Furthermore, regarding the model’s generalization capability, while the current experimental validation is conducted on a comprehensive one-year dataset from a specific commercial complex, the architectural design of the BiLSTM–Transformer–DAF intrinsically endows it with strong cross-scenario transferability. Unlike traditional static models that may overfit to specific local weather patterns or facility schedules, the DAF module operates as a dynamic feature-weighting filter. It learns to dynamically evaluate the relative importance of different inputs based on the immediate context, rather than memorizing rigid spatial-temporal correlations. Consequently, when applied to different non-residential facilities or climatic zones, the model can autonomously adjust its attention weights to accommodate new data distributions, effectively mitigating the risk of domain-specific overfitting. This consistency across individual and overlaid fitting curves confirms the model’s reliability and generalization, providing a robust and high-precision technical solution for the refined operation of modern smart grids.
5. Conclusions
This study addresses critical challenges in high-precision power load forecasting by proposing a BiLSTM–Transformer hybrid model integrated with a Dynamic Adaptive Fusion (DAF) mechanism. The proposed model systematically overcomes the limitations of existing hybrid models regarding multi-scale feature coordination and dynamic adaptability. Theoretically, this research designs a DAF module that enables adaptive interaction between local fluctuation features and global temporal dependencies through refined weight allocation. By leveraging a bidirectional memory structure alongside a long-range dependency modeling framework, the architecture effectively captures the complex nonlinear patterns inherent in power loads.
Experimental validation demonstrates that the proposed architecture establishes improved performance over mainstream hybrid models. The model not only provides high tracking precision in typical daily forecasting but also exhibits remarkable stability across continuous weekly scales. In particular, it demonstrates strong adaptability to the “weekend effect” and peak-valley transitions where traditional models often falter. The ablation study further confirms the decisive role of the DAF module, proving that intelligent feature fusion is more critical for accuracy than merely increasing the depth of the neural network.
Future research will focus on several key directions. First, we will investigate the lightweight deployment of the model to facilitate edge computing applications. Second, we acknowledge that the current linear interpolation method for missing data has limitations in handling continuous sensor failures or severe data loss. Therefore, future work will explore integrating generative imputation models (such as Generative Adversarial Networks, GANs) to enhance the framework’s robustness against extreme data quality issues in industrial grid operations. Third, we acknowledge the limitation that our current empirical validation relies on a single full-year dataset. To further strengthen the reliability of our conclusions and explicitly verify the model’s generalization capability, our future research will prioritize extensive cross-domain evaluations. We plan to benchmark the BiLSTM–Transformer–DAF framework across multiple open-source public datasets—such as residential grid data and diverse industrial load profiles—under varying climatic conditions. Additionally, we plan to validate the model’s cross-scenario transferability in various energy management systems.
Author Contributions
Conceptualization, J.X. and L.Z.; methodology, J.X.; software, Z.Z.; validation, L.Z. and Z.Z.; formal analysis, J.X.; writing—original draft preparation, J.X.; writing—review and editing, J.X.; visualization, J.X.; supervision, L.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Our dataset has been described in detail in this paper.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Zhao, Z.; Xia, C.; Chi, L.; Chang, X.; Li, W.; Yang, T.; Zomaya, A.Y. Short-term load forecasting based on the transformer model. Information 2021, 12, 516. [Google Scholar] [CrossRef] [Scilit]
- Hu, J. Power Load Forecasting Model Based on Long Short-Term Memory Network. J. Xuchang Univ. 2025, 44, 117–122. [Google Scholar]
- Huy, P.C.; Minh, N.Q.; Tien, N.D.; Anh, T.T.Q. Short-term electricity load forecasting based on temporal fusion transformer model. IEEE Access 2022, 10, 106296–106304. [Google Scholar] [CrossRef] [Scilit]
- L’Heureux, A.; Grolinger, K.; Capretz, M.A.M. Transformer-based model for electrical load forecasting. Energies 2022, 15, 4993. [Google Scholar] [CrossRef] [Scilit]
- Chan, J.W.; Yeo, C.K. A transformer based approach to electricity load forecasting. Electr. J. 2024, 37, 107370. [Google Scholar] [CrossRef] [Scilit]
- Li, K.; Pan, T.; Xu, D. Short-Term Power Load Forecasting Based on MSCNN-BiGRU-Attention. China Electr. Power 2025, 58, 10–18. [Google Scholar]
- Lu, S.; Bao, T. Short-term electricity load forecasting based on NeuralProphet and CNN-LSTM. IEEE Access 2024, 12, 76870–76879. [Google Scholar] [CrossRef] [Scilit]
- Chen, Y. Research on Short-Term Power Load Forecasting Based on Deep Network. Master’s Thesis, Shijiazhuang Railway University, Shijiazhuang, China, 2024. [Google Scholar]
- Ullah, K.; Ahsan, M.; Hasanat, S.M.; Haris, M.; Yousaf, H.; Raza, S.F.; Tandon, R.; Abid, S.; Ullah, Z. Short-term load forecasting: A comprehensive review and simulation study with CNN-LSTM hybrids approach. IEEE Access 2024, 12, 111858–111881. [Google Scholar] [CrossRef] [Scilit]
- Ren, C.; Jia, L.; Wang, Z. A CNN-LSTM hybrid model based short-term power load forecasting. In Proceeding of the 2021 Power System and Green Energy Conference (PSGEC), Shanghai, China, 13–16 May 2021; IEEE: New York, NY, USA, 2021; pp. 182–186. [Google Scholar]
- Wu, K.; Wu, J.; Feng, L.; Yang, B.; Liang, R.; Yang, S.; Zhao, R. An attention-based CNN-LSTM-BiLSTM model for short-term electric load forecasting in integrated energy system. Int. Trans. Electr. Energy Syst. 2021, 31, e12637. [Google Scholar] [CrossRef] [Scilit]
- Li, W.; Huang, W.; Li, P.; Pu, Y.; Zhai, S. Deep Learning Network for Short-Term Power Load Forecasting with Multi-Scale Feature Fusion Enhancement. J. Yunnan Univ. (Nat. Sci.) 2025, 47, 839–847. [Google Scholar]
- Islam, B.; Ahmed, S.F. Short-term electrical load demand forecasting based on LSTM and RNN deep neural networks. Math. Probl. Eng. 2022, 2022, 2316474. [Google Scholar] [CrossRef] [Scilit]
- Luo, S.; Wang, B.; Gao, Q.; Wang, Y.; Pang, X. Stacking integration algorithm based on CNN-BiLSTM-Attention with XGBoost for short-term electricity load forecasting. Energy Rep. 2024, 12, 2676–2689. [Google Scholar] [CrossRef] [Scilit]
- Peng, Z.; Wu, R.; Zhang, Z.; Yu, Y. Research on Ultra-short-term Power Load Forecasting Based on Deep Learning LSTM-Attention Model. Inf. Technol. Informatiz. 2025, 1, 155–158. [Google Scholar]
- Nti, I.K.; Teimeh, M.; Nyarko-Boateng, O.; Adekoya, A.F. Electricity load forecasting: A systematic review. J. Electr. Syst. Inf. Technol. 2020, 7, 13. [Google Scholar] [CrossRef] [Scilit]
- Dong, Q.; Huang, R.; Cui, C.; Towey, D.; Zhou, L.; Tian, J.; Wang, J. Short-Term Electricity-Load Forecasting by deep learning: A comprehensive survey. Eng. Appl. Artif. Intell. 2025, 154, 110980. [Google Scholar] [CrossRef] [Scilit]
- Yu, S.; Sun, K.; Cai, H.; Liu, J.; Gu, Y.; Jiang, Y. A Short-Term Power Load Forecasting Method Combining Extreme Gradient Boosting Decision Tree and Improved Informer. China Electr. Power 2025, 58, 195–205. [Google Scholar]
- Xu, H.; Hu, F.; Liang, X.; Zhao, G.; Abugunmi, M. A framework for electricity load forecasting based on attention mechanism time series depthwise separable convolutional neural network. Energy 2024, 299, 131258. [Google Scholar] [CrossRef] [Scilit]
- Eskandari, H.; Imani, M.; Moghaddam, M.P. A deep residual network integrating entropy-based wavelet packet ensemble model for short-term electrical load forecasting. Energy 2025, 314, 134168. [Google Scholar] [CrossRef] [Scilit]
- Xiao, B.; Xie, S.; Wang, M.; Wang, M.; Liu, D.; Yao, R.; Li, Y. Research on Short-Term Power Load Forecasting from the Perspective of Domain Prior Knowledge Fusion. Comput. Eng. 2025; in press.
- Singh, B.; Shah, O.A.; Arora, S. Seasonal Electrical Load Forecasting Using Machine Learning Techniques and Meteorological Variables. Int. J. Robot. Control. Syst. 2024, 4, 1092–1108. [Google Scholar] [CrossRef] [Scilit]
- Liu, C.; Xu, Z.; Yuan, M.; Xie, J.; Yuan, Y.; Ma, K. Building electrical load forecasting with occupancy data based on wireless sensing. Appl. Energy 2025, 380, 124960. [Google Scholar] [CrossRef] [Scilit]
- Huang, Y.; Hu, Y.; Ma, J.; Liang, B.; Cui, Y.; Zhang, H. Short-term Power Load Forecasting Based on RIME-Optimized VMD and Multi-scale Fusion of TCN-Crossformer. Electr. Power Sci. Eng. 2025, 41, 48–57. [Google Scholar]
- Chen, W. Research on Short-Term Power Load Forecasting Based on Deep Fusion Algorithm. Master’s Thesis, Fujian Institute of Technology, Fujian, China, 2023. [Google Scholar]
- Chen, J. Research on Power Load Forecasting Combining Graph Network and Transformer. Master’s Thesis, Wuhan University of Technology, Wuhan, China, 2023. [Google Scholar]
- Meyer, M.; Zapata, D.; Kaltenpoth, S.; Müller, O. Benchmarking time series foundation models for short-term household electricity load forecasting. arXiv 2024, arXiv:2410.09487. [Google Scholar] [CrossRef] [Scilit]
- Cao, S. Research on Short-Term Power Load Forecasting Algorithm Based on Attention Mechanism and LSTM Fusion. Master’s Thesis, North China Electric Power University, Beijing, China, 2022. [Google Scholar]
- Hu, W. Short-Term Power Load Forecasting Based on CSWOA Optimized BiGRU Fusion Time Pattern Attention Model. Master’s Thesis, Guangdong University of Technology, Guangzhou, China, 2022. [Google Scholar]
- Chandrasekaran, R.; Paramasivan, S.K. Advances in deep learning techniques for short-term energy load forecasting applications: A review. Arch. Comput. Methods Eng. 2025, 32, 663–692. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.











