Adaptive federated learning framework for predicting
EV charging stations occupancy

Khaled Hallak, Oudom Kem

► To cite this version:

Khaled Hallak, Oudom Kem. Adaptive federated learning framework for predicting EV charg-
ing stations occupancy. International Journal of Transportation Science and Technology, In press,
10.1016/j.ijtst.2025.04.007. hal-05079666

HAL Id: hal-05079666

https://hal.science/hal-05079666v1

Submitted on 22 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

Research Paper

# Adaptive federated learning framework for predicting EV charging stations occupancy ⭐

Khaled Hallak *, Oudom Kem

CEA, List, Université Paris-Saclay, F-91120 Palaiseau, France

## ARTICLE INFO

**Article history:**

Received 30 December 2024

Received in revised form 21 April 2025

Accepted 22 April 2025

Available online xxxx

**Keywords:**

Federated Learning

Time Series Forecasting

Charging Station Occupancy

Data Heterogeneity

Concept Drift

## ABSTRACT

Forecasting the occupancy of electric vehicle (EV) charging stations is crucial for addressing key challenges in e-mobility, including charging inefficiency, traffic congestion, and drivers' difficulty in locating available stations. Recent studies on predicting charging station occupancy have predominantly employed conventional centralized machine learning models. However, these models struggle to adapt to evolving data streams, limiting their accuracy and practical applicability. Furthermore, centralized approaches exacerbate these limitations by conflicting with privacy requirements, as they necessitate sharing sensitive data from charging stations and users. To address these limitations, this study introduces a novel federated learning framework designed to collaboratively predict EV charging station occupancy by leveraging data from all participating stations without sharing any raw data. The framework addresses critical challenges, including concept drift, data heterogeneity among clients, and model generalization. It clusters stations with similar drift patterns and leverages personalized models, updated using incremental learning, to ensure adaptive and precise forecasting. This adaptability allows the system to respond to dynamic environments characterized by changing traffic patterns, user behaviors, and station utilization trends. Three datasets with diverse characteristics were used to validate the proposed framework, demonstrating its robustness, adaptability, and scalability in improving forecasting accuracy. This work provides a robust, privacy-preserving, and scalable framework to enhance the reliability and efficiency of EV infrastructures, promoting broader adoption of sustainable transportation.

© 2025 Tongji University and Tongji University Press. Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

## 1. Introduction

The rapid growth of electric vehicles (EVs) has introduced significant challenges to charging infrastructure (Matanov and Zahov, 2020), including insufficient charging stations, difficulties in locating available charging piles, and increased traffic congestion caused by drivers searching for idle stations (Wang et al., 2021). These challenges, if left unresolved, could undermine the sustainability of urban mobility systems. However, expanding the charging network alone is not a viable long-term solution due to financial, spatial, and environmental constraints (Chen et al., 2022). Instead, accurate and real-time forecasting of charging station occupancy is critical for optimizing the utilization of existing infrastructure and alleviating urban congestion.

Peer review under the responsibility of Tongji University and Tongji University Press

E-mail address: khaled.hallakhammoud@cea.fr (K. Hallak).

https://doi.org/10.1016/j.ijtst.2025.04.007

2046-0430/© 2025 Tongji University and Tongji University Press. Published by Elsevier B.V.

This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).

<footnote>* Corresponding author.</footnote>
The real-time forecasting of charging station occupancy is particularly important (Fescioglu-Unver and Yıldız Aktaş, 2023), as it enables dynamic routing of EVs to the nearest available stations within typical urban travel times. This reduces unnecessary cruising and associated emissions, contributing to more efficient urban mobility.

Recent studies have focused on centralized prediction models, which collect data from different places to develop global forecasting systems (Aghsaee et al., 2023; Bikcora et al., 2016; Gruosso et al., 2020; Luo et al., 2021; Ostermann et al., 2022). Although these models demonstrate effectiveness in specific applications, they encounter several significant limitations. The aggregation of sensitive data from distributed sources presents notable privacy issues, and the elevated communication and computational expenses make centralized methods impractical for real-time applications.

To overcome these challenges, Federated Learning (FL) (McMahan et al., 2016) has emerged as a promising decentralized approach. FL enables collaborative model training across distributed clients while keeping data localized, thereby addressing privacy concerns and reducing communication overhead. However, applying FL to time series forecasting introduces unique challenges, such as handling concept drift (Xiang et al., 2023) and managing the non-independent and identically distributed (non-IID) (Ma et al., 2022) nature of client datasets. Concept drift occurs when the statistical properties of data change over time, rendering previously learned models less effective. In non-IID scenarios, data distributions vary across clients due to differences in local usage patterns, complicating the development of a generalized global model and limiting the efficacy of conventional FL algorithms.

To address these challenges, this study proposes a novel framework for real-time EV charging station occupancy prediction, leveraging FL's privacy-preserving nature. This framework introduces a Federated Personalized Pattern-Based Clustering (Fed-PPBC), an approach tailored to address forecasting challenges in this domain. The framework dynamically clusters clients based on recent patterns, and trains personalized models for each cluster to adapt to local data distributions while maintaining a global learning structure. Moreover, Incremental Learning (IL) (Luo et al., 2020) is further integrated into the framework, allowing for continuous model updates without retraining from scratch, thereby ensuring efficient adaptation to evolving data streams. The combination of these techniques enhances predictive performance and provides a robust solution for large, distributed systems.

The proposed framework is validated using three real-world datasets from EV charging stations in Guangzhou, Shenzhen, and Paris. These datasets encompass diverse geographic and behavioral patterns, testing the scalability and robustness of the approach. The approach is benchmarked against state-of-the-art baseline algorithms, with performance assessed using three error metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE). Results demonstrate the framework's ability to adapt to evolving conditions while maintaining high predictive performance in distributed systems, making it a viable solution for the growing challenges in EV infrastructure.

This paper is organized as follows: Section 1 reviews related work and outlines the study's contributions. Section 2 details the proposed methodology, followed by Section 3, which describes the datasets and experimental setup. Section 4 evaluates the proposed framework against baseline methods, with an in-depth discussion and interpretation of the results. Finally, Section 5 concludes the paper and highlights directions for future research.

## 2. Related work

### 2.1. Occupancy prediction

Charging Station Occupancy Prediction (CSOP) focuses on learning patterns from historical data to forecast future charging station availability. This task, a critical application of time-series forecasting, aims to optimize resource allocation, reduce congestion, and improve the overall efficiency of Intelligent Transportation Systems (ITS). A variety of methodologies have been explored in the literature, broadly categorized into conventional machine learning models and deep learning techniques.

Conventional machine learning models are often valued for their interpretability and ability to extract meaningful patterns from structured data. Logistic models (Bikcora et al., 2016), for example, have been used in probabilistic frameworks to forecast charging rates and availability, particularly in disaggregated scenarios such as individual charging sockets. These models emphasize the importance of features like hourly indicators, day- and week-lagged variables, and temporal factors such as holidays. Similarly, Markov chain models (Gruosso et al., 2020) are employed to capture cyclic behaviors in charging patterns, such as frequency and duration, and have been effective in forecasting while supporting power grid simulations. Logistic regression models have also been applied to forecast charging station occupancy using engineered features derived from timestamps, such as the interval of the day and weekday (Motz et al., 2021). These features proved particularly valuable, and the study emphasized that using data from individual stations yields superior results compared to aggregated datasets. Moreover, XGBoost (Ostermann et al., 2022), a gradient-boosting framework, has been highlighted for its robustness in both classification and regression tasks, achieving high accuracy by incorporating diverse feature sets, including time-of-day, weather conditions, and vehicle demand patterns.

Recently, deep learning models have emerged as a powerful alternative due to their ability to learn hidden patterns and capture complex temporal dependencies. Recurrent Neural Networks (RNNs) and their advanced variants, such as Long Short-Term Memory (LSTM) networks and Gated Recurrent Units (GRUs) (Douaidi et al., 2023; Hochreiter and Schmidhuber, 1997), have been widely adopted for time-series prediction in CSOP. These models excel at handling sequen-
tial data by maintaining a memory of past information, which is crucial for accurately predicting future occupancy. Moreover, hybrid architectures like the Deep Fusion of Dynamic and Static information (DFDS) model (Sao et al., 2021), built on GRUs, have demonstrated enhanced prediction accuracy by integrating diverse data sources, such as static station characteristics and dynamic real-time inputs.

Despite these advancements, most existing approaches are implemented in a centralized manner, which overlooks practical challenges inherent in real-world applications, particularly related to data privacy. In the centralized model process, as illustrated in Fig. 1, individual charging stations send their local data to a central server. The server aggregates this data and trains a global model, which is then deployed back to the stations for predictions. This approach effectively utilizes global data patterns; however, it raises substantial privacy concerns, particularly in the context of data protection regulations (Phillips, 2018). Moreover, centralized methods overlook the opportunity to utilize distributed computational resources at individual charging stations, potentially leading to inefficiencies in training workflows. These limitations hinder the development of robust, high-performance models that can scale effectively across diverse environments.

As a result, there is growing interest in decentralized approaches, such as Federated Learning, which can address these challenges by enabling collaborative model training without compromising data privacy. In contrast to traditional centralized methods, FL allows for the training of models across distributed charging stations, while keeping the data localized, mitigating privacy concerns, and leveraging local data to improve model performance. This paradigm has the potential to overcome the limitations of centralized CSOP methods and enhance the scalability, privacy, and adaptability of forecasting systems in real-world applications.

## 2.2. Federated learning in time series forecasting

FL offers a decentralized approach to machine learning, enabling collaborative model training across distributed clients while ensuring that sensitive data remains local. This framework is particularly useful for applications such as CSOP, where data privacy is a critical concern (Douaidi et al., 2023). In the context of CSOP, the FL process operates as illustrated in Fig. 2. Each station independently trains a local model using its own data, ensuring no raw data is shared. The locally trained model parameters are then aggregated by a central server, which computes a global model update. This updated global model is subsequently sent back to the clients for further training, iterating until convergence. This decentralized process preserves privacy while leveraging the collective knowledge of all stations. However, applying FL to time series forecasting tasks, such as CSOP, introduces additional challenges due to the inherent complexities of time-series data, including data heterogeneity and concept drift.

To address these challenges, several FL approaches have been proposed. FedProx (Li et al., 2018) introduces a proximal term during local model training to prevent local updates from diverging too far from the global model. FedDyn (Acar et al., 2021) uses dynamic regularization to adjust each client's objective during training, while Elastic (D. Chen et al., 2023) designs an elastic aggregation approach to reduce the impact of updates to sensitive parameters. Scaffold (Karimireddy et al., 2019) incorporates control variates to address client drift by aligning local updates with the global objective, ensuring more stable convergence in heterogeneous settings. Adaptive-FedAvg (AFL) (Canonaco et al., 2021) introduces a dynamic learning rate adjustment mechanism, improving model performance in the presence of concept drift.

Although these approaches have shown promise, their application to time-series forecasting remains challenging due to the unique nature of time-series data. Heterogeneity in time-series forecasting arises from differences in variable types, temporal dependencies, and evolving patterns, which introduce challenges such as non-iid distributions and concept drift. These factors complicate generalization, underscoring the need for novel FL methods tailored to decentralized forecasting tasks.

<figure><img src="image_4.png" /><figcaption>Fig. 1. Training of a centralized model with data from distributed EV charging stations.</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Fig. 2. Training of FL model with data from distributed EV charging stations.</figcaption></figure>

## 2.3. Study contribution

The use of FL for CSOP has been explored in only two prior studies. The first study applied FL with an LSTM backbone model for CSOP (Douaidi et al., 2023), without incorporating any adaptation during the online phase. While this work marked the initial application of FL to the CSOP problem, it did not address the statistical heterogeneity among clients, limiting its scope to a preliminary investigation. The second study introduced the AFML (Asynchronous Federated Meta-Learning) algorithm to address client heterogeneity (Chen et al., 2024). This approach personalized the clients prior to the online phase and applied a meta-learning framework to incrementally update the trained FL model. AFML incorporates an adaptive reptile algorithm, which integrates a first-order meta-learning mechanism and a layerwise update strategy to efficiently learn an initial model capable of swift adaptation to local tasks. Additionally, the considered weighted aggregation strategy enhances the aggregation of local updates by assigning dynamic weights based on data freshness and relevance. This approach outperformed baseline algorithms by addressing heterogeneity among stations. However, it did not account for the concept drift issue, which is critical in dynamic real-world streaming environments.

Building on these foundational studies, this research introduces Fed-PPBC, a novel approach designed to effectively address both concept drift and statistical heterogeneity in CSOP. Unlike the existing methods, which primarily cluster clients based on input features or gradient similarities, Fed-PPBC clusters clients based on the recent behavior of their target patterns. This distinction is crucial in forecasting problems where input features across clients may be similar, yet their target values exhibit diverse and evolving patterns over time.

Fed-PPBC focuses on grouping clients with similar drift patterns by analyzing recent dynamics in target values, rather than relying solely on input features. This strategy allows the framework to capture shifts in predicted outcomes that may be masked by static input features. Personalized models are then generated for each cluster, specifically tailored to the drift patterns observed within each cluster's target values. This leads to enhanced prediction accuracy, particularly in real-time forecasting applications where adaptability is key.

To further enhance the adaptability of the system, the proposed method integrates incremental learning techniques, enabling continuous updates to personalized models without requiring full retraining. This dynamic adaptation to evolving data streams is a significant advantage over traditional methods that rely on static models. By incorporating incremental learning, the framework can quickly adjust to shifts in target distributions, ensuring timely and efficient responses to concept drift, and reducing computational overhead.

The combination of personalized clustering and incremental learning mitigates the impact of statistical heterogeneity and improves the model's ability to adapt to the concept drift. As a result, the proposed framework demonstrates superior performance in time series forecasting tasks within distributed and dynamic environments, such as CSOP.

## 3. Methodology

The proposed methodology consists of two primary phases: the Offline Phase and the Online Phase, as depicted in Fig. 3. The Offline Phase involves data collection, preparation, and preprocessing at each client site, followed by training the backbone FL model. The Online Phase processes real-time data streams, applies the trained FL model for predictions, evaluates the model's performance after each prediction, and incorporates drift detection to identify shifts in the data distribution. When drift is detected, drift adaptation techniques are applied to adjust the model to the evolving data.
<figure><img src="image_6.png" /><figcaption>Fig. 3. Illustration of the two main phases of Fed-PPBC: the Offline and Online Phases.</figcaption></figure>

To facilitate clarity and understanding of the notations used in the proposed methodology, Table 1 provides a summary of the key variables introduced in this section. These variables are essential for describing the offline and online phases of the framework, including model training, drift detection, and adaptive updates.

### 3.1. Offline phase

In the offline phase, the FL framework is initially trained on historical data to establish a baseline global model across all clients. The goal is to create a global model that forecasts future occupancy across the clients, without needing to centralize any of the data. As shown in Algorithm 1, the process begins with the server initializing a global model parameters, $\Phi$, which is then shared with each client. Each client $i$ holds its own local dataset, $D_i$, and trains its local model, $M_i$, for a predefined number of epochs, $E$, using its local data and an optimizer (such as Adam) to update the local model parameters, $\Phi_i$. After completing the training, each client $i$ sends the updated parameters, $\Phi_i$, back to the server. The server then aggregates the received parameters from all $N$ clients by averaging them, which updates the global model parameters $\Phi$. This aggregated global model, $\Phi$, is used to update the global model $M_g$, and this process is repeated over $R$ communication rounds. After the specified number of rounds, the server outputs the final global model, $M_g$, which is now a collective representation of the knowledge learned from all clients' data, and is ready for deployment in the online phase for real-time predictions.

<table><caption>**Table 1**
Summary of key variables in the methodology.</caption><thead><tr><td>Variable</td><td>Description</td></tr></thead><tbody><tr><td>Φ</td><td>Global model parameters initialized on the server</td></tr><tr><td>Φ<sub>i</sub></td><td>Local model parameters updated by client i</td></tr><tr><td>M<sub>i</sub></td><td>Local model for client i</td></tr><tr><td>M<sub>g</sub></td><td>Global model aggregated from all client models</td></tr><tr><td>D<sub>i</sub></td><td>Local dataset for client i</td></tr><tr><td>N</td><td>Total number of clients participating in training</td></tr><tr><td>E</td><td>Number of training epochs for each client</td></tr><tr><td>R</td><td>Number of communication rounds between clients and the server</td></tr><tr><td>c<sub>k</sub></td><td>Set of k clusters representing different client behaviors</td></tr><tr><td>c<sub>k</sub></td><td>Centroid of cluster k</td></tr><tr><td>m</td><td>Size of the drift pattern vector used for clustering</td></tr><tr><td>W<sub>t</sub></td><td>Sliding window used for drift detection</td></tr><tr><td>P<sub>t</sub></td><td>Performance metric calculated at time step t</td></tr><tr><td>ΔP</td><td>Change in performance metric (P<sub>t</sub> - P<sub>t-1</sub>) used for drift detection</td></tr><tr><td>θ</td><td>Threshold for detecting concept drift</td></tr><tr><td>PM<sub>i</sub></td><td>Personalized model for client i after drift adaptation</td></tr><tr><td>x<sub>t</sub></td><td>Streamed data point at time t</td></tr><tr><td>y<sub>i</sub></td><td>Recent occupancy sequence for client i</td></tr><tr><td>d(y<sub>i</sub>, c<sub>k</sub>)</td><td>Euclidean distance between client i's occupancy sequence and cluster centroid c<sub>k</sub></td></tr><tr><td>k</td><td>Number of clusters initialized for drift pattern detection</td></tr></tbody></table>
During this process, no client data is shared, preserving privacy while ensuring that the global model benefits from the training done on local datasets across all clients.

In addition, Cluster Initialization is performed before the system processes streaming data. The server initializes k clusters, denoted by $C_k$, each representing distinct potential client behavior patterns. Each cluster $C_k$ is characterized by a centroid $c_k = [c_k(t - m),...,c_k(t-1),c_k(t)]$, an m-dimensional vector considering the expected range of occupancy values. The parameters related to the number of clusters and the size of the drift pattern vector (k and m, respectively) are determined through parameter tuning using grid search on the training data during the offline phase. The tuning process is discussed in section 4.5. Once initialized, the centroids are distributed to the clients, enabling each client to compare its drift pattern to these predefined reference points when the online streaming phase begins and a drift is detected.

**Algorithm 1 (Offline phase of federated learning framework).**

**Input:** Historical dataset $D_i$ for each client $i$, total clients $N$, epochs $E$, number of communication rounds $R$

Initialize global model parameters $\Phi$ on server

**for** each round $r = 1$ to $R$ **do**

**for** each client $i = 1$ to $N$ **in parallel do**

Client $i$ initializes local model parameters $\Phi_i = \Phi$

**for** epoch $e = 1$ to $E$ **do**

Train $M_i$ on $D_i$ using Adam optimizer to update parameters $\Phi_i$

**end for**

Client $i$ sends updated parameters $\Phi_i$ to server

**end for**

Server aggregates $\Phi_i$ by averaging:

$\Phi \leftarrow \frac{1}{N} \sum_{i=1}^{N} \Phi_i$ Update global model $M_g$ with new parameters $\Phi$

**end for**

**Output:** Final global model $M_g$ for deployment in the online phase

## 3.2. Online phase

In the online phase, as shown in Algorithm 2 the framework processes real-time streaming data for each client individually, $x_t$, by applying the previously trained global model, $M_g$, to make predictions for each incoming data point. Each client utilizes the global model to predict based on the streaming data and subsequently employs the drift detection mechanism, as detailed in Algorithm 3, to identify potential concept drift. Concept drift refers to shifts in the statistical properties of the data over time, which may adversely affect model performance.

**Algorithm 2 (Online phase of federated learning framework with drift detection and clustering).**

**Input:** Streamed data point $x_t$ at time $t$, global model $M_g$, client models $M_i$, drift threshold $\theta$, cluster assignments

**for** each client $i = 1$ to $N$ **do**

Client $i$ applies $M_g$ to predict based on $x_t$

Call drift detection mechanism Algorithm 3

**if** drift is detected **then**

Apply Algorithm 4 to update personalized models $PM_i$

**else**

Continue using the initially assigned global model $M_g$

**end if**

**end for**

When drift is detected, Algorithm 4 is invoked to update the personalized models, $PM_i$, enabling the system to adapt to the evolving data distribution. If no drift is detected, clients continue using the global model, $M_g$, without any adaptation. This adaptive mechanism ensures that the framework can react to changes in the data stream by updating models collaboratively while preserving the efficacy of the global model when no drift is observed.

### 3.2.1. Concept drift detection

To detect concept drift, each client continuously monitors the performance of the model on incoming data using a sliding window approach. This approach calculates performance metrics over a window of recent data points, and a threshold-based mechanism is employed to assess whether a significant change, indicative of drift, has occurred. In this study, the sliding
window, $W_t$, is chosen to have a size of 1, meaning the drift detection process compares the performance change between the most recent target value and the newly received stream. The drift detection process, outlined in Algorithm 3, involves computing a performance metric, $P_t$, for each sliding window, $W_t$, and evaluating the change in the performance metric, $\Delta P=P_t - P_{t-1}$, between successive windows. If the change exceeds a predefined threshold, $\theta$, drift is detected; otherwise, no drift is assumed. The threshold $\theta$ is a tunable parameter, designed to balance sensitivity and specificity, minimizing false positives while ensuring timely detection. Further details regarding the tuning of $\theta$ are provided in Section 4.5. Once drift is detected, the framework adapts the model as described in the next section.

<caption>**Algorithm 3 (Concept drift detection process).**</caption>

**Input:** Sliding window $W_t$, performance metrics $P_b$, drift threshold $\theta$
Compute performance metric $P_t$ for $W_t$
Compute change $\Delta P = P_t - P_{t-1}$
**if** $|\Delta P| > \theta$ then
**Drift Detected**
**else**
**No Drift**
**end if**

### 3.2.2. Drift adaptation and personalized model update

Once concept drift is detected, the system adapts by updating the personalized models for each client based on the identified drift pattern. This process is detailed in Algorithm 4. Initially, the clustering assignment for each client i is updated using Algorithm 5, which will be explained in the following section. The updated cluster assignment reflects the client's new position relative to the detected drift pattern. After updating the cluster assignments, each client update its local model $M_i$, using the most recent data within a sliding window of size n. The retraining occurs over E epochs and R communication rounds. Once the local models have been updated, they are aggregated within their respective clusters $C_k$ by averaging the models of all clients in the same cluster. The aggregated model is then sent back to the clients within the same cluster, resulting in the updated personalized model $PM_j$. The personalized model $PM_j$ is then used by all clients in the cluster, ensuring that each client's model remains responsive to the evolving data distribution. This process enables continuous adaptation of the models in response to concept drift, maintaining prediction accuracy over time.

<caption>**Algorithm 4 (Updating personalized model in the presence of drift).**</caption>

**Input:** Drift pattern, local model $M_i$, data window size n, number of epochs E, number of rounds R, cluster assignment $C_k$
**for** each round $r = 1$ to $R$ **do**
**for** each client $i = 1$ to $N$ **do**
Update cluster assignment for Client i using Algorithm 5
**for** each epoch $e = 1$ to $E$ **do**
Update local model $M_i$ using the latest n samples
**end for**
Send updated local model $M_i$ to the server
**end for**
Aggregate local models $M_i$ of clients in cluster $C_k$ by averaging
Send updated personalized model $PM_j$ back to all clients in cluster $C_k$
**end for**
**Output:** Updated personalized model $PM_j$ for each cluster $C_k$

### 3.2.3. Cluster assignment update based on drift

The final step in the drift adaptation process is the update of cluster assignments for clients that exhibit concept drift. This is accomplished by Algorithm 5, where each client calculates the distance between its recent occupancy sequence $y_i$, and the centroids of the existing clusters $c_k$. The occupancy sequence $y_i$ represents the most recent m occupancy values recorded by the client, specifically $y_i = [y_i(t-m),...,y_i(t)]$. The distance is computed using the Euclidean metric, which measures the difference between the client's data and the cluster centroids $c_k = [c_k(t-m),...,c_k(t)]$. The client is then assigned to the cluster that minimizes this distance, ensuring that clients with similar drift patterns are grouped together. In the case where no drift is detected, the client retains its current cluster assignment. Once the cluster assignment is updated, clients are grouped
according to their drift characteristics, allowing them to benefit from personalized models that reflect their specific occupancy patterns. This step is critical for maintaining the relevance and accuracy of the personalized models over time.

**Algorithm 5** (*Update cluster assignment for client based on detected drift pattern*).

**Input:** Recent occupancy sequence $y_i$ for Client i, cluster centroids $c_k$

for each client $i = 1$ to $N$ do

if drift is detected at time t then

for each cluster centroid $c_k \in C$ do

Compute the Euclidean distance:

$$d(y_i, c_k) = \sqrt{\sum_{j=0}^{m}(y_i(t-j) - c_k(t-j))^2}$$

end for

Update cluster assignment for Client i:

$$k = \underset{k_r}{\operatorname{argmin}} d(y_i, c_{k_r})$$

else

Retain: Keep Client i in the current cluster assignment

end if

end for

Output: Updated cluster assignment for Client i

# 4. Experiments

## 4.1. Datasets

This study evaluates the proposed methods using three distinct datasets representing real-world charging station occupancy data, characterized by varying geographical and temporal attributes. Dataset 1 (Guangzhou, China) includes records from 35 charging stations with 12-76 charging piles, spanning December 10, 2021, to January 7, 2022, at 5-minute intervals. The data, sourced from (Chen et al.), is divided into a training set (December 10-31, 2021) and a test set (January 1-7, 2022). Dataset 2 (Shenzhen, China) comprises data from 30 charging stations with 10-87 charging piles, also collected at 5-minute intervals between December 10, 2021, and January 7, 2022, and is similarly sourced from (Chen et al.). Dataset 3 (Paris, France) features real-time data from the Belib network, including 20 charging stations with 3-21 charging piles, spanning July 3-August 1, 2020, recorded at 15-minute intervals. This dataset, sourced from (Jan et al.), is split into a training set (July 3-24, 2020) and a test set (July 24-August 1, 2020). All datasets include temporal variables:

* **time of day (tod):** calculated as sequential intervals starting from 1 at midnight, incrementing every 5 min (1-288 for Datasets 1 and 2) or every 15 min (1-96 for Dataset 3),

* **day of the week (dow):** encoded as integers from 1 for Monday to 7 for Sunday,

* **and a stream index (ID):** increasing from 1 to infinity.

The target variable in all datasets represents station occupancy as a percentage (0-100%) of occupied charging piles at each timestamp. While additional factors such as traffic conditions, weather, and holidays may influence station occupancy, the datasets used in this study do not include these variables. Our primary objective is to evaluate the performance of the proposed FL framework rather than to construct an exhaustive predictive model.

To illustrate the heterogeneity and concept drift in these datasets, Fig. 4 presents daily occupancy curves for three randomly selected charging stations from each dataset. The plots exhibit substantial variability across stations, indicating strong non-IID characteristics and clear evidence of target drift. In the Guangzhou and Shenzhen datasets, occupancy patterns vary significantly between stations, with some displaying gradual trends while others experience abrupt shifts, suggesting diverse user behaviors and demand fluctuations. The Paris dataset further demonstrates irregular occupancy fluctuations, with sharp transitions observed in multiple stations, reinforcing the presence of target drift. These findings highlight the non-stationary nature of EV charging behaviors, emphasizing the necessity for adaptive models capable of dynamically adjusting to evolving patterns in real-time forecasting.

## 4.2. Evaluation metrics

This paper evaluates the proposed framework using three distinct real-world datasets representing EV charging stations in Guangzhou, Shenzhen, and Paris. The approach is benchmarked against state-of-the-art baseline algorithms, with performance assessed using three error metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), Mean Absolute Percentage Error (MAPE) which are defined below, where $y_i$ and $y_i$ denote the predicted value and the real value, respectively.
<figure><img src="image_7.png" /><figcaption>Fig. 4. The occupancy curves of sampled charging stations in (A) Guangzhou, (B) Shenzhen, and (C) Paris.</figcaption></figure>

* **MAE (Mean Absolute Error):** Measures the average absolute error. Lower values indicate better accuracy.

$$MAE = \frac{1}{n} \sum_{i=1}^{N} (y_i - y_i)$$

* **MAPE (Mean Absolute Percentage Error):** Measures the average percentage error. Lower values indicate better accuracy.

$$MAPE = \frac{100}{N} \sum_{i=1}^{N} \frac{y_i - y_i}{y_i}$$

* **RMSE (Root Mean Square Error):** Measures the average magnitude of errors. Lower values indicate better accuracy.

$$RMSE = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (y_i - y_i)^2}$$

Moreover, to avoid the serendipity of the experiment for a fair comparison, the experiment runs 10 times, and the averaged performance is utilized as the final result.

## 4.3. Baselines

To evaluate the effectiveness of Fed-PPBC, several baseline FL methods are considered, including advanced frameworks designed to address client heterogeneity in FL. These baselines include FedAvg, FedProx, FedDyn, Elastic, Scaffold, and AFML. The global training process is configured with R = 500 communication rounds, each involving all participating clients. Each client trains locally for one epoch per round, using the Adam optimizer with a learning rate of 10⁻³. A batch size of 32 is employed for local training.

* **FedAvg:** FedAvg is the foundational and most widely used FL algorithm. It updates the global model by averaging the model parameters received from all participating clients after local training.

* **FedProx:** FedProx extends FedAvg by introducing a proximal term into the local objective function. This term regularizes the client updates to mitigate instability caused by diverse data distributions among clients. The regularization coefficient used for FedProx is set to 0.01.

* **FedDyn:** FedDyn incorporates a dynamic regularization term into the local training objective to address data heterogeneity. This mechanism synchronizes client updates with the global training process, improving convergence and stability. The regularization coefficient is fine-tuned, with the optimal value set to 0.1.

* **Elastic:** Elastic aggregation method tackles the challenges of data heterogeneity by dynamically weighting client updates. This ensures that the global model learns stable and consistent patterns while minimizing the adverse effects of updates influenced by highly divergent local data distributions. The damping factor, which controls the degree of smoothing, is set to 0.01.

* **Scaffold:** Scaffold introduces control variates that mitigate the impact of client drift, caused by local updates diverging from the global objective. This is achieved by maintaining and exchanging correction variables between the server and clients, ensuring consistency across local and global updates.

* **AFL:** AFL allows the server to tune the learning rate used by all clients dynamically. This tuning is based on the variability across client updates, enabling AFL to respond swiftly to concept drift while ensuring stable performance in scenarios where no drift occurs.

* **AFML:** AFML integrates asynchronous FL and meta-learning using adaptive reptile Algorithm and weighted aggregation strategy to address data isolation and heterogeneity in IoT systems for CSOP.

To further validate the Fed-PPBC framework, various forecasting models are evaluated, each with unique characteristics and demonstrated effectiveness in addressing time series forecasting challenges.
* **LSTM:** Long Short-Term Memory is a popular recurrent neural network architecture for modeling sequential data. Its capacity to capture long-term dependencies makes it ideal for time series forecasting challenges. The LSTM model used in this work consists of a single LSTM layer with six hidden units, followed by a fully connected layer that generates the prediction. The output of the final time step is connected to a tanh activation function before being transmitted through the fully-connected layer.

* **TSMixer:** TSMixer uses a mixing operation across temporal dimensions to detect complicated patterns in time series data (Chen et al. 2023). It has been found to perform well in predicting tasks, particularly on datasets with significant temporal dynamics. The model has an input projection layer and a single mixer block for regularization (LayerNorm, GELU activation, and dropout = 0.1). It concludes with an output projection layer that generates the prediction based on the latest timestep. The hidden size is set to 6 and the number of mixer blocks is 1.

* **DLinear:** DLinear is a lightweight model for predicting time series with high efficiency (Zeng et al. 2022). By emphasizing on linear decomposition, it successfully handles both trend and seasonal components while being computational efficient. The model consists of an encoder-decoder structure, with the encoder projecting input features into a hidden space using a ReLU activation function. The decoder reconstructs the data before the model executes the regression job based on the previous time step's output. The hidden size is set to 6, and ReLU activation is implemented at both encoder and decoder stages. The final prediction is generated using a fully connected layer.

* **LightTS:** LightTS is designed for time series forecasting with limited resources (Zhang et al. 2022). Its simplicity and efficiency make it ideal for large-scale datasets, allowing for quick and accurate forecasts. The algorithm begins with an embedding layer that projects the input sequence into a hidden space. It then uses a multi-head attention mechanism to capture temporal relationships. The output is processed by a feedforward network with ReLU activations, while training is stabilized using LayerNorm. The model employs dropout for regularization, with the output layer forecasting based on the previous time step. The hidden size is set to 6, with four heads and a single layer.

* **Itransformer:** iTransformer (Liu et al. 2023) applies the principles of transformer architectures to time series data. Its attention method detects global relationships in the data, making it ideal for difficult forecasting jobs. The model starts with an input embedding layer that maps the input sequence to a hidden space. The data goes via a transformer encoder with various layers that use multi-head attention and a feedforward network with dropout to ensure regularization. The hidden size is set to 6, with one transformer layer and four attention heads, making it ideal for detecting global dependencies in complicated time series data.

## 4.4. Implementation details

In this study, two distinct experimental configurations are considered:

### 1. Configuration 1: Guangzhou and Shenzhen Datasets

This experiment uses datasets from Guangzhou and Shenzhen, China, following the evaluation configurations in (Chen et al., 2024), which serves as the latest research applying FL to CSOP. The results from this work are used as benchmarks to validate the performance of the proposed FED-PPBC framework alongside baseline algorithms.

* Training data includes records from 30 stations, covering the period from December 10 to December 31, 2021.

* Testing data comprises the remaining 5 stations, evaluated over the period January 1 to January 7, 2022.

The same training and evaluation configurations as in (Chen et al., 2024) are adopted to ensure consistency and comparability of results. This challenging evaluation setup assesses the model's generalizability by testing its ability to adapt to new stations with unseen data distributions and operational patterns.

### 2. Configuration 2: Paris Dataset

This experiment considers data from all 20 stations in Paris.

* The model is trained using data from all 20 stations, covering the period (July 3–24, 2020).

* Testing is conducted on all the 20 stations participated in model training for the following 7-day period (July 24–August 1, 2020).

The evaluation configurations used in this study plays a crucial role in the overall results. This dual configuration approach provides a comprehensive evaluation of the proposed Fed-PPBC framework across diverse datasets and configurations, ensuring robustness and generalizability of the findings. Although the framework has been validated on other configurations, only those that align with prior studies in the literature, particularly (Chen et al., 2024), are presented to ensure a fair comparison with existing methods.

For Guangzhou and Shenzhen, a challenging evaluation configuration is employed, where the model is trained using 30 stations and tested on 5 new stations not seen during training. This configuration tests the generalizability of the FL model, assessing its ability to adapt to new stations with data that differ in distribution or operational patterns. This test is critical for evaluating Fed-PPBC's performance in real-world, unseen environments.
On the other hand, for Paris dataset, the method is trained using the entire set of available stations, allowing it to predict the Occupancy of upcoming events across all 20 stations participating in training the backbone model.

## 4.5. Hyperparameters tuning

The proposed method, Fed-PPBC, is characterized by several key parameters, including cluster size (m), incremental learning window (n), learning rate (lr), number of epoch (E), and the number of communication rounds (R), and the threshold for drift detection (θ). These parameters belong to the Online phase of the framework, especially for the drift detection, personalized model training, and clustering creation. Proper tuning of these parameters is critical for the effective implementation of Fed-PPBC, as their optimal values are inherently dependent on both the specific dataset and the requirements of the problem being addressed. The selection of these parameters was done by a comprehensive grid search study conducted across all identified parameters. The evaluations in this section involve multiple experimental runs (5 trials) to account for the stochastic nature of the incremental adaptation process. The obtained results are displayed in Fig. 5.

For the lr, values of 10⁻⁶ (a = 0,1,2,3,4) were tested, and lr = 0.1 was identified as optimal, yielding the lowest Mean Squared Error (MSE) with minimal variability. For the number of epochs (E), increasing E up to 25 significantly reduced MSE, with E = 25 achieving the lowest average MSE and narrow variability, while higher values introduced overfitting and variability. Similarly, the optimal number of communication rounds (R) was found to be 5, balancing accuracy and communication efficiency, as increasing R further led to diminishing returns and greater variability. For the drift detection threshold (θ), a range of 0% to 15% was evaluated, with θ = 5% selected as optimal due to its balance of accuracy, stability, and computational efficiency. The data window size (n), representing the most recent samples used for incrementally updating the model, was optimal at n = 5, as larger windows introduced outdated information and reduced adaptation accuracy. Finally, the cluster size (m), representing the drift pattern characteristics, was optimized at m = 3, offering the best trade-off between accuracy and stability, as larger cluster sizes increased MSE and variability.

## 4.6. Generalization across time series forecasting models

In this section, several forecasting models have been employed within the Fed-PPBC framework. The evaluation of time series forecasting models revealed distinct performance patterns. These patterns highlight the strengths and weaknesses of each model under various configurations. The obtained results are presented in Table 2.

In the Guangzhou and Shenzhen datasets (Configuration 1), where the models were trained on a subset of stations and evaluated on unseen stations, the ability to generalize to new data became a critical factor. For both datasets, DLinear and LSTM consistently outperformed the other models, with DLinear slightly outperformed LSTM. These results highlights the robustness of DLinear and LSTM in handling non-IID data distributions typical in FL settings. However, models like ITransform, LightTS, and TSMixer showed reduced performance in both the Guangzhou and Shenzhen datasets, with significantly higher error values, indicating their lower ability to generalize to unseen stations.

<figure><img src="image_8.png" /><figcaption>**Fig. 5.** Grid search results for hyperparameter tuning: A) Learning Rate, B) Number of Epochs, C) Communication Rounds, D) Drift Detection Threshold, E) Cluster Size, F) Updating Data Window Size.</figcaption></figure>
In the Paris dataset (Configuration 2), where the model trained on all participating stations, DLinear demonstrated superior performance with the lowest error values (RMSE = 9.19 × 10⁻²). It was followed by Itransform, which achieved an RMSE of 9.13 × 10⁻², and LightTS, which had an RMSE of 9.33 × 10⁻². In contrast, LSTM showed the highest error metrics among the models, with an RMSE of 11.12 × 10⁻². These results indicate that DLinear outperformed LSTM and the other models in this configuration, suggesting that it is particularly well-suited when tested stations have already participated in the training process.

In conclusion, DLinear emerged as the top performer in the Paris, Guangzhou and Shenzhen datasets. LSTM generally lagged behind DLinear in the case where new stations are tested without participating in the training process. Itransform, LightTS, and TSMixer were consistently outperformed by both DLinear and LSTM, highlighting their limitations in FL tasks involving heterogeneous data. Therefore, DLinear and LSTM are the most suitable models for the Fed-PPBC framework, with DLinear being preferable in both configurations.

## 4.7. Performance comparison (1-step prediction)

The comparative evaluation of the proposed Fed-PPBC method against baseline algorithms, in the presence of data heterogeneity and concept drifts, highlights its superior performance across three datasets: Guangzhou, Shenzhen, and Paris. The experimental evaluations are displayed in Table 3. As mentioned previously, for a fair comparison, the experiment runs 10 times, and the averaged performance is utilized as the final result. Moreover, the results for AFML were adopted from (Chen et al., 2024) to ensure a fair comparison with tested FL methods, following the same experimental configuration as in the reference study. The AFML method could not be applied to the Paris dataset, as the authors did not provide the implementation code, making it impossible to reproduce their method for Paris dataset.

The evaluation is conducted under two distinct configurations, which are, (1) using 30 stations for training, followed by testing on 5 unseen stations, for the Guangzhou and Shenzhen datasets, and (2) all stations participate in the training process, to forecast the occupancy for all the 20 participating stations in the next 7 days. These configurations were specifically designed to assess both the generalization capacity of the FL model and its adaptability to real-world scenarios with non-IID data distributions. The first configuration, implemented for the Guangzhou and Shenzhen datasets, aims to simulate a more realistic FL setting where a model trained on a subset of stations is deployed to make predictions on new, unseen stations. This setup serves as a critical evaluation of the model's generalizability and robustness in real-world applications. The second configuration, using all available training stations for the Paris dataset, evaluates the model's performance across all 20 stations, ensuring high representation of non-IID data and significant concept drifts. This setup is crucial for validating the proposed algorithm's adaptability and superiority under diverse and dynamic conditions, closely mirroring real-world scenarios. The results reveal significant improvements in the performance of Fed-PPBC compared to baseline methods across all datasets and evaluation configurations.

For the Guangzhou dataset, Fed-PPBC achieves an RMSE of 8.13 × 10⁻², MAE of 5.87 × 10⁻², and MAPE of 20.51%, outperforming the next-best method, AFML, which records 10.18 × 10⁻², 8.50 × 10⁻², and 42.47%, respectively. This corresponds to relative improvements of 20.14%, 30.94%, and 51.71%, underscoring Fed-PPBC ability to mitigate heterogeneity and adapt effectively to unseen stations. Similar trends are observed for the Shenzhen dataset, where Fed-PPBC achieves the lowest RMSE (6.24 × 10⁻²), MAE (4.18 × 10⁻²), and MAPE (16.57%), reflecting improvements of 19.69%, 26.92%, and 14.89% over AFML, the closest-performing baseline.

On the Paris dataset, where the model is tested on stations included in training, Fed-PPBC continues to exhibit remarkable performance with an RMSE of 9.19 × 10⁻², MAE of 6.45 × 10⁻², and MAPE of 21.61%, achieving relative improvements of 55.7%, 62.6%, and 51.6%, respectively, compared to next-best method such as Scaffold and FedProx. Traditional methods show higher error values across all datasets, demonstrating their limitations in handling concept drift and client heterogeneity.

In conclusion, the comparative analysis establishes Fed-PPBC as a superior approach for FL in time series forecasting, particularly in environments where data heterogeneity and concept drift are prevalent. The results underscore the importance of personalization and incremental adaptation in achieving significant improvements in forecasting accuracy and model generalizability, which are essential for real-world deployment.

<table><caption>**Table 2**
The performance of Fed-PPBC with various time series forecasting models across Guangzhou, Shenzhen, and Paris datasets.</caption><thead><tr><th rowspan="2"></th><th colspan="3">Guangzhou</th><th colspan="3">Shenzhen</th><th colspan="3">Paris</th></tr><tr><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th></tr></thead><tbody><tr><td>LSTM</td><td><strong>8.16</strong></td><td><strong>5.94</strong></td><td><strong>21.46</strong></td><td><strong>6.28</strong></td><td><strong>4.2</strong></td><td><strong>16.66</strong></td><td><strong>11.12</strong></td><td><strong>6.66</strong></td><td><strong>22.32</strong></td></tr><tr><td>Dlinear</td><td><strong>8.13</strong></td><td><strong>5.87</strong></td><td><strong>20.51</strong></td><td><strong>6.24</strong></td><td><strong>4.18</strong></td><td><strong>16.57</strong></td><td><strong>9.19</strong></td><td><strong>6.45</strong></td><td><strong>21.61</strong></td></tr><tr><td>Itransform</td><td>9.13</td><td>6.78</td><td>24.33</td><td>7.71</td><td>5.51</td><td>23.51</td><td>10.13</td><td>7.33</td><td>24.28</td></tr><tr><td>LightTS</td><td>9.33</td><td>6.97</td><td>25.36</td><td>7.62</td><td>5.40</td><td>22.96</td><td>10.07</td><td>7.32</td><td>24.61</td></tr><tr><td>TSMixer</td><td>12.16</td><td>9.24</td><td>35.52</td><td>12.07</td><td>9.16</td><td>34.52</td><td>12.31</td><td>9.17</td><td>29.92</td></tr></tbody></table>
<table><caption>**Table 3**
Performance comparison of federated learning methods across Guangzhou, Shenzhen, and Paris datasets. Best results in bold; second best underlined.</caption><thead><tr><th rowspan="2"></th><th colspan="3">Guangzhou</th><th colspan="3">Shenzhen</th><th colspan="3">Paris</th></tr><tr><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th><th>RMSE<br>(×10<sup>-2</sup>)</th><th>MAE<br>(×10<sup>-2</sup>)</th><th>MAPE<br>(%)</th></tr></thead><tbody><tr><td>FedAvg</td><td>18.03</td><td>15.26</td><td>76.37</td><td>22.37</td><td>18.99</td><td>106.5</td><td>20.52</td><td>16.72</td><td>42.44</td></tr><tr><td>FedProx</td><td>18.39</td><td>15.60</td><td>78.94</td><td>22.89</td><td>19.55</td><td>112.6</td><td>20.30</td><td>16.79</td><td><strong>42.25</strong></td></tr><tr><td>Elastic</td><td>19.03</td><td>15.87</td><td>83.04</td><td>22.75</td><td>19.41</td><td>111.8</td><td>20.28</td><td>16.55</td><td>42.78</td></tr><tr><td>FedDyn</td><td>20.04</td><td>16.47</td><td>73.73</td><td>22.38</td><td>18.40</td><td>88.11</td><td>20.30</td><td>17.47</td><td>42.93</td></tr><tr><td>Scaffold</td><td>18.58</td><td>15.47</td><td>78.56</td><td>22.96</td><td>19.57</td><td>108.08</td><td>20.43</td><td>16.82</td><td>42.42</td></tr><tr><td>AFL</td><td>18.35</td><td>15.24</td><td>78.57</td><td>22.43</td><td>20.21</td><td>116.7</td><td>20.40</td><td>16.72</td><td>42.63</td></tr><tr><td>AFML</td><td><strong>10.18</strong></td><td><strong>8.50</strong></td><td><strong>42.47</strong></td><td><strong>7.77</strong></td><td><strong>5.72</strong></td><td><strong>19.47</strong></td><td></td><td></td><td></td></tr><tr><td>Fed-PPBC</td><td><strong>8.13</strong></td><td><strong>5.87</strong></td><td><strong>20.51</strong></td><td><strong>6.24</strong></td><td><strong>4.18</strong></td><td><strong>16.57</strong></td><td><strong>9.19</strong></td><td><strong>6.45</strong></td><td><strong>21.61</strong></td></tr><tr><td>Improvements</td><td>20.14%</td><td>30.94%</td><td>51.71%</td><td>19.69%</td><td>26.92%</td><td>14.89%</td><td>55.7%</td><td>62.6%</td><td>51.6%</td></tr></tbody></table>

<figure><img src="image_9.png" /><figcaption>**Fig. 6.** Comparative analysis of Fed-PPBC and baseline algorithms over forecast horizons.</figcaption></figure>

## 4.8. Performance comparison (multi-step prediction)

This section presents a comparative evaluation of the proposed Fed-PPBC framework against leading federated learning baselines, based on multi-step prediction performance. The evaluation uses the same evaluation period described in previous sections (7-day); however, instead of single-step forecasting, models are now assessed over multi-step prediction horizons (30, 60, 120, and 240 min). Each forecast horizon corresponds to a fixed number of future steps—e.g., 30 min equals 6 steps for Guangzhou and Shenzhen (with 1 step = 5 min), and 2 steps for Paris (with 1 step = 15 min). RMSE is computed as the average across all predicted steps within each horizon. Forecasting accuracy is visualized using RMSE curves in Fig. 6, where each method is represented by a separate line to illustrate its performance trajectory across time.

Across all datasets, the RMSE curves demonstrate that Fed-PPBC consistently outperforms baseline algorithms at every forecast step. For short-term horizons (up to 60 min), Fed-PPBC maintains significantly lower error rates, highlighting its ability to capture immediate temporal dynamics. The slight underperformance of Fed-PPBC at longer horizons (e.g., 240 min) in Guangzhou and Shenzhen is likely due to a combination of error accumulation and catastrophic forgetting. These are inherent trade-offs in continual learning systems that prioritize adaptability, especially in highly dynamic, non-IID environments. The Paris dataset demonstrates minimal RMSE degradation over time because the model was trained and tested on the same stations, reducing the impact of distribution shifts and unseen dynamics. This contrasts with Guangzhou and Shenzhen, where generalization to new stations introduces more error accumulation, particularly for longer forecasting horizons.

These visual comparisons reinforce the advantages of Fed-PPBC's design. By incorporating personalized client clustering and incremental model updates, it adapts effectively to dynamic, non-IID data. Whether evaluated on unseen stations (Guangzhou and Shenzhen) or stations seen during training (Paris), the method consistently delivers superior predictive accuracy. The plotted trends confirm Fed-PPBC as a robust, adaptive solution for multi-horizon forecasting in federated and privacy-sensitive environments. However, to further enhance performance especially over longer forecasting horizons, it is essential to mitigate catastrophic forgetting, which remains a key challenge in continual and multi-step learning. Addressing this limitation can lead to more stable representations and improved accuracy as the prediction horizon increases.

## 5. Conclusion

This study presents a robust FL framework for time series forecasting in streaming environments, with a focus on CSOP. By addressing the challenges of concept drift and statistical heterogeneity, the proposed framework demonstrates the capa-
bility to adaptively personalize client models while maintaining high accuracy and computational efficiency. The comparative evaluation against state-of-the-art algorithms highlights significant performance improvements in terms of RMSE, MAE, and MAPE across diverse city datasets, showcasing the robustness and adaptability of the framework under varying conditions.

A key innovation lies in the integration of incremental learning, drift detection, and clustering-based personalization, which collectively enhance the framework's ability to manage non-IID client data and dynamic patterns in distributed environments. Several time series forecasting models were tested within the Fed-PPBC framework, with the DLinear method consistently outperforming others across both configurations. These configurations included: (1) training on 30 stations and testing on 5 unseen stations for the Guangzhou and Shenzhen datasets, and (2) using all available training data to forecast events for 20 stations in the Paris dataset, ensuring a high presence of non-IID data and concept drift. Moreover, the framework consists of several crucial parameters, including the learning rate, drift detection threshold, and incremental adaptation window size, which have been intensively tuned in this study to maximize performance under diverse conditions. The lightweight design of the framework ensures efficient communication, making it well-suited for deployment in real-time applications. By providing accurate forecasts of station availability, the framework contributes to optimizing resource allocation, reducing wait times, and improving user satisfaction in smart cities.

Beyond EV infrastructure, the versatility of the framework positions it as a general solution for any time series forecasting problem in streaming mode. Its modular architecture allows seamless adaptation to various domains, including renewable energy systems, traffic flow prediction, and healthcare monitoring, where dynamic, distributed, and real-time data processing is critical. Future work will focus on extending the framework to incorporate advanced drift adaptation techniques, such as *meta*-learning and self-supervised learning, to further enhance its generalizability. Additionally, exploring mechanisms for automated hyperparameter tuning and real-time anomaly detection could refine its performance and scalability. Additionally, validating the Fed-PPBC approach using different dataset types will help assess its broader applicability and effectiveness across diverse use cases.

**Declaration of competing interest**

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

**CRediT authorship contribution statement**

**Khaled Hallak:** Writing – review & editing, Writing – original draft, Visualization, Validation, Software, Resources, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. **Oudom Kem:** Writing – review & editing, Visualization, Validation, Supervision, Resources, Project administration, Methodology, Investigation, Conceptualization.

**Acknowledgments**

This work was conducted in the framework of the AI-NRGY project (grant No: ANR-22-PETA-0004) funded by the PEPR TASE program of France 2030. The authors declare that the contents of this article has not been published previously. All the authors have contributed to the work described, read and approved the contents for publication in this journal. All the authors have no conflict of interest with the funding entity and any organization mentioned in this article in the past three years that may have influenced the conduct of this research and the findings. All the authors have been certified by their respective organizations for human subject research.

**REFERENCES**

Acar, D.A.E., Zhao, Y., Navarro, R.M., Mattina, M., Whatmough, P.N., Saligrama, V., 2021. Federated Learning Based on Dynamic Regularization. https://doi.org/10.48550/ARXIV.2111.04263.

Aghsaee, R., Hecht, C., Schwinger, F., Figgener, J., Jarke, M., Sauer, D.U., 2023. Data-driven, short-term prediction of charging station occupation. Electricity 4, 134–153. https://doi.org/10.3390/electricity4020009.

Bikcora, C., Refa, N., Verheijen, L., Weiland, S., 2016. Prediction of availability and charging rate at charging stations for electric vehicles. In: 2016 International Conference on Probabilistic Methods Applied to Power Systems (PMAPS). Presented at the 2016 International Conference on Probabilistic Methods Applied to Power Systems (PMAPS), pp. 1–6. https://doi.org/10.1109/PMAPS.2016.7764216.

Canonaco, G., Bergamasco, A., Mongelluzzo, A., Roveri, M., 2021. Adaptive Federated Learning in Presence of Concept Drift. In: 2021 International Joint Conference on Neural Networks (IJCNN). Presented at the 2021 International Joint Conference on Neural Networks (IJCNN), IEEE, Shenzhen, China. Pp. 1–7. https://doi.org/10.1109/IJCNN52387.2021.9533710.

Chen, D., Hu, J., Tan, V.J., Wei, X., Wu, E., 2023. Elastic Aggregation for Federated Optimization. In: 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Presented at the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, Vancouver, BC, Canada. Pp. 12187–12197. https://doi.org/10.1109/CVPR52729.2023.01173.

Chen, Q., Huang, K., Ferguson, M.R., 2022. Capacity expansion strategies for electric vehicle charging networks: Model, algorithms, and case study. Nav. Res. Logist. NRL 69, 442–460. https://doi.org/10.1002/nav.22027.

Chen, Q., Li, H., You, L., Qu, H., Abdelmoniem, A.M., Yuen, C., 2024. AFML: An asynchronous federated meta-learning mechanism for charging station occupancy prediction with biased and isolated data. IEEE Trans. Big Data 1–16. https://doi.org/10.1109/TBDATA.2024.3484651.

Chen, S.-A., Li, C.-L., Yoder, N., Arik, S.O., Pfister, T., 2023. TSMixer: An All-MLP Architecture for Time Series Forecasting. https://doi.org/10.48550/ARXIV.2303.06053.
Douaidi, L., Senouci, S.-M., El Korbi, I., Harrou, F., 2023. Predicting electric vehicle charging stations occupancy: a federated deep learning framework. In: 2023 IEEE 97th Vehicular Technology Conference (VTC2023-Spring). Presented at the 2023 IEEE 97th Vehicular Technology Conference (VTC2023-Spring), pp. 1-5. https://doi.org/10.1109/VTC2023-Spring57618.2023.10199832.

Fescioglu-Unver, N., Yıldız Aktaş, M., 2023. Electric vehicle charging service operations: A review of machine learning applications for infrastructure planning, control, pricing and routing. Renew. Sustain. Energy Rev. 188, 113873. https://doi.org/10.1016/j.rser.2023.113873.

Gruosso, G., Mion, A., Storti Gajani, G., 2020. Forecasting of electrical vehicle impact on infrastructure: Markov chains model of charging stations occupation. eTransportation 6, 100083. https://doi.org/10.1016/j.etran.2020.100083.

Hochreiter, S., Schmidhuber, J., 1997. Long Short-Term Memory. Neural Comput. 9, 1735-1780. https://doi.org/10.1162/neco.1997.9.8.1735.

Karimireddy, S.P., Kale, S., Mohri, M., Reddi, S.J., Stich, S.U., Suresh, A.T., 2019. SCAFFOLD: Stochastic Controlled Averaging for Federated Learning. https://doi.org/10.48550/arXiv.1910.06378.

Li, T., Sahu, A.K., Zaheer, M., Sanjabi, M., Talwalkar, A., Smith, V., 2018. Federated Optimization in Heterogeneous Networks. https://doi.org/10.48550/ARXIV.1812.06127.

Liu, Y., Hu, T., Zhang, H., Wu, H., Wang, S., Ma, L., Long, M., 2023. iTransformer: Inverted Transformers Are Effective for Time Series Forecasting. https://doi.org/10.48550/ARXIV.2310.06625.

Luo, R., Zhang, Y., Zhou, Y., Chen, H., Yang, L., Yang, J., Su, R., 2021. Deep Learning Approach for Long-Term Prediction of Electric Vehicle (EV) Charging Station Availability. In: 2021 IEEE International Intelligent Transportation Systems Conference (ITSC). Presented at the 2021 IEEE International Intelligent Transportation Systems Conference (ITSC), pp. 3334-3339. https://doi.org/10.1109/ITSC48978.2021.9564633.

Luo, Y., Yin, L., Bai, W., Mao, K., 2020. An Appraisal of Incremental Learning Methods. Entropy 22, 1190. https://doi.org/10.3390/e22111190.

Ma, X., Zhu, J., Lin, Z., Chen, S., Qin, Y., 2022. A state-of-the-art survey on solving non-IID data in Federated Learning. Future Gener. Comput. Syst. 135, 244-258. https://doi.org/10.1016/j.future.2022.05.003.

Matanov, N., Zahov, A., 2020. Developments and Challenges for Electric Vehicle Charging Infrastructure. In: 2020 12th Electrical Engineering Faculty Conference (BulEF). Presented at the 2020 12th Electrical Engineering Faculty Conference (BulEF), IEEE, Varna, Bulgaria. Pp. 1-5. https://doi.org/10.1109/BulEF51036.2020.9326080.

McMahan, H.B., Moore, E., Ramage, D., Hampson, S., Arcas, B.A. y, 2016. Communication-Efficient Learning of Deep Networks from Decentralized Data. https://doi.org/10.48550/ARXIV.1602.05629.

Motz, M., Huber, J., Weinhardt, C., 2021. Forecasting bev charging station occupancy at work places. https://doi.org/10.18420/INF2020_68.

Ostermann, A., Fabel, Y., Ouan, K., Koo, H., 2022. Forecasting charging point occupancy using supervised learning algorithms. Energies 15, 3409. https://doi.org/10.3390/en15093409.

Phillips, M., 2018. International data-sharing norms: from the OECD to the General Data Protection Regulation (GDPR). Hum. Genet. 137, 575-582. https://doi.org/10.1007/s00439-018-1919-7.

Sao, A., Tempelmeier, N., Demidova, E., 2021. Deep Information Fusion for Electric Vehicle Charging Station Occupancy Forecasting. In: 2021 IEEE International Intelligent Transportation Systems Conference (ITSC). Presented at the 2021 IEEE International Intelligent Transportation Systems Conference (ITSC), IEEE, pp. 3328-3333. https://doi.org/10.1109/ITSC48978.2021.9565097.

Wang, T., Tang, T.-Q., Huang, H.-J., Qu, X., 2021. The adverse impact of electric vehicles on traffic congestion in the morning commute. Transp. Res. Part C Emerg. Technol. 125, 103073. https://doi.org/10.1016/j.trc.2021.103073.

Xiang, Q., Zi, L., Cong, X., Wang, Y., 2023. Concept drift adaptation methods under the deep learning framework: a literature review. Appl. Sci. 13, 6515. https://doi.org/10.3390/app13116515.

Zeng, A., Chen, M., Zhang, L., Xu, Q., 2022. Are Transformers Effective for Time Series Forecasting? https://doi.org/10.48550/ARXIV.2205.13504.

Zhang, T., Zhang, Y., Cao, W., Bian, J., Yi, X., Zheng, S., Li, J., 2022. Less is more: fast multivariate time series forecasting with light sampling-oriented MLP structures. https://doi.org/10.48550/arXiv.2207.01186.

[dataset] Jan, A., Berhaut, P., Goude, Y., Amara-Ouali, Y., Smarter mobility data challenge. https://gitlab.com/smarter-mobility-data-challenge/tutorials.

[dataset] Chen, Q., Li, H., You, L., Qu, H., Abdelmoniem, A.M., Yuen, C., The datasets of charging station occupancy prediction. https://github.com/IntelligentSystemsLab/AFML/tree/main/datasets.