ROBAT: A Hierarchical Transformer with Rotary Position Embeddings for Generalizable Battery Health Prediction
Abstract
Accurate and robust state-of-health (SOH) prediction is essential for improving the safety, reliability, and lifecycle management of lithium-ion batteries. Recent advances in deep learning have improved data-driven battery prognostics. However, many existing approaches require separate training for different chemistries and cycling protocols, extensive feature engineering, and substantial preprocessing to accommodate heterogeneous measurement formats. Here, we propose ROBAT, a hierarchical Transformer framework that jointly models intra-cycle and inter-cycle dynamics to learn generalizable battery representations from irregularly sampled voltage and current measurements, without requiring handcrafted degradation indicators or fixed-grid interpolation of the raw signals. In the time-level module, multi-time attention maps irregularly sampled voltage and current measurements to a common latent representation, which is subsequently encoded by a Transformer with rotary position embeddings (RoPE). The cycle-level module then uses another Transformer with RoPE to integrate the resulting cycle representations with SOH history and model degradation dependencies across cycles. We train a single ROBAT model on combined public datasets spanning diverse cathode chemistries. The model predicts SOH for both public test cells and independently collected laboratory data without fine-tuning. Across 101,579 cycling samples from 142 test cells drawn from seven datasets, ROBAT achieves a mean absolute error of 0.059\% and a root-mean-square error of 0.094\% for next-cycle SOH prediction. More than 90\% of the samples exhibit absolute errors below 0.15\%, with more than 98\% below 0.3\%, demonstrating robust predictive performance across chemically and operationally diverse batteries. These results indicate that a single hierarchical model can support accurate SOH prediction across chemically and operationally diverse batteries.