# BATT2GRAPH: A Hybrid CNN-LSTM and Temporal Graph-Based Approach for Lithium-Ion Battery SOH Prediction and Anomaly Detection

Hajer Akid, Mohamed Wadhah Mabrouk, Slimane Arbaoui, Ahmed Samet, Boudour Ammar

► To cite this version:

Hajer Akid, Mohamed Wadhah Mabrouk, Slimane Arbaoui, Ahmed Samet, Boudour Ammar. BATT2GRAPH: A Hybrid CNN-LSTM and Temporal Graph-Based Approach for Lithium-Ion Battery SOH Prediction and Anomaly Detection. iiWAS 2025 - 27th International Conference on Information Integration and Web Intelligence, Dec 2025, Matsue, Japan. pp.127-141, 10.1007/978-3-032-11976-6_9. hal-05449517v1

HAL Id: hal-05449517

https://hal.science/hal-05449517v1

Submitted on 8 Jan 2026 (v1), last revised 19 Jan 2026 (v2)

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# BATT2GRAPH: A Hybrid CNN-LSTM and Temporal Graph-Based Approach for Lithium-Ion Battery SOH Prediction and Anomaly Detection

Hajer Akid¹, Mohamed Wadhah Mabrouk², Slimane Arbaoui³, Ahmed Samet³, and Boudour Ammar²

¹ Université Côte d'Azur, Inria, CNRS, I3S (UMR 7271), France

² REGIM-Lab (LR11ES48), National Engineering School of Sfax (ENIS), University of Sfax, BP 1173, Sfax, 3038, Tunisia

³ ICube (UMR 7357), National Institute of Applied Sciences (INSA) of Strasbourg, University of Strasbourg, 24 Bd de la Victoire, Strasbourg, 67000, France

**Abstract.** The rapid adoption of electric vehicles (EVs) underscores the growing need for reliable battery health monitoring systems to ensure safety, optimize performance, and extend operational lifespan. In this paper, we introduce BATT2GRAPH, a novel approach that combines a temporal graph-based representation with a CNN-LSTM predictive model for accurate State-of-Health (SOH) estimation and anomaly detection in lithium-ion batteries (LIBs). On one hand, BATT2GRAPH constructs a temporal property graph using Neo4j to store enriched charge-discharge cycles with both raw time-series data and aggregated statistical indicators, enabling interpretable SOH monitoring and anomaly detection through expressive Cypher queries. On the other hand, a hybrid CNN-LSTM model is trained on this data to capture fine-grained variations and long-term degradation trends. Extensive experiments on the Stanford-MIT battery aging dataset demonstrate that our approach consistently outperforms existing baselines across multiple evaluation metrics.

**Keywords:** Battery Health Monitoring · State of Health Prediction · Hybrid LSTM-CNN model · Temporal graph databases · Lithium-ion battery

## 1 Introduction

The global transition toward sustainable energy systems and reduced carbon emissions demands several social and technological transformations to achieve net-zero goals. Among emerging low-carbon and renewable technologies, lithium-ion batteries (LIBs) play a key enabler of this transition, thanks to their high energy density (up to 200 Wh/kg), wide operating temperature range (0°C to 60°C), and low self-discharge rate [1,2]. Today, LIBs are extensively deployed in smart grids, consumer electronics such as smartphones and laptops, and play a critical role in the electrification of transportation, particularly in electric vehicles (EVs). In this context, the EV market has experienced exponential growth,
with annual sales rising from approximately 17,000 units in 2010 to more than 16 million in 2024 [3]. This rapid adoption has led to a parallel surge in demand for LIBs, highlighting their pivotal role in the transition to low-emission mobility. However, despite their many advantages, LIBs face major challenges regarding longevity and safety [4]. Over time, electrochemical degradation during repeated charging and discharging reduces their ability to store and deliver energy efficiently. Moreover, operating conditions such as overcharging, deep discharge, or internal short circuits may compromise battery performance and even cause critical failures such as fires or explosions, mainly due to increased internal resistance in aging cells [5,6]. These risks underscore the need for advanced diagnostic tools and robust safety monitoring systems.

To address these challenges, predictive health monitoring of LIBs has emerged as a critical area of research. This involves estimating future battery states using historical and real-time data, enabling proactive maintenance, reducing unexpected failures, and extending operational lifespan. A crucial element of this task is anomaly detection, identifying unexpected deviations from normal patterns, which is key to preventing hazardous incidents and implementing timely interventions. The key indicator of battery health assessment is the state of health (SOH), a widely used term that reflects the current capacity of the battery compared to its nominal capacity. SOH is formally defined as follows [7]:

$$SOH(\%) = \left( \frac{Q(t)}{Q_{nom}} \right) \times 100$$

where $Q(t)$ is the current capacity at time $t$, and $Q_{nom}$ is the initial nominal capacity.

In EV applications, a LIB typically reaches its end of first life when its SOH drops below 80%. Although not yet suitable for vehicle use, such batteries can still be reused for secondary applications such as stationary energy storage [8]. To anticipate end-of-life, a wide range of methods has been proposed as part of Prognostics and Health Management (PHM). These approaches not only track long-term degradation but also aim to detect early anomalies that could indicate future failures. PHM methods are commonly categorized into two main classes: model-based and data-driven approaches. In this paper, we introduce BATT2GRAPH, a novel hybrid data-driven approach for LIB SOH prediction and anomaly detection. The key contributions of this work are twofold:

- First, we design and implement a temporal graph-based data model using Neo4j, which enables the structured storage of charge-discharge cycles and supports SOH monitoring and anomaly detection through interpretable Cypher queries and pattern matching.

- Second, we propose an enriched hybrid CNN-LSTM model that combines raw time-series features with aggregated statistical indicators to improve SOH prediction accuracy.

The remainder of this paper is organized as follows: Section 2 presents the background and related work on SOH prediction and anomaly detection. Section 3
describes the overall architecture of the proposed BATT2GRAPH approach. Section 4 details the experimental setup and discusses the results. Finally, Section 5 concludes the paper and outlines future research directions.

## 2 Related Work

The monitoring and analysis of LIB behavior require handling large volumes of multivariate time-series data. These data include measurements of voltage, current, and temperature recorded throughout charge and discharge cycles, which are vital indicators of battery performance and degradation. Although several time-series databases exist, only a few approaches have been specifically designed to represent battery data in a structured form that supports both long-term degradation monitoring and early anomaly detection [9]. Furthermore, most conventional data storage strategies lack the capability to capture the complex temporal and relational dependencies inherent in battery usage.

### 2.1 Time-Series Data in Battery Monitoring

A time series is defined as a sequence of data points indexed in time order, often measured at uniform intervals [10, 11]. A univariate time series consists of observations of a single variable over time and can be formally written as:

$$ \{x_t\}_{t \in T} = \{x_1, x_2, x_3, \dots, x_m\} $$

where $x_t$ denotes the value at time $t$, and $T = \{1, 2, \dots, m\}$ is the index set. Sub-sequences extracted from these series, denoted as $T_{i,n} = (x_i, x_{i+1}, \dots, x_{i+n-1})$, allow localized pattern analysis.

In battery monitoring applications, sensors typically record multiple variables simultaneously (e.g., voltage, current, and temperature) at each time point. This leads to a multivariate time series. In practice, battery time-series data exhibits nonlinear trends and long-term dependencies across charge-discharge cycles. Traditional flat storage formats such as CSV files are often insufficient to preserve the rich structure and temporal dependencies present in battery data. The increasing volume and temporal complexity of these datasets call for more expressive data models capable of capturing temporal dynamics, inter-variable correlations, and deviations from expected behavior.

### 2.2 Temporal Graph Databases

Temporal graph databases offer a compelling paradigm for modeling evolving battery data. They combine structural expressiveness with temporal information, enabling complex relationship modeling and time-aware queries [12, 13]. Formally, a temporal graph is defined as $G = (V, E, \lambda, \tau)$, where nodes $V$ and edges $E$ are annotated with temporal labels $\lambda$ over a time domain $\tau \subseteq \mathbb{N}$.

These structures support operations such as temporal pattern matching and aggregation over time, which are particularly relevant for SOH trend tracking
and anomaly detection in LIBs. In the context of battery monitoring, each cycle
can be modeled as a temporal node, linked through chronological or contextual
relationships to preceding cycles, metadata (e.g., charge policies), and statistical
health indicators. This graph-based approach allows for querying and analyzing
degradation paths, identifying cycles with similar anomaly patterns, and under-
standing the interplay between operational conditions and battery aging.

## 2.3 Prognostic Methods for Lithium-Ion Batteries

PHM methods are generally classified into two main categories: model-based approaches and data-driven approaches. Model-based approaches, also known as white-box methods, rely on physical principles and use mathematical models to characterize battery behavior. Such models typically include electrochemical models and equivalent circuit models (ECMs), often coupled with state estimators or observers to infer internal battery parameters. For instance, Kalman filter variants such as the Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) have been widely used to estimate capacity fade and the evolution of internal resistance over time [14, 15]. These methods offer advantages in terms of low complexity and low computational requirements, making them effective when sensor data is limited [16]. However, they rely heavily on accurate parameter identification and a thorough understanding of the battery's physicochemical properties and environmental conditions [17], which can limit their scalability across different battery types and operating scenarios. On the other hand, data-driven approaches, often referred to as black-box models, infer degradation patterns directly from operational data such as voltage, current, and temperature, without relying on explicit physical modeling. These approaches encompass both classical machine learning techniques and modern deep learning architectures [18]. In particular, recurrent neural networks such as Long Short-Term Memory (LSTM) models have become a popular choice for SOH prediction, as they are well suited for modeling sequential data and capturing long-term dependencies in battery cycle data [19–22]. For example, in [20], the authors proposed an enhanced LSTM model, referred to as E-LSTM, for battery SOH forecasting. This architecture integrates a dimensionality-reduction encoder before the LSTM layers to better capture underlying data trends. They also developed a CNN–LSTM model, combining convolutional layers for extracting local features from charge–discharge curves with LSTM layers for modeling temporal dynamics. Applied to the public Stanford–MIT battery dataset, both models achieved high predictive accuracy, with the E-LSTM slightly outperforming the CNN–LSTM and reaching a mean absolute error below 1% of the nominal capacity. Similarly, other researchers have explored hybrid architectures and feature engineering to improve data-driven SOH estimation. In [21], the authors extract diagnostic features from charging curves using Incremental Capacity Analysis (ICA), and input these features into an LSTM network, leading to improved SOH prediction accuracy for lithium–sulfur batteries. In [22], the authors enhanced a standard CNN–LSTM architecture by introducing skip connections between LSTM layers and integrating a feature selection strategy
to eliminate irrelevant inputs. This hybrid design aimed to improve model robustness and training efficiency by mitigating network degradation and reducing input dimensionality. Their results support the effectiveness of combining convolutional feature extraction, temporal modeling, and input optimization for improving battery SOH prediction.

Despite the advantages of data-driven strategies, existing approaches still face significant limitations. Many deep learning models treat battery data as a straightforward time series, without exploiting the rich relational and contextual structure inherent in long-term degradation processes. CNN-LSTM models typically rely on raw sensor sequences or a narrow set of hand-crafted features, potentially missing higher-level statistical patterns and contextual dependencies. Moreover, although temporal databases and battery knowledge graphs have recently gained attention [23], there remains a lack of dedicated methods that structure, store, and leverage time-series battery data for effective health monitoring and anomaly detection. To overcome these limitations, we introduce BATT2GRAPH, a novel approach that combines a temporal graph-based representation of LIB cycling data with a hybrid deep learning model enriched with statistical features. This integration enables more interpretable anomaly detection by jointly modeling temporal dynamics and structural context.

## 3 Proposed Approach: BATT2GRAPH

The proposed approach, BATT2GRAPH, models the lifecycle of LIBs as a temporal property graph and integrates a hybrid CNN-LSTM architecture for State of Health (SOH) prediction. This representation provides a structured and scalable way to organize heterogeneous information, such as sensor readings, operational protocols, and extracted features. It captures both the temporal progression of battery cycles and their contextual dependencies. The resulting graph structure supports robust anomaly detection, enables long-term monitoring, and improves interpretability. The predictive pipeline combines two complementary neural components. Convolutional Neural Networks (CNNs) extract local patterns from cycle-level features. In parallel, Long Short-Term Memory (LSTM) layers capture long-range dependencies in degradation trajectories. This hybrid design enhances predictive performance by leveraging the temporal structure embedded in the data.

Before being used for model training or stored in the temporal graph, raw time-series signals (e.g., voltage, current, temperature) are divided into two types of features: temporal features (TF) and historical features (HF). These features are then incorporated into the temporal graph structure. In addition, all signals are normalized using a z-score transformation computed within a local sliding window to ensure comparability across batteries and to highlight sustained anomalies or abnormal deviations. The z-score of a given value X is defined as:

$$z = \frac{X - \mu}{\sigma}$$
where $\mu$ is the mean and $\sigma$ is the standard deviation of the corresponding signal within the window. This normalization facilitates the comparison of signals with different magnitudes and improves the detection of deviations from normal behavior. Aggregated statistical indicators, primarily derived from the HF and normalized signals (e.g., mean, max, min), are also computed and used to enrich the predictive model. An overview of the full BATT2GRAPH pipeline is shown in Figure 1. The process begins with feature extraction from raw LIB data, followed by z-score normalization, feature aggregation, graph modeling, and finally SOH prediction using the hybrid CNN-LSTM architecture. After prediction, model performance is evaluated using several standard metrics.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Overview of the BATT2GRAPH pipeline</figcaption></figure>

The remainder of this section presents the motivation and key components of BATT2GRAPH. It begins with the rationale for adopting a graph-based representation, then describes the construction of the proposed temporal graph, the process of anomaly detection and data aggregation, and finally the CNN-LSTM architecture for SOH prediction.

## 3.1 Motivation for Graph-Based Battery Data Representation

Battery data is inherently multi-dimensional and time-dependent, involving various sensor measurements such as voltage, current, temperature, and capacity recorded across many charge-discharge cycles. Traditional data representations (e.g., flat feature vectors or tabular formats) often fall short of capturing the complex temporal and contextual relationships embedded in this data. In contrast, a graph-based representation provides a more intuitive and expressive way to model battery degradation trajectories. Each cycle can be represented as a
node, with edges encoding temporal progression or contextual interactions (e.g., operating conditions, charge policies). This structure makes it possible to visualize and analyze how degradation unfolds over time and under specific conditions. Moreover, graph structures facilitate the identification of similar degradation patterns across different cells or usage histories, supporting explainability and comparative analysis. Unlike rigid sequential models, the graph structure can evolve dynamically as new data arrives, maintaining a coherent view of the system's history while enabling both localized and global understanding of the data. Hence, representing battery data as a temporal graph allows us to better capture the dynamic and relational nature of degradation processes.

## 3.2 Temporal Graph Modeling of Battery Data

In this work, we propose modeling the battery dataset as a temporal property graph. This graph-based representation is designed to capture the hierarchical structure and temporal evolution of LIB cycling data, enabling the integration of degradation dynamics and contextual factors within a flexible data model. The graph comprises several types of meaningful nodes.

- A Batch node represents a group of battery cells manufactured and tested under identical experimental conditions.

- A Cell node corresponds to a specific battery cell and is linked to the Batch it belongs to.

- A Charge_Policy node describes the protocol used for charging and discharging, including parameters such as voltage thresholds, current limits, and cutoff criteria.

- A Cycle node represents a single charge-discharge cycle. These nodes are ordered and connected by directed edges (e.g., Cycle₁ → Cycle₂) to preserve the chronological progression of the battery's lifecycle. Each cycle node stores raw data such as voltage, current, and temperature, and is enriched with two types of computed indicators:

* **Historical Features (HF):** Scalar features computed for each cycle, including both direct measurements (e.g., charge/discharge capacities) and summary statistics (e.g., maximum temperature, minimum voltage). The SOH estimated for each cycle is also stored as part of the HF set.

* **Temporal Features (TF):** Raw vector sequences collected during each charge or discharge cycle, such as time series of temperature, voltage, and current. Z-score normalization and sliding-window analysis are applied later in the pipeline to highlight patterns and detect anomalies.

- Additional contextual nodes such as AGG_HF (aggregated historical features) can be linked to their corresponding Cell nodes to reflect statistical summaries or temporal aggregations used for monitoring and analysis.

Figure 2 illustrates the proposed temporal graph structure. By encoding battery degradation data in this graph, we enable advanced querying, subgraph matching, and similarity analysis between different degradation trajectories. This
<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Proposed temporal graph-based representation for SOH monitoring and anomaly detection</figcaption></figure>

representation serves as the foundation for anomaly detection and SOH monitoring.

To detect anomalies, we leverage the structure of the temporal property graph. Each cycle is represented as a node connected to its predecessor and successor, enabling traversal along the battery's chronological degradation path. By examining cycle-to-cycle variations in SOH, charge and discharge capacities, or other historical features, we can flag abrupt deviations that are inconsistent with the expected degradation trend. Moreover, contextual information stored in neighboring nodes, such as temperature values, charge policies, or operating conditions, can be queried using the Cypher query language to isolate outlier cycles. For instance, a drop in capacity that occurs without a corresponding change in temperature or charging protocol may indicate a true anomaly rather than a context-driven variation. The graph structure also facilitates group-wise analysis. Anomalies can be detected by comparing a cell's behavior to that of others from the same batch or operating under the same charge policy.
3.3 Hybrid CNN-LSTM Model for SOH Prediction

We designed a hybrid deep learning model that combines Convolutional Neural
Networks (CNNs) with Long Short-Term Memory (LSTM) units to predict the
State of Health (SOH) of lithium-ion batteries (LIBs). The model is trained to
learn both local and long-range temporal dependencies from structured inputs
derived from the temporal property graph.

The model processes two distinct types of features for each sliding window
of 10 consecutive cycles:

- **Multivariate time-series inputs** of shape (10, 6, 652), representing six raw sensor signals (voltage, current, and temperature during charge and discharge) per cycle, each sampled over 652 time steps.

- **Aggregated scalar features** of shape (10, 6), including maximum, minimum, and temperature differences per cycle, as well as statistical indicators such as rolling Z-score means computed over the same cycles.

These inputs are generated using a sliding window approach, where each
training sample consists of the input for 10 cycles and the corresponding SOH
values for the following 10 cycles. The time-series data are normalized using Z-
score scaling within each window to enhance contrast and reduce sensor variabil-
ity. As illustrated in Figure 3, the architecture comprises two parallel branches
followed by temporal modeling:

- **CNN branch:** The time-series inputs are passed through a **Conv2D** layer with 32 filters and a kernel size of (3,3) to capture short-term spatial-temporal patterns across sensors and time. A **MaxPooling2D** layer reduces dimensionality and filters noise. The resulting feature maps are then flattened.

- **Dense branch:** The scalar statistical features are processed through two fully connected layers (Dense) of sizes 6 → 16 and 16 → 8, allowing the network to learn compact representations of aggregated contextual data. These are also flattened.

- **Concatenation and Reshaping:** Outputs from both branches are concatenated and reshaped into a sequence compatible with LSTM input format.

- **Temporal modeling:** Two stacked LSTM layers (128 units each) learn long-term dependencies in the sequence of battery cycles, supported by a **Dropout** layer to mitigate overfitting.

- **Prediction layer:** A final dense layer maps the output to a 10-dimensional vector, representing the predicted SOH values for the next 10 cycles. The model is trained using a Mean Squared Error (MSE) loss function, suitable for regression tasks.

The model is trained using both raw sensor data and aggregated statistical
indicators. Sequences are constructed per cell using non-overlapping windows for
prediction. The enriched input data improves generalization by providing both
low-level signals and high-level context.
This hybrid CNN-LSTM design leverages the strengths of both components: CNNs are effective at detecting local variations and reducing noise, while LSTMs capture the progressive and nonlinear nature of battery aging over time. The integration of graph-derived contextual features further enhances robustness and interpretability in SOH prediction.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Architecture of the hybrid CNN-LSTM model for SOH prediction.</figcaption></figure>

# 4 Experiments and Results

To evaluate the effectiveness of BATT2GRAPH, we conducted experiments using the Stanford-MIT aging dataset which include cycling data from 124 LIB cells. Each cell undergoes repeated charge-discharge cycles, providing multivariate time-series signals such as current, voltage, and temperature. For each battery cell, 80% of the initial cycles were used for training, and the remaining 20% for testing (predicting SOH beyond the training window). All experiments were
conducted on a machine equipped with a 12th-generation Intel Core i5 processor, 32 GB of RAM, an NVIDIA GeForce RTX 3070 GPU (6 GB VRAM), and a 512 GB SSD. Graph modeling and data storage were implemented using Neo4j (version 5.20), which provides native support for property graphs and facilitates expressive graph traversals. The Cypher query language was used to define the graph schema, insert cycle-level data, extract relevant features, and support anomaly detection through pattern-based queries.

## 4.1 Evaluation Metrics

To evaluate the performance of the BATT2GRAPH model, we employed commonly used regression metrics, including Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). These metrics provide a comprehensive assessment of predictive accuracy, enabling a detailed comparison against standard baseline models.

- **Mean Absolute Error (MAE):** Measures the average absolute differences between predicted and actual SOH values, providing a direct indication of the model's general accuracy:

$$MAE = \frac{1}{n} \sum_{i=1}^{n} |y_i - \hat{y}_i|$$

- **Mean Squared Error (MSE):** Captures the average squared differences between predictions and actual values, penalizing larger errors:

$$MSE = \frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2$$

- **Root Mean Squared Error (RMSE):** Provides an error measure in the same unit as the SOH, useful for interpretability:

$$RMSE = \sqrt{\frac{1}{n} \sum_{i=1}^{n} (y_i - \hat{y}_i)^2}$$

- **Mean Absolute Percentage Error (MAPE):** Expresses error as a percentage of actual values, helping evaluate relative accuracy:

$$MAPE = \frac{1}{n} \sum_{i=1}^{n} \left| \frac{y_i - \hat{y}_i}{y_i} \right| \times 100$$

(Note: instances where $y_i = 0$ are excluded to avoid division by zero.)

These metrics were computed on the test set to quantify the prediction performance of BATT2GRAPH and compare it with baseline models.
## 4.2 Comparative Analysis and Results

In order to validate our enriched predictive CNN-LSTM model, we compared its performance to two state-of-the-art baselines:

- CNN-LSTM: a hybrid model combining 1D convolutional layers and LSTM layers, trained directly on sequences of time-series features (e.g., voltage, current, temperature).

- E-LSTM: an enhanced LSTM model incorporating an exponential decay prior to better model the degradation trend.

All models are implemented using TensorFlow and trained on a Tesla T4 GPU. Hyperparameter tuning is performed using grid search on a validation set (e.g., filter sizes {16, 32}, LSTM units {32, 64}, dropout rates). The training uses the Adam optimizer with a learning rate of $10^{-3}$ and the MSE loss function. Early stopping is applied to prevent overfitting.

<table><caption>**Table 1.** SOH prediction accuracy across models (mean ± standard deviation).</caption><thead><tr><th rowspan="2">Metric</th><th colspan="2">E-LSTM</th><th colspan="2">CNN-LSTM</th><th colspan="2">BATT2GRAPH</th></tr><tr><th>Mean</th><th>Std</th><th>Mean</th><th>Std</th><th>Mean</th><th>Std</th></tr></thead><tbody><tr><td>MAE</td><td>0.0086</td><td>0.0006</td><td>0.0090</td><td>0.0008</td><td><strong>0.0066</strong></td><td>0.0003</td></tr><tr><td>MSE</td><td>0.00017</td><td>0.00002</td><td>0.00022</td><td>0.00003</td><td><strong>0.00010</strong></td><td>0.00001</td></tr><tr><td>RMSE</td><td>0.013</td><td>0.0044</td><td>0.014</td><td>0.0054</td><td><strong>0.0100</strong></td><td>0.0032</td></tr><tr><td>MAPE</td><td>0.91</td><td>0.06</td><td>0.96</td><td>0.09</td><td><strong>0.70</strong></td><td>0.04</td></tr></tbody></table>

As shown in Table 1, BATT2GRAPH consistently outperforms the baseline models across all metrics. In particular, it achieves the lowest MAE and RMSE, reducing the average prediction error by more than 25% compared to the standard CNN-LSTM and by over 20% relative to the E-LSTM model. These improvements highlight the benefits of integrating aggregations as input to the predictive model.

To evaluate the potential of our temporal graph model for monitoring battery health, we explored a series of expressive Cypher queries that allow anomaly detection and behavioral pattern analysis. These queries leverage the structure of the graph to retrieve, aggregate, and filter information at different levels of granularity. Below are examples of relevant queries tested using Cypher to illustrate the capabilities of the proposed temporal graph database.

- **Detecting Abnormal Capacity Deviations:** This query identifies cycles where the charge capacity deviates significantly from the neighboring cycles. It compares the capacity values between consecutive cycles of the same cell to detect abrupt changes:

```
MATCH (c1:Cycle)-[:NEXT]->(c2:Cycle),
(c1)-[:Has_HistoricalFeats]->(h1:HF),
```
(c2)-[:Has_HistoricalFeats]->(h2:HF)
WHERE abs(h2.Qc - h1.Qc) > 0.1 * h1.Qc
RETURN c1.Cycle_ID, c2.Cycle_ID, h1.Qc, h2.Qc

- **Finding Cycles with Unusual SOH Drops:** This query selects cycles that exhibit a sudden decrease in the state of health compared to the previous one, which may indicate degradation anomalies or sensor failures:

MATCH (c1:Cycle)-[:NEXT]->(c2:Cycle),
(c1)-[:Has_HistoricalFeats]->(h1:HF),
(c2)-[:Has_HistoricalFeats]->(h2:HF)
WHERE h1.SOH - h2.SOH > 0.05
RETURN c1.Cycle_ID, c2.Cycle_ID, h1.SOH AS SOH1, h2.SOH AS SOH2

- **Detecting Persistent Temperature Increase:** This query identifies sequences of consecutive cycles where the average temperature shows a sudden ≥ 5°C and sustained increase, which may indicate abnormal thermal behavior:

MATCH (c1:Cycle)-[:NEXT]->(c2:Cycle),
(c1)-[:Has_TemporalFeats]->(t1:TF),
(c2)-[:Has_TemporalFeats]->(t2:TF)
WHERE t2.avgTemp - t1.avgTemp > 5
AND t1.avgTemp > 35
AND t2.avgTemp > 40
RETURN c1.Cycle_ID, t1.avgTemp AS Temp1,
c2.Cycle_ID, t2.avgTemp AS Temp2

All the Cypher queries presented above were tested and validated within the Neo4j environment using Stanford-MIT dataset. Our primary goal was to assess the feasibility of expressing domain-specific anomaly detection logic using graph queries. This preliminary validation confirms the flexibility and expressiveness of the temporal graph model.

# 5 Conclusions

In this paper, we introduced BATT2GRAPH, a novel approach for State-of-Health (SOH) prediction and anomaly detection in lithium-ion batteries (LIBs), combining a temporal graph database with a hybrid CNN-LSTM model. Unlike traditional sequence-based methods, our approach explicitly captures contextual and temporal dependencies through a structured and expressive graph representation, thereby improving both prediction accuracy and model interpretability. Experimental results on the Stanford-MIT battery aging dataset show that BATT2GRAPH consistently outperforms baseline models, achieving SOH prediction with root mean squared error (RMSE) values below 1%. By integrating raw time-series measurements, aggregated statistical features, and Cypher-based graph querying, BATT2GRAPH offers a powerful and interpretable solution for predictive modeling and anomaly detection. Its modular and extensible architecture opens promising directions for future research, including the refinement
of anomaly detection rules via threshold optimization and expert feedback, validation across multiple datasets, and the integration of advanced architectures such as Graph Neural Networks (GNNs).

# 6 Acknowledgments

This research received support from the European Union through the Horizon Europe program and the Innovation Program under grant agreement GAP-101103667.

# References

1. Xu, J., Cai, X., Cai, S., Shao, Y., Hu, C., Lu, S., Ding, S.: High-energy lithium-ion batteries: recent progress and a promising future in applications. Journal of Energy & Environmental Materials, 1-26(2023). https://doi.org/10.1002/eem2.12450

2. Jorge, I., Mesbahi, T., Samet, A., & Boné, R.: Time series feature extraction for lithium-ion batteries state-of-health prediction. Journal of Energy Storage, 1-9 (2023). https://doi.org/10.1016/j.est.2022.106436

3. International Energy Agency, https://www.iea.org/energy-system/transport/electric-vehicles, last accessed 2025/07/12

4. Liu, K., Liu, Y., Lin, D., Pei, A., & Cui, Y.: Materials for lithium-ion battery safety. Science advances, 1-11 (2018). https://doi.org/10.1126/sciadv.aas9820

5. Wang, Q., Ping, P., Zhao, X., Chu, G., Sun, J., & Chen, C.: Thermal runaway caused fire and explosion of lithium ion battery. Journal of power sources, 210-224 (2012). https://doi.org/10.1016/j.jpowsour.2012.02.038

6. Shan, T., Zhang, P., Wang, Z., & Zhu, X.: Insights into extreme thermal runaway scenarios of lithium-ion batteries fire and explosion: A critical review. Journal of Energy Storage, (2024). https://doi.org/10.1016/j.est.2024.111532

7. Yang, S., Zhang, C., Jiang, J., Zhang, W., Zhang, L., Wang, Y.: Review on state-of-health of lithium-ion batteries: Characterizations, estimations and applications. Journal of Cleaner Production, 1-23 (2021). https://doi.org/10.1016/j.jclepro.2021.128015

8. Vignesh, S., Che, H. S., Selvaraj, J., Tey, K. S., Lee, J. W., Shareef, H., & Errouissi, R.: State of Health (SOH) estimation methods for second life lithium-ion battery—Review and challenges. Applied Energy, 369, 123542 (2024). https://doi.org/10.1016/j.apenergy.2024.123542

9. Karmawijaya, M.I., Haq, I.N., Leksono, E., Widyotriatmo, A.: Development of big data analytics platform for electric vehicle battery management system. In: 2019 6th International Conference on Electric Vehicular Technology (ICEVT), pp. 151-155. IEEE (2019). https://doi.org/10.1109/ICEVT48285.2019.8994013

10. Rodpongpun, S., Niennattrakul, V., & Ratanamahatana, C. A.: Selective subsequence time series clustering. Knowledge-Based Systems, 361-368 (2012). https://doi.org/10.1016/j.knosys.2012.04.022
11. Shumway, R. H., Stoffer, D. S., & Stoffer, D. S.: Time series analysis and its applications. New York: springer (2000). https://doi.org/10.1007/978-3-319-52452-8

12. Andriamampianina, L., Ravat, F., Song, J., & Vallès-Parlangeau, N.: A generic modelling to capture the temporal evolution in graphs. In 16e journées EDA: Business Intelligence & Big Data. EDA, 19–32 (2020). https://doi.org/https://hal.science/hal-03109670

13. Kutner, D. C., & Larios-Jones, L.: Temporal Reachability Dominating Sets: contagion in temporal graphs. In International Symposium on Algorithmics of Wireless Networks, 101–116 (2023) https://doi.org/https://doi.org/10.1007/978-3-031-48882-5_8

14. Duan, W., Song, S., Xiao, F., Chen, Y., Peng, S., and Song, C. Battery SOH estimation and RUL prediction framework based on variable forgetting factor online sequential extreme learning machine and particle filter. Journal of Energy Storage, 65, 107322 (2023). https://doi.org/https://doi.org/10.1016/j.est.2023.107322

15. Chen, L., Xie, S., Lopes, A. M., Li, H., Bao, X., Zhang, C., and Li, P. A new SOH estimation method for Lithium-ion batteries based on model-data-fusion. Energy, 286, 129597 (2024). https://doi.org/https://doi.org/10.1016/j.energy.2023.129597

16. Vichard, L., Ravey, A., Venet, P., Harel, F., Pelissier, S., and Hissel, D. A method to estimate battery SOH indicators based on vehicle operating data only. Energy, 225, 120235 (2021). https://doi.org/https://doi.org/10.1016/j.energy.2021.120235

17. Hu, X., Xu, L., Lin, X., and Pecht, M.: Battery lifetime prognostics. Joule, 4(2), 310–346 (2020). https://doi.org/https://doi.org/10.1016/j.joule.2019.11.018

18. Khaleghi, S., Hosen, M. S., Karimi, D., Behi, H., Beheshti, S. H., Van Mierlo, J., & Berecibar, M.: Developing an online data-driven approach for prognostics and health management of lithium-ion batteries. Applied Energy, 308, 118348 (2022). https://doi.org/https://doi.org/10.1016/j.apenergy.2021.118348

19. Audin, P., Jorge, I., Mesbahi, T., Samet, A., De Beuvron, F. D. B., & Boné, R.: Auto-encoder LSTM for Li-ion SOH prediction: A comparative study on various benchmark datasets. In Proceedings of the 2021 20th IEEE International Conference on Machine Learning and Applications (ICMLA), pp. 1529–1536. IEEE (2021). https://doi.org/10.1109/ICMLA52953.2021.00246

20. Arbaoui, S., Samet, A., Ayadi, A., Mesbahi, T., & Boné, R.: Data-driven strategy for state of health prediction and anomaly detection in lithium-ion batteries. Energy and AI, 17, 100413 (2024). https://doi.org/https://doi.org/10.1016/j.egyai.2024.100413

21. Zhang, H., Sun, H., Kang, L., Zhang, Y., Wang, L., & Wang, K.: Prediction of health level of multiform lithium sulfur batteries based on incremental capacity analysis and an improved LSTM. Protection and Control of Modern Power Systems, 9(2), 21–31 (2024). https://doi.org/10.23919/PCMP.2023.000280

22. Xu, H., Wu, L., Xiong, S., Li, W., Garg, A., & Gao, L.: An improved CNN-LSTM model-based state-of-health estimation approach for lithium-ion batteries. Energy, 276, 127585 (2023). https://doi.org/https://doi.org/10.1016/j.energy.2023.127585

23. Kalayci, T. E., Bricelj, B., Lah, M., Pichler, F., Scharrer, M. K., & Rubeša-Zrim, J.: A knowledge graph-based data integration framework applied to battery data management. Sustainability, 13(3), 1583 (2021). https://doi.org/https://doi.org/10.3390/su13031583