Battery lifetime prediction across diverse ageing conditions with inter-cell deep learning
Main
With high energy densities and low production costs, lithium-ion batteries have become widely adopted across modern industries, driving the growth of renewable energy solutions and electric vehicles1,2,3. Nevertheless, the capacity of lithium-ion batteries inevitably fades with cyclic operations due to their intrinsic electrochemical mechanisms4. Unexpected rapid degradation not only leads to poor user experiences, such as range anxiety for electric vehicles, but can also affect the operation of essential facilities, such as the stability of power grids. To proactively mitigate these side effects, accurately predicting battery lifetime in early cycles has been identified as a critical task5,6,7,8, where the lifetime is typically measured in cycle life, which is defined as the number of charge–discharge cycles until the capacity of a battery cell drops to 80% of its nominal capacity9,10. Predicting battery lifetime in early cycles is rather challenging because numerous factors, including but not limited to cycling protocols, ambient temperatures and electrode materials, collectively influence the complex battery ageing process. Additionally, achieving comprehensive coverage of various ageing conditions is prohibitively costly and time-consuming, as testing a cell under a specific condition is a lengthy process.
Existing methods for battery lifetime prediction have been developed and validated under limited ageing conditions, such as testing only lithium-iron-phosphate (LFP) cathode materials and using a certain group of cycling protocols9,10,11,12. Data characteristics under these restricted conditions affect influence a thorough examination of feature designs and modelling techniques, potentially limiting the success and generalization of their conclusions. It remains questionable whether these methods perform well across broad ageing conditions. Moreover, focusing on limited ageing conditions restricts the research development of leveraging historical data collected under different conditions. This limitation separates battery datasets emphasizing different ageing factors as isolated islands, hindering the development of general modelling approaches.
In this study, we introduce BatLiNet, a deep learning framework designed for reliably predicting battery lifetime across diverse ageing conditions, such as variations in cycling protocols, ambient temperatures and even battery chemistries. At its core, the framework introduces inter-cell learning that contrasts pairs of battery cells to discern lifetime differences, a significant leap from traditional models that focus solely on individual cells. By combining this approach with conventional single-cell learning, BatLiNet not only captures the unique degradation patterns of individual batteries but also places these patterns within a broader, comparative ageing landscape.
In our experiments covering various ageing complexities, BatLiNet consistently outperforms traditional models, delivering precise and robust lifetime predictions. A noteworthy observation is BatLiNet’s ability to reduce the mean absolute percentage error (MAPE) of its single-cell learning counterpart by more than 40% on average, underscoring the significance of inter-cell learning. Additionally, BatLiNet exhibits intriguing capabilities to transfer learning across different battery chemistries. These findings underscore the importance of considering a broad range of ageing conditions in battery data modelling and also reveal the untapped potential of leveraging the connections across different ageing conditions.
Results
To gain a comprehensive understanding of various ageing factors and their influences on battery lifetime, we aggregate most publicly available datasets, including MATR9, HUST12, CLO11, CALCE13,14,15, HNEI16, UL-PUR17, RWTH18 and SNL19. Figure 1 compares the ageing conditions examined in this study with typical datasets, highlighting the associated complex degradation behaviours. Supplementary Note 1 provides additional detailed comparisons across all datasets.

a, We compare the broad coverage of different ageing factors in this study against typical datasets, including MATR9, HUST12, SNL19 and CALCE13,14,15. b, The varying capacity degradation behaviours over long- and short-term cycles.
In this study, we derive five datasets reflecting different variations in ageing conditions. First, we inherit two evaluation sets of the MATR dataset, labelled MATR-1 and MATR-2, to maintain a consistent comparison with existing models. Besides, we consider the HUST dataset, using similar LFP cells to MATR, to investigate the adaptation of current models to different cycling protocols. Furthermore, we include other datasets by merging all datasets into a MIX set because of limited cells under other conditions, different ambient temperatures, packing structures and cathode active materials, such as lithium nickel cobalt manganese oxide (NMC), lithium cobalt oxide (LCO) and lithium nickel cobalt aluminium oxide (NCA). We develop two prediction setups based on the MIX dataset: MIX-100 and MIX-20. MIX-100 examines a typical early prediction scenario where models must predict the 80% end-of-life point using only the first 100 cycles of data. MIX-20 presents a more challenging task, wherein models must forecast the number of cycles before the capacity degrades to 90% of the initial value using just the first 20 cycles. It is worth noting that batteries that reached their end-of-life prematurely during the early cycles were excluded from the study.
The BatLiNet framework
The inherent conflict between numerous ageing conditions and limited cell cycling coverage poses a significant challenge to predictive modelling. Existing models primarily focus on intra-cell learning, capturing early variations of a single cell to predict its long-term lifetime9,10. However, this approach struggles with data scarcity due to limited cell samples available. In contrast, our BatLiNet framework, presented in Fig. 2, integrates inter-cell learning, which is essentially an auxiliary task of predicting lifetime differences given a pair of cells. We designate a cell with an unknown lifetime as the ‘target cell’ and use a fully cycled cell from existing databases as the ‘reference cell’.

a, The feature construction for intra- and inter-cell learning given the curve illustrating the relationship between Q (current capacity normalized by nominal capacity) and V (voltage in volts) as a per-cycle feature map. b, The correlations between constructed features and prediction targets for both intra-cell (the upper half) and inter-cell (the lower half) learning. c, The data flow of BatLiNet.
Figure 2a depicts the process of constructing effective features for intra- and inter-cell learning, where we use the voltage–capacity curve during the discharge stage as a typical cycle-level feature. Traditional approaches for intra-cell learning operate on a single cell and obtain effective intra-cell features by calculating the cycle-level feature differences between a pair of early cycles9,10. We refer to these operations as calculating intra-cell differences. In contrast, we calculate inter-cell differences by contrasting the cycle-level features between a target cell and a reference cell in the same cycle. The inter-cell differences aim to represent the connections between cells cycled under different conditions.
Figure 2b illuminates the potential and challenges of both intra- and inter-cell learning across various ageing conditions. The upper plot illustrates a near-linear relationship between the standard deviation of intra-cell difference curves and the corresponding lifetime for different LFP cell groups. While the linearity is consistent with previous studies9, this correlation highlights the complexities introduced by diverse ageing conditions, as shown by the scattered points, outliers and distinct clusters due to additional cells undergoing varied protocols and temperatures. Conversely, the lower plot delves into inter-cell learning by mapping the correlation between inter-cell differences and associated lifetime differences. Here, the same LFP cells serve as target cells, and a shared LCO cell acts as a reference. Despite the challenges posed by diverse ageing factors, a clear connection is evident. This suggests that a simple feature computed on inter-cell difference curves can differentiate lifetime differences, even with a reference cell from a different battery chemistry. Supplementary Note 2 further supports the feasibility of inter-cell learning within or across different battery chemistries with more data-driven evidence.
Moreover, these nonlinear patterns have indicated the necessity of leveraging deep learning for effective representation learning. Figure 2c concludes the data flow of BatLiNet. Given a target cell, we feed its cycle-level features into two separate branches. The first branch calculates intra-cell difference curves by comparing features in all early cycles with that of a reference cycle and uses a specific neural network f for intra-cell learning. In addition, the second branch includes a reference cell to obtain inter-cell difference curves and further feeds them into another neural network g for inter-cell learning. After the encoding procedures of f and g, the resulting representations are mapped to an aligned linear space, allowing us to leverage a shared linear layer to emit outputs for these two branches. The rationale for separated encoding followed by a shared linear layer is detailed in the Methods. During training, we can simply select any pair of cells from a training set to stimulate robust inter-cell modelling across various combinations of ageing conditions. To ensure robust prediction during inference, we randomly select a batch of reference cells from the training set and use the average of outputs from intra- and inter-cell branches as the final prediction.
Figure 3 offers a comparison of BatLiNet with state-of-the-art baselines across different datasets, using two metrics: root mean squared error (r.m.s.e.) and MAPE. We can observe that basic linear models relying on hand-crafted features, such as the ‘Var.’, ‘Dis.’ and ‘Full’ models9, demonstrated commendable performance on their initial datasets. However, their performance degraded significantly when faced with datasets encompassing complex ageing conditions. This trend is also evident in some advanced statistical learning techniques applied to raw capacity–voltage curves10, such as ridge regression20, partial least-squares regression21, principal component regression22 and support vector machine23. An exception to this pattern is random forest24, which consistently delivered relatively robust predictions, even on the MIX-100 and MIX-20 datasets. Despite this, random forest generally yielded suboptimal performances across all datasets under evaluation.

Linear models (Var., Dis. and Full) developed in ref. 9, and statistical models (ridge regression, partial least-squares regression, principal component regression, support vector machine, random forest) and deep learning models (multi-layer perceptron (MLP), long-short-term memory (LSTM), convolutional neural network (CNN)) from ref. 10. These comparisons span five datasets, MATR-1, MATR-2, HUST, MIX-100 and MIX-20, and cover two evaluation metrics, r.m.s.e. and MAPE. For deep learning models, we run various experiments with eight unique initializations (n = 8 trials). The bar plot displays the mean and standard deviation values. The dashed line represents a simple baseline, using the average lifetime of training cells as a fixed prediction to indicate the difficulty of learning. PCR, principal component regression; PLSR, partial least-squares regression; RF, random forest; Ridge, ridge regression; SVM, support vector machine.
Compared with statistical methods, deep learning models operating in the feature space developed by ref. 10 are susceptible to high variability resulting from different random initializations, including multi-layer perceptron25, long-short-term memory network26 and convolutional neural network (CNN)27. This may be due to the limited number of cells available for learning, combined with diverse ageing patterns and significant noise. BatLiNet also belongs to the deep learning family and uses the same CNN architecture for feature encoding. We observe that it has significantly mitigated the high variability associated with deep learning baselines, consistently delivering highly competitive results across diverse ageing conditions. Specifically, BatLiNet reduces the r.m.s.e. of the best-performing baseline (which varies by dataset) by 36.5, 6.8, 20.1, 27.4 and 40.1%, respectively. When compared with its single-cell learning counterpart, CNN, BatLiNet can reduce the average MAPE by up to 40%. It is worth noting that even for BatLiNet, the MAPE score on the MIX-100 and MIX-20 datasets is distinctly higher than that on previous datasets such as MATR-1 and MATR-2. We believe this highlights the significance of considering comprehensive ageing factors in battery data modelling.
Furthermore, we delve into investigating cross-chemistry transfer of BatLiNet. More specifically, we aim to confirm if BatLiNet can enhance the transfer from a resource-rich chemistry to other chemistries that have limited cells. This arrangement can highlight its potential in expediting precise lifetime predictions for future chemistries. In our experiments, we use 275 LFP cells as the rich-resource battery chemistry and aim to investigate how well we can leverage these LFP cells to develop models for the remaining 37 LCO cells, 22 NCA cells and 69 NMC cells. For consistent evaluation, we randomly sampled 21 LCO cells, 14 NCA cells and 53 NMC cells to form respective test sets. Then, from the remaining cells, we sampled 1, 2, 4, 8 and 16 cells as the available data for model training, corresponding to different low-resource conditions for each target battery chemistry. Figure 4 presents the overall comparisons of these models. We can observe that in most cases, BatLiNet has demonstrated distinct error reductions over other learning models. For instance, direct learning cannot leverage information from LFP cells and thus struggle when the number of target cells is extremely rare. Parameter-based transfer learning relies on pretrained parameters to enable implicit transfer, which we also find could encounter generalization challenges in certain cases, such as transferring from LFP cells to only one NCA or LCO cell. In contrast, BatLiNet enables an explicit transfer via inter-cell learning, which delivers more robust and accurate predictions in most cases.

We simulate various low-resource scenarios by varying the number of available target cells for training (1, 2, 4, 8, 16). BatLiNet’s inter-cell learning is compared to two baselines: a CNN model trained directly on target cells and a CNN model pretrained on LFP cells then fine-tuned. Each case and model is tested over eight unique initializations and data splits (n = 8 trials), with bar charts showing average error and error bars indicating standard deviation across runs.
Finally, we explain the reference selection strategy in BatLiNet. Figure 5 presents extended results on the MIX-100 dataset. Figure 5a shows that the choice of reference cells for a target cell can significantly affect prediction errors, as seen from the gap between the best and worst choices across different test set cells. While selecting the optimal reference cell is challenging, we mitigate performance variations by sampling a batch of reference cells and using their median predictions, as shown in Fig. 5b. Figure 5c reveals that this batch sampling mechanism does result in a significant reduction in inference speed as the batch size increases exponentially. However, given the extensive battery cycling time, these differences in inference speed are negligible. We find that using a batch of 64 reference cells is effective in maintaining a reasonable inference speed yet delivering robust predictions.

a, Best, worst and median prediction errors for all test cells in the MIX-100 dataset, using a single reference cell traversing all training cells. Shaded areas represent the standard deviation of prediction errors from randomly selecting a reference cell. b, Effects of increasing reference cell numbers on predictions in the MIX-100 dataset, with eight random selections per case (n = 8 trials). Every box plot displays medians as centre lines, the 25th and 75th percentiles as lower and upper quartiles, with whiskers extending to 1.5 times the interquartile range, including outlier points. c, Changes in inference throughput as the number of reference cells increases, tested on an NVIDIA GTX 4090 graphical processing unit.
Discussion
We introduce BatLiNet, a deep learning framework that integrates inter- and intra-cell learning to improve battery lifetime predictions across varied ageing conditions. Inter-cell learning complements intra-cell learning by enabling knowledge transfer across different ageing conditions.
This approach has potential applications in other critical prediction tasks, such as estimating battery state of charge and health5,28, adapting to diverse ageing conditions such as fast-charging protocols29 and emerging chemistries such as solid-state and sodium-ion batteries30,31,32, predicting calendar life under real-world conditions for more accurate lifetime estimates33.
While this study demonstrates the data-driven feasibility of inter-cell learning across various conditions, a deeper physical understanding and modelling remain essential34. Future research should prioritize a comprehensive approach to understanding and modelling diverse ageing factors to advance battery research, development and application.
Methods
Building per-cycle feature maps
We use the normalized capacity (Q ∈ [0, 1]) as a unified index to align different electrical signals in different cycles and compute their differentiation within the same stage or between charge and discharge stages. In this way, we do not need to worry about the variable lengths of different signals across different cycles and charge–discharge stages. Besides, due to the redundant recording of electrical signals, we can obtain these Q-indexed series by performing interpolations on raw time-indexed signals and easily control the feature dimensions by adjusting interpolation granularity. After this step, we can obtain four types of processed series indexed by Q, Vc(Q), Vd(Q), Ic(Q) and Id(Q), where Q varies from 0 to 1 with a prespecified step, V denotes voltage, I denotes current and d and c are superscripts to denote discharge and charge stages, respectively. We further derive two additional signals to characterize the connections between the charge and discharge stages: (1) ΔV(Q) = Vc(Q) − Vd(Q), meaning the gap between charge voltages and discharge voltages, and (2) R(Q) = (Vc(Q) − Vd(Q))/(Ic(Q) − Id(Q)), corresponding to the status of internal resistance as Q varies. These cycle-level features serve as the basic elements for calculating intra- and inter-cell differences.
There are two critical processing steps to ensure the effectiveness of calculating these differences from cycle-level feature maps. This first is to normalize the capacity of all batteries by their respective norminal capacities, ensuring the range of Q falls within [0, 1], to adapt to various battery types with very different nominal capacities. The second is to eliminate the data noise introduced by abrupt changes in current and voltage signals due to the variations in cycling protocols. We use a rolling-median-based filter to alleviate this issue:
Here r is the raw signal and w represents the window size of the rolling operations. These multi-faceted feature maps will both intra- and inter-cell learning as separate channels.
Unifying intra- and inter-cell learning
Given the intra-cell feature of a battery cell, denoted x, and its cycle life y, we want to optimize the following objective to obtain a perfect cycle life predictor.
where D denotes the data distribution, fθ is an encoding function parameterized by θ and wf is the weight of the last prediction layer. In practice, we need to perform the empirical risk minimization over limited training instances, that is
However, battery lifetime prediction is a special task that suffers from the data-scarce challenge due to the necessity of nonlinear modelling and the huge cost of obtaining data labels. In this scenario, instantiating fθ as a neural network has a high risk of overfitting. To alleviate the data-scarce issue, we consider modelling the differences between two distinct cells:
where ({rm{Delta }}{bf {x}}={bf {x}}-{{bf {x}}}^{{prime} }), ({rm{Delta }}y=y-{y}^{{prime} }), (x, y) and (({{bf {x}}}^{{prime} },{y}^{{prime} })) are independently sampled from D and gϕ is a function parameterized by ϕ that operates in the space of Δx.
The inter-cell learning formulation (6) assumes that the differences in feature representations for any pair of battery cells hold a unified relationship with the differences in their lifetimes. Specifically, we can establish a clear connection between fθ and gϕ in the linear setting. For example, if y is zero-centred (can be done via preprocessing), and the optimal solution for the original objective (4) is ({f}_{{{{theta }}}^{* }}({{x}})={{{bf {w}}}^{* }}^{T}{bf {x}}), then it is easy to verify that ({g}_{{{{phi }}}^{* }}={f}_{{{{theta }}}^{* }}) is also the optimal solution for the contrastive objective (6) because ({{mathbb{E}}}_{({rm{Delta }}{bf {x}},{rm{Delta }}y)}{leftVert {{{bf {w}}}^{* }}^{T}{rm{Delta }}{bf {x}}-{rm{Delta }}yrightVert }_{2}^{2}) can be decomposed into
In the nonlinear setting, such as using neural networks as function approximators, it is intractable to establish the exact connection between fθ and gϕ, which leads to two separate optimization procedures. Inspired by the same optimality of the objectives (4) and (6) under the linear setting, we propose to share the last linear layer of fθ and gθ when using neural networks, that is
where w is the shared parameter, hθ(⋅) and hϕ(⋅) are two separate neural networks parameterized by θ and ϕ, respectively. In this way, we can connect the optimization of the objectives (4) and (6) via the shared parameter w and enjoy the complementarity between intra- and inter-cell modelling.
Moreover, we also need to perform empirical risk minimization to mimic the desired objective (6). Specifically, given that we only have N training instances, we use N(N − 1) pairs of instances to substitute the expectation over independently sampled instance pairs. Together with the original regression, we have the following joint empirical risk minimization problem:
where Δxi,j = xi − xj, Δyi,j = yi − yj and λ is a hyper-parameter to balance two regression objectives.
After the optimization stage, we can leverage the neural networks for encoding intra- and inter-cell differences to make predictions. Given an unseen instance x, we have
where ({hat{y}}^{o}) and ({hat{y}}^{c}) are the predictions in the original and contrastive space, respectively, and (({{bf {x}}}^{{prime} },{y}^{{prime} })) can be sampled from the training instances. Last, we predict the lifetime as (hat{y}=alpha {hat{y}}^{o}+(1-alpha ){hat{y}}^{c}), where α is a hyper-parameter to balance the two types of prediction.
Responses