10.57647/ijm2c.2026.1604.28

Optimized Multilayer Perceptron Neural Network Using Adam Optimizer and Huber Loss Function for Electricity Consumption Forecasting in Residential Buildings: A Case Study of Isfahan City

  1. Department of Electrical Engineering, Dam.C., Islamic Azad University, Damavand, Iran
  2. Electrical Engineering Department, Malek Ashtar University of Technology, Tehran, Iran
  3. Department of Biomedical Engineering, Isf.C., Islamic Azad University, Isfahan, Iran

Received: 08-11-2025

Revised: 03-01-2026

Accepted: 02-02-2026

Published in Issue 27-04-2026

How to Cite

Alizade, A., Khajeh Salehani, H., Vali, A. R., Derakhshan, G., & Azimifar, F. (2026). Optimized Multilayer Perceptron Neural Network Using Adam Optimizer and Huber Loss Function for Electricity Consumption Forecasting in Residential Buildings: A Case Study of Isfahan City. International Journal of Mathematical Modelling & Computations. https://doi.org/10.57647/ijm2c.2026.1604.28

Abstract

Forecasting electricity consumption in residential buildings is a critical area in building energy management systems (BEMS). This study develops an optimized Multilayer Perceptron Neural Network (MLP-NN) for accurate short-term forecasting of residential electricity consumption in Isfahan City. Data were preprocessed using Min–Max Normalization (MMN). The model utilizes 9 input parameters: HVAC power consumption, lighting, household appliances, energy stored in a 5-kWh supercapacitor, ambient temperature, solar irradiance, hour of the day, holiday indicator, and seasons. The model predicts electricity consumption for the next 15-minute interval. Datasets comprised 15-minute interval records over one year from the Isfahan Electricity Distribution Company and ambient temperature data from the Iranian Meteorological Organization. The MLP-NN was trained with early stopping to prevent overfitting and optimized using Adaptive Moment Estimation (Adam) and Stochastic Gradient Descent (SGD) algorithms. Performance was compared with several machine learning models (Random Forest, SVR, XGBoost, Gradient Boosting, Extra Trees, and Linear Regression), with hyperparameters tuned by Random Search (10 iterations). Additionally, feature importance analysis using Chatterjee's Xi correlation coefficient, combined with physics-informed feature engineering, led to the selection of a refined set of 6 features. This reduced-dimensionality model, trained with the Adam optimizer and Huber loss function, achieved the best performance across all configurations on the test sets (test Huber loss = 0.002594), outperforming both the full 9 features MLP-NN and all benchmark machine learning models. This study demonstrates the superiority of the proposed MLP-NN, enhanced by temporal features, early stopping, and feature selection, for reliable short-term electricity consumption forecasting in residential buildings.

Keywords

  • Multilayer Perceptron Neural Network (MLP-NN),
  • Machine Learning (ML),
  • Huber Loss Function,
  • Adaptive Moment Estimation (Adam),
  • Stochastic Gradient Descent (SGD)

References

  1. Nakhaee Sharif, A., et al., Evaluating and identifying climatic design features in traditional Iranian architecture for energy saving (case study of residential architecture in northwest of Iran). Complexity, 2022. 2022(1): p. 3522883.
  2. Zhang, M., et al., A novel flexible grey multivariable model and its application in forecasting energy consumption in China. Energy, 2022. 239: p. 122441.
  3. Lima-Junior, F.R. and L.C.R. Carpinetti, Predicting supply chain performance based on SCOR® metrics and multilayer perceptron neural networks. International Journal of Production Economics, 2019. 212: p. 19-38.
  4. Runge, J. and R. Zmeureanu, Forecasting energy use in buildings using artificial neural networks: A review. Energies, 2019. 12(17): p. 3254.
  5. Zhong, H., et al., Vector field-based support vector regression for building energy consumption prediction. Applied Energy, 2019. 242: p. 403-414.
  6. Peng, L., et al., Effective energy consumption forecasting using empirical wavelet transform and long short-term memory. energy, 2022. 238: p. 121756.
  7. Khajavi, H. and A. Rastgoo, Improving the prediction of heating energy consumed at residential buildings using a combination of support vector regression and meta-heuristic algorithms. Energy, 2023. 272: p. 127069.
  8. Ye, Z., et al., Identifying critical building-oriented features in city-block-level building energy consumption: A data-driven machine learning approach. Applied Energy, 2021. 301: p. 117453.
  9. Fan, C., et al., Statistical investigations of transfer learning-based methodology for short-term building energy predictions. Applied Energy, 2020. 262: p. 114499.
  10. Saffari, M., et al., Passive cooling of buildings with phase change materials using whole-building energy simulation tools: A review. Renewable and Sustainable Energy Reviews, 2017. 80: p. 1239-1255.
  11. Assadian, C.F. and F. Assadian, Data-Driven Modeling of Appliance Energy Usage. Energies, 2023. 16(22): p. 7536.
  12. Ilbeigi, M., M. Ghomeishi, and A. Dehghanbanadaki, Prediction and optimization of energy consumption in an office building using artificial neural network and a genetic algorithm. Sustainable Cities and Society, 2020. 61: p. 102325.
  13. Xu, Y., F. Li, and A. Asgari, Prediction and optimization of heating and cooling loads in a residential building based on multi-layer perceptron neural network and different optimization algorithms. Energy, 2022. 240: p. 122692.
  14. KEYNIA, F. and G. MEMARZADEH, Short term electric load prediction based on deep neural network and wavelet transform and input selection. 2019.
  15. Ferdosian, M., et al., Mid-Term and Short-Term Load Forecasting Using Rough Neural Networks and Grasshopper Mutation. 2020.
  16. Sadeghi, S.H., Modeling and Forecasting Short-Term Electricity Consumption in Iran Using Neural Networks and the TPE Algorithm. 2024.
  17. Chen, G., et al., A Systematic Review of Building Energy Consumption Prediction: From Perspectives of Load Classification, Data-Driven Frameworks, and Future Directions. Applied Sciences, 2025. 15(6): p. 3086.
  18. Afzal, S., et al., Building energy consumption prediction using multilayer perceptron neural network-assisted models; comparison of different optimization algorithms. Energy, 2023. 282: p. 128446.
  19. Azadeh, A., S. Ghaderi, and S. Sohrabkhani, Forecasting electrical consumption by integration of neural network, time series and ANOVA. Applied mathematics and computation, 2007. 186(2): p. 1753-1761.
  20. Isabona, J., et al., Development of a multilayer perceptron neural network for optimal predictive modeling in urban microcellular radio environments. Applied Sciences, 2022. 12(11): p. 5713.
  21. Goodfellow, I., et al., Deep learning. Vol. 1. 2016: MIT press Cambridge.
  22. Vinutha, H., B. Poornima, and B. Sagar. Detection of outliers using interquartile range technique from intrusion dataset. in Information and decision sciences: Proceedings of the 6th international conference on ficta. 2018. Springer.
  23. Patro, S. and K.K. Sahu, Normalization: A preprocessing stage. arXiv preprint arXiv:1503.06462, 2015.
  24. Terven, J., et al., A comprehensive survey of loss functions and metrics in deep learning. Artificial Intelligence Review, 2025. 58(7): p. 195.
  25. Hearst, M.A., et al., Support vector machines. IEEE Intelligent Systems and their applications, 1998. 13(4): p. 18-28.
  26. Breiman, L., Random forests. Machine learning, 2001. 45(1): p. 5-32.
  27. Friedman, J.H., Greedy function approximation: a gradient boosting machine. Annals of statistics, 2001: p. 1189-1232.
  28. Chen, T., XGBoost: A Scalable Tree Boosting System. Cornell University, 2016.
  29. Geurts, P., D. Ernst, and L. Wehenkel, Extremely randomized trees. Machine learning, 2006. 63(1): p. 3-42.
  30. Xia, L., et al., The improved correlation coefficient of Chatterjee. Journal of Nonparametric Statistics, 2025. 37(2): p. 265-281.
  31. Al-Dahidi, S., et al., Ensemble approach of optimized artificial neural networks for solar photovoltaic power prediction. IEEE Access, 2019. 7: p. 81741-81758.
  32. Konur, O., D. Kingma, and J. Ba. Adam: A method for stochastic optimization. in Proc. Int. Conf. Learn. Represent.(ICLR). 2015.
  33. Tong, H., Functional linear regression with Huber loss. Journal of Complexity, 2023. 74: p. 101696.