[Paper Review] Electricity Theft Detection with self-attention
This paper proposes a hybrid deep learning model combining multi-head self-attention, dilated convolutions, and a binary input mask to detect electricity theft in imbalanced, real-world daily consumption data from State Grid Corporation of China. The model achieves an AUC of 0.926, a 17% improvement over prior work, by effectively handling missing values and capturing long-range temporal dependencies through attention mechanisms and quantile normalization.
In this work we propose a novel self-attention mechanism model to address electricity theft detection on an imbalanced realistic dataset that presents a daily electricity consumption provided by State Grid Corporation of China. Our key contribution is the introduction of a multi-head self-attention mechanism concatenated with dilated convolutions and unified by a convolution of kernel size $1$. Moreover, we introduce a binary input channel (Binary Mask) to identify the position of the missing values, allowing the network to learn how to deal with these values. Our model achieves an AUC of $0.926$ which is an improvement in more than $17\%$ with respect to previous baseline work. The code is available on GitHub at https://github.com/neuralmind-ai/electricity-theft-detection-with-self-attention.
Motivation & Objective
- To address the challenge of detecting electricity theft in imbalanced, real-world electricity consumption data with high missing value rates.
- To improve upon the state-of-the-art baseline model in terms of AUC, F1 score, and training efficiency.
- To introduce a binary input channel (Binary Mask) that enables the model to learn how to handle missing values without reconstruction bias.
- To leverage self-attention mechanisms to capture long-range temporal dependencies in daily consumption sequences.
- To validate the effectiveness of quantile normalization and 2D data reshaping for improved model generalization.
Proposed method
- The model uses a hybrid architecture combining multi-head self-attention, dilated convolutions, and a 1x1 convolutional fusion layer to unify features from different branches.
- A binary input channel (Binary Mask) is introduced to encode the positions of missing values, allowing the network to learn robust representations despite data gaps.
- The input time series is reshaped into 2D format, enabling the use of 2D CNNs to capture local and global spatial correlations.
- Quantile normalization is applied to the original data to reduce distribution shifts and improve model generalization.
- The model is trained using cross-entropy loss with class weighting to address class imbalance, and early stopping is used to prevent overfitting.
- A threshold of 0.27 is identified as optimal for F1 score, with 0.50 used for comparison in confusion matrices.
Experimental results
Research questions
- RQ1Can a self-attention mechanism improve AUC and F1 score in electricity theft detection compared to traditional CNN and hybrid models?
- RQ2How does the inclusion of a Binary Mask input channel affect model performance on datasets with high missing value rates?
- RQ3To what extent does quantile normalization improve model generalization on imbalanced real-world electricity consumption data?
- RQ4Can a hybrid architecture of self-attention and dilated convolutions outperform standard CNNs in terms of convergence speed and detection accuracy?
- RQ5What is the optimal decision threshold for balancing precision and recall in electricity theft detection under class imbalance?
Key findings
- The proposed Hybrid Multi-Head Self-Attention with Dilated Convolution achieved an AUC of 0.926, representing a 17% improvement over the previous state-of-the-art baseline.
- The model achieved an F1 score of 0.606 at a training split of 80%, a 10-point improvement over the best baseline, with the Binary Mask contributing significantly to this gain.
- The model converged in approximately 20 epochs, compared to 100 epochs for the baseline CNN, reducing training time by nearly 75%.
- The inference time was 37 seconds on a Tesla V100 GPU, with only 51 million parameters, indicating good efficiency for real-world deployment.
- The optimal threshold for F1 score was found to be 0.27, while a 0.50 threshold led to a trade-off between precision and recall, as shown in the confusion matrix.
- The combination of quantile normalization, Binary Mask, and attention mechanisms led to consistent improvements in AUC, F1, and MAP@100 across all training splits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.