1. Introduction
With the continuous development of society and the ever-increasing demand for energy, traditional power grids relying on fossil fuels for electricity generation produce greenhouse gas emissions, leading to global warming. This reality is thus driving the transition towards Smart Grids [
1]. Due to its cost-effectiveness, availability, and environmental friendliness, wind energy has emerged as a crucial form of clean and renewable energy. However, wind energy is inherently intermittent, stochastic, and uncontrollable. Consequently, wind power generation is comprehensively influenced by multiple factors, including the physical design of wind turbine blades, the technical specifications of the turbines, geographical location, and the climatic conditions of the area. Under the combined influence of these multifaceted factors, the stability of wind power output is significantly compromised, leading to difficulties in power dispatch. Accurate short-term forecasting of wind power based on historical wind resource data from wind farms is beneficial for the timely and rational planning of wind energy development, improves the quality of power supply, and simultaneously reduces wear and tear on wind turbines, thereby cutting costs and minimizing resource waste [
2].
With the construction of onshore and nearshore wind farms approaching saturation and available development space becoming limited, the global focus of wind power generation is shifting from land and nearshore areas towards the far-offshore regions, which boast more abundant resource reserves. Far-offshore areas possess more expansive maritime space and superior wind energy resources, making them the primary zones for future wind energy development. However, far-offshore wind farms are located far from coastlines and endure harsh environmental conditions, meaning equipment wear or errors in power dispatch can lead to significant economic losses. Consequently, conducting research on far-offshore wind power forecasting is not only an urgent requirement for coping with extreme conditions in these areas and ensuring the reliable power supply capacity of the grid but also represents the core of achieving refined operation and management for far-offshore wind power generation. Current short-term wind power forecasting methods are primarily categorized into physical methods, statistical methods, and machine learning (ML) methods [
3].
Physical methods primarily rely on terrain, roughness, wind farm layout, and the characteristic parameters of wind turbines. They utilize micro-meteorological theory and fluid dynamics to establish models for describing wind energy resource distribution [
4]. These methods do not depend on historical data from wind power sites, making them suitable for wind farms under construction or those lacking data. However, this approach requires simulating changes in meteorological elements such as local wind speed and wind direction, leading to extremely high modeling complexity and uncertainty, which can introduce further systematic bias. In comparison to physical methods, statistical methods are simpler and rely on a limited scope of data. They are primarily based on modeling historical time-series data [
5]. Methods such as the Autoregressive (AR) model [
6], Autoregressive Moving Average (ARMA) model [
7], and Autoregressive Integrated Moving Average (ARIMA) model [
8] typically characterize the dynamic features of wind power based on single-variable wind power data. The Vector Autoregression (VAR) model [
9] assumes linear dependencies among variables. The computational cost of Gaussian Process (GP) models [
10] grows exponentially with data volume. Due to the exponential growth in model complexity with the number of variables in statistical methods, they suffer from being computationally inefficient, having high computational complexity, and exhibiting low accuracy in linear predictions. Consequently, the applicability of these methods is often limited in newly constructed or data-scarce wind farm sites [
11].
In recent years, the advancement of deep learning has broken through the limitations inherent in physical and statistical methods. Nonlinear modeling techniques and machine learning approaches have demonstrated significant potential in wind power forecasting tasks. Owing to its outstanding capability in extracting temporal features, Long Short-Term Memory (LSTM) networks and convolutional neural networks (CNNs) have achieved remarkable success in forecasting tasks. Within the field of wind power forecasting, numerous research efforts have yielded substantial progress based on LSTM. Studies [
12,
13] utilized attention mechanisms combined with other networks to construct hybrid models, thereby enhancing the accuracy of wind power forecasting. Similarly, works [
14] further improved forecasting accuracy by introducing LSTM to extract temporal features from historical wind power data. Although centralized machine learning has exhibited excellent performance in terms of accuracy for wind power forecasting tasks, it operates under the assumption that data from various wind power sites can be transmitted and aggregated centrally. This assumption is often difficult to fulfill in practical forecasting scenarios, primarily for three reasons: First, the harsh environment of far-offshore wind farms makes it challenging to establish reliable communication links between sites, resulting in data typically existing in isolated forms at each location. Second, far-offshore wind power data involves national security and commercial competition concerns, where data transmission carries risks such as privacy leakage. Third, meteorological data from different sites within a far-offshore wind farm exhibit significant differences in the feature space and are non-independently and identically distributed (non-IID). Training a single global model using aggregated data would cause the model to lean towards learning the average features of all sites, severely degrading the forecasting performance for specific sites located in extreme climate zones. To address the issues mentioned above, the forecasting method based on federated learning (FL) [
15] trains models on the local data of each site independently, eliminating the need to upload data to a central server for centralized training. This approach not only ensures data privacy and prevents leakage but also reduces the computational resources required by the server. Consequently, it holds significant advantages for far-offshore wind power forecasting tasks. Moradzadeh et al. [
16] proposed a CNN-based federated learning framework for forecasting photovoltaic power generation in different regions. Building upon the architecture in [
2], Loukil et al. [
17] introduced a federated learning framework combining CNNs and LSTM for wind power forecasting. Zhang et al. [
18] proposed a novel federated learning model for predicting wind turbine blade icing based on a feature enhancement selection method utilizing prior knowledge. However, the aforementioned methods struggle to effectively address the challenges posed by multi-dimensional feature redundancy and multi-scale non-stationary evolution in far-offshore wind power forecasting. This limitation restricts the model’s ability in key feature identification and temporal dependency modeling under complex marine environments, making it difficult to support high-precision forecasting requirements.
To address the aforementioned challenges, this paper proposes a federated learning-based adaptive multi-head attention model for short-term wind power forecasting at distributed sites within far-offshore wind farms. The main technical contributions of this work are summarized as follows:
A parallel temporal feature-enhanced BiLSTM model framework for deep-sea offshore wind power forecasting is proposed. To address the strong non-stationarity and multi-scale temporal dependence characteristics of deep-sea offshore wind power time series, a Top-K feature selection method based on Spearman’s rank correlation is first employed for data dimensionality reduction. Subsequently, a BiLSTM is utilized to extract long-range bidirectional temporal dependencies, while a multi-branch 1D-CNN structure is constructed in parallel, thereby enhancing the model’s capability to characterize complex time-series evolution patterns.
An adaptive feature recalibration mechanism based on channel attention is designed. By dynamically modeling the importance of multi-channel temporal features and utilizing the query vector generated by mapping the final hidden state of the BiLSTM as guidance, the contribution of each channel branch is adjusted. This suppresses redundant and noisy information, improves the discriminability and robustness of the model’s feature representation, and enhances its generalization capability in complex marine environments.
An adaptive multi-head temporal attention mechanism is introduced to precisely focus on critical historical information. Unlike traditional direct concatenation, learnable head weights are incorporated for aggregation. By aggregating these weights based on the importance of different heads exhibited during the learning process, fine-grained modeling of essential time-series information is achieved, thereby significantly enhancing forecasting accuracy and stability. Validation on two public datasets demonstrates that the proposed model effectively improves the prediction accuracy of wind power generation.
The rest of this paper is organized as follows.
Section 2 provides a brief review of related research on feature selection and wind power forecasting.
Section 3 articulates the statement of the research problem.
Section 4 elaborates in detail on the proposed wind power forecasting model based on Spearman’s rank correlation coefficient and adaptive multi-head attention.
Section 5 introduces the comparative experiments and analyzes the corresponding results.
Section 6 concludes the work presented in this paper.
3. Problem Restatement
Wind resources are inherently characterized by significant randomness, intermittency, and uncertainty, which render wind power output with strong nonlinear and non-stationary features and pose considerable challenges to the dispatching and operation of power systems. Therefore, how to achieve high-precision short-term wind power forecasting based on historical observation data has become one of the core issues in the grid-connected operation of wind power.
Let the multi-dimensional observation feature vector of the wind farm at time step
t be expressed as
where
d denotes the number of features, which usually includes variables closely related to wind power output, such as wind speed, wind direction, temperature, air pressure, and humidity. For a historical time window
of length
p, the model input can be expressed as a multivariate time series:
The goal of short-term wind power forecasting is to learn a nonlinear mapping function
, such that the model can predict the wind power output at the next time step based on the historical observation sequence
:
where
denotes the predicted value of wind power at the future time step.
In practical applications, due to the wide distribution of wind farms and their affiliation with different operating entities, raw data is often restricted by privacy policies and commercial secrets, making it impossible to be directly aggregated to the cloud, thus forming “data silos”. Federated learning provides a solution for collaborative modeling while ensuring that data does not leave the local site. Assume there are
K wind farm participants in the federated network, where each participant
holds its local dataset
. The goal of federated short-term wind power forecasting is to collectively learn an optimal global mapping function
by aggregating the model updates from each site via a server. Its local loss function
is defined as the discrepancy between the local predicted value and the true power value
y at that site:
where
is the number of samples at the
k-th site. The global optimization objective of federated learning is to find a set of parameters
that minimizes the weighted sum of losses of all participants on their respective private data:
where
is the total number of samples.
This forecasting task faces multiple key challenges: the highly nonlinear and time-varying relationship between wind power and meteorological variables—shaped by terrain, airflow, and climate—resists capture by traditional linear models; the dynamically changing influence of different meteorological features requires accurate modeling of heterogeneous feature relationships; wind power’s combination of long-term trends and short-term fluctuations demands effective capture of multi-time-scale dependencies; and the unequal contribution of historical time steps necessitates adaptive identification of critical time segments and relevant feature patterns to enhance forecasting accuracy and robustness.
Based on the above analysis, this paper models the wind power forecasting problem as a multi-variable, multi-time-scale time-series regression task, aiming to achieve accurate prediction of short-term wind power output by effectively mining the temporal dependency relationships and feature importance information in historical observation data. The following table is cited to explain the main symbols used in this paper, as shown in
Table 1.
4. Method
Considering the highly nonlinear, time-varying nature of wind power output with multiple meteorological factors and the existence of data distribution differences, this paper constructs a BiLSTM model integrating parallel 1D convolution and attention mechanism under the federated learning framework for multi-site wind power forecasting. The overall framework is shown in
Figure 1. The main steps are as follows:
Multi-variable time-series data such as wind speed, wind direction, air pressure, temperature, air density, and historical wind power are collected at multiple wind farms separately. All raw data is stored locally and not uploaded to the central server to meet data privacy and security requirements.
Each client locally preprocesses data (imputes missing values, removes outliers), screens power-correlated features via Spearman’s coefficients to eliminate redundancy, normalizes retained features, constructs single-step prediction samples with a sliding window (past period as input, next-step power as output), and splits them into local train/validation/test sets.
First, BiLSTM extracts contextual hidden state sequences via bidirectional temporal modeling of input sequences; linear projection and parallel 1D-CNN are then applied to capture multi-scale local temporal features through kernel sliding, and channel attention plus adaptive multi-head temporal feature attention are stacked to weight time segments/feature channels; by synergistically enhancing critical information strongly correlated with the prediction target across both feature and temporal dimensions, the accuracy of feature representation in heterogeneous environments is significantly improved.
Each client updates model parameters locally with the Adam optimizer, uploading only parameters/gradients to the central server; the server aggregates the parameters using FedAvg to get the global model and distributes it back for further local training. Multiple “local training–central aggregation” iterations achieve collaborative model optimization via multi-site information with no raw data sharing.
After training converges, the global model is deployed on each wind farm client. Historical time window data from the local test set is input to output the wind power forecast for the next time step. Multiple error metrics are used to evaluate and compare the prediction accuracy and stability.
4.1. Feature Selection Based on Spearman’s Correlation Coefficient
Feature selection is a critical preliminary step in high-dimensional data modeling, with the core goal of eliminating irrelevant and redundant features and retaining a subset of features strongly correlated with the target variable. This reduces the computational complexity of the model, alleviates the curse of dimensionality, and simultaneously improves the model’s generalization ability. This paper adopts a filter-based Top-K feature selection method utilizing Spearman’s rank correlation. Compared to the classical Pearson Correlation Coefficient, Spearman rank correlation does not require the data to follow a normal distribution and can effectively capture nonlinear monotonic relationships between variables. This provides a stronger representational capability for wind power data, which is influenced by complex meteorological factors and exhibits highly nonlinear characteristics. Furthermore, since deep-sea offshore wind power data frequently contains outliers due to extreme weather disturbances, the Spearman method—which calculates based on ranks rather than raw values—demonstrates significant robustness to anomalies. The method adopted in this paper is a model-agnostic strategy, which can also meet the requirement of feature subspace consistency in multi-site federated learning or multi-source data scenarios.
Suppose the original dataset contains n time steps of data and d features, denoted by the feature matrix , where each row corresponds to a sample and each column corresponds to a candidate feature. The target variable is , representing the prediction label of the samples. For each feature column () in A, the Spearman rank correlation coefficient between the d features and y is calculated. The absolute value measures the correlation strength between the feature and the target variable. The value of is in the range of , where a larger value indicates a higher degree of monotonic correlation between feature and target variable y, meaning the feature has stronger explanatory power and predictive contribution to the target variable.
Subsequently, all d candidate features are sorted in descending order of , and the top K-ranked features are selected to form the final feature subset L. This selection process serves as an independent preprocessing step before data enters the downstream model, completely decoupled from subsequent modeling algorithms. It avoids introducing hyperparameter dependencies from downstream models and quickly reduces feature dimensions before modeling, significantly improving the efficiency of the overall modeling workflow.
denote the rank sequence of the feature column , where represents the ascending rank of the feature value at the i-th time step among all observations in feature column . The sample with the smallest feature value has a rank of 1, and the sample with the largest feature value has a rank of n. Similarly, let denote the rank sequence of the target variable y, following the same rank transformation rules as the feature columns.
Based on the rank-transformed sequences, the Spearman rank correlation coefficient
for the
j-th feature column is calculated as
where
denotes the covariance, and
denotes the standard deviation.
After calculating the Spearman rank correlation coefficients between all features and the target variable, we obtain the set of correlation coefficients . These coefficients are then sorted in descending order of , and the indices of the top k feature columns are selected to construct the feature subset L. Finally, we extract the columns from the original input matrix whose indices belong to L, yielding the filtered input matrix as the input to the subsequent prediction model. This retains the k features most strongly correlated with the target variable, thereby improving model performance and generalization ability.
4.2. Sequence Feature Encoding Network Based on BiLSTM
The Bidirectional Long Short-Term Memory (BiLSTM) network introduces a bidirectional recursive structure on the basis of the standard LSTM. By simultaneously constructing forward and backward information flows, it jointly models the forward and backward dependencies of the sequence. In wind power forecasting tasks, meteorological variables and power output exhibit significant temporal correlation and nonlinear coupling characteristics; unidirectional LSTM models often struggle to simultaneously account for historical evolutionary trends and current local abrupt variations. In contrast, BiLSTM can concurrently extract the cumulative effects and evolutionary trends of observation sequences, providing higher-quality temporal representations for subsequent modules. Compared to purely attention-based Transformer models, BiLSTM, leveraging its gating mechanism, exhibits superior robustness when capturing wind power data characterized by strict temporal causality and physical continuity, effectively mitigating overfitting issues in high-noise environments. A BiLSTM unit consists of a forget gate, an input gate, and an output gate, with its internal state update process as follows:
Long-Term Memory State Update:
Short-Term Memory (Hidden State) Output:
where
denotes the Sigmoid activation function,
denotes the hyperbolic tangent function;
is the input feature vector at time step
t;
represents the hidden state from the previous time step;
are the bias terms for the forget gate, input gate, candidate memory cell, and output gate, respectively;
denote the weight matrices for the corresponding gate structures.
In wind power forecasting, the BiLSTM network is used to perform temporal modeling on multi-variable time-series features. After the historical meteorological feature sequence is input, the forget gate calculates a probability value to retain key information from the long-term memory of the previous time step. The input gate generates a probability value to filter the current candidate features , which are then weighted and fused with historical information to obtain the new long-term memory . The output gate then generates based on the current input and historical state, filtering to extract core information and outputting the short-term memory . This state comprehensively reflects the temporal features related to wind power. By jointly modeling with forward and backward LSTMs, BiLSTM can fully exploit the bidirectional temporal dependencies in the data, extracting effective temporal features and providing high-quality representations for subsequent attention modules.
4.3. Temporal Feature Extraction Parallel Sublayer
Although BiLSTM can effectively encode the global and bidirectional dependencies of sequences, its hidden state sequence still contains a large number of local dynamic patterns (e.g., short-term wind speed spikes, local oscillations), which make important contributions to wind power forecasting. To further exploit the local temporal dynamic features embedded in the BiLSTM hidden states, this paper introduces a parallel 1D convolutional neural network sublayer after the sequence encoder. Compared to traditional serial convolution, this parallel design enables the model to independently capture heterogeneous physical evolutionary patterns across different variable branches, thereby preserving the site-specific wind characteristic responses within the federated global model. This sublayer consists of multiple groups of independent 1D convolution kernels, which perform convolution operations on the hidden state sequence along the temporal dimension to effectively extract multi-scale temporal features. Let the hidden state matrix of BiLSTM within the time window
be expressed as
where
n denotes the feature dimension,
p denotes the time window length, and the
r-th column of matrix
corresponds to the hidden state sequence of the
r-th feature over
p consecutive time steps.
We utilize the output of the BiLSTM at the last time step as the query vector. Assuming a window length of T, with the forward LSTM output at time step T being
and the backward LSTM output at time step 1 being
, the bidirectional concatenation at the final time step is denoted as
. Therefore, the query vector is defined as
where
denotes a learnable parameter. Vector
encapsulates the overall temporal information of the sequence and serves as the query for evaluating the correlation of features in subsequent branches.
The parallel 1D-CNN sublayer consists of
k 1D convolution kernels. For ease of expression, the convolution kernel matrix is defined as
where
denotes the
j-th 1D convolution kernel.
After the convolution operation, the convolution results of
k feature dimensions are combined to obtain the overall output matrix of the parallel 1D-CNN sublayer:
It can be seen that each element of matrix G represents a hierarchical temporal feature extracted from the time window by different convolution kernels under the same feature dimension. Since these features are obtained by convolution operations on the BiLSTM hidden states over consecutive time steps, they can effectively characterize the local temporal evolution patterns in the hidden state sequence. In this sense, the parallel 1D-CNN sublayer achieves further extraction and enhancement of temporal features in the BiLSTM hidden states, providing richer temporal feature representations for subsequent attention mechanisms.
4.4. Feature Enhancement Module with Dual-Dimensional Attention Mechanism
After the BiLSTM temporal encoder and parallel 1D-CNN sublayer, the model extracts multi-scale temporal features and local pattern information. However, there are significant differences in the contribution of different feature channels and the value of historical information at different time steps. To address this, this section introduces a dual-dimensional attention mechanism, which performs adaptive weighting from the feature channel and temporal dimensions to enhance key information, suppress redundant noise, and improve the discriminability and accuracy of feature representations.
Let the fused feature representation after BiLSTM and parallel 1D-CNN be
where
n denotes the feature dimension (corresponding to the number of parallel branches), and
k denotes the number of convolution output channels. The channel attention mechanism first extracts the overall response features of each channel through a global information aggregation operation. Specifically, global average pooling along the temporal dimension is used to generate a channel description vector:
where
.
Subsequently, a learnable channel mapping function is used to model channel importance, which can be expressed as
where
and
are learnable parameters,
denotes the Sigmoid activation function, and
is the attention weight for each channel.
Finally, the channel attention weights are reapplied to the original feature representation to achieve feature recalibration:
where ⊙ denotes element-wise multiplication along the channel dimension.
The feature sequence after processing by the channel attention mechanism is
where
. To extract the correlation information among branches from different subspaces, four independent attention heads are configured, the multi-head temporal attention mechanism characterizes temporal dependencies from different temporal perspectives by introducing multiple parallel attention subspaces. For the
m-th attention head, its attention score function is defined as
where
is the learnable parameter for the
m-th attention head. By explicitly introducing
, the model can dynamically adjust its attention to the features
of each branch based on the final state representation of the entire sequence.
Subsequently, the attention scores along the temporal dimension are normalized using the Softmax function to obtain temporal attention weights:
Based on the temporal attention weights, the context feature vector of the
m-th attention head can be expressed as
Unlike traditional direct fusion approaches, this paper employs an adaptive weighted fusion strategy for the outputs of multiple attention heads. Let
denote the learnable log-odds representing the contribution of each head, which is a learnable parameter of the model. Then, the fusion weight
for each head can be defined as
where
M denotes the total number of heads, and
represents the original importance score of the
m-th attention head. After applying the fusion weights
, the final fused features are obtained as follows:
where
M denotes the number of attention heads, and
is the output projection matrix.
This adaptive multi-head temporal attention mechanism can model historical features from multiple temporal perspectives, enabling the model to not only focus on single critical time points but also assign reasonable weights to different time segments based on the temporal characteristics of wind power changes. As a result, the model can more effectively capture both short-term and long-term temporal dependencies, improving the accuracy and stability of wind power forecasting under complex meteorological conditions.
4.5. Feature Fusion and Prediction
The task query vector
and the context feature
S are fused in the same intermediate representation space:
where
,
,
,
are responsible for mapping the two types of information to the
r-dimensional fusion space;
is the output projection matrix,
is the fused feature, and
is the final wind power prediction value.
This prediction structure can simultaneously utilize the global temporal representation
encoded by BiLSTM and the local critical pattern information
S filtered by the attention mechanism, thereby improving the accuracy and stability of wind power forecasting under complex meteorological conditions. The algorithm is as shown in Algorithm 1.
| Algorithm 1: Fed-AMHA Algorithm |
![Bdcc 10 00147 i001 Bdcc 10 00147 i001]() |