Abstract
Timely warning of battery faults can improve the safety of electric vehicles, aiding the decarbonization of both transportation and power sectors. Although machine learning holds great promise for accurate fault detection, its practical deployment is hindered by the need to gather adequate data, which generally belongs to various owners and exhibits significant heterogeneity. Here, we propose a personalized federated learning framework that allows diverse data owners to cooperatively develop fault detection models without sharing data. In addition, our approach empowers data owners to customize their detection models, ensuring robust performance across diverse data distributions. A large real-world battery charging dataset is gathered for the validation, encompassing charging sequences collected from over 10,000 vehicles across 30 authentic charging stations. The dataset spans a wide range of vehicle and battery types, as well as voltage and power levels. Results indicate that our method outperforms state-of-the-art federated learning approaches in detection performance. Moreover, it exhibits robust generalization, facilitating swift adaptation to new participants. Additional validations confirm its robustness to data heterogeneity and variations in the input data window length. This work underscores the potential for privacy-preserving cooperation among data owners to improve battery safety management, which can result in significant economic and social advantages.
Similar content being viewed by others
Introduction
Electric vehicles (EVs) powered by rechargeable batteries are playing a prominent role towards the goal of carbon neutrality1. The EV markets are experiencing remarkable expansion, with sales exceeding 10 million in 2022. This wide utilization of EVs is anticipated to avert approximately 700 million tons of CO2-equivalents in emissions in 20302. A critical challenge faced by current EVs is battery safety3, where battery thermal runaway significantly risks the safety of EV users as it spreads quickly and cannot be easily put off4. Identifying the battery security issue early can prevent dangerous failures while optimizing battery performance and lifespan. This safety assurance boosts consumer confidence in EVs, speeding up their adoption and enabling a faster transition away from fossil fuel-powered vehicles in the transportation sector5.
Many research efforts have been devoted to developing battery fault warning methods, which can be divided into physical model-based and machine learning methods6. Physical model-based methods attempt to develop physical models to describe battery behaviors in the presence of different types of faults. The similarity between model simulation and measured signals can thus be used for fault warning7. However, challenges in the present battery models, such as missing physics and imprecise parameterization, can risk the performance of physical model-based fault warning. Meanwhile, current cell models are not easy to extend to battery packs, which comprise thousands of cells of certain inconsistencies. Machine learning methods constitute a highly efficient and scalable alternative8. Regardless of battery chemistries or system configuration, machine learning methods can be established after being trained on large amounts of data. Battery faults caused by design defects, manufacturing deviations, and improper usage, such as charging capacity abnormalities9, internal short-circuits10, external short-circuits11, lithium plating12, and over-charging13, manifest as abnormal curves in charging data, enabling their effective detection using machine learning approaches. In recent studies, high detection accuracy has been reported based on laboratory-simulated battery faults using various machine learning algorithms, such as Gaussian process regression14, support vector machine15, random forests16, and neural networks17,18. Given substantial real-world data for training, deep learning techniques have achieved attractive performance for EV-level fault warning19,20. Zhang et al.21 conducted a large fault warning study using long-term charging data from 347 EVs of three brands, where an autoencoder comprising recurrent neural networks (RNNs) was successfully trained to accurately detect faults in EV batteries.
However, one critical challenge of machine learning applications is the data privacy problem. Sharing the sensitive operational battery management system (BMS) data with third-party service providers raises privacy and proprietary concerns. Many regions impose strict regulations on data sharing, limiting its practical use in collaborative fault warning frameworks. Secondly, not all vehicles transmit BMS data to centralized original equipment manufacturer (OEM) servers in real time. Besides, single EV has limited computing resources, which cannot support the computing burden of machine learning approaches. And most EV drivers are understandably reluctant to undergo frequent battery inspections due to the associated costs and time commitments. As a result, a significant number of EV batteries remain uninspected for extended periods, substantially increasing the risk of fire and explosion.
Therefore, in this work, to boost the high performance of machine learning into EV battery fault warning in real-environment operation, we propose a generic EV battery fault warning method based on realistic data collected from numerous charging stations. Charging stations are mandatory touchpoints for all EVs, ensuring consistent data availability regardless of the vehicle's connectivity capabilities. More importantly, since charging stations can accumulate charging data of various EVs, they undoubtedly provide representative real-world data to train fault warning models. As such, the resulting warning model can timely inform EV users of underlying risks, which may not be detected by EV's own BMSs. Our approach focuses on enabling cross-OEM interoperability, a key requirement for stakeholders such as charging networks, energy providers, and independent maintenance services that cannot access proprietary BMS data streams directly. Rather than replacing OEM-level BMS analytics, our framework serves as a supplementary solution for cases where BMS data is unavailable, such as aftermarket diagnostics and third-party fleet management.
In this work, we collect a large spectrum of real-world EV charging data from 30 charging stations. The dataset contains 21,175 pieces of charging data with 1,547,432 sampling points, covering 10,154 EVs with behaviors of EVs and great data distribution discrepancies among different charging stations. Specifically, huge uncertainties in battery types, EV types, charging voltage and power levels, state of health (SOH), and state of charge (SOC) of these charging data pose significant challenges to fault warning. Furthermore, the discrepancy in the data distributions among these charging stations is mainly due to data amount, normal-to-fault data ratios, and the distribution of battery types. These characteristics reflect a more complex real environment and are not considered in existing battery fault warning studies.
However, current studies on data-driven fault warning, which essentially demand long-term usage data from one or several types of EVs, are difficult to exhibit high performance in this real-environment dataset. In practice, EV battery systems entail significant diversity in many aspects, including battery chemistry, states, degradation levels, system configuration, operational condition, and historical usage22. Therefore, fault warning methods trained on a limited number of EVs are inevitably challenging to generalize to various EVs operating in real-world environments. Furthermore, even vast EV charging data are generated from millions of EVs every moment, and these distributed data belong to different owners. Hence, individual data owners, such as charging station operators themselves, might not have comprehensive training data due to their station locations or operating history, which is generally revealed by the biased data distribution and limited number of fault data.
To overcome these issues, it is essential to fuse as much data as possible for training. However, sharing data among these owners is also infeasible due to the conflict of interests. Hence, a collaborative and privacy-preserving approach is required to leverage data from multiple owners, necessitating the application of federated learning. And the different data distributions of data owners imply their demand for personalized models rather than one shared model. Therefore, we propose a personalized federated learning based fault warning framework, enabling a privacy-preserving way for the collaboration of data owners while producing fault warning models customized for each data owner. Federated learning, as a privacy-preserving machine learning framework, has emerged as a promising solution in other privacy-sensitive fields23,24,25. By federated learning, machine learning models can be collaboratively trained by a group of data owners without sharing their original training data. Hence, data privacy is retained while achieving the goal of training the model with more data.
There are already some studies using federated learning in the context of battery management. References26,27,28 employed vanilla federated learning approach for battery fault diagnosis. In refs. 29,30,31, federated learning based battery SOH forecasting methods in the decentralized manner were proposed, where each distributed client utilizes a long short-term memory (LSTM) based sequence-to-sequence (seq2seq) predictive method to perform the forecasting of SOH. References32 and33 proposed federated battery prognosis, which distribute the processing of battery standard current and voltage time usage data in a privacy-preserving manner, offering the paradigm shift for battery remaining useful life (RUL) prediction. In ref. 34, a federated learning based retired battery sorting method was proposed, which classifies the type of retired batteries with high accuracy. In ref. 35, a federated learning framework was proposed for SOC estimation to improve the efficiency of data collaboration while addressing data privacy and security issues. Reference36 integrated federated learning, convolutional neural network (CNN), and Fourier neural network (FNN) to establish a stacking method for battery capacity prediction.
Compared with these approaches, the main advantages of the proposed approach lie on two points. At first, existing studies focus on the privacy-preserving collaboration, ignoring the customization needs of data owners. In contrast, the personalization mechanism of our approach allows the customized local models for each data owner. Each data owner can have distinct model parameters to adapt to its own data distribution, leading to significant improvement in the performance and generalization. Secondly, another distinctive advantage against existing methods is that our method can rapidly generalize to new data owners who did not participate into the federated training process. By a very fast tuning, our method can achieve high fault warning performance for new data owners while not influencing existing participants.
In contrast to two state-of-the-art approaches, federated averaging (Fedavg) and federated averaging with proximal term (FedProx), our method achieves 7.12%−8.73%, 9.75%−18.07%, 10.30−13.88 priority in accuracy (10), fault recall rate (11), and f 1 index (12), respectively. Besides, for new data owners, our method shows 6.13%−32.97% improvement in fault recall rate, and keeps robust for different normal-to-fault data ratios, data types, and data window sizes. Finally, the presented approach is able to obtain an additional economic benefit of 7.89 million Chinese yuan (CNY) for EVs in this dataset by avoiding severe fault damage, and the interpretability of our method is also discussed.
To sum up, the main contributions are listed as follows:
(1) A realistic EV charging dataset is collected and released, which includes 21,175 pieces of charging data with 1,547,432 sampling points from 30 charging stations, covering 10,154 EVs with various types of batteries. Collected by the sensors in the charging station side, this dataset contains the charging curves of voltage, current, power, temperature, SOC, and so on.
(2) We propose a personalized federated learning framework for EV battery fault detection, enabling privacy-preserving collaboration among data owners while generating customized fault warning models tailored to individual data distributions. This approach achieves the coordination of data owners, eliminating the need for raw data sharing.
(3) The personalization property of our method allows each data owner to have distinct model parameters to adapt to its own data distribution, leading to significant improvement in the performance and generalization of fault warning methods. Besides, it can quickly accommodate new data owners who are willing to join into the federation after the completion of normal federated training with data owners.
Results
Data collection
An EV charging dataset covering the period between October 2020 and October 2023 was collected from 30 real public EV charging stations, which are operated by Shenzhen Auto Electric Power Plant Co., Ltd (Autosun), a leading company in EV Mega-Watt charging technology solution with a 250 MW public EV charging network in China. The dataset contains 21,175 pieces of EV charging data with 1,547,432 sampling points, covering 10,154 EVs that comprise various types of batteries. Each piece of charging data includes charging current, voltage, and power at a 1 min time interval. Depending on the region of charging stations, this dataset is divided into 8 data owners, each of whom has the intention to train a better fault warning model but is not willing to share their data due to business interests. Compared to battery data collected from laboratory tests or onboard BMS37, real-world EV charging data has significant differences.
(1) Limited battery information: The charging stations can only collect limited EV battery information. For example, EV driving distance21 and cell voltages, which have been extensively used for battery fault warning in the literature, are absent in the collected charging data. In addition, few historical data are stored for a single EV, thereby the detection model has to rely only on current charging data to detect faults.
(2) High data heterogeneity: The charging stations serve various types of EVs, which have different battery systems, management strategies, and usage history. Therefore, battery states, degradation levels, charging protocols, and power demand can vary significantly. As a result, the charging curves in the dataset exhibit dissimilar characteristics, and mixing these data into a fault warning method may be a challenge. For example, we observe five dominant battery types, including LiFePO4 (LFP), LiNiMnCoO2 (NMC), LiMn2O4 (LMO), LiCoO2 (LCO), Li polymer (LiPo), and their amounts are highly imbalanced, as illustrated in Fig. 1a. Detailed charging curves of different battery types shown in Supplementary Notes 1 and 2 also vary significantly.
a The overall distribution of battery types, where LFP, NMC, LMO, LCO and LiPo account for 62.02%, 36.51%, 1.21%, 0.19% and 0.07%, respectively. b The detailed distribution of battery types in 8 owners. c The probability distribution of the averaged voltage of all charging sequences. d The probability distribution of the averaged power of all charging sequences. e The number of normal and faulty battery data. f The performance of local training, where the fault recall rate refers to how many fault data are detected w.r.t. total fault data. In the local training, each data owner trains its own local Transformer model (see “Methods'') only by its own data.
(3) High inconsistency between data owners: Beyond the inherent variability in battery charging data, the data stored by various data owners exhibit significant inconsistency, caused by their distinct geographical locations and operational histories. Figure 1b–d illustrates the variations among data owners regarding battery type, charging voltage, and power.
More importantly, since battery faults are intrinsically rare, some data owners may not have sufficient fault samples. As shown in Fig. 1e, owners 2, 5, 6, and 8 only have 40, 16, 6, and 50 fault samples, respectively. Even for the two main battery types, LFP and NMC, owner 2 only possesses 4 NMC fault samples, while owners 5, 6 only have 1 LFP fault samples.
Framework overview
In this work, we introduce a heterogeneous federated learning approach designed to collaboratively create distinct fault warning models for various data owners while ensuring their data privacy. As illustrated in Fig. 2 and Supplementary Note 3, our approach primarily consists of a hyper-model located on the central server and some local fault warning models at data owners. While all local models have the same structural design, they operate with distinct parameters produced by the central hyper-model. The training process for these detection models is iterative, involving both local and global training phases.
The top part represents the central server, which uses a hyper-model to generate customized weight parameters for each local model. The bottom part is numerous data owners, where each data owner possesses some charging stations and a local fault warning model. The flags of 1–5 refer to five steps: ① (blue wide arrow in the cloud) initiating local models, and generating their model parameters through a hyper-model by data owner embedding vectors; ② (green narrow arrows from top to bottom) distributing the model parameters to each data owner through wireless communication; ③ (self-loop arrows with multiple colors) implementing local training to update the parameters of local model only by the data of this owner; ④ (green narrow lines from bottom to top) delivering the changes of parameters of the local model to the central server; ⑤ (purple narrow arrow in the cloud) updating the parameters of hyper-model according to the gradient of the received parameter changes of local model.
Model initialization (step ① in Fig. 2): At the start of federated learning, both a hyper-model and some local models are set up on the central server. Subsequently, the parameters of the fault warning model are distributed to all data owners.
Local training of detection models (steps ②-③ in Fig. 2): The local detection models undergo an update via backpropagation utilizing the local data of each owner. Afterwards, the updated model parameters, rather than the local data itself, are transmitted to the central server, thereby maintaining data privacy38.
Global training of hyper-model (steps ④-⑤ in Fig. 2): The hyper-model is designed to enable knowledge sharing and model personalization among data owners. Specifically, each data owner is characterized by an embedding vector that is used as the input for the hyper-model to generate the weight parameters of local detection models. Throughout the global training stage, the server refines the hyper-model by backpropagation according to the gradient of the parameters change of local models. Subsequently, the refined hyper-model produces updated parameters for each local model, which are dispatched to data owners for the next-round local training. After multiple rounds of iterations, the hyper-model reaches convergence, which allows for the creation of customized weights for local models belonging to different owners. These local models can subsequently be implemented at data owner sides for real-time fault warning.
Efficient integration of new data owners: With the rapid expansion of EVs, it is likely that new data owners want to participate into the federation framework after the completion of prior local and global iterations. Starting a new federated training from scratch in such scenarios is not advisable due to the costs imposed on both the server and data owners. Our approach can swiftly accommodate these new data owners without impacting the existing ones. Upon the arrival of new data owners, our method only updates their embedding vectors, leaving the weight parameters of the hyper-model unchanged. Consequently, the incorporation of new data owners into the training is rapid and does not affect data owners who were trained earlier.
We design the hyper-model by several blocks of linear neural network layers. One basic block of linear layers is used to process the embedding vector of data owners, and other blocks generate weight parameters of local models. Specifically, each block produces one weight parameter matrix/tensor in local models. All local models share the identical structure, and according to their distinct embedding vectors, these blocks generate different weight parameters for various local models of data owners. We use the Transformer network to create local detection models39. The Transformer network is specifically designed to effectively handle large-scale long-term time series problems through the self-attention mechanism, and it is capable of leveraging the temporal-spatial correlation between each data point in a series40. The Transformer model has achieved state-of-the-art performance in different research areas related to time series analysis41. The detailed structure is shown in Methods, and the parameters refer to Supplementary Note 4. Upon receiving the input of voltage, current, and power sequences, the Transformer model generates the fault warning result.
Fault warning performance
Without loss of generality, we assume that data owners 1−6 initially form a federation framework to collaboratively train their detection models, while data owners 7−8 are designated as new members who plan to join the federation framework after the normal federated training. For real-time fault warning, only charging segments containing at least 30 data points of voltage, current, and power are used as inputs for the detection model. Furthermore, we evaluate the proposed method against three types of training approaches: local training, Fedavg42, and FedProx43. Local training involves each data owner training a model independently using their own data. In Fedavg, each owner trains the shared model using their individual data, and the weight updates are averaged on the central server to modify the shared model accordingly. FedProx builds upon Fedavg by adding a regularization term to constrain the weight updates in each cycle, enhancing the robustness and ability to handle variations in data distribution among data owners. The detailed settings of these methods for comparison are shown in Supplementary Note 6.
The comparison results in terms of accuracy, fault recall rate, and f 1 index are shown in Fig. 3a–c. The accuracy measures the overall accuracy of classification of normal and faulty batteries. However, accuracy alone may not be highly representative, particularly when the quantity of normal data far exceeds the fault data. In such cases, the accuracy tends to be very high, even if nearly all fault data are not correctly identified44. The fault recall rate directly indicates the proportion of correctly-identified fault data, making it the most direct index for fault warning. Lastly, f 1 index is an indicator that emphasizes the performance on fault data while considering the results on normal data to a lesser extent. Due to the different emphasis of these indicators, we show the results of all these indices.
a The mean accuracy of the fault warning result, i.e., the classification accuracy of normal and potential faulty batteries. b The fault recall rate of the results. c The f1 index of the results. d The averaged accuracy, f1 index, and fault recall rate of various battery types, respectively. Due to the sparsity of fault data of LMO, LCO, LiPo, all training and testing data of LMO, LCO, LiPo are counted.
We can observe that local training can only achieve 39.45% fault recall rate, 75.46% accuracy, and 30.23 f 1 index on average. This is due to the fact that local training cannot address the issues of biased data distribution and fault data scarcity. These issues call for a federated learning framework, which allows data owners to share knowledge among them with the safety of data privacy. Two federated learning methods, Fedavg and FedProx, demonstrate significant enhancements, achieving overall fault recall rates 55.49% and 63.81%, accuracies 83.70% and 85.30%, f 1 indices 47.46 and 43.91, all of which surpass the results of local training. However, these methods still suffer from the drawback that they generate the identical fault warning model for all data owners, implying that they cannot customize local models for different data owners. This is evidenced by their substandard results for data owners 5 and 6, with fault recall rates and f 1 indices dropping below 40% and 20, respectively. Unlike Fedavg and FedProx, our approach enables the personalization of parameters for each local model. This personalization allows each model to adapt to its specific data distribution, thereby enhancing the performance. Our approach leads to significant enhancements across all metrics. The averaged accuracy of our method is 92.43%, which exceeds the results of Fedavg, FedProx, and local training by 8.73%, 7.12%, and 16.97%, respectively. Additionally, the averaged fault recall rate has risen to 73.56%, as shown in Fig. 3b. Also, the averaged f 1 index has escalated to 57.79 (Fig. 3c). The better performance of our method is attributed to its ability to simultaneously achieve privacy-preserving knowledge sharing and tailor the local model of each data owner to adapt to its specific data distribution.
For data owner 5, the advantages of the proposed method over other approaches are more pronounced. Data owner 5 possesses a total of 4114 data sequences, with a fault data ratio of merely 0.39%, significantly below the averaged fault data ratio of 3.41%. Moreover, data owner 5 only has the fault data of 1 LFP battery compared to 15 NMC batteries. Given that LFP batteries construct the majority of fault data (70.25%), a significant disparity is evident between the types of batteries in the fault data of owner 5 and those of other data owners. Thus, other methods42,43 that do not take this difference into account cannot obtain pleasant results for data owner 5.
To further scrutinize the deviation of results among different battery types, we exhibit the overall accuracy, f 1 index, and fault recall rate of these battery types in Fig. 3(d). The overall performance of LFP and NMC batteries is observed to exceed that of LMO, LCO, and LiPo. This inconsistent performance is attributed to the scarce data available for LMO, LCO, and LiPo batteries, which hinders the comprehensive exposure of their fault characteristics. Another notable observation is that although the accuracy of LMO, LCO, and LiPo batteries is high, their fault recall rate and f 1 index are relatively low. This is mainly due to the scarcity of fault data for these battery types. Deep learning methods tend to focus more on normal data and allocate less emphasis on fault data. As a result, most of normal data are correctly classified, but a smaller number of faults are identified. Consequently, LMO, LCO, and LiPo batteries, which have a limited number of fault data, exhibit a low fault recall rate and f 1 index.
Generalization to new data owners
As mentioned earlier, our approach can quickly accommodate new data owners 7 and 8 who are willing to join into the federation after the completion of normal federation training with data owners 1−6.
The data type distributions of data owners 7 and 8 are shown in Fig. 4a. Significant heterogeneity is observed in the data distribution, with substantially lower proportion of NMC batteries in fault data, being 21.08% compared to 34.87% in normal data. Consequently, the data distributions of these new data owners diverge markedly from those of data owners 1−6. In this scenario, the new participants continue to gain advantages from the federation, and Fig. 4b shows that our method significantly exceeds comparison methods.
a The data distribution of normal and fault data in owners 7 and 8. There are in order LFP, NMC, LMO, LCO and LiPo type batteries in each bar, where the numbers in the bar denote the amount of data samples of each battery type, and the percentage ratio above each bar represents the cumulative proportion. b The fault recall rate of different battery types in data owners 7 and 8. Results of other metrics are shown in Supplementary Note 7. c The averaged epochs to convergence and the averaged operation time per epoch of the normal federated training and adaptive training for new data owners.
When a new data owner is coming, weight parameters of hyper-model will be frozen (without updating), and only the embedding vectors of new data owners are updated. Therefore, this adaptive training process is very fast. To prove this, we exhibit the averaged number of epochs required for convergence and the averaged operation time per epoch for both normal federation training and adaptive training of new data owners in Fig. 4c. Rapid tuning for new data owners only needs 12 epochs on average, which is largely faster than normal training with 343 epochs to convergence. For the operation time of each training epoch, since only the embedding vector requires to be updated, the operation time reduces from 0.909 s to 0.415 s.
Investigation of data heterogeneity
The preliminary results above indicate that the data heterogeneity is one critical influencing factor on the detection performance. As a personalized federated learning approach, our method offers a key advantage in addressing the heterogeneity of data distribution among data owners. Here, we further examine the impact of data heterogeneity on the fault warning performance of different methods by varying the normal-to-fault data ratio and battery type ratio. Specifically, data owner 2 is set to have a normal-to-fault ratio from 1:1 to 10:1, and other data owners keep the same, where this normal-to-fault ratio is adjusted by changing the amount of normal data. Then, the fault recall rate of data owner 2 is shown in Fig. 5a. It is evident that as the normal-to-fault ratio increases, the performances of all methods decline, with the greatest decrease observed in the case of local training. This decline is attributed to the class imbalance issue that arises from an excessive amount of normal data. However, our method consistently achieves the best results in contrast to these comparison methods, as demonstrated in Fig. 5a. For battery types, we consider two dominant types of batteries in EVs, namely LFP and NMC. We vary the data ratio of LFP batteries w.r.t. NMC batteries from 1:1 to 10:1, and the performance is shown in Fig. 5b. According to Fig. 5b, our approach maintains a high fault recall rate with the increase of data of NMC batteries, while the other methods appear to be slightly reduced, illustrating the high adaptation ability of our method to various data distributions. Compared with common ways to handle data heterogeneity, such as transfer learning45,46, the proposed method can directly join the new data owner into the framework, without a second training or fine-tuning process.
The evaluation metric is fault recall rate, and other metrics are shown in Supplementary Notes 8 and 9. a The performance of data owner 2 under different normal-to-fault data ratios. b The performance of data owner 2 under different LFP/NMC data ratios. c The performance of our method under different data window lengths in six data owners.
Sensitivity to data window length
An important advantage of data-driven fault warning lies in the flexibility in accommodating different input data lengths. So we test the sensitivity of our method to the data window length, i.e., how long does the proposed method requires a charging segment to realize pleasant detection performance. The result is shown in Fig. 5c, from which we can discover that longer data sequences can yield better performance due to more time series characteristics are revealed in the battery charging curves. However, in practice, since the length of charging curves is determined by the customer behaviors, many charging curves are not very long. Thus, if a too-long window is used, many short charging data sequences are ignored. Also, the results show that even with relatively short window length, such as 10 points, our method can still obtain certain acceptable accuracy. In practice, the selection of the window length should balance the detection performance and the duration of data sampling.
Generalization to different local models
Our federated learning method constitutes a genetic model development framework that is agnostic to the structure of local detection models. To demonstrate this point, we apply the proposed method to several prevalent fault warning models reported in the literature, including LSTM network19,20,47, gated recurrent unit (GRU)48,49, temporal convolution network (TCN)50, autoencoder (AE)51,52,53, and GRU formed autoencoder (AE-GRU). LSTM and GRU are famous deep learning methods designed for handling time series problems, while TCN is an extension of traditional CNNs to process time series. AE based fault warning is another kind of fault warning way that attempts to reconstruct the input sequence through an encoder and decoder part, and the data with pool reconstruction accuracy will be identified as fault data. This kind of fault warning has been widely applied in battery fault warning51,53. AE-GRU21 enhances AE by building the encoder and decoder with GRU layers. More information about our design of the AE-GRU can be seen in Supplementary Notes 10 and 11.
Table 1 displays the fault warning results for various models. In local training scenarios, the Transformer model surpasses the rest, achieving a fault recall rate of 39.45%, and is closely followed by two other sophisticated neural networks, TCN and AE-GRU, which have fault recall rates of 34.45% and 36.56%, respectively. These results suggest that integrating advanced neural network architectures, which have powerful learning capability, into battery data analysis leads to some improvements, albeit slight, with the primary bottleneck being the data itself. Moreover, our proposed federated learning framework, which facilitates the implicit sharing of training data among owners, markedly improves the performance of all fault warning models of data owners. Furthermore, the Transformer shows the greatest performance by resorting to federated learning, achieving the highest fault recall rate of 73.56%. Overall, the results highlight the importance of prioritizing data over models, and our federated learning method acts as genetic remedy irrespective of the model structures.
Furthermore, to fully demonstrate the great performance of the proposed approach, it is essential to compare with the methods using complete data in cloud. Specifically, we also compare with the above-mentioned state-of-the-art methods in literature. The only difference here is that these methods use complete data (i.e., direct training by data of all owners), but the proposed approach still operates in the federated way. The results are shown in Table 2, where we can see that the proposed approach still outperforms other methods using complete data. Moreover, the performance of federated learning framework using other local models (the right part in Table 1) is only slightly lower than that using complete data (Table 2), suggesting that the proposed personalized federated learning framework can achieve very excellent performance that approaches the theoretical limit.
Rationalization of detection performance
The detection performance of the proposed method can be explained by the inherent physical and statistical correlations between charging measurement data and battery fault mechanisms. For instance, external and internal short circuits result in rapid voltage collapse or abnormal distortions in the voltage curve, which are directly reflected in the charging profile54,55. Lithium plating faults typically occur under low-temperature or high-current conditions, where lithium ions fail to fully intercalate into the graphite anode and instead deposit on its surface, leading to intensified polarization and an abnormally rapid voltage rise during charging56. Over-charging faults are explicitly indicated when the cell voltage exceeds the safety upper limit. These fault-induced signatures are inherently embedded in charging data, enabling machine learning models to effectively distinguish between normal and faulty states.
The explainability of our approach is further evidenced by the distinct separation between normal and fault data in the feature space extracted from our approach. To clearly show the correlation in two-dimensional plot, these features are processed by principal component analysis (PCA). The visualizations for data owners 1 and 5 (Fig. 6a, c) confirm this clear clustering (see Supplementary Note 12 for other owners). Conversely, features from locally trained Transformers (Fig. 6b, d and Supplementary Note 13) exhibit significant overlap, corroborating the overall performance gap between local and federated training. The particularly poor feature distinction for owner 5 is attributed to its divergent data distribution, highlighting a key limitation of localized training.
a The visualization of learned features of data owner 1 by the proposed method, where fault and normal data are split largely. b The visualization of learned features of data owner 1 through local training. c The visualization of learned features of data owner 5 through the proposed approach. d The visualization of learned features of data owner 5 through local training. e The learned features of different data owners through our approach. f The distribution of learned features of different battery types through local training.
The knowledge sharing between owners in our approach enables local detection models to overcome the heterogeneity behind the data. As illustrated in Fig. 6e, f, our method results in similar feature distributions for different data owners and different battery types. The data heterogeneity is also revealed in Fig. 6e, which shows the learned features of data in all owners. It is not difficult to see that the feature distributions of data owners 5 and 6 are relatively dissimilar to others, conforming to the results that the performances of all methods in owners 5 and 6 are relatively lower. This difference is also depicted in Fig. 1c, d, where we can see the overall voltage levels of owners 5 and 6 are lower than others. Especially, data owner 5 has a median voltage around 310 V, which is very low. The learned features of different types are shown in Fig. 6f, where we can see that the learned features of various battery types are similar, so our method is agnostic to various battery types and charging modules.
Discussion
Usage of charging station data
BMS data offers high-resolution, real-time insights into battery conditions, making it invaluable for OEM-centric diagnostics. However, due to the privacy concern of sharing BMS data and not all EVs timely transmit their data into OEMs, we turn to use data from charging stations. Charging stations provide a neutral, standardized data source that avoids OEM dependencies, enabling broader applicability across heterogeneous EV fleets. Our method targets cross-OEM interoperability, which is critical for stakeholders like charging networks, energy providers, or independent maintenance services that lack direct access to proprietary BMS streams. We position our framework not as a replacement for OEM-level BMS analytics but as a supplementary layer for scenarios where BMS data is unavailable, such as aftermarket diagnostics and third-party fleet management.
In practice, our method can be deployed into charging stations with a central cloud server and be employed by the charging station operators. When an EV finishes charging, the trained model can be used to judge if the battery is at risk. And the EV drivers can be informed by their apps in mobile phone, which encourages them to timely inspect the battery. Furthermore, relevant communication standards are also included in Supplementary Note 14.
Social advantages
The proposed approach exhibits great social advantages. By detecting potential battery failures, it minimizes property damage, lowering the economic and social costs associated with battery-related failures. The economic analysis illustrates that we have opportunity to save additional 7.89 million CNY compared with local training for EVs in this dataset, where the detailed economic analysis is shown in Supplementary Note 15. Additionally, reliable battery monitoring fosters greater consumer confidence in EVs, accelerating the EV adoption and helping societies transition faster toward cleaner transportation. By integrating data-driven and federated learning-based fault warning systems, EV manufacturers and fleet operators can ensure safer roads, greener energy use, and more resilient smart cities, ultimately contributing to a more sustainable and secure future.
Our method has a huge potential to generalize to larger and more complex scenarios. Rather than corporations, data owners can be unions in different countries/regions. For example, if a region that originally has a smaller amount of EVs intends to implement fault warning, it can directly participate into the federation to obtain pleasant fault warning results. As for large data owners, by joining into this framework it can make the local model more adaptive to various kinds of EVs that do not frequently emerge in its region, and hence more general and robust. Besides, this framework builds on battery charging data to enable fault warning, and thus is very general to other battery applications, such as electrical bicycles, energy storage stations, and portable devices.
Limitations and future work
However, the establishment of our framework in practice still faces some practical challenges. At first, federated learning involves distributed training across multiple devices or servers, which can pose scalability challenges. Coordinating a large number of data owners, managing computational resources, and handling potential failures requires robust infrastructure and resource management techniques. Secondly, since federated learning operates in a decentralized manner, the control and visibility over the training process is limited. Monitoring, debugging, and diagnosing issues during training can be more challenging compared to traditional centralized learning methods. Finally, there is no global policy governing federated learning. The implementation and policies surrounding federated learning can vary depending on the specific organization, industry, or jurisdiction involved. Therefore, the lack of unified governance and accountability makes current federated learning platforms not sufficiently reliable and untrustworthy.
Another limitation is the ineffectiveness of charging data to reflect certain faults. Some faults may not manifest during the charging cycle, or their signals are too subtle to distinguish from normal operational data. For instance, the electromagnetic shielding effect of the battery metallic casing may prevent subtle internal changes from manifesting clearly in external charging curves. As a result, detecting very early-stage faults based solely on external charging data remains challenging57. To address these constraints, future work will explore integrating advanced multi-sensor systems capable of simultaneously monitoring internal and external signals, thereby improving fault detection and enabling early warnings over extended time horizons.
Summary
We establish an EV battery fault warning framework based on personalized federated learning. The proposed framework enables a privacy-preserving way for the collaboration of data owners to advance the fault warning and produces fault warning models customized for each data owner. The main advantage of our method lies in the fact that it can integrate the information of all data owners without data sharing, thus overcoming the drawback of biased data distribution and insufficient fault data for single data owner. This leads to a significant improvement in the performance and generalization of deep learning based fault warning methods, especially for some small-scale data owners which only have a little data available originally. Besides, the personalization property of our method allows each data owner to have distinct model parameters to adapt to its own data distribution. Therefore, in summary, the collaboration makes a data owner to obtain the knowledge of other owners, and the personalization enables the local model to be specific to its data distribution. By using the proposed method, all data owners can obtain better fault warning model easily without any risk of data leakage. The results show that our method makes a 34.11% improvement of fault recall rate against local training, as well as 16.97% and 27.56% improvement of classification accuracy and f 1 index. In comparison to alternative federated learning approaches like Fedavg and FedProx, our method demonstrates superior performance across multiple evaluation metrics. Specifically, our method achieves a priority range of 7.12%−8.73%, 9.75%−18.07%, and 10.30−13.88 in terms of accuracy, fault recall rate, and f 1 index, respectively. Additionally, our method exhibits the robustness across different scenarios, such as varying normal-to-fault data ratios, data types, and data window sizes. When considering new data owners, our method exhibits significant improvements in fault recall rate, ranging from 15.89% to 40.11%, and high adaptation speed, which only needs 1.60% time w.r.t. the time of normal federation training time. As for the local model, in contrast to existing fault warning methods, our approach outperforms other deep learning models. The economic analysis illustrates that we have opportunity to save additional 7.89 million CNY compared with local training for EVs in this dataset, hence providing very valuable profit and social impact considering the damages of EVs caused by battery fire and explosion.
Methods
Structure of hyper and local models
H(Φ,:) and Ti(Ωi,:) are used to denote the hyper-model at central server and local model at a data owner, where Φ and Ωi are the weight parameters of the hyper-model and local model. All local models have the identical structure, but with various weight parameters. If the parameters of a local model Ωi have n weight matrix/tensors (\({{{\bf{W}}}}_{{{\bf{1}}}}^{{{\bf{i}}}}\), \({{{\bf{W}}}}_{{{\bf{2}}}}^{{{\bf{i}}}}\), ..., \({{{\bf{W}}}}_{{{\bf{n}}}}^{{{\bf{i}}}}\)), the hyper-model H(Φ,:) will have n + 1 linear blocks, where each block is composed of multiple linear layers, as shown in Fig. 7a. Except for one basic linear block, other n blocks will generate the weight parameters (\({{{\bf{W}}}}_{{{\bf{1}}}}^{{{\bf{i}}}}\), \({{{\bf{W}}}}_{{{\bf{2}}}}^{{{\bf{i}}}}\), ..., \({{{\bf{W}}}}_{{{\bf{n}}}}^{{{\bf{i}}}}\)) of local model Ti(Ωi,:). The input of hyper-model is the embedding vector vi of a data owner. Each data owner will be assigned an embedding vector to represent it, and this embedding vector is generated randomly and then updated gradually along with the training process of hyper-model. Detailed information of the rational of embedding vectors is shown in Supplementary Note 5. Besides, to stabilize the training of hyper-model, a spectral normalization is used to regularize all generated weights. The spectral normalization for a weight W is:
where h is a non-zero vector to be optimized. Therefore, the entire calculation process in hyper-model can be written as:
where Lnb denotes the basic linear block, and Ln1, Ln2, ..., Lnn are numerous linear blocks to generate weights \({{{\bf{W}}}}_{{{\bf{1}}}}^{{{\bf{i}}}}\), \({{{\bf{W}}}}_{{{\bf{1}}}}^{{{\bf{i}}}}\), ..., \({{{\bf{W}}}}_{{{\bf{n}}}}^{{{\bf{i}}}}\). vi is the embedding vector of data owner i, and mb is the output of the basic linear block.
a The structure of hyper-model at central server and the diagram of information communication between the server and data owners. The hyper-model is composed of many blocks of linear neural layers, where each block generates one weight matrix/tensor of local model, in addition to one basic block. b The structure of the Transformer model, where from left to right we show the diagram of the entire Transformer model, a single Transformer layer, and a self-attention block in order.
The local model includes a normalization part, some Transformer layers, and a final linear layer, where a single Transformer layer is composed of a multi-head self-attention structure, an alternation part of multiple skip-connection modules58, and a layer normalization59, as shown in the middle part of Fig. 7b. The right part exhibits the calculation flow of a self-attention structure39.
Before inputting data into our model, a normalization is required to regularize them. The normalization can be described as:
where \(\widehat{V}\), \(\widehat{I}\), and \(\widehat{P}\) denote the average of voltage, current, and power, respectively. σV, σI, and σP represent the standard deviation of voltage, current, and power, respectively. Vi, Ii, and Pi are voltage, current, and power in charging curves, respectively. After normalization, the distribution of all variables \(\widetilde{V}\), \(\widetilde{I}\), \(\widetilde{P}\) has a zero mean and unit variance. Then we construct a data matrix X with the shape L × 3, where L is the length of data window.
The basic neural network structure of the Transformer is the well-known multi-head self-attention structure39. The self-attention structure of one head is:
where X is the inputting measurement data matrix defined above, and Q, K, V, S are matrices in the calculation process. Sm() denotes the well-known Softmax function, and WE, WQ, WK, WV are wight matrices. d is the hidden size, and F is the output. The flowchart of this calculation is shown in the right part in Fig. 7b.
To enhance the fitting ability of the proposed learning method, multi-head attention is employed. There are multiple similar blocks of self-attentions, as shown in the middle part of Fig. 7b. The final output of multi-head attention is a linear integration of the result of all heads with a skip-connection part:
where Fi denotes the output of the ith head, and H is the number of heads of the multi-head attention. Wo is the weight matrix, and Fo is the integrated result.
After the multi-head attention, the output Fo is then sent into a layer normalization59, a linear layer with skip-connection, and a layer normalization sequentially. The FC layer with skip-connection is:
where WF and bF are the weight matrix and bias vector, respectively. Above-mentioned multi-head attention part, linear layers, and layer normalization are concatenated to form one Transformer layer of the proposed method, as shown in the middle part in Fig. 7b. Then, the normalization, multiple Transformer layers, and one linear layer are connected to compose the local model Ti(Ωi,:).
Collaborative training
The loss function of each local model is the well-known cross-entropy:
where yi and \({\widehat{y}}_{i}\) represent the truth (1 is fault and 0 is normal) and the estimation result, respectively, and nd is the number of data.
In each round of the training process, a data owner i is selected and their local model Ti (Ωi,:) is trained by its local data using cross-entropy loss:
where CE() is the cross-entropy loss (7), and αc is the learning rate. \({\nabla }_{{\Omega }_{i}}CE(y,{T}_{i}({\Omega }_{i},X))\) denotes the gradient of loss function w.r.t. the parameters Ωi. X and y denote the inputting data (sequence of voltage, current, and power) and the true label (normal or fault).
After local training, the local model becomes \({T}_{i}({\Omega }_{i}^{{\prime} },:)\), followed by that its parameter deviation \(\Delta \Omega={\Omega }^{{\prime} }-\Omega\) is delivered to the server. The server will update the hyper-model H(Φ,:) by:
where ∇ΦΔΩ is the gradient of ΔΩ w.r.t. the parameters Φ. By multiple rounds of training, the hyper-model finally converges, which can generate personalized weights of local models, and each local model can obtain high fault warning precision locally. The detailed training process is shown in Algorithm 1.
Algorithm 1
Collaborative training of our method.
1: Inputs: Number of training epochs ne, number of training rounds of local model nk, learning rate of hyper-model αh, learning rate of local model αc.
2: for epoch e = 1, 2, ..., ne do
3: Sample a data owner i
4: Calculate local model parameters by hyper-model Ωi = H(Φ, i)
5: for k = 1, 2, ..., nk do
6: Sample a batch of data {X, y}
7: Update local model parameters by \({\Omega }_{i}^{{\prime} }={\Omega }_{i}-{\alpha }_{c}{\nabla }_{{\Omega }_{i}}CE(y,{T}_{i}({\Omega }_{i},{{\bf{X}}}))\)
8: end for
9: \(\Delta \Omega={\Omega }^{{\prime} }-\Omega\)
10: Update the parameters of hyper-model by \({\Phi }^{{\prime} }=\Phi -{\alpha }_{h}{\nabla }_{\Phi }\Delta \Omega\)
11: end for
12: Outputs: Trained hyper-model at server H(Φ,:) and local model Ti(Ωi,:) for each data owner.
Evaluation metrics
Considering the estimation result of a dataset, there must exist some corrective positive-predicted (fault) data TP, corrective negative-predicted (normal) data TN, wrong positive-predicted data FP, wrong negative-predicted data FN. For example, corrective positive-predicted data TP represents the number of fault data that is correctly identified, and TN refers to the number of correctly-predicted normal data. Wrong predicted positive data FP refers to the data that the fault warning method classifies them into fault data, but they are actually normal data, and TP has the opposite meaning. The accuracy is defined as:
The fault recall rate is:
Similar to the fault recall rate, the precision of positive-predicted data is \({prc}=\frac{{TP}}{{TP}+{FP}}\). Then, the f 1 index is defined as:
The accuracy depicts the mean estimation precision, and the fault recall rate measures how many fault data is discovered against all fault data. f 1 index is an indicator focusing more on fault data rather than normal data44.
Data availability
The data generated in this study have been deposited at Mendeley Data60. Source data are provided with this paper.
Code availability
The code for the modeling work has been deposited at Zenodo repository61.
References
Deng, J., Bae, C., Denlinger, A. & Miller, T. Electric vehicles batteries: requirements and challenges. Joule 4, 511–515 (2020).
IEA. Global EV Outlook 2023. https://www.iea.org/reports/global-ev-outlook-2023 (2023).
Feng, X. et al. Thermal runaway mechanism of lithium ion battery for electric vehicles: a review. Energy Storage Mater. 10, 246–267 (2018).
Wang, Q., Mao, B., Stoliarov, S. I. & Sun, J. A review of lithium ion battery failure mechanisms and fire prevention strategies. Prog. Energy Combust. Sci. 73, 95–131 (2019).
Xu, C. et al. Electric vehicle batteries alone could satisfy short-term grid storage demand by as early as 2030. Nat. Commun. 14, 119 (2023).
Hu, X. et al. Advanced fault diagnosis for lithium-ion battery systems: a review of fault mechanisms, fault features, and diagnosis procedures. IEEE Ind. Electron. Mag. 14, 65–91 (2020).
Dey, S., Perez, H. E. & Moura, S. J. Model-based battery thermal fault diagnostics: algorithms, analysis, and experiments. IEEE Trans. Control Syst. Technol. 27, 576–587 (2017).
Finegan, D. P. et al. The application of data-driven methods and physics-based learning for improving battery safety. Joule 5, 316–329 (2021).
Wang, Z. et al. A data-driven method for battery charging capacity abnormality diagnosis in electric vehicle applications. IEEE Trans. Transport. Electrification 8, 990–999 (2022).
Qiquan, L., Jian, M., Xuan, Z., Kai, Z., Dean, M., Zhipeng, J. Fault diagnosis of early internal short circuit for power battery systems based on the evolution of the cell charging voltage slope in variable voltage window. Appl. Energy 376, 124310 (2024).
Xu, Y., Ge, X., Guo, R. & Shen, W. Online soft short-circuit diagnosis of electric vehicle li-ion batteries based on constant voltage charging current. IEEE Trans. Transport. Electrification 9, 2618–2627 (2023).
Tian, Y., Lin, C., Li, H., Du, J. & Xiong, R. Deep neural network-driven in-situ detection and quantification of lithium plating on anodes in commercial lithium-ion batteries. EcoMat 5, e12280 (2023).
Zhipeng, Y. et al. Multi-task learning framework for fault detection in energy storage system lithium-ion batteries: From degradation to slight overcharge. J. Energy Storage 127, 117164 (2025).
Qiao, D. et al. Quantitative diagnosis of internal short circuit for lithium-ion batteries using relaxation voltage. IEEE Trans. Ind. Electron. 71, 13201–13210 (2024).
Jia, Y., Li, J., Yao, W., Li, Y. & Xu, J. Precise and fast safety risk classification of lithium-ion batteries based on machine learning methodology. J. Power Sources 548, 232064 (2022).
Naha, A. et al. Internal short circuit detection in Li-ion batteries using supervised machine learning. Sci. Rep. 10, 1301 (2020).
Ma, G., Xu, S. & Cheng, C. Fault detection of lithium-ion battery packs with a graph-based method. J. Energy Storage 43, 103209 (2021).
Ojo, O. et al. A neural network based method for thermal fault detection in lithium-ion batteries. IEEE Trans. Ind. Electron. 68, 4068–4078 (2020).
Li, D., Zhang, Z., Liu, P., Wang, Z. & Zhang, L. Battery fault diagnosis for electric vehicles based on voltage abnormality by combining the long short-term memory neural network and the equivalent circuit model. IEEE Trans. Power Electron. 36, 1303–1315 (2020).
Hong, J., Wang, Z. & Yao, Y. Fault prognosis of battery system based on accurate voltage abnormity prognosis using long short-term memory neural networks. Appl. Energy 251, 113381 (2019).
Zhang, J. et al. Realistic fault detection of Li-ion battery via dynamical deep learning. Nat. Commun. 14, 5940 (2023).
Pozzato, G. et al. Analysis and key findings from real-world electric vehicle field data. Joule 7, 2035–2053 (2023).
Luzón, M. V. et al. A tutorial on federated learning from theory to practice: Foundations, software frameworks, exemplary use cases, and selected trends. IEEE/CAA J. Autom. Sin. 11, 824–850 (2024).
Zhang, A., Xing, L., Zou, J. & Wu, J. C. Shifting machine learning for healthcare from development to deployment and from models to data. Nat. Biomed. Eng. 6, 1330–1345 (2022).
Shamsian, A., Navon, A., Fetaya, E. & Chechik, G. Textup Personalized federated learning using hypernetworks. In Proc. International Conference on Machine Learning, 9489–9502 (PMLR, 2021).
Wang, X., Liang, Y., Chen, Y. & Dobre, O. A. TextupRobust federated learning for energy storage systems. In Proc. IEEE Wireless Communications and Networking Conference (WCNC), 01–06 (IEEE, 2024).
Han, J., Zhang, X., Xie, Z., Zhou, W. & Tan, Z. Federated learning-based equipment fault-detection algorithm. Electronics 14, 92 (2025).
Zhang, Z., Wang, Y., Ruan, X. & Zhang, X. A federated transfer learning approach for lithium-ion battery lifespan early prediction considering privacy preservation. J. Energy Storage 102, 114153 (2024).
Wong, K. L., Tse, R., Tang, S.-K. & Pau, G. Decentralized deep-learning approach for lithium-ion batteries state of health forecasting using federated learning. IEEE Trans. Transport. Electrification 10, 8199–8212 (2024).
Kröger, T., Belnarsch, A., Bilfinger, P., Ratzke, W. & Lienkamp, M. Collaborative training of deep neural networks for the lithium-ion battery aging prediction with federated learning. eTransportation 18, 100294 (2023).
Wang, T., Dong, Z. Y. & Xiong, H. Adaptive multipersonalized federated learning for state of health estimation of multiple batteries. IEEE Internet Things J. 11, 39994–40008 (2024).
Altinpulluk, N. B. et al. Catalyzing deep decarbonization with federated battery diagnosis and prognosis for better data management in energy storage systems. Cell Rep. Phys. Sci. 5, 102215 (2024).
Zhong, R. et al. Lithium-ion battery remaining useful life prediction: a federated learning-based approach. Energy Ecol. Environ. 9, 549–562 (2024).
Tao, S. et al. Collaborative and privacy-preserving retired battery sorting for profitable direct recycling via federated machine learning. Nat. Commun. 14, 8032 (2023).
Lai, R., Wang, J., Tian, Y. & Tian, J. Fedcbe: a federated-learning-based collaborative battery estimation system with non-iid data. Appl. Energy 368, 123534 (2024).
Chen, X., Wang, X. & Deng, Y. Federated learning-based prediction of electric vehicle battery pack capacity using time-domain and frequency-domain feature extraction. Energy 319, 135002 (2025).
Finegan, D. P. et al. The battery failure databank: Insights from an open-access database of thermal runaway behaviors of li-ion cells and a resource for benchmarking risks. J. Power Sources 597, 234106 (2024).
Zhang, Y. et al. Seq2Seq attentional siamese neural networks for text-dependent speaker verification. In Proc. IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) 6131–6135 (IEEE, 2019).
Vaswani, A. et al. Attention is all you need, advances in neural information processing systems. In Proc. Advances in Neural Information Processing Systems, vol. 30 (Curran Associates Inc., 2017).
Yang, H., Ding, K., Qiu, R. C. & Mi, T. Remaining useful life prediction based on normalizing flow embedded sequence-to-sequence learning. IEEE Trans. Reliab. 70, 1342–1354 (2020).
Xu, J., Wu, H., Wang, J. & Long, M. Anomaly transformer: time series anomaly detection with association discrepancy. In The Tenth International Conference on Learning Representations (ICLR, 2022).
McMahan, B., Moore, E., Ramage, D., Hampson, S. & Arcas, B. A. y. Communication-efficient learning of deep networks from decentralized data. ArXiv 1273–1282 https://doi.org/10.48550/arXiv.1602.05629 (2017).
Li, T. et al. Federated optimization in heterogeneous networks. Proc. Mach. Learn. Syst. 2, 429–450 (2020).
Yang, H., Qiu, R. C. & Tong, H. Reconstruction residuals based long-term voltage stability assessment using autoencoders. J. Mod. Power Syst. Clean. Energy 8, 1092–1103 (2020).
Lu, J., Xiong, R., Tian, J., Wang, C. & Sun, F. Deep learning to estimate lithium-ion battery state of health without additional degradation experiments. Nat. Commun. 14, 2760 (2023).
Yang, H., Wang, Z. & Qiu, R. C. Data domain adaptation for voltage stability evaluation considering topology changes. IEEE Trans. Power Syst. 38, 2834–2844 (2023).
Hochreiter, S. & Schmidhuber, J. Long short-term memory. Neural Comput. 9, 1735–1780 (1997).
Gao, Y. & Glowacka, D. textupDeep gate recurrent neural network, Asian Conference on Machine Learning. In Proc. Asian Conference on Machine Learning 350–365 (PMLR, 2016).
Sun, C. et al. Anomaly detection of power battery pack using gated recurrent units based variational autoencoder. Appl. Soft Comput. 132, 109903 (2023).
Shaojie Bai, V. K. & Zico Kolter, J. An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. Preprint at arXiv https://doi.org/10.48550/arXiv.1803.01271 (2018).
Zhang, X., Liu, P., Lin, N., Zhang, Z. & Wang, Z. A novel battery abnormality detection method using interpretable autoencoder. Appl. Energy 330, 120312 (2023).
Baldi, P. Autoencoders, unsupervised learning and deep architectures. In Proc. International Conference on Unsupervised and Transfer Learning Workshop Vol. 27, 37–50 (JMLR.org, 2011).
Jeng, S.-L. & Chieng, W.-H. Evaluation of cell inconsistency in lithium-ion battery pack using the autoencoder network model. IEEE Trans. Ind. Inform. 19, 6337–6348 (2023).
Xiong, R., Yang, R., Chen, Z., Shen, W. & Sun, F. Online fault diagnosis of external short circuit for lithium-ion battery pack. IEEE Trans. Ind. Electron. 67, 1081–1091 (2020).
Huang, L. et al. A review of the internal short circuit mechanism in lithium-ion batteries: Inducement, detection and prevention. Int. J. Energy Res. 45, 15797–15831 (2021).
Zoerr, C., Sturm, J. J., Solchenbach, S., Erhard, S. V. & Latz, A. Electrochemical polarization-based fast charging of lithium-ion batteries in embedded systems. J. Energy Storage 72, 108234 (2023).
Fan, J. et al. Wireless transmission of internal hazard signals in Li-ion batteries. Nature 641, 639–645 (2025).
He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 770–778 (IEEE, 2016).
Ba, J. L., Kiros, J. R. & Hinton, G. E. Layer normalization. Preprint at arXiv https://doi.org/10.48550/arXiv.1607.06450 (2016).
Yang, H., Tian, J., Mai, W. & Chung, C. Y. A dataset of EV battery charging from Shenzhen Auto Electric Power Plant Co., Ltd (Autosun) and Hong Kong Polytechnic University https://data.mendeley.com/datasets/c7gg94tmvz/3 (2024).
Yang, H., Tian, J., Mai, W. & Chung, C. Y. FL for EV battery fault detection https://doi.org/10.5281/zenodo.17423221 (2025).
Acknowledgements
This work was supported by the National Natural Science Foundation of China (No. 52207229) [J.T.].
Author information
Authors and Affiliations
Contributions
H.Y. conducted methodology investigation, coding, validation, and writing. J.T. conceptualized this work, contributed to the methodology investigation, and the first draft. W.M., C.H.W., L.R., and T.W. collected and analysed the dataset. S.H., Z.W., Z.L., Y.Y., H.D., and C.Y.W. contributed to the validation and figure drawing. X.S. contributed to data processing. W.S. reviewed and edited manuscript. C.Y.C. supervised the project and edited the manuscript. All authors discussed the results.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks the anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Source data
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Yang, H., Tian, J., Mai, W. et al. Privacy-preserving collaborative battery fault warning for massive electric vehicles by heterogeneous data from charging stations. Nat Commun 17, 974 (2026). https://doi.org/10.1038/s41467-025-67703-7
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41467-025-67703-7
This article is cited by
-
Tackling privacy issue with personalized federated learning
Nature Reviews Electrical Engineering (2026)









