Skip to main content

Anomaly Detection of Residential Electricity Consumption Based on Ensemble Model of PSO-AE-XGBOOST

  • Conference paper
  • First Online:
Neural Computing for Advanced Applications (NCAA 2024)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 2182))

Included in the following conference series:

  • 53 Accesses

Abstract

In modern society, the dependency on electricity is increasing, with electricity becoming a vital support for daily life, industrial production, and social development. However, incidents like electricity theft contribute to substantial energy consumption and economic losses, escalating the severity of the situation. To address this issue, a method based on the optimization of particle swarm optimization (PSO) and integration of autoencoder and extreme gradient boosting (XGBoost) was proposed in this paper for detecting abnormal electricity consumption in residential areas. Firstly, the user data was preprocessed to enhance data quality and model performance. Subsequently, the particle swarm optimization was utilized to adjust the hyperparameters of the autoencoder, thereby enhancing its performance. The particle swarm optimization searched for the optimal parameter combination in the parameter space of the autoencoder and utilized the found optimal parameters to train the autoencoder, thereby learning effective features from the data. Finally, using the features extracted by the autoencoder, XGBoost was employed as a supervised learning model for classification and anomaly detection, identifying users with abnormal electricity consumption. The results demonstrated that this model outperformed other detection methods such as support vector machines (SVM), K-nearest neighbors (KNN), and decision trees in terms of accuracy and recall. This research is significant for enhancing residential electricity security and energy utilization efficiency, and provides valuable insights for further research and practical applications in related fields.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Lorenzo, M., Salvatore, D.S., Simone, E., et al.: A machine learning-based Anomaly Detection Framework for building electricity consumption data. Sustain. Energy Grids Netw. 36, 101194 (2023)

    Article  Google Scholar 

  2. Ahir, R.K., Chakraborty, B.: Pattern-based and context-aware electricity theft detection in smart grid. Sustain. Energy Grids Netw. 32, 100833 (2022)

    Article  Google Scholar 

  3. Somalee, M., Basab, C., Pabitra, M.: Smart meter data analytics applications for secure, reliable and robust grid system: survey and future directions. Energy 289, 129920 (2024)

    Article  Google Scholar 

  4. Ul, E.H., Jianjun, H., Huarong, X., et al.: A hybrid approach based on deep learning and support vector machine for the detection of electricity theft in power grids. Energy Rep. 7(S6), 349–356 (2021)

    Google Scholar 

  5. Tianyang, L., Chang, G., Gang, C., et al.: A novel unsupervised framework for time series data anomaly detection via spectrum decomposition. Knowl.-Based Syst. 280, 111002 (2023)

    Article  Google Scholar 

  6. Ul, E.H., Can, P., Ruihong, Z., et al.: Electricity-theft detection for smart grid security using smart meter data: a deep-CNN based approach. Energy Rep. 9(S1), 634–643 (2023)

    Google Scholar 

  7. Chen, J., Nanehkaran, Y.A., Chen, W., et al.: Data-driven intelligent method for detection of electricity theft. Int. J. Electr. Power Energy Syst. 148, 108948 (2023)

    Article  Google Scholar 

  8. Huang, Y., Xu, Q.: Electricity theft detection based on stacked sparse denoising autoencoder. Int. J. Electr. Power Energy Syst. 125, 106448 (2021)

    Article  Google Scholar 

  9. Yang, Y., Jianqiang, D., Jigen, L., et al.: Discrimination of missing data types in metabolomics data based on particle swarm optimization algorithm and XGBoost model. Sci. Rep. 14(1), 152 (2024)

    Article  ADS  Google Scholar 

  10. Zheng, K., Chen, Q., Wang, Y., Kang, C., Xia, Q.: A novel combined data-driven approach for electricity theft detection. IEEE Trans. Ind. Inform. 15(3), 1809–1819 (2019)

    Article  Google Scholar 

  11. Songping, M., Chengdong, L., Wei, P., et al.: Empirical mode decomposition-based multi-scale spectral graph convolution network for abnormal electricity consumption detection. Neural Comput. Appl. 35(13), 9865–9881 (2023)

    Article  Google Scholar 

  12. Lu, W.: Imbalanced credit risk prediction based on SMOTE and multi-kernel FCM improved by particle swarm optimization. Appl. Soft Comput. 114, 108153 (2022)

    Article  Google Scholar 

  13. Pardo, C.X., González, P., Banga, R.J., et al.: Population based metaheuristics in Spark: towards a general framework using PSO as a case study. Swarm Evol. Comput. 85, 101483 (2024)

    Article  Google Scholar 

  14. Raghuvamsi, Y., Teeparthi, K., Kosana, V.: Denoising autoencoder based topology identification in distribution systems with missing measurements. Int. J. Electr. Power Energy Syst. 154, 109464 (2023)

    Article  Google Scholar 

  15. Saigustia, C., Pijarski, P.: Time series analysis and forecasting of solar generation in Spain using eXtreme gradient boosting: a machine learning approach. Energies 16(22), 7618 (2023)

    Article  Google Scholar 

  16. Makonin, S.: HUE: the hourly usage of energy dataset for buildings in British Columbia. Data in Brief (2019)

    Google Scholar 

  17. Aciu, M.A., Nițu, C.M., Nicola, I.C., et al.: Determining the remaining functional life of power transformers using multiple methods of diagnosing the operating condition based on SVM classification algorithms. Machines 12(1), 37 (2024)

    Google Scholar 

  18. Sarangi, S., Sahu, B.K., Rout, P.K.: Fault location estimation using ensemble averaging decomposition and hybrid meta-heuristic optimized kernel-based ELM technique for DG-integrated microgrid.Smart Grids Sustain. Energy 9(1), 7 (2023)

    Google Scholar 

  19. Scheepens, D.R., Schicker, I., Hlaváčková-Schindler, K., Plant, C.: Adapting a deep convolutional RNN model with imbalanced regression loss for improved spatio-temporal forecasting of extreme wind speed events in the short to medium range.Geosci. Model Dev. 16(1), 251–270 (2023)

    Google Scholar 

  20. Wang, S., Dai, R., Yang, L., et al.: Error prediction of a capacitor voltage transformer using dilated causal convolution and LSTM. J. Phys. Conf. Ser. 2703(1), 012059 (2024)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yanling Zhang .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liu, H., Shi, J., Fu, R., Zhang, Y. (2025). Anomaly Detection of Residential Electricity Consumption Based on Ensemble Model of PSO-AE-XGBOOST. In: Zhang, H., Li, X., Hao, T., Meng, W., Wu, Z., He, Q. (eds) Neural Computing for Advanced Applications. NCAA 2024. Communications in Computer and Information Science, vol 2182. Springer, Singapore. https://doi.org/10.1007/978-981-97-7004-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-981-97-7004-5_4

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-97-7003-8

  • Online ISBN: 978-981-97-7004-5

  • eBook Packages: Artificial Intelligence (R0)

Publish with us

Policies and ethics