A deep Bi-LSTM detects daily energy theft and grid anomalies directly from smart meter time series.

When Energy Data Reveal Hidden Patterns: Deep Learning for Detecting Anomalies in the Grid
The increasing digitalization of electrical distribution systems has transformed the way energy is monitored, measured, and managed. Smart meters continuously generate large volumes of consumption data, opening the door to more advanced forms of analysis. Yet, within this abundance of information lies a critical challenge: distinguishing between normal consumption patterns and irregular behaviours such as anomalies or illicit energy usage. We address this challenge by framing the problem as a time-series classification task and designing a deep learning architecture that can detect subtle deviations in daily energy consumption profiles. Rather than relying on handcrafted features or simplified statistical models, the proposed solution leverages the ability of deep neural networks to learn directly from raw data, capturing complex temporal patterns embedded in real-world measurements.
From Raw Measurements to Daily Behavioural Signatures
A central design choice lies in how the data is represented. Instead of analysing long consumption histories as a whole, the system operates at a finer level of granularity, focusing on individual daily profiles. Each day is treated as a time series composed of high-frequency measurements, reflecting the consumption behaviour of a single user over 24 hours. This representation allows the model to interpret each day as a behavioural signature, where anomalies, whether caused by irregular usage or fraudulent activity, manifest as deviations from expected temporal patterns. By shifting the focus from aggregated statistics to daily sequences, the approach enables a more precise and localised detection of anomalies, improving the resolution of the analysis.
Learning Temporal Dependencies in Both Directions
To model these daily sequences, the architecture employs a bidirectional recurrent neural network based on LSTM units. Unlike traditional unidirectional models, which process data only in chronological order, the bidirectional structure analyses the sequence in both forward and backward directions. This design allows the network to capture dependencies that may not be evident when considering time only in one direction, enhancing its ability to detect subtle anomalies. The model further extends this concept by stacking multiple bidirectional layers, increasing its capacity to learn hierarchical representations of the data.
From Representation to Decision
Once the temporal features have been extracted, the architecture translates them into a classification decision: normal consumption or anomaly. This end-to-end structure allows the system to operate directly on raw time series, eliminating the need for complex preprocessing pipelines. The model is trained using labelled datasets derived from real-world measurements, where anomalies have been identified through external reports and manual verification.
Testing on Real-World Consumption Data
The evaluation is carried out using datasets collected from industrial users, covering several years of energy consumption. These datasets include both regular and anomalous patterns, allowing the model to learn from realistic and heterogeneous scenarios. The results demonstrate that the proposed architecture consistently outperforms both standard LSTM and deeper unidirectional variants. The improvement is particularly evident when dealing with highly variable data, where the ability to capture bidirectional dependencies becomes crucial. The model also shows strong generalisation capabilities across different datasets and seasonal conditions.
Toward Intelligent Monitoring of Energy Systems
Beyond the specific application, the broader contribution lies in demonstrating how deep learning can transform raw energy data into actionable insights. By treating consumption patterns as structured temporal signals and applying advanced sequence modelling techniques, it becomes possible to detect anomalies that would be difficult to identify through traditional methods. This approach opens new perspectives for the management of modern energy systems, where real-time monitoring and automated detection play a key role in ensuring efficiency, reliability, and security. The ability to identify irregular behaviours at a daily level represents a significant step toward more intelligent and adaptive grid infrastructures. In this evolving landscape, artificial intelligence does not simply analyse data; it interprets behaviour, identifies risks, and supports decision-making processes in increasingly complex environments.
Authors
A. Ceschini, A. Rosato, F. Succetti, F. Di Luzio, M. Mitolo, R. Araneo, M. Panella
November 3, 2021









