Abstract
Mitigating cybersecurity risk in electric vehicle (EV) charging demand forecasting plays a crucial role in the safe operation of collective EV chargings, the stability of the power grid, and the cost-effective infrastructure expansion. However, existing methods either suffer from the data privacy issue and the susceptibility to cyberattacks or fail to consider the spatial correlation among different stations. To address these challenges, a federated graph learning approach involving multiple charging stations is proposed to collaboratively train a more generalized deep learning model for demand forecasting while capturing spatial correlations among various stations and enhancing robustness against potential attacks. Firstly, for better model performance, a Graph Neural Network (GNN) model is leveraged to characterize the geographic correlation among different charging stations in a federated manner. Secondly, to ensure robustness and deal with the data heterogeneity in a federated setting, a message passing that utilizes a global attention mechanism to aggregate personalized models for each client is proposed. Thirdly, by concerning cyberattacks, a special credit-based function is designed to mitigate potential threats from malicious clients or unwanted attacks. Extensive experiments on a public EV charging dataset are conducted using various deep learning techniques and federated learning methods to demonstrate the prediction accuracy and robustness of the proposed approach.
Introduction
As electric vehicles (EVs) become a cornerstone of sustainable transportation, accurately predicting their charging demand is vital for grid stability and infrastructure planning. However, traditional centralized forecasting faces significant barriers. Data privacy regulations often prevent stations from sharing raw transaction data. Furthermore, the inherent heterogeneity of demand patterns across different locations—such as a shopping mall versus a residential suburb—makes "one-size-fits-all" global models ineffective. Finally, the decentralized nature of Federated Learning (FL) makes systems vulnerable to "poisoning attacks," where a single compromised station can ruin forecasts for the entire network.
The PFGL Framework
To address these challenges, we propose Personalized Federated Graph Learning (PFGL). This framework allows multiple charging stations to collaboratively train a forecasting model without sharing sensitive raw data, while explicitly accounting for spatial relationships and security threats.
PFGL consists of three core components:
- Spatial-Temporal GNNs: Unlike standard models that treat stations as isolated points, PFGL uses Graph Neural Networks to model geographic and temporal relationships. This captures how demand surges at one station might ripple to nearby locations.
- Personalized Aggregation: Instead of simple averaging (FedAvg), the server uses a global attention mechanism. This allows each station to receive a "personalized" global model that prioritizes information from other stations with similar demand patterns.
- Credit-Based Robustness: To fight cyberattacks, a credit-based function measures the similarity between model updates. If a station sends suspicious or noisy updates—indicating a potential False Data Injection attack—the system assigns it a low credit score, neutralizing its impact on the network.
Experimental Setup
The framework was evaluated using the Palo Alto EV charging dataset, containing transaction records from eight stations in California from 2018 to 2020. The data was discretized into 30-minute intervals, providing nearly 35,000 entries per station. To handle uncertainty, the model utilizes Multi-output Quantile Regression (MQNN), providing a confidence interval rather than a single point estimate.
Key Results
PFGL was tested against six baselines, including standard LSTMs and state-of-the-art federated GNNs (CNFGNN). The results demonstrate that PFGL consistently achieves superior accuracy and resilience.
As shown in the table above, PFGL achieved the lowest Quantile Loss (QS) across almost all stations, particularly in long-term (6-step) forecasting. Beyond accuracy, the model remained stable under three types of cyberattacks—Parameter Flipping, Scaling, and Gaussian Noise—where standard federated models saw error rates skyrocket. By treating maliciousness as an extreme form of data heterogeneity, the attention mechanism inherently gains the ability to ignore compromised clients.
Conclusion and Future Work
PFGL represents a significant advancement in secure, private, and accurate EV demand forecasting. By leveraging spatial-temporal correlations and a robust credit-based attention mechanism, it provides a viable path for grid operators to manage the complexities of modern EV infrastructure. Future research will focus on improving algorithmic scalability for city-wide deployments and exploring dynamic graph structures that adapt to real-time traffic conditions.
Summary updated