BatteryMFormer: Early Battery Degradation Forecasting
- BatteryMFormer is a specialized Transformer architecture for early battery degradation forecasting that leverages dual-view encoding and a meta degradation memory.
- It employs a dual encoder design to capture both temporal cycle dynamics and SOC-localized variations in voltage–current profiles.
- Empirical evaluations show that BatteryMFormer reduces forecast errors across multiple battery domains by integrating aging-condition-aware decoding.
BatteryMFormer is a specialized Transformer architecture for early battery degradation trajectory forecasting (BDTF), defined as predicting the full-life state-of-health (SOH) trajectory from the first charge–discharge cycles of a battery (Tan et al., 26 May 2026). It is designed around two empirical characteristics of battery degradation data emphasized in the literature: a multi-level structure spanning aging-condition regularities, cross-battery trajectory patterns, and battery-specific dynamics; and SOC-localized variations in voltage–current profiles, where degradation signatures concentrate in specific state-of-charge intervals rather than being uniformly distributed across the profile. The model addresses these characteristics through a dual-view encoder, an aging-condition-aware decoder, and a meta degradation pattern memory, with the goal of forecasting the SOH trajectory from cycle to end-of-life (EOL).
1. Problem setting and degradation structure
BatteryMFormer formulates early BDTF as follows. For each battery, the input consists of the early operational sequence
together with aging condition metadata , yielding
Each per-cycle input is a voltage–current–capacity–SOC time series
where is the number of resampled points and the four channels are voltage, current, capacity, and SOC. The forecasting target is the future SOH trajectory up to EOL,
The paper defines discharge capacity for cycle as
and SOH as
0
where 1 is nominal or first-cycle capacity and 2 is depth of discharge. EOL cycle 3 is the first cycle where SOH falls below a threshold 4: 80% for Li-ion, Na-ion, and Zn-ion, and 90% for CALB.
A central premise of BatteryMFormer is that battery degradation data exhibit a multi-level structure. At the aging-condition level, batteries sharing the same factor tuple 5—including positive electrode, negative electrode, electrolyte, package, nominal capacity, manufacturer, formation protocol, charge/discharge protocols, and temperature—tend to exhibit similar operational patterns and similar degradation regimes. At the trajectory-pattern level, full-life SOH curves often fall into a limited family of canonical shapes such as sublinear decay, linear decay, and superlinear “knee” behavior, with phenomena including initial capacity rise and capacity regeneration. At the battery-specific level, individual cells deviate from their condition average and require cell-specific representations. BatteryMFormer is explicitly constructed to model all three levels (Tan et al., 26 May 2026).
The second premise is that degradation-related profile changes are frequently localized to specific SOC intervals. Mechanisms such as phase transitions or local stoichiometry changes appear as subtle shifts, broadening, or distortions in particular SOC regions. This motivates an encoder that represents not only temporal evolution across cycles but also cross-cycle dynamics within fixed SOC slices.
2. Input representation and dual-view encoding
BatteryMFormer preprocesses each cycle by SOC-aligning and resampling it to a fixed grid with 6 points, with charging and discharging segments resampled and concatenated. It also computes cycle-level descriptors 7, specifically Coulombic efficiency and energy efficiency. Currents are normalized to C-rate, and SOH is normalized with respect to the EOL threshold inside the loss computation.
The model’s encoder has two complementary views: a temporal view and an SOC view. The temporal view captures per-cycle intra-cycle dynamics. For each cycle 8, the cycle tensor is flattened and projected,
9
then passed through an intra-cycle encoder to form the cycle token
0
Stacking these tokens yields
1
and cycle-level descriptors are injected through
2
The SOC view is designed for SOC-localized cross-cycle patterns. Treating variables as channels, each cycle is represented as 3. A 1D convolution along the SOC axis with patch length and stride 4 produces
5
Each of the 6 columns is an SOC patch. After stacking over cycles, the model extracts, for each SOC interval 7, a cross-cycle sequence 8 and feeds it into a shared temporal encoder: 9 Concatenating over all SOC intervals yields
0
The encoder therefore produces two token sets: 1, summarizing per-cycle dynamics, and 2, summarizing degradation-sensitive SOC segments. This dual representation is later concatenated for decoding (Tan et al., 26 May 2026).
3. Aging-condition-aware decoding and meta degradation pattern memory
BatteryMFormer’s decoder, termed ACDecoder, injects aging-condition information into the decoding process at every layer. It begins from learnable generic queries
3
where 4 is the number of decoder query tokens. The aging condition 5 is converted into a free-form text prompt 6 and encoded by the pretrained text embedder Qwen3-Embedding-0.6B. The resulting embedding is projected to the model dimension to obtain 7, and then transformed into a separate prior vector for each decoder query, producing 8. The decoder input is
9
This yields aging-condition-informed queries (ACQuery): every decoder query token is explicitly conditioned on 0, and different queries can specialize to different aspects of the condition. The decoder also uses aging-condition-aware attention (ACAttention), in which each query is shifted by its corresponding aging-condition prior before projection: 1 This applies to both self-attention and cross-attention, so attention patterns are explicitly conditioned on aging conditions.
The decoder attends jointly to temporal and SOC tokens through
2
with positional encoding 3. The resulting hidden representation 4 is passed to the model’s memory module.
The meta degradation pattern memory (MDPM) is a learnable memory matrix
5
whose slots are prototype embeddings for shared trajectory patterns. A query vector is formed from the final decoder output, cosine similarity is computed to all memory slots, and the top-2 most similar slots are selected. Their softmax-weighted combination yields a retrieved pattern embedding 6. The paper describes these prototypes as representing trajectory types such as knee-type, linear, and sublinear behavior.
To ensure that memory slots encode real full-life trajectories, BatteryMFormer introduces a trajectory encoder and trajectory decoder. The full ground-truth SOH trajectory, padded to 7, is embedded as
8
and the memory retrieval is aligned with that embedding through a cosine alignment loss,
9
A reconstruction loss is also applied via
0
At prediction time, decoder features and retrieved memory are fused through a feature-wise gate: 1 followed by
2
where the head is a linear projection to a length-3 SOH sequence. This design combines battery-specific decoder features with global trajectory prototypes in a learned, dimension-wise manner (Tan et al., 26 May 2026).
4. Optimization, implementation, and forecasting objective
BatteryMFormer is trained with a composite objective
4
where 5 and 6 are hyperparameters. The prediction loss is a masked mean squared error over a fixed maximum horizon 7: 8 Only valid time steps are counted, which allows batteries with different lifetimes to be trained within the same output space.
The architecture is tuned over the following hyperparameter ranges: embedding dimension 9; decoder layers 0; intra-cycle layers 1; number of queries 2; memory size 3; and SOC convolution kernel sizes 4. Training uses PyTorch, Adam + weight decay, early stopping with patience 30, and up to 300 epochs. Hyperparameters are tuned with Bayesian optimization, using 30 trials for BatteryMFormer per fold and at least 10 configurations for baselines.
The operational significance of this formulation is that the model is required to predict the entire future SOH trajectory from early cycles only. The paper focuses on the “early” regime, from the first few cycles up to the first 100 cycles, including few-cycle settings where early SOH curves remain visually similar even when later degradation trajectories diverge (Tan et al., 26 May 2026).
5. Empirical performance and ablation evidence
BatteryMFormer is evaluated on four domains from the BatteryLife database: Li-ion (963 cells, 466 conditions), CALB (27 cells, 4 conditions, large-format Li-ion), Na-ion (31 cells, 12 conditions), and Zn-ion (95 cells, 95 conditions). The evaluation metrics are MAPE (%) and MAE on SOH.
| Domain | Best baseline | BatteryMFormer |
|---|---|---|
| Li-ion | IC2ML: MAPE 2.528, MAE 2.284 | MAPE 2.248, MAE 2.034 |
| CALB | IC2ML: MAPE 1.955, MAE 1.892 | MAPE 1.789, MAE 1.687 |
| Na-ion | TimeBridge: MAPE 1.217, MAE 1.008 | MAPE 1.002, MAE 0.830 |
| Zn-ion | IC2ML: MAPE 5.460, MAE 5.355 | MAPE 4.970, MAE 4.721 |
The reported relative improvements are 11.07% MAPE and 10.94% MAE on Li-ion, 8.49% MAPE and 10.83% MAE on CALB, 17.66% MAPE and 17.65% MAE on Na-ion, and 8.97% MAPE and 11.83% MAE on Zn-ion. The paper states that BatteryMFormer is consistently best across all domains and metrics (Tan et al., 26 May 2026).
The baseline suite includes battery-specific BDTF models—IC2ML, CPTransformer, and CPMLP—as well as generic time-series forecasters such as TimeMixer++, TimeBridge, iTransformer, TimesFM, PatchTST, PatchMLP, DLinear, and ConvTimeNet. A notable comparison is CPTransformer-SI, a strong baseline variant given the same input information, including SOC, aging conditions, and descriptors, but without the multi-level architecture. The paper reports that CPTransformer-SI remains clearly worse than BatteryMFormer, supporting the interpretation that the gains arise from architectural design rather than from additional input features alone.
Ablation results attribute the performance to all three main components. Removing the SOC view increases errors significantly, especially on Li-ion and Na-ion. Removing MDPM degrades performance on all domains. Removing the entire ACDecoder, or removing ACQuery or ACAttention individually, produces substantial degradation, especially on CALB and Zn-ion. Replacing the LLM-based aging-condition encoding with simple lookup embeddings (“w/o LLM”) worsens both performance and stability.
The model also exhibits a data-efficiency advantage. When training with only 50% of training batteries, BatteryMFormer still outperforms the best baselines on all four domains, with especially large gains on Na-ion and Zn-ion, reported as up to 5 MAE reduction. In experiments varying the number of early cycles 6, BatteryMFormer remains superior across a range of early-cycle lengths. The paper notes that, for some baselines, adding more early cycles can fail to help because of redundancy and optimization difficulties on very long sequences, whereas BatteryMFormer remains more robust.
6. Interpretability, limitations, and research context
The paper includes several interpretability analyses. First, decoding the top-2 retrieved MDPM slots for test batteries with superlinear, linear, and sublinear degradation shows prototypes with knee-like, linear, or sublinear shapes that match the true long-term behavior. This indicates that the memory retrieves trajectory prototypes that are relevant even when early degradation appears mild. Second, decoder attention allocates most mass to temporal tokens but assigns a significant share to SOC tokens, with SOC attention concentrated on a small subset of intervals. Third, the SOC tokens with the top 25% attention weights align with major differential voltage analysis (DVA) peaks and shoulders, which are known to be sensitive to aging mechanisms such as lithium inventory loss and active material loss. This suggests that BatteryMFormer’s SOC-view attention is focusing on electrochemically meaningful intervals (Tan et al., 26 May 2026).
The authors identify several limitations. Using many early cycles, particularly beyond 25, yields very long input sequences—illustrated as exceeding 7500 points—which can degrade performance because of redundancy and optimization difficulty. The evaluation is conducted on laboratory or production-test data with regular cycles and relatively clean signals, so extension to irregular, noisy field data such as EV logs would require preprocessing for irregular sampling and noise and may benefit from ideas such as Warpformer. The paper also notes that uncertainty quantification is not explicitly addressed, and that this would be valuable in safety-critical settings.
Within the broader transformer literature for batteries, BatteryMFormer occupies a distinct position. Dynaformer introduced an ageing-aware encoder–decoder Transformer for voltage discharge prediction and end-of-discharge estimation under varying aging conditions, emphasizing latent aging-state inference from short discharge snippets (Biggio et al., 2022). CDFormer combined CNNs, deep residual shrinkage networks, and Transformer encoders for lithium-ion battery RUL prediction from multivariate cycle-level signals, with a composite temporal data augmentation strategy (Tian et al., 28 Mar 2026). “Prognosis of Multivariate Battery State of Performance and Health via Transformers” applied a spacetimeformer architecture to forecast a vector of battery state-of-performance and state-of-health descriptors, including capacity, energy, efficiencies, and ECM-derived OCV and resistance over SOC (Paulson et al., 2023). Pretrained Battery Transformer (PBT) extended transformer-based battery modeling toward a foundation-model regime through domain-knowledge-encoded mixture-of-experts layers and transfer learning across heterogeneous datasets (Tan et al., 18 Dec 2025).
Against that background, BatteryMFormer is characterized not by foundation-model pretraining or multivariate SoPaH prediction, but by a multi-level learning formulation for early BDTF: aging-condition priors are injected directly into decoding; cross-battery trajectory regularities are represented as a learnable prototype memory; and degradation-sensitive SOC sub-intervals are modeled explicitly rather than uniformly. A plausible implication is that BatteryMFormer helps connect battery-life forecasting more tightly to both metadata-conditioned generalization and electrochemically localized profile variation, while remaining centered on full-trajectory SOH extrapolation from the first tens of cycles.