1. Introduction
Conventional power generation’s heavy reliance on fossil fuels leads to environmental pollution and resource depletion and exacerbates global warming [
1]. To mitigate these detrimental impacts and facilitate the transition towards a sustainable power system, renewable power generation has emerged as a crucial alternative [
2]. Among these, wind energy has emerged as a widely used, environmentally friendly renewable resource for large-scale power generation [
3]. However, wind power generation is subject to various factors such as wind speed, wind direction, and temperature, resulting in considerable randomness and variability [
4,
5]. Therefore, accurate wind power forecasting is essential for power management and planning, effectively enhancing the economic and social benefits of power systems [
6,
7].
In recent years, driven by the ongoing advancement of artificial intelligence, a myriad of machine learning (ML) techniques has been extensively applied to wind power forecasting [
8]. Traditional ML forecasting models, such as support vector machine regression (SVR) [
9], random forest [
10], and autoregressive integrated moving average (ARIMA) [
11], have been widely employed. However, these conventional techniques tend to be relatively simple and heavily reliant on manually engineered features, which can limit their predictive accuracy when dealing with complex and nonlinear wind power data. Recently, deep learning (DL) has emerged as the mainstream of ML, owing to its exceptional capacity to handle nonlinear mappings [
12,
13,
14]. This inherent ability to automatically extract correlations between input samples and wind power output often results in more accurate forecasts [
15]. Deep learning-based models, such as Long Short-Term Memory Networks (LSTMs) [
16], Convolutional Neural Networks (CNNs) [
17], Recurrent Neural Networks (RNNs) [
18], Bidirectional Long Short-Term Memory (Bi-LSTM) [
19], and Gated Recurrent Units (GRUs) [
20], have wide application in wind power forecasting.
Although DNN-based forecasting models have achieved high accuracy, their nonlinear nature also makes them vulnerable to adversarial attacks [
21,
22,
23]. Input data such as wind speed, wind direction, and ambient temperature are critical to accurate forecasts and are typically obtained via online weather forecast application programming interfaces (APIs) [
22]. During transmission over communication networks, such data may be intercepted or tampered with, exposing potential attack surfaces for adversarial manipulation [
23]. If the input data used for wind power forecasting are compromised by such attacks, the resulting perturbations can lead to degradation in forecasting accuracy, which may have real-world consequences, including inaccurate dispatching, increased reserve requirements, and reduced economic benefits for wind farm operators. In Ref. [
24], the fast gradient sign method (FGSM) is employed to attack wind speed and wind direction data. The experimental results demonstrate that FGSM outperforms the civil attack (CA) in reducing forecast accuracy. In Ref. [
25], the projected gradient descent method is utilized to perform non-directional, semi-directional and fully directional attacks on wind power data, and the advantages of various attack methods are extensively studied. In Ref. [
26], an attack strategy targeting external-factor data is proposed. This approach employs an attack sample selection model to improve stealthiness by selectively filtering the attack samples and an attack direction judgment model to enhance the attack effectiveness by determining the correct attack direction. In Ref. [
27], a new attack algorithm, called the adversarial learning attack, is proposed for wind power forecasting. This algorithm stably optimizes the meteorological data into its adversarial patterns, effectively degrading the forecast accuracy. Although existing studies have demonstrated that wind power forecasting models are vulnerable to adversarial attacks, most research has not simultaneously addressed both the effectiveness and the stealthiness of attacks.
To ensure the safe application of DNNs in wind power forecasting, it is crucial to investigate the defense algorithms. The adversarial training (AT) [
25,
28] is an advanced defense algorithm that improves the robustness of DNNs by retraining them on a mixed set comprising both adversarial and clean samples. In Ref. [
29], SSA is used to attack DNN to generate adversarial PQD signals, and then the DNN performs adversarial training through these signals. However, traditional adversarial training often performs poorly when dealing with a range of perturbation strengths and can even degrade the model’s original forecast accuracy. In Ref. [
30], the iterative adversarial training (IAT) is proposed in PQD classification. This method employs multiple perturbation training defense models, significantly enhancing the model’s ability to defend against attacks of varying perturbation strengths. The DAE method performs preprocessing before the forecasting model, effectively mitigating the impact of attacks without significantly compromising the original forecast accuracy [
31]. In Ref. [
32], the DAE defense is employed for preprocessing, effectively safeguarding deep learning-based power allocation models from adversarial attacks in massive MIMO systems without compromising original forecast accuracy. However, DAE performs optimally only in defending against an attack with a single strength. In wind power forecasting, there is little research on defense algorithms. In Ref. [
24], a preprocessing framework for wind power forecasting is proposed to defend against adversarial attacks in the white-box environment. This method mitigates attacks by identifying perturbations in input samples and replacing corrupted samples with corresponding forecasted values. In Ref. [
25], the effectiveness of adversarial training is validated in the field of wind power forecasting, emphasizing its capacity to enhance model robustness in the white-box environment. Currently, research on adversarial defenses in wind power forecasting has yet to explore the effectiveness of attacks involving multiple perturbation strengths. Additionally, existing studies have not explored the defense issues in the black-box environments.
Overall, research on adversarial attacks and defenses in wind power forecasting remains limited, and the security aspects of this field warrant further in-depth investigation. Although momentum-based attacks, such as the momentum iterative fast gradient sign method (MI-FGSM), have been extensively studied in other domains, their application to wind power forecasting, along with the associated challenges, has not yet been adequately explored. In addition, existing studies have rarely investigated preprocessing-based defense strategies or considered defenses under multiple perturbation levels. Therefore, we propose a momentum-based adversarial attack method tailored for wind power forecasting and introduce a novel multi-layer iterative denoising autoencoder (MLI-DAE) as a defense mechanism. The MI-FGSM attack incorporates momentum into gradient information to generate adversarial samples, which ensures the stable convergence of original clean samples into stealthy and destructive adversarial samples. The MLI-DAE operates on the principle of iterative training. It first generates adversarial samples using multiple perturbation strengths. These are then combined with clean samples and sequentially fed into a denoising autoencoder (DAE) for iterative refinement. When strategically placed as a preprocessing module before the wind power forecasting model, the trained MLI-DAE effectively mitigates adversarial attacks across varying perturbation strengths. The framework of the entire process is depicted in
Figure 1. When the wind power forecasting system is subjected to adversarial attacks, the generated adversarial input samples may mislead the forecasting model into producing inaccurate forecasts, potentially causing the control center to issue wrong instructions. However, by leveraging the preprocessing capabilities of the MLI-DAE, these adversarial input samples can be reconstructed into their clean forms. This step enables the control center to maintain correct decision-making and ensure operational integrity.
The primary contributions of this paper are outlined as follows:
We propose an MI-FGSM attack algorithm for wind power forecasting. Compared to FGSM, MI-FGSM produces smaller perturbations to input samples while causing more substantial degradation in forecast accuracy in both white-box and black-box environments.
We propose an MLI-DAE defense algorithm against adversarial attacks in wind power forecasting. Compared to the advanced AT, MLI-DAE more effectively mitigates forecast errors caused by adversarial attacks with multi-level perturbation strengths, while better maintaining the original accuracy of the forecasting model.
The adversarial defense performance is systematically evaluated under both white-box and black-box attack scenarios in wind power forecasting. The defense model trained in the white-box environment maintains strong effectiveness against black-box attacks with different perturbation strengths, highlighting its generalization capability across diverse attack settings.
Figure 1.
Adversarial attack and defense in wind power forecasting system.
Figure 1.
Adversarial attack and defense in wind power forecasting system.
The remainder of the paper is structured as follows:
Section 2 presents a comprehensive description of the DL-based wind power forecasting model. In
Section 3, we analyze the attack environments and objectives and provide a detailed description of the proposed attack algorithm.
Section 4 provides an overview of the proposed defense algorithm. In
Section 5, we validate the effectiveness of the proposed attack and defense algorithms through a series of experiments, with a detailed comparison to existing methods.
Section 6 summarizes the main conclusions of this study.
5. Case Studies
5.1. Dataset Description and Experimental Setup
This study uses the SDWPF dataset [
43], provided by Longyuan Power Group Co., Ltd., which gained prominence during the Baidu KDD Cup 2022. The dataset comprises records from 134 wind turbines over a 245-day period, incorporating features such as temperature, wind speed, and wind direction. The data are recorded at a 10-min resolution. Based on previous research, to evaluate the performance of the proposed methods, a wind turbine is randomly selected to evaluate the performance of the proposed attack and defense methods. Of the entire dataset, 80% is used as the training set, while the remaining 20% serves as the testing set.
To improve model training, the callback function is utilized to optimize both the learning rate and the number of training epochs. The learning rate is initially set to 0.01 and dynamically adjusted using a decay strategy: if the loss value does not decrease over five consecutive iterations, the learning rate is reduced to one-tenth of its current value. The number of training epochs is initially set to 80, with an early stopping strategy applied: if the loss value does not decrease for 10 consecutive iterations, training is terminated early. The Adam optimizer is used for all experiments. All model training is conducted using TensorFlow and Keras in the environment equipped with NVIDIA GeForce RTX 3050 GPUs (NVIDIA: Santa Clara, CA, USA).
5.2. Analysis of Key Factors in the Attack Algorithm
The MI-FGSM attack algorithm generates adversarial samples by integrating a momentum optimization mechanism into the iterative attack process, where the decay factor serves as a critical parameter. When , MI-FGSM loses its momentum effect and degenerates into the regular iterative attack, which may lead to overfitting of the adversarial samples and consequently degrade the attack performance. Therefore, we implemented black-box and white-box attacks on the test set to determine the optimal value of the decay factor in both environments.
The decay factor
is incrementally varied from 0 to 2 with a step size of 0.1, the perturbation strength
is set to
, and the number of attack iterations
N is set to 60.
Figure 4 illustrates the attack performance under different momentum decay factors, using the mean absolute percentage error (MAPE) as the evaluation metric. As shown in
Figure 4a, the MAPE of the forecasting model under white-box attacks reaches its peak at
across various perturbation strengths.
Figure 4b shows the MAPE of the forecasting model under the MI-FGSM black-box attacks. Under different perturbation strengths, the MAPE reaches its maximum value when
. Therefore, we set
in the white-box environment and
in the black-box environment.
5.3. Experimental Analysis of MI-FGSM in White-Box Environment
In the white-box environment, attackers leverage full knowledge of the forecasting model’s architecture and parameters to execute the MI-FGSM attack. To visualize the impact of MI-FGSM on wind power forecasting, we show the forecast results post-attack in
Figure 5. As shown in
Figure 5a, when
, by injecting adversarial samples with perturbation strengths of
into the forecasting model, the forecasted values can be maliciously increased, causing the forecast curves to deviate upward from the original curve. This deviation becomes increasingly pronounced as the perturbation strength grows.
Figure 5b demonstrates the scenario where
; attackers maliciously decrease the wind power forecasts by introducing perturbations with strengths of
. This causes the forecast curves to deviate downward from the original curve, with the deviation becoming more pronounced as the perturbation strength increases.
To demonstrate the superiority of MI-FGSM, we conduct a comparative analysis with the FGSM baseline. The experimental parameters are set as follows: (1) For FGSM, the perturbation strength is selected from . (2) For MI-FGSM, is set to 0.9, the number of iterations N is set to 60, and follows the same range as in FGSM. The performance of these attack algorithms is evaluated from two dimensions: attack strength and stealthiness. The attack strength assesses the extent of forecast accuracy degradation, whereas attack stealthiness quantifies the magnitude of perturbations introduced to the input samples.
To evaluate attack strength, MAPE is employed to quantify forecast errors under attacks, as shown in
Table 3. The results demonstrate that MI-FGSM outperforms FGSM in terms of attack potency under the same attack directions and perturbation strengths. For example, at a perturbation strength of 0.21, MI-FGSM yields a MAPE of 49.05%, significantly higher than the 38.61% produced by FGSM. When the perturbation strength is
, MI-FGSM achieves a MAPE of 40.26% compared to 32.37% for FGSM.
Stealthiness is a critical metric for evaluating the superiority of adversarial attack algorithms. Since excessive perturbations are susceptible to detection by anomaly detection systems [
29,
30], we quantified the perturbation percentage applied to input samples.
Table 4 presents the perturbation percentages for two key input features: wind speed (WS) and wind direction (WD). The results demonstrate that MI-FGSM exhibits superior stealthiness compared to FGSM under the same perturbation strength. For instance, when
, the perturbation percentages for WS and WD under FGSM are 26.91% and 29.13%, respectively; in contrast, MI-FGSM yields significantly lower values of 20.81% and 23.05%. This is because, during each iteration, the momentum mechanism of MI-FGSM guides the perturbation along the optimal attack direction, resulting in a smaller overall disturbance than that of the single-step FGSM.
Based on the analysis and comparison of experimental results in the white-box environment, it can be concluded that MI-FGSM causes the forecast curve to deviate from the original, leading to a marked decline in forecast accuracy. Compared to FGSM, MI-FGSM results in more significant forecast errors while introducing smaller perturbations to the input samples.
5.4. Experimental Analysis of MI-FGSM in Black-Box Environment
Black-box attacks are among the most realistic and likely scenarios in practical applications [
31]. In the black-box environment, adversarial samples generated by a substitute forecasting model are employed to attack the target forecasting model.
Figure 6 illustrates the forecasting curves under perturbations with strengths of
. As shown in
Figure 6a, when
, the forecast curve shifts upward relative to the original, with deviations becoming more pronounced as the perturbation strength increases. Conversely,
Figure 6b demonstrates that when
, the forecast curve shifts downward, with deviations similarly amplifying alongside greater perturbation strengths. These findings indicate that MI-FGSM black-box attacks significantly deteriorate forecast accuracy, highlighting the strong transferability of the generated adversarial samples.
To facilitate a comparative analysis in the black-box environment, the parameter configurations are kept consistent with
Section 5.2, with the exception of the MI-FGSM momentum decay factor
, which is set to 0.7.
Table 5 summarizes the impact of MI-FGSM and FGSM on forecasting performance. It is evident that, under the same attack direction and perturbation strength, MI-FGSM more effectively reduces forecast errors. For instance, when
is
, MI-FGSM results in a MAPE of 33.82%, compared to 29.12% for FGSM; similarly, at
, MI-FGSM yields a MAPE of 26.44%, whereas FGSM results in 23.63%. These findings indicate that MI-FGSM possesses superior transferability in black-box scenarios, potentially posing a severe threat to the forecasting systems. Furthermore, a comparison with
Table 3 reveals that black-box attacks are notably less effective than white-box attacks under equivalent conditions. This is due to the differences in the training parameters and structure between the substitute model and the original model.
We further investigate the stealthiness of black-box attacks.
Table 6 compares the perturbation percentages for WS and WD induced by MI-FGSM and FGSM. It is evident that MI-FGSM modifies the data to a lesser extent, demonstrating superior stealthiness. For instance, when
, the perturbation percentages for WS and WD under FGSM are 33.81% and 36.48%, respectively; in contrast, MI-FGSM yields significantly lower values of 25.11% and 27.95%.
Based on the analysis and comparison of experimental results in the black-box environment, it can be concluded that MI-FGSM exhibits excellent ability of adversarial sample migration, causing the forecast curves to deviate from the original curve. Compared to FGSM, MI-FGSM leads to a greater increase in forecast errors, indicating its stronger black-box transferability. Additionally, MI-FGSM generates smaller perturbations to input samples, highlighting its excellent stealthiness.
5.5. The Defense Performance of MLI-DAE in the White-Box Environment
The procedure of the proposed MLI-DAE is shown in Algorithm 2. To evaluate the effectiveness of the MLI-DAE defense algorithm, we designed two training schemes, named MLI-DAE-5 and MLI-DAE-8, to select the optimal defense model. For MLI-DAE-5, the specific parameters are as follows: The training epoch K is set to 50, the learning rate is 0.001, the activation function is set to linear, and the optimizer is set to SGD. The iterative training process is repeated five times. In each iteration, adversarial samples generated by the MI-FGSM white-box attack are used for training, with the perturbation strength increasing from 0.01 to 0.21 in five steps (step size of 0.04). For MLI-DAE-8, the number of iteration training is increased to 8. By extending the number of training epochs and reducing the step size, the model can learn more comprehensive perturbation features. All other procedures remain consistent with those of MLI-DAE-5. To demonstrate the advantages of MLI-DAE against multi-level perturbations, a traditional DAE is trained as a baseline using MI-FGSM white-box samples with a perturbation strength of 0.12. The evaluation focused on two aspects: MLI-DAE’s efficacy in restoring forecast accuracy under attack and its ability to preserve the original forecast performance on clean data.
Table 7 summarizes the effectiveness of various defense mechanisms in enhancing forecast accuracy. Due to space constraints and the high degree of similarity in defense performance across different attack directions, only the results for
are reported. It is evident that the proposed MLI-DAE algorithm significantly mitigates forecast errors induced by MI-FGSM white-box attacks, demonstrating robust defensive capabilities. Compared to the traditional DAE, MLI-DAE consistently exhibits superior performance across all perturbation strengths, whereas the baseline DAE struggles to withstand multi-level adversarial samples. For example, when the perturbation strength is 0.21, MLI-DAE-5 and MLI-DAE-8 reduce the MAPE from 49.05% to 18.68% and 22.34%, respectively, while the traditional DAE only achieves a reduction to 29.11%. Consequently, MLI-DAE is a more suitable defense model for wind power forecasting. Notably, MLI-DAE-5 outperforms MLI-DAE-8 in error reduction across various perturbation strengths. This performance gap may stem from an overfitting issue of the latter scheme; the increased number of iterations and the simultaneous exposure to a wider variety of perturbation strengths may reduce the model’s generalization ability, leading to the slightly lower defense efficiency observed in MLI-DAE-8.
To evaluate the impact of MLI-DAE and DAE on original forecast accuracy, the forecasting model equipped with defense algorithms is used to predict the original input samples, and the forecast errors are shown in
Table 7 (row
). Following preprocessing by MLI-DAE-5 and MLI-DAE-8, the MAPE increased by only 0.40% and 0.63%, respectively, whereas the implementation of the traditional DAE led to a more significant MAPE increase of 1.11%. These results indicate that MLI-DAE more effectively retains the original forecast accuracy in the absence of perturbations compared to DAE.
To provide an intuitive visualization of the defense efficacy of MLI-DAE-5,
Figure 7 shows the forecast curves under the MI-FGSM white-box attack with a perturbation strength of 0.21. As observed, the attack causes a noticeable deviation in the forecast curves from the original curve. Through the preprocessing stage of MLI-DAE-5, the wind power forecasts, which are maliciously manipulated by MI-FGSM, are effectively restored. The result demonstrates that MLI-DAE can robustly defend against MI-FGSM white-box attacks.
Based on the analysis and comparison of experimental results in the white-box environment, it can be concluded that MLI-DAE possesses exceptional defense efficacy, effectively restoring the attacked forecast curve. Compared to DAE, MLI-DAE more effectively reduces the forecast errors caused by the MI-FGSM white-box attacks, while better preserving the original forecast accuracy.
5.6. The Defense Performance of MLI-DAE in the Black-Box Environment
To evaluate the performance of the MLI-DAE defense algorithm in the black-box environment, we employed the MLI-DAE model trained in a white-box environment to resist black-box attacks. As illustrated in
Table 8, the MLI-DAE model, trained against MI-FGSM white-box perturbations, maintains remarkable efficacy against black-box attacks generated by the same strategy. Compared to DAE, the MLI-DAE also demonstrates superior defense capabilities across various perturbation levels. For instance, when the perturbation strength is 0.21, MLI-DAE-5 and MLI-DAE-8 reduce the MAPE from 33.82% to 24.42% and 27.79%, respectively, whereas DAE only reduces the MAPE to 32.15%. Furthermore, consistent with the white-box results, MLI-DAE-5 more significantly reduces the post-attack forecast errors than MLI-DAE-8, thereby offering better defense performance. However, as observed in
Table 6 and
Table 8, the performance of the MLI-DAE decreases in the black-box environment compared to the white-box environment. This is because the MLI-DAE is trained in the white-box environment, while the adversarial samples generated by the MI-FGSM black-box attacks are not included in the training set, thereby reducing the performance of the MLI-DAE in the black-box environment.
To provide an intuitive visualization of the defense performance of MLI-DAE-5,
Figure 8 illustrates the forecast curves under the MI-FGSM black-box attack with a perturbation strength of 0.21. The MLI-DAE-5 effectively restores the attacked forecast curves to be close to the original curve, demonstrating its effectiveness in the black-box environment.
Based on the analysis and comparison of experimental results in the black-box environment, it can be concluded that the MLI-DAE defense algorithm trained in the white-box environment can resist the MI-FGSM black-box attacks, effectively restoring the attacked forecast curve. Compared to DAE, MLI-DAE achieves a more substantial reduction in forecast errors across various perturbation magnitudes. These results highlight the excellent generalization capability of MLI-DAE in the black-box environment.
6. Conclusions
In this study, an MI-FGSM attack algorithm and an MLI-DAE defense algorithm are proposed for wind power forecasting. The MI-FGSM attack algorithm utilizes the momentum optimization during attack iterations to generate stealthy, high-quality adversarial samples. The MLI-DAE defense algorithm employs an iteratively trained DAE as a preprocessor, effectively mapping adversarial examples back to their clean forms. The performance of both algorithms is evaluated through extensive experiments in both white-box and black-box environments.
Experimental evaluations demonstrate that MI-FGSM causes the forecast curves to deviate upward or downward from the original curve, with the deviation becoming more pronounced as the perturbation strength increases. Compared to FGSM, MI-FGSM achieves greater degradation in forecast accuracy, induces smaller perturbations to input samples, and generates adversarial samples with stronger black-box transferability. In terms of defense, MLI-DAE effectively mitigates the impact of MI-FGSM attacks, significantly restoring the attacked forecast curves. Moreover, the MLI-DAE defense algorithm trained in the white-box environment also demonstrates strong resistance against black-box attacks, indicating its excellent generalizability in the black-box environment. Compared to DAE, MLI-DAE outperforms in reducing forecast errors caused by the MI-FGSM attacks, while hardly affecting the original forecast accuracy.
In future work, we aim to investigate the detection algorithms for adversarial attacks in wind power forecasting, with the goal of developing a comprehensive system that includes attacks, detections, and defenses. Furthermore, a detailed analysis of the computational overhead and inference latency of the MLI-DAE defense is warranted to ensure its practical applicability in real-time forecasting environments.