Explainable Self-Supervised Temporal Contrastive Learning for Electricity Theft Detection in Smart Grids (SSTCL-AD-XAI)
Abstract Electricity theft imposes substantial revenue losses on utility operators and threatens smart-grid stability. Existing detection methods struggle with scarce labelled anomalies, distribution shift, and opaque decision boundaries that hinder forensic auditing. This paper proposes SSTCL-AD-XAI, a self-supervised temporal contrastive learning framework with explainable artificial intelligence for anomaly detection in hourly electricity consumption data. A two-layer LSTM encoder is first pre-trained via InfoNCE contrastive loss with stochastic augmentations — random hour masking, multiplicative scaling, and additive Gaussian noise — and then fine-tuned with Focal Loss under a leakage-safe protocol in which validation data serve only for model and threshold selection. Evaluated on a combined synthetic and SGCC corpus of 42,872 samples over 10 independent seeds, the framework attains a mean F1-score of 0.914, a mean ROC-AUC of 0.975, and a mean PR-AUC of 0.949. It significantly outperforms six unsupervised detectors — LOF, One-Class SVM, HBOS, Deep Autoencoder, DAGMM-like Autoencoder, and Transformer Autoencoder — at Wilcoxon p=0.002, and exceeds a supervised BiLSTM reference in ROC-AUC and PR-AUC while matching its F1-score. Source-wise evaluation confirms that performance is carried by the real SGCC data (SGCC-only F1 0.914), and a 5% prevalence stress test quantifies the deployment operating point (Recall 0.955, Precision 0.357). Multi-seed ablation identifies self-supervised pre-training as the dominant performance driver. Sequence-aware attribution via Integrated Gradients and temporal occlusion, computed exclusively on SGCC samples, confirms midnight consumption (H1) as the most discriminative forensic feature, and quantitative embedding metrics (silhouette 0.548; Davies-Bouldin 0.786) verify moderate and consistent class structure. The framework demonstrates promising potential for transparent electricity theft detection and provides a foundation for future validation in operational smart-grid environments.
Authors
- Jalalud Din (ORCID: https://orcid.org/0009-0003-3477-9999)
- Wang Guo (ORCID: https://orcid.org/0009-0007-4737-8819)
Institutions
- Lanzhou Jiaotong University (CN)
Publication Details
- Journal
- Engineering Research Express
- Published
- 2026-11-02
- DOI
- https://doi.org/10.1088/2631-8695/aebcc6
- Primary Topic
- Electricity Theft Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China