Manuscript Offprint
arXiv:2608.27791Initialization Is Critical: Advancing Federated Short-Term Load Forecasting under Load Heterogeneity via Model Initialization
Jianing Chen, Member, IEEE, Vajiheh Farhadi, Member, IEEE, Yan Li, Senior Member, IEEE, Thomas La Porta, Fellow, IEEE
Abstract—Short-term load forecasting (STLF) provides essential information for numerous applications in modern power systems. However, accurate STLF often relies on fine-grained smart-meter data from distributed users, raising increasing concerns about data privacy. Federated learning (FL) has therefore emerged as a promising privacy-preserving paradigm for STLF. Nevertheless, this paper reveals structured heterogeneity in clients' load data. Specifically, clients exhibit different responses to exogenous factors and distinct temporal load profiles, which can degrade forecasting performance in FL. To mitigate these issues, this paper studies the role of model initialization in federated STLF, and proposes two initialization strategies from global and local perspectives. For global model initialization, when auxiliary public load data are available, a pretrained initialization strategy is developed to initialize the global model before federated training, thereby reducing client drift during the training process. For local model initialization, we propose SLIAvg, a sequential local initialization strategy that promotes a more consistent training process by allowing participating clients to start from progressively adapted models within each communication round. Since the proposed strategies only modify the initialization process, they are compatible with most existing FL frameworks and privacy-enhancing techniques. Experiments on real smart-meter data with two representative forecasting architectures demonstrate that the proposed strategies effectively improve forecasting performance, as evidenced by reduced client drift, improved convergence behavior, and lower forecasting errors.
Index Terms—Federated learning, short-term load forecasting, client drift, data heterogeneity, model initialization, pretraining, sequential local initialization.
I. INTRODUCTION
ACCURATE short-term load forecasting (STLF) supports a wide range of critical applications in smart grids, spanning demand response, dynamic pricing, distribution-level state estimation, and economic dispatch [1]-[3]. With the rapid deployment of smart meters and advanced sensing infrastructure, STLF has increasingly shifted toward more granular scenarios, including residential-, building-, and user-level forecasting [4]. However, the limited data from individual users make it difficult to train powerful single-user STLF models, whereas centralized training for a more capable model may raise privacy leakage concerns. This has motivated the use of federated learning (FL) for STLF [5], [6].
FL collaboratively trains a global forecasting model through iterative local updates on distributed clients and server-side aggregation, without centralizing raw load data [7]. This mechanism is effective when local data distributions are similar. Nevertheless, data heterogeneity across individual users remains a major challenge, often degrading the forecasting performance of FL [8]. In many conventional FL applications, data heterogeneity is commonly characterized by label-distribution skew, feature-distribution skew, or sample-size imbalance [9], [10]. However, load data heterogeneity among electricity users is manifested in more complex forms, driven by diverse behaviors, occupancy schedules, and weather sensitivities [11]. As a result, the local data distributions across users can differ substantially, driving local model updates away from the global optimization direction [10]. This phenomenon, commonly referred to as client drift in FL, can slow down convergence and degrade the performance of predictive models [10], [12]. Therefore, mitigating client drift is imperative for the practical deployment of FL in STLF.
Existing studies have proposed effective solutions to improve the performance of federated STLF from different perspectives, including personalized learning schemes [6], [13], [14], client grouping and hierarchical framework [2], [11], [15], robust aggregation strategies [16] and enhanced forecasting model architectures [17]. Personalized FL methods aim to address the heterogeneous consumption behaviors of different users by learning user-specific forecasting models. For instance, a personalized federated online learning framework is introduced in [13] that allows distributed models to continuously learn from newly arriving data. A local personalization retraining step is proposed in [14] to improve user-specific adaptation and enhance the overall performance of the FL model. In [6], personalized local models are constructed through tensor decomposition techniques.
Another important direction is client grouping and hierarchical FL frameworks [18], [19]. To mitigate client drift, clustering-based methods partition users based on load-pattern similarity, such that FL is performed within groups of users exhibiting similar consumption behaviors [15], [20]. Hierarchical FL is further improved in [11] by introducing privacy-preserving clustering at the intra-cluster level, thereby enhancing privacy protection within the hierarchical framework. In addition, privacy-preserving clustering and anomaly detection
J. Chen, Y. Li and T. F. La Porta are with the School of Electrical Engineering and Computer Science, The Pennsylvania State University, University Park, PA 16802, USA (e-mail: yql5925@psu.edu).
V. Farhadi is with the Department of Electrical and Computer Engineering, Bucknell University, Lewisburg, PA 17837, USA (e-mail: vf008@bucknell.edu).
mechanisms are introduced in [2] to mitigate the effects of data incongruence and anomalies in local datasets.
Additionally, federated STLF has also been improved from other perspectives. In [16], an aggregation method that incorporates both global and local information is integrated into FL to improve STLF accuracy. Enhanced forecasting architectures, such as iQGRU, are developed to better characterize the randomness of individual loads in probabilistic forecasting [17]. A secure FL-STLF framework that combines differential privacy and gradient quantization is proposed in [21] to improve privacy protection and communication efficiency.
Recent studies in general FL have indicated that model performance is strongly influenced by model initialization [22], [23]. In centralized training, initialization is known to strongly affect convergence speed. However, its role in FL can be even more important. If the global model is randomly initialized, early-stage local updates are likely to be highly inconsistent across heterogeneous users. Such inconsistency can be amplified by multiple local training steps and then aggregated into unstable global updates, which can lead to severe client drift [10], [24]. In contrast, an informative initialization can place the global model closer to a favorable parameter region, thereby promoting more stable federated optimization. This can make early local updates more aligned and improve the stability of aggregation. However, to the best of our knowledge, the role of model initialization has not been systematically investigated in federated STLF.
Building on this insight, this paper studies federated STLF by jointly considering data heterogeneity and model initialization. Unlike existing approaches that primarily improve forecasting architectures or rely on client clustering, the proposed framework mitigates client drift through model initialization at both the global and local levels. The main contributions are summarized as follows:
-
Load heterogeneity is systematically analyzed in terms of heterogeneous responses to exogenous factors and temporal load profiles, with quantitative indicators demonstrating substantial cross-user differences in both aspects.
-
When auxiliary public load data are available, a pre-trained global initialization strategy is proposed. The auxiliary data are used to pretrain the global model before FL, providing a more informative starting point that reduces client drift and improves forecasting accuracy.
-
At the local level, a sequential local initialization strategy (SLIAvg) is proposed to mitigate client drift. By progressively adapting client initializations within each communication round, SLIAvg promotes smoother cross-client transitions and more consistent local updates.
-
Comprehensive experiments are conducted on a real smart-meter dataset with two different forecasting architectures. The results show that the proposed strategies effectively reduce client drift, improve convergence behavior, and achieve better performance across different client scales and model architectures.
It should be noted that the proposed methods are compatible with existing federated STLF methods, including advanced forecasting architectures, aggregation rules, personalization methods, since they only act on the initialization of the global model or local models. Additionally, the proposed initialization strategies can be further integrated with secure aggregation, differential privacy, or other privacy-enhancing techniques when stronger formal privacy guarantees are required [25], [26].
The remainder of this paper is organized as follows. Section II formulates the federated STLF problem and provides an overview of the main research components and their relationships. Section III analyzes structured heterogeneity in load data and the resulting client drift. Section IV presents two initialization strategies for federated STLF. Section V presents numerical experiments, and Section VI concludes the paper.
Let denote a parametric forecasting model with parameter ; representative architectures include Long Short-Term Memory (LSTM), Transformer, and Gated Recurrent Unit (GRU) [27]–[29]. The FL objective is formulated as
(1)
where the random variable denotes a user index sampled from a user-population distribution . The expectation models how different users are weighted in the overall objective, e.g., according to local sample sizes or operational importance. The function denotes the loss function. In practice, is approximated by the empirical average over the local dataset , while can be approximated through stochastic client sampling across communication rounds under partial participation.
Despite the privacy-preserving advantages of this framework, the performance of federated STLF can be significantly degraded by data heterogeneity. To investigate and address this challenge, this paper focuses on two main research components, as illustrated in Fig. 1. First, the sources and consequences of load data heterogeneity in federated STLF are analyzed. Specifically, load data across users exhibit two distinctive forms of heterogeneity: heterogeneous responses to exogenous factors and temporal heterogeneity. These forms of heterogeneity can lead to divergent local objectives and, consequently, client drift. Second, two model initialization strategies are developed at the global and local levels to mitigate the adverse effects of such heterogeneity. The proposed strategies promote more consistent local updates, thereby improving convergence and forecasting accuracy.

Fig. 1. Overview of load heterogeneity analysis and the proposed initialization strategies.
III. STRUCTURED LOAD HETEROGENEITY AND CLIENT DRIFT IN FEDERATED STLF
A. Load Data Heterogeneity
In standard FL literature, data heterogeneity is commonly characterized by feature-distribution skew and target-distribution skew [10], [12]. Formally, it can be described as
where the discrepancy often arises from differences in the marginal distributions, e.g.,
Feature-distribution skew: ,
(3)
Target-distribution skew: .
(4)
Such feature-distribution skew or target-distribution skew can induce discrepancies among the local objective functions across users.
In STLF tasks, non-IID client data arise from more complex mechanisms. Beyond data heterogeneity (3) and (4), load data heterogeneity often exhibits more structured and persistent patterns. Such heterogeneity can be characterized from two perspectives: 1) heterogeneous responses to exogenous factors and 2) temporal heterogeneity across users.
- Heterogeneous responses to exogenous factors: Each user k observes a local load time series governed by
The exogenous factors play a critical role in shaping electricity demand. Even when users may share a similar exogenous feature space, their true load-generation mechanisms differ due to users' intrinsic characteristics. As a result, different users could exhibit heterogeneous responses to the same exogenous inputs. This heterogeneity induces structured variation in the conditional distributions, i.e.,
In order to quantify the heterogeneous responses of users to exogenous factors, a linear response model is fitted to estimate the effects of exogenous variables on load demand for each user as follows,
where denotes the standardized load of user at time , denotes the continuous exogenous variables, denotes the categorical weather condition, and contains historical load features. The category is treated as the reference weather condition. The parameters , , , and are fitted using the local data of user . Specifically, and serve as empirical indicators of user 's responses to exogenous conditions. characterizes the average sensitivity of the standardized load to continuous exogenous variables, while characterizes the average load shift associated with weather category relative to the reference category .
- Temporal heterogeneity: In addition to heterogeneous responses to exogenous factors, user load profiles exhibit heterogeneous temporal structures. Although the overall short-term periodicity of load dynamics is often shared across users, the timing and evolution of these dynamics can differ due to individual consumption behaviors. Typical manifestations of temporal heterogeneity include daily load cycles with similar shapes but shifted peak hours, user-specific durations of load-state transitions, and stochastic timing variability in load responses across users. Consequently, temporal heterogeneity can induce structured variation in the temporal conditional distributions, i.e.,
To characterize such temporal heterogeneity, the load profile of user k can be described by a set of temporal load windows:
where denotes the window length and represents the temporal evolution of user ending at time .
To quantitatively measure temporal heterogeneity, the maximum mean discrepancy (MMD) is employed to compare the distributions of temporal load windows across users [30]. Let denote the distribution induced by . The temporal discrepancy between two users and is measured by
where denotes the kernel mean embedding of distribution , and is the reproducing kernel Hilbert space induced by a positive definite kernel . In this work, the Gaussian radial basis function kernel is adopted:
where is the kernel bandwidth.
Given two finite window sets and , the empirical squared MMD is computed as
A larger value of indicates a greater discrepancy between the temporal load patterns of two users. Therefore, this metric provides a distribution-level measurement of temporal heterogeneity, thereby reflecting differences in peak timing, transition duration, and stochasticity across users.
In summary, heterogeneous responses to exogenous factors and temporal heterogeneity jointly give rise to structured non-IID behavior in STLF. Such non-IID behavior reflects user-specific predictive mappings and can result in discrepancies among the local objectives across clients. These discrepancies provide the basis for the client drift issue discussed in the next subsection.
B. Client Drift in Federated STLF
Client drift refers to the systematic deviation of local model updates from the global optimization direction, which makes it difficult to train an accurate predictive model. The structured non-IID behavior among users' data can exacerbate client drift. Specifically, when client drift is severe, persistent discrepancies arise between local and global gradients, i.e., , indicating that local gradients may provide biased or inconsistent estimates of the global descent direction. Thus, the aggregated update direction may no longer be well aligned with the descent direction of the global objective. This mismatch undermines the performance of the final model.
Common FL strategies, such as FedAvg [7] and its variants (e.g., FedAdam [31]), are still insufficient to address this issue under heterogeneous data. To clearly illustrate the mechanism of client drift, FedAvg is taken as a representative example due to its widespread adoption in FL. The pseudocode of FedAvg is summarized in Algorithm 1.
Algorithm 1: FedAvg
Input : Total clients K; participating clients M; local sample sizes ; learning rate ; communication rounds T; local steps E.
Output: Global model .
1 Initialize global model ;
2 for do
3 Server uniformly samples a subset of clients
, where ;
4 for in parallel do
5 ;
6 for do
7 Compute gradient at ;
8 ;
9 end for
10 end for
11 Server aggregates updates:
;
12 end for
13 return
As shown in Algorithm 1, at each communication round, participating clients receive the current global model param-

Fig. 2. Illustration of client drift in FedAvg compared with centralized optimization. Two clients perform three local update steps ( , ). Local updates (gray arrows) move toward client-specific optima and (blue and green squares). Under heterogeneous local objectives, the aggregated server trajectory (red arrows) may deviate from the centralized optimization trajectory and move toward an averaged local solution (black square), rather than the centralized optimum (gray square).
eters and perform multiple steps of local optimization on their private datasets. The server then aggregates the locally updated models, typically via a weighted average, to produce a new global model. While this procedure is effective under homogeneous data distributions, it exhibits pronounced client drift in the presence of data heterogeneity. The mechanism of client drift is illustrated in Fig. 2 using a simplified example with two clients. Starting from the same initial server model, the two clients perform local updates toward different client-specific optima, and , because their local objectives are heterogeneous. After aggregation, the server trajectory can therefore move toward an averaged local solution rather than following the centralized optimization trajectory toward the true centralized optimum . This illustrates how heterogeneous local updates can bias the aggregated FedAvg update and degrade the final global model.
IV. ADVANCING FEDERATED STLF VIA MODEL INITIALIZATION UNDER LOAD HETEROGENEITY
To train an accurate predictive model within the FL framework, mitigating client drift is essential as discussed in Section II. Existing studies have demonstrated that model initialization plays a critical role in FL [22], [23]. A well-initialized model can accelerate convergence, improve training stability, and enhance generalization performance. Motivated by these facts, this paper proposes two strategies, aiming to alleviate client drift through both global and local model initialization: A) pretrained global initialization using auxiliary public load data; and B) sequential initialization of local models.
A. Pretrained Initialization with Auxiliary Public Load Data
A randomly initialized model tends to lie in a less informative region of the optimization landscape, where heterogeneous local data distributions can drive different clients toward substantially different descent directions, thereby leading to severe client drift. To quantify the client drift during FL, consider one communication round of FedAvg:
where denotes the local model of client after local steps, and is the aggregation weight of client . The local-model divergence is defined as
measures the divergence of local models around their weighted average after aggregation. Since all clients start from the same model at the beginning of each communication round, reflects the inconsistency of local model updates and can serve as an indicator of client drift [24].
Although individual clients exhibit heterogeneous load behaviors, STLF tasks often share common temporal structures. When auxiliary public load data are available, the model can be pretrained to capture dominant temporal load dynamics before federated training, thereby establishing a common representational prior across clients. Such pretrained initialization provides a more informative starting point for FL, allowing the model to start from a parameter region that is empirically closer to the final solution than random initialization. As a result, early-stage client updates become more consistent across heterogeneous clients, which helps reduce the value of and improve forecasting performance.
From the perspective of system operators or electric utilities, a limited amount of properly anonymized or publicly available load data may be accessible under privacy-preserving conditions. Such data may include historical public load records, anonymized measurements from representative users, simulation-generated load trajectories, or datasets voluntarily released by participating clients. Although these data are typically insufficient to train a fully optimized forecasting model, they can provide valuable global prior information for federated STLF.
Under this setting, a pretrained initialization strategy is proposed, in which the forecasting model is first trained in a centralized manner using available public or shared load data. The resulting pretrained model is then adopted as the initial global model for subsequent federated training. Since the proposed strategy only modifies the initial global model parameters without introducing additional communication rounds or altering the client-side training protocol, it can be readily incorporated into existing federated optimization algorithms, such as FedAvg and FedAdam, and can be integrated with more advanced FL strategies. Moreover, because pretraining relies only on auxiliary public or shareable data, it does not require access to private client data during the pretraining stage, thereby avoiding additional privacy risks before federated training.
B. Sequential Local Initialization without Pretraining Data
In the standard FL setting, each participating client initializes its local model with the global model received from

Fig. 3. Illustration of the proposed SLIAvg strategy with randomized client ordering, sequential local initialization, and server-side aggregation.
the server at the beginning of every communication round. Although this hard synchronization simplifies the training protocol, it may be suboptimal for STLF under strong data heterogeneity. Since all clients perform local training independently from the same initialization, their local models can quickly move toward different client-specific descent directions. After local training, these adapted models are directly averaged at the server. However, under strong data heterogeneity, local updates starting from the same initialization may point to substantially different or even conflicting directions, causing useful update components to be partially canceled and degrading global optimization [32].
To address this issue, a SLIAvg strategy is proposed to alleviate client drift, as illustrated in Fig. 3. Instead of broadcasting the same global model to all participating clients, SLIAvg uses the locally updated model of one client to initialize the next client through server coordination. Specifically, the server first sends the current global model to the first participating client in an order . After local training, the updated model is returned to the server and then forwarded as the initialization for the next participating client. This process is repeated until all participating clients complete local training.
In this way, each client starts from a progressively adapted initialization that carries representations learned from preceding clients, allowing temporal features to be retained and refined before server-side aggregation. This progressive adaptation provides smoother transitions among local updates and reduces abrupt discrepancies caused by independent local training. As a result, local updates are expected to become more consistent across heterogeneous clients, which helps reduce client drift and improve forecasting accuracy.
In this regime, the initial model of each participating client is given by
where M is the number of participating clients.
After all selected clients complete local training, their resulting local models are aggregated using the FedAvg rule. In the proposed SLIAvg, two issues are particularly important:
a) Randomized Client Ordering: In SLIAvg, the initialization of each client depends on its position in the client sequence. Let the ordered participating clients in round t be
Define the local update of the j-th participating client as
According to the sequential initialization rule, the initial model of the j-th participating client is
Thus, clients appearing later in the sequence are initialized with models that have accumulated more preceding local updates. If a fixed client order is repeatedly used, some clients may consistently occupy similar positions, leading to systematic order bias. To mitigate this issue, SLIAvg randomly shuffles the participating clients in each communication round.
b) FedAvg Aggregation for Avoiding Terminal-Endpoint Dominance: Although randomized client ordering alleviates systematic order bias across rounds, the sequential initialization process remains order-dependent within each round. If the last local model were directly used as the next global model, as , the model may become increasingly adapted to later clients, and the representations learned from earlier clients may be gradually diluted or overwritten.
To avoid this issue, SLIAvg applies FedAvg aggregation to all sequentially trained local models. The global model is
where the position-dependent coefficient is
Since and ,
FedAvg aggregation prevents the global model from being solely determined by the terminal endpoint. By aggregating all intermediate local models, SLIAvg assigns relatively larger weights to earlier client updates as shown in (21), thereby mitigating excessive terminal-endpoint dominance.
The pseudocode of the proposed SLIAvg strategy is presented in Algorithm 2.
V. NUMERICAL EXAMPLES
In this section, numerical experiments are conducted to evaluate the effectiveness of the proposed strategies for STLF. The experiments are based on the public Low Carbon London dataset [33], which contains smart-meter measurements collected by UK Power Networks together with detailed weather
Algorithm 2: SLIAvg
Input : Total clients K; participating clients M; learning rate ; communication rounds T; local steps E; local sample sizes .
Output: Global model
1 Initialize global model ; 2 for do 3 Server uniformly samples a subset of clients , where ; 4 Server draws a random permutation of ; 5 for in sequence do 6 Initialize the local model ; 7 for do 8 Compute gradient ; 9 ; 10 end for 11 end for 12 Server aggregates all generated local endpoints: ; 13 end for 14 return
information. The smart-meter data are recorded at a half-hour resolution, resulting in 48 load observations per day.
In this paper, 30 clients with load records from July 1, 2013, to February 16, 2014, are randomly selected from the dataset. Specifically, data from July 1, 2013, to January 15, 2014, are used for training, while data from January 16, 2014, to February 16, 2014, are used for testing. The data are processed using a sliding window of size 48, where the previous 48 half-hourly load observations are used to predict the current load. This setting follows the experimental setup in [2].
All experiments were implemented in Python 3.12 and PyTorch 2.11, and run on a workstation equipped with an Intel Xeon Gold 6542Y CPU at 2.90 GHz, 512 GB of host RAM, and two NVIDIA L40S GPUs, each with 48 GB of VRAM.
A. Data Heterogeneity Analysis
This section evaluates the heterogeneity of the load dataset adopted in this study.
a) Heterogeneous responses to exogenous factors: Fig. 4(a) evaluates heterogeneous exogenous responses across clients based on (7). Since all clients share the same exogenous features at each time index, the estimated coefficients and are obtained under the same exogenous factors and are therefore comparable across clients.
For continuous weather variables, the first box plot in Fig. 4(a) presents several exogenous features which have clear cross-client variability, especially for temperature and dew point. For instance, related to temperature is negative, indicating that lower temperature is generally associated

Continuous Weather Feature
(a) Heterogeneous responses to exogenous factors
(b) Temporal heterogeneity
Fig. 4. Visualization of client heterogeneity in exogenous weather responses and temporal load-profile distributions. (a) Distributions of client-specific response coefficients to continuous and categorical weather factors. Temp., Dew pt., App. temp., Humid., Wind spd., Press., Vis., and Wind dir. denote temperature, dew point, apparent temperature, humidity, wind speed, pressure, visibility, and wind direction, respectively. PC day and PC night denote partly cloudy day and partly cloudy night. (b) Pairwise temporal heterogeneity matrix of client load profiles.
with higher electricity consumption, which is consistent with heating-driven demand in London. The spread of this coefficient also shows that the heterogeneity of this response varies substantially across clients. For categorical weather conditions, the second box plot in Fig. 4(a) reports the client-specific response relative to the reference category, clear-day. The wide distribution of the coefficient in reflects that different clients exhibit different load shifts under the same weather condition.
b) Temporal heterogeneity: Fig. 4(b) presents the pairwise MMD matrix used to measure temporal heterogeneity across clients, where a larger value indicates stronger heterogeneity. The heatmap shows that the temporal distributions are not uniform across clients, as several client pairs exhibit large MMD values. This suggests that different clients have distinct temporal load behaviors.
B. Comparisons of Different Training Strategies
To demonstrate the effectiveness of the proposed strategies, the following experimental settings are adopted:
-
To evaluate the generality of the proposed strategies, two representative forecasting architectures are considered, namely a Transformer model and a dual-channel LSTM model. For the Transformer model, is fed into the encoder block, while is used as the input to the decoder block. For the LSTM model, and are fed into two separate channels, respectively, and their learned representations are fused for final prediction.
-
To ensure experimental reproducibility and improve the reliability of the comparison, the random seed is fixed to 42 for all steps involving weight initialization, data shuffling, and client sampling. This setting ensures that comparable runs use the same initial model weights and the same sampled clients participating in FL. By control- ling these sources of randomness, the impact of stochastic variations on the experimental results is reduced.
-
The reported evaluation metrics are mean squared error (MSE) and mean absolute error (MAE) [16]. The reported results correspond to the best performance on the test dataset achieved during the entire training process.
TABLE I EFFECT OF PRETRAINING EPOCHS ON TEST LOSS (K = 15)
| Pretraining Epoch | Transformer | LSTM | ||
|---|---|---|---|---|
| MSE | MAE | MSE | MAE | |
| No pretraining | ||||
| 0 | 0.1363 | 0.1993 | 0.0897 | 0.1599 |
| Pretraining without FL training data | ||||
| 1 | 0.1034 | 0.1708 | 0.0856 | 0.1567 |
| 5 | 0.0928 | 0.1606 | 0.0839 | 0.1566 |
| 20 | 0.1073 | 0.1699 | 0.0873 | 0.1620 |
| Pretraining with FL training data | ||||
| 1 | 0.0958 | 0.1724 | 0.0814 | 0.1536 |
| 5 | 0.0980 | 0.1738 | 0.0779 | 0.1525 |
| 20 | 0.0953 | 0.1658 | 0.0753 | 0.1496 |
- Evaluation of Pretrained Initialization with Auxiliary Public Load Data: Table I reports the effect of pretrained initialization, where FedAvg is adopted. In this experiment, 15 clients are randomly selected to construct the training set, and 5 clients participate in each communication round. To examine the influence of pretraining data, two settings are considered: pretraining with data from 5 clients excluded from federated training, and pretraining with data from 5 clients included in federated training.
For both forecasting models under two settings, pretrained initialization improves the best MSE and MAE, reducing them from 0.1363/0.1993 to 0.0953/0.1658 for the Transformer

Fig. 5. The test loss of the Transformer-based models.

Fig. 6. The test loss of the LSTM-based models.
model and from 0.0897/0.1599 to 0.0753/0.1496 for the LSTM model. However, when the pretraining dataset does not contain FL training data, increasing the number of pretraining epochs does not necessarily lead to better performance. For example, both models achieve their best performance at five pretraining epochs, whereas their performance degrades when the number of pretraining epochs is further increased to 20. This suggests that excessive pretraining on auxiliary data whose distribution differs from that of the FL training data may cause the model to learn client-specific patterns from the auxiliary clients. As a result, the pretrained model may move away from a favorable region for subsequent federated optimization, thereby reducing the effectiveness of pretrained initialization. This phenomenon further indicates that the effectiveness of pretrained initialization depends on whether the pretrained model provides a suitable starting point for subsequent federated optimization.
Figs. 5 and 6 illustrate the evolution of test loss over communication round for both forecasting models. Due to the presence of client drift, the original test loss curves exhibit considerable fluctuations during federated training. Therefore, to improve visual clarity, a moving-average smoothing with a window length of 5 is applied to the displayed curves.
As shown in Figs. 5 and 6, pretrained initialization leads to faster convergence in the early communication rounds, which is consistent with the behavior commonly observed in transfer learning. More importantly, pretrained initialization also

Fig. 7. Client drift of the Transformer model with and without pretraining.

Fig. 8. Client drift of the LSTM model with and without pretraining.
achieves better forecasting performance, indicating that the auxiliary pretraining stage provides a better-aligned starting point for subsequent federated optimization.
To further explain the performance improvement, client drift is computed in Figs. 7 and 8 via (14). A smaller drift indicates that local models move in more consistent optimization directions. Since the random seed is fixed, the same clients participate in each communication round under different settings. Therefore, the client-drift values are directly comparable across different settings.
Compared with random initialization, pretrained initialization yields lower client drift in most subsequent rounds after the first few communication rounds, especially in the middle stage of federated training. This suggests that pretrained initialization helps guide local optimization trajectories toward more consistent directions across clients, thereby improving the stability of server-side aggregation. The reduced client drift provides an important explanation for the lower test loss achieved by the proposed method. It should be noted that the smaller client drift of the non-pretrained model in the first few communication rounds does not necessarily indicate better federated optimization. At this stage, the training loss remains large, and the model mainly learns coarse and common forecasting patterns from random initialization. As a result, local updates across clients may follow relatively similar descent directions, leading to smaller measured client drift. This phenomenon mainly reflects the early underfitted state of the model, rather than genuinely stable client-specific adaptation.
TABLE II HOUSE-LEVEL AND OVERALL FORECASTING PERFORMANCE OF DIFFERENT TRAINING STRATEGIES
| House ID | FedAvg | SLI | SLIAvg | Centralized | ||||
|---|---|---|---|---|---|---|---|---|
| MSE | MAE | MSE | MAE | MSE | MAE | MSE | MAE | |
| 1 | ||||||||
| 2 | ||||||||
| 3 | ||||||||
| 4 | ||||||||
| 5 | ||||||||
| 6 | ||||||||
| 7 | ||||||||
| 8 | ||||||||
| 9 | ||||||||
| 10 | ||||||||
| Overall | ||||||||
- Evaluation of Sequential Local Initialization: The following methods are compared in the experiments:
-
FedAvg: The standard FL algorithm.
-
SLI: Sequential local initialization strategy without aggregation, where the last local model in the sequence is taken as the next global model.
-
SLIAvg: Sequential local initialization with aggregation, where all resulting local models are averaged to obtain the next global model.
-
Centralized: All client datasets are collected and trained centrally. This is reported as a reference baseline and does not satisfy the privacy requirement of FL.
Table II compares the household-level forecasting performance of different training strategies. In this experiment, the number of clients is set to , 5 clients participate in each communication round, and the Transformer model is adopted. As presented in Table II, SLIAvg achieves the best performance for most clients and obtains the lowest overall error, reducing the MSE and MAE from 0.0720 and 0.1491 using FedAvg to 0.0633 and 0.1375, respectively. SLI also improves over FedAvg, while SLIAvg further reduces the prediction error through the additional aggregation step.
TABLE III TEST LOSS COMPARISON OF DIFFERENT FL STRATEGIES UNDER DIFFERENT NUMBERS OF CLIENTS
| FL Strategy | K = 15 | K = 30 | ||
|---|---|---|---|---|
| Transformer | LSTM | Transformer | LSTM | |
| FedAvg | ||||
| SLI | ||||
| SLIAvg | ||||
| Centralized | ||||
Table III further compares different federated strategies under different numbers of clients. Compared with FedAvg, SLIAvg substantially narrows the performance gap between federated training and the centralized reference. Figs. 9 shows representative forecasting trajectories for one client. These

Fig. 9. STLF result for Client 1.
results indicate that SLIAvg helps mitigate the adverse effects of client heterogeneity and improves the prediction accuracy.
C. Privacy Discussion
-
Privacy of Pretrained Initialization: The auxiliary data used for pretraining initialization are assumed to be privacy-compliant. If load records voluntarily shared by some users are included in the auxiliary dataset, proper anonymization and authorization are required to avoid violating the privacy-preserving setting of FL. Therefore, the proposed pretrained initialization remains compatible with the privacy-preserving requirement of FL. Moreover, it can be combined with existing privacy-enhancing techniques during federated training, since it only modifies the initial global model and does not change the client-side training or server-side aggregation protocol.
-
SLIAvg Privacy: Since raw load data remain local throughout training, the proposed SLIAvg strategy also preserves the privacy-compatible setting of FL. Additional privacy-enhancing techniques can also be incorporated when formal privacy guarantees are required. Compared with standard parallel FL, SLIAvg introduces extra training latency because the initialization model must be synchronized from one client to the next through the server. This requires more training time, especially when many clients participate in each round. Nevertheless, this cost does not change the decentralized paradigm of FL, and the trade-off is justified in STLF where forecasting accuracy is prioritized over training speed.
VI. Conclusions
This paper investigates federated STLF from the joint perspective of client heterogeneity and model initialization. Load data heterogeneity is revealed by analyzing heterogeneous responses to exogenous factors and differences in temporal load profiles. Based on this analysis, two initialization strategies are proposed for federated STLF. First, the pretrained initialization strategy uses auxiliary public load data to initialize the global model before FL. Second, SLIAvg introduces sequential local initialization to promote smoother adaptations across client updates. The proposed strategies are evaluated on real load data using two representative forecasting models, demonstrating their effectiveness in reducing client drift, improving convergence behavior, and achieving better predictive performance.
Future work will focus on reducing the training latency of SLIAvg while preserving its benefits.
REFERENCES
[1] G. Gross and F. Galiana, “Short-term load forecasting,” Proceedings of the IEEE, vol. 75, pp. 1558–1573, 1987.
[2] C. Si, H. Wang, L. Chen, J. Zhao, Y. Min, and F. Xu, “Robust co-modeling for privacy-preserving short-term load forecasting with incongruent load data distributions,” IEEE Transactions on Smart Grid, vol. 15, no. 3, pp. 2985–2997, 2024.
[3] J. Yang, J. Zhao, F. Wen, and Z. Dong, “A model of customizing electricity retail prices based on load profile clustering analysis,” IEEE Transactions on Smart Grid, vol. 10, pp. 3374–3386, 05 2019.
[4] A. Mutanen, M. Ruska, S. Repo, and P. Jarventausta, “Customer classification and load profiling method for distribution systems,” IEEE Transactions on Power Delivery, vol. 26, pp. 1755–1763, 07 2011.
[5] R. Zhang, T. Jiang, G. Li, X. Li, and H. Chen, “Stochastic optimal energy management and pricing for load serving entity with aggregated TCLs of smart buildings: A stackelberg game approach,” IEEE Transactions on Industrial Informatics, vol. 17, pp. 1821–1830, 03 2021.
[6] G. Luo, M. Cui, Q. Wang, S. Shu, and J. Zhang, “Privacy-preserving tensor decomposition personalized federated learning for ultra-short-term load forecasting,” IEEE Transactions on Smart Grid, vol. 17, no. 2, pp. 1723–1739, 2026.
[7] B. McMahan, E. Moore, D. Ramage, S. Hampson, and B. A. y. Arcas, "Communication-Efficient Learning of Deep Networks from Decentralized Data," in Proceedings of the 20th International Conference on Artificial Intelligence and Statistics, ser. Proceedings of Machine Learning Research, A. Singh and J. Zhu, Eds., vol. 54. PMLR, 20–22 Apr 2017, pp. 1273–1282.
[8] F. Sattler, K.-R. Müller, and W. Samek, “Clustered federated learning: Model-agnostic distributed multitask optimization under privacy constraints,” IEEE Transactions on Neural Networks and Learning Systems, vol. 32, pp. 3710–3722, 08 2021.
[9] Y. Sun, L. Shen, and D. Tao, “Understanding how consistency works in federated learning via stage-wise relaxed initialization,” in Advances in Neural Information Processing Systems, 2023.
[10] S. P. Karimireddy, S. Kale, M. Mohri, S. Reddi, S. Stich, and A. T. Suresh, “Scaffold: Stochastic controlled averaging for federated learning,” in Proceedings of the 37th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, vol. 119, 2020, pp. 5132–5143.
[11] Y. He, F. Luo, M. Sun, and G. Ranzi, “Privacy-preserving and hierarchically federated framework for short-term residential load forecasting,” IEEE Transactions on Smart Grid, vol. 14, no. 6, pp. 4409–4422, 2023.
[12] Y. Yan, C.-M. Feng, M. Ye, W. Zuo, P. Li, R. S. M. Goh, L. Zhu, and C. L. P. Chen, “Rethinking client drift in federated learning: A logit perspective,” arXiv preprint arXiv:2308.10162, 2023.
[13] M. A. T. A. Elgalhud, M. N. Fekri, S. Mir, and K. Grolinger, “Federated online learning for adaptive load forecasting across decentralized nodes,” International Journal of Electrical Power & Energy Systems, vol. 169, p. 110779, 2025.
[14] S. Barja-Martinez, F. Teng, A. Junyent-Ferré, and M. Aragüés-Peñalba, "Personalized federated learning with cost-oriented load forecasting for home energy management systems," IEEE Transactions on Industry Applications, vol. 61, no. 1, pp. 1410–1422, 2025.
[15] J. D. Fernández, S. P. Menci, C. M. Lee, A. Rieger, and G. Fridgen, "Privacy-preserving federated learning for residential short-term load forecasting," Applied Energy, vol. 326, p. 119915, 2022.
[16] C. Feng, L. Shao, J. Wang, Y. Zhang, and F. Wen, “Short-term load forecasting of distribution transformer supply zones based on federated model-agnostic meta learning,” IEEE Transactions on Power Systems, vol. 40, no. 1, pp. 31–45, 2025.
[17] Y. Liu, Z. Dong, B. Liu, Y. Xu, and Z. Ding, “Fedforecast: A federated learning framework for short-term probabilistic individual load forecasting in smart grid,” International Journal of Electrical Power & Energy Systems, vol. 152, p. 109172, 2023.
[18] Y. L. Tun, K. Thar, C. M. Thwal, and C. S. Hong, “Federated learning based energy demand prediction with clustered aggregation,” in 2021 IEEE International Conference on Big Data and Smart Computing (BigComp), 2021, pp. 164–167.
[19] N. Gholizadeh and P. Musilek, “Federated learning with hyperparameter-based clustering for electrical load forecasting,” Internet of Things, vol. 17, p. 100470, 2022.
[20] Y. He, F. Luo, G. Ranzi, and W. Kong, “Short-term residential load forecasting based on federated learning and load clustering,” in 2021 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), 2021, pp. 77–82.
[21] M. A. Husnoo, A. Anwar, N. Hosseinzadeh, S. N. Islam, A. N. Mahmood, and R. Doss, “A secure federated learning framework for residential short-term load forecasting,” IEEE Transactions on Smart Grid, vol. 15, no. 2, pp. 2044–2055, 2024.
[22] H.-Y. Chen, C.-H. Tu, Z. Li, H.-W. Shen, and W.-L. Chao, “On the importance and applicability of pre-training for federated learning,” in International Conference on Learning Representations, 2023.
[23] J. Nguyen, J. Wang, K. Malik, M. Sanjabi, and M. Rabbat, “Where to begin? on the impact of pre-training and initialization in federated learning,” in International Conference on Learning Representations, 2023.
[24] X. Li, K. Huang, W. Yang, S. Wang, and Z. Zhang, “On the convergence of FedAvg on Non-IID data,” in International Conference on Learning Representations, 2020.
[25] K. Bonawitz, V. Ivanov, B. Kreuter, A. Marcedone, H. B. McMahan, S. Patel, D. Ramage, A. Segal, and K. Seth, “Practical secure aggregation for privacy-preserving machine learning,” in Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, 2017, pp. 1175–1191.
[26] L. Zhu, Z. Liu, and S. Han, “Deep leakage from gradients,” in Advances in Neural Information Processing Systems, vol. 32, 2019.
[27] S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997.
[28] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, “Attention is all you need,” in Advances in Neural Information Processing Systems, vol. 30, 2017.
[29] K. Cho, B. van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using RNN encoder–decoder for statistical machine translation,” in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP). Doha, Qatar: Association for Computational Linguistics, 2014, pp. 1724–1734.
[30] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Schölkopf, and A. Smola, "A kernel two-sample test," Journal of Machine Learning Research, vol. 13, no. 25, pp. 723–773, 2012.
[31] S. J. Reddi, Z. Charles, M. Zaheer, Z. Garrett, K. Rush, J. Konečný, S. Kumar, and H. B. McMahan, “Adaptive federated optimization,” in International Conference on Learning Representations, 2021.
[32] Y. Li and X. Lyu, “Convergence analysis of sequential federated learning on heterogeneous data,” in Advances in Neural Information Processing Systems, vol. 36, 2023.
[33] “Smart meters in London,” Kaggle, 2017. [Online]. Available: https://www.kaggle.com/datasets/jeanmidev/smart-meters-in-london