Prepaid electricity metering is widely adopted in Nigeria to improve revenue collection and reduce customer indebtedness. However, irregularities in transaction records continue to challenge operational reliability and financial transparency. This study presents an unsupervised machine learning framework for detecting anomalies in prepaid electricity transactions using nine months of real-world data. The framework integrates three distinct anomaly detection methods: Isolation Forest, DBSCAN, and a reconstruction-based model using either an Autoencoder or Principal Component Analysis (PCA). These models were combined through a rank-based ensemble scoring system and a majority-vote mechanism to enhance detection of robustness. The dataset includes 23 features spanning customer identifiers, tariff details, and transaction attributes such as energy purchased, payments made, arrears, and VAT. Preprocessing steps involved standardizing column formats, handling missing values, and engineering features such as payment ratios and log-transformed monetary values to improve model sensitivity. Each model independently flagged anomalies, and the ensemble strategy consolidated these outputs to identify high-confidence irregular transactions. The framework uncovered several types of anomalies, including transactions with missing payment and unit values but large arrears repayments, extreme pay-per-unit ratios exceeding operational norms, and VAT entries that deviated significantly from the statutory rate. Spatial analysis revealed concentrated anomalies in specific districts and feeders, suggesting localized vulnerabilities in transaction management and enforcement. Although ground-truth fraud labels were unavailable, the detected anomalies represent statistically significant deviations that warrant further investigation. The results demonstrate that unsupervised models can effectively highlight suspicious patterns without relying on labeled data, offering a scalable approach for utilities to monitor prepaid electricity systems. This methodology supports targeted audits, enhances revenue protection, and contributes to improved regulatory compliance. The study underscores the potential of data-driven techniques in addressing fraud and operational inefficiencies in African energy systems. Future work may incorporate labeled datasets, temporal features, and network-level attributes to refine detection capabilities and expand the scope of analysis.
| Published in | Science, Technology & Public Policy (Volume 9, Issue 2) |
| DOI | 10.11648/j.stpp.20250902.16 |
| Page(s) | 127-134 |
| Creative Commons |
This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited. |
| Copyright |
Copyright © The Author(s), 2025. Published by Science Publishing Group |
Unsupervised Machine Learning, Anomaly Detection, Fraud Detection, Prepaid Electricity Transactions, Isolation Forest, DBSCAN, Nigeria Energy Sector
| [1] | D. Oni, E. Arshad, and B. Pham, Cybercrime On Social Media In Nigeria: Trends, Scams, Vulnerabilities and Prevention, vol. 2. 2023. |
| [2] | “Evolution of Electricity Metering Technologies in Nigeria | Nigerian Journal of Technological Development.” Accessed: Dec. 04, 2025. Available: |
| [3] | D. I.-C. Limited, “NIGERIAN ELECTRICITY REGULATORY COMMISSION.” Accessed: Oct. 07, 2025. Available: |
| [4] | “Energy Theft Detection and Real-Time Monitoring in a Smart Prepaid Metering System,” Traektori226 Nauki, vol. 10, no. 8, pp. 6029–6037, 2024. |
| [5] | S. O. Abdulsalam, M. O. Arowolo, R. Babatunde, M. Raji, and S. O. H. Sulyman, “Fraud detection in customers’ electricity consumption in Nigeria using machine learning approach,” Technoscience J. Community Dev. Afr., vol. 2, no. 1, pp. 81-91, 2021. |
| [6] | O. Nwafor, E. Okafor, A. A. Aboushady, C. Nwafor, and C. Zhou, “Explainable Artificial Intelligence for Prediction of Non-Technical Losses in Electricity Distribution Networks,” IEEE Access, vol. 11, pp. 73104-73115, 2023, |
| [7] | O. Z. Nwafor, “Artificial Intelligence for Management of Non-Technical Losses in Electricity Distribution Networks in Sub-Saharan Africa: A Case Study of Nigeria.”. |
| [8] | I. R. Aliu, “Energy efficiency in postpaid-prepaid metered homes: analyzing effects of socio-economic, housing, and metering factors in Lagos, Nigeria,” Energy Effic., vol. 13, no. 5, pp. 853-869, Jun. 2020, |
| [9] | M. Ahmed, A. Naser Mahmood, and J. Hu, “A survey of network anomaly detection techniques,” J. Netw. Comput. Appl., vol. 60, pp. 19-31, Jan. 2016, |
| [10] | “[1901.03407] Deep Learning for Anomaly Detection: A Survey.” Accessed: Oct. 07, 2025. Available: |
| [11] | F. Jamil and E. Ahmad, “Policy considerations for limiting electricity theft in the developing countries,” Energy Policy, vol. 129, pp. 452-458, Jun. 2019, |
| [12] | V. Hodge and J. Austin, “A Survey of Outlier Detection Methodologies,” Artif. Intell. Rev., vol. 22, no. 2, pp. 85-126, Oct. 2004, |
| [13] | A. Jindal, A. Dua, K. Kaur, M. Singh, N. Kumar, and S. Mishra, “Decision Tree and SVM-Based Data Analytics for Theft Detection in Smart Grid,” IEEE Trans. Ind. Inform., vol. 12, no. 3, pp. 1005-1016, Jun. 2016, |
APA Style
Damilola, O., Godwin, O. P., Odunayo, T. I., Emmanuel, A. D., Asuquo, U. S. (2025). An Unsupervised Machine Learning Framework for Fraud and Anomaly Detection in Nigerian Prepaid Electricity Transactions. Science, Technology & Public Policy, 9(2), 127-134. https://doi.org/10.11648/j.stpp.20250902.16
ACS Style
Damilola, O.; Godwin, O. P.; Odunayo, T. I.; Emmanuel, A. D.; Asuquo, U. S. An Unsupervised Machine Learning Framework for Fraud and Anomaly Detection in Nigerian Prepaid Electricity Transactions. Sci. Technol. Public Policy 2025, 9(2), 127-134. doi: 10.11648/j.stpp.20250902.16
@article{10.11648/j.stpp.20250902.16,
author = {Oni Damilola and Okon Paul Godwin and Taiwo Ikeoluwa Odunayo and Akinyooye Demilade Emmanuel and Umoh Samuel Asuquo},
title = {An Unsupervised Machine Learning Framework for Fraud and Anomaly Detection in Nigerian Prepaid Electricity Transactions},
journal = {Science, Technology & Public Policy},
volume = {9},
number = {2},
pages = {127-134},
doi = {10.11648/j.stpp.20250902.16},
url = {https://doi.org/10.11648/j.stpp.20250902.16},
eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.stpp.20250902.16},
abstract = {Prepaid electricity metering is widely adopted in Nigeria to improve revenue collection and reduce customer indebtedness. However, irregularities in transaction records continue to challenge operational reliability and financial transparency. This study presents an unsupervised machine learning framework for detecting anomalies in prepaid electricity transactions using nine months of real-world data. The framework integrates three distinct anomaly detection methods: Isolation Forest, DBSCAN, and a reconstruction-based model using either an Autoencoder or Principal Component Analysis (PCA). These models were combined through a rank-based ensemble scoring system and a majority-vote mechanism to enhance detection of robustness. The dataset includes 23 features spanning customer identifiers, tariff details, and transaction attributes such as energy purchased, payments made, arrears, and VAT. Preprocessing steps involved standardizing column formats, handling missing values, and engineering features such as payment ratios and log-transformed monetary values to improve model sensitivity. Each model independently flagged anomalies, and the ensemble strategy consolidated these outputs to identify high-confidence irregular transactions. The framework uncovered several types of anomalies, including transactions with missing payment and unit values but large arrears repayments, extreme pay-per-unit ratios exceeding operational norms, and VAT entries that deviated significantly from the statutory rate. Spatial analysis revealed concentrated anomalies in specific districts and feeders, suggesting localized vulnerabilities in transaction management and enforcement. Although ground-truth fraud labels were unavailable, the detected anomalies represent statistically significant deviations that warrant further investigation. The results demonstrate that unsupervised models can effectively highlight suspicious patterns without relying on labeled data, offering a scalable approach for utilities to monitor prepaid electricity systems. This methodology supports targeted audits, enhances revenue protection, and contributes to improved regulatory compliance. The study underscores the potential of data-driven techniques in addressing fraud and operational inefficiencies in African energy systems. Future work may incorporate labeled datasets, temporal features, and network-level attributes to refine detection capabilities and expand the scope of analysis.},
year = {2025}
}
TY - JOUR T1 - An Unsupervised Machine Learning Framework for Fraud and Anomaly Detection in Nigerian Prepaid Electricity Transactions AU - Oni Damilola AU - Okon Paul Godwin AU - Taiwo Ikeoluwa Odunayo AU - Akinyooye Demilade Emmanuel AU - Umoh Samuel Asuquo Y1 - 2025/12/29 PY - 2025 N1 - https://doi.org/10.11648/j.stpp.20250902.16 DO - 10.11648/j.stpp.20250902.16 T2 - Science, Technology & Public Policy JF - Science, Technology & Public Policy JO - Science, Technology & Public Policy SP - 127 EP - 134 PB - Science Publishing Group SN - 2640-4621 UR - https://doi.org/10.11648/j.stpp.20250902.16 AB - Prepaid electricity metering is widely adopted in Nigeria to improve revenue collection and reduce customer indebtedness. However, irregularities in transaction records continue to challenge operational reliability and financial transparency. This study presents an unsupervised machine learning framework for detecting anomalies in prepaid electricity transactions using nine months of real-world data. The framework integrates three distinct anomaly detection methods: Isolation Forest, DBSCAN, and a reconstruction-based model using either an Autoencoder or Principal Component Analysis (PCA). These models were combined through a rank-based ensemble scoring system and a majority-vote mechanism to enhance detection of robustness. The dataset includes 23 features spanning customer identifiers, tariff details, and transaction attributes such as energy purchased, payments made, arrears, and VAT. Preprocessing steps involved standardizing column formats, handling missing values, and engineering features such as payment ratios and log-transformed monetary values to improve model sensitivity. Each model independently flagged anomalies, and the ensemble strategy consolidated these outputs to identify high-confidence irregular transactions. The framework uncovered several types of anomalies, including transactions with missing payment and unit values but large arrears repayments, extreme pay-per-unit ratios exceeding operational norms, and VAT entries that deviated significantly from the statutory rate. Spatial analysis revealed concentrated anomalies in specific districts and feeders, suggesting localized vulnerabilities in transaction management and enforcement. Although ground-truth fraud labels were unavailable, the detected anomalies represent statistically significant deviations that warrant further investigation. The results demonstrate that unsupervised models can effectively highlight suspicious patterns without relying on labeled data, offering a scalable approach for utilities to monitor prepaid electricity systems. This methodology supports targeted audits, enhances revenue protection, and contributes to improved regulatory compliance. The study underscores the potential of data-driven techniques in addressing fraud and operational inefficiencies in African energy systems. Future work may incorporate labeled datasets, temporal features, and network-level attributes to refine detection capabilities and expand the scope of analysis. VL - 9 IS - 2 ER -