International Peer-Reviewed Journal•Open Access•ISSN 2456-8880
[email protected]•+91-7433024337

Home / Current Issue / Paper 1726028

1726028 Vol 10 · Issue 6 Download Paper

Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution

Mehboob Ali Khan

Subject area: Science,Engineering and Technology  ·  Area of research: Machine Learning

DOI: 10.64388/ire1726028

Abstract

Air handling units (AHUs) are major contributors to HVAC faults, with undetected issues potentially wasting 15–30% of building HVAC energy. Existing machine-learning fault detection and diagnosis (FDD) models often lack interpretability, generalize poorly to unseen fault severities and imbalanced data, and provide limited diagnostic confidence. To address these limitations, this paper proposes the SHAP-Attributed Temporal Explainable Fault Diagnosis Network (SHAPE-FDNet), an integrated framework comprising three components: (i) a physics-aware, operating-mode-conditioned variational autoencoder (VAE) for fault detection using reconstruction probabilities and adaptive thresholds; (ii) a hybrid 1D-CNN–Transformer encoder integrated with AHU Performance Assessment Rules (APAR) residuals and a LightGBM classifier, enhanced through CTGAN augmentation, focal loss, and Optuna-based optimization; and (iii) a Multi-Granular SHAP Attribution Layer combining TreeSHAP, DeepSHAP, Integrated Gradients, and SHAP interaction values to generate diagnostic explanations and confidence scores. Evaluation on two real benchmark datasets, the experimental ASHRAE RP-1312 data and the LBNL single-duct AHU dataset, demonstrates macro-F1 scores of 0.755 and 0.718 and MCC values of 0.738 and 0.698, outperforming competing approaches. The framework also demonstrates improved detection of unseen fault severities, with fault-free-trained detection AUCs of 0.885 and 0.901. Although its explanations achieve the highest insertion AUC (0.599), they exhibit lower stability and expert agreement than feature-level TreeSHAP. Cross-building transfer remains stronger for statistical-feature-based XGBoost. The complete framework processes each window in 133.88 ms on a two-core CPU.

Keywords

Air handling unit, Fault detection and diagnosis, Explainable artificial intelligence, SHAP, Variational autoencoder, Transformer, LightGBM, Class imbalance

References

[1] S. Katipamula, M.R. Brambley, Methods for fault detection, diagnostics, and prognostics for building systems—a review, Part I, HVAC&R Research 11 (1) (2005) 3–25.

[2] S. Katipamula, M.R. Brambley, Methods for fault detection, diagnostics, and prognostics for building systems—a review, Part II, HVAC&R Research 11 (2) (2005) 169–187.

[3] W. Kim, S. Katipamula, A review of fault detection and diagnostics methods for building systems, Science and Technology for the Built Environment 24 (1) (2018) 3–21.

[4] Y. Zhao, T. Li, X. Zhang, C. Zhang, Artificial intelligence-based fault detection and diagnosis methods for building energy systems: advantages, challenges and the future, Renewable and Sustainable Energy Reviews 109 (2019) 85–101.

[5] M.S. Mirnaghi, F. Haghighat, Fault detection and diagnosis of large-scale HVAC systems in buildings using data-driven methods: a comprehensive review, Energy and Buildings 229 (2020) 110492.

[6] Z. Chen, Z. O’Neill, J. Wen, O. Pradhan, T. Yang, X. Lu, G. Lin, S. Miyata, S. Lee, C. Shen, et al., A review of data-driven fault detection and diagnostics for building HVAC systems, Applied Energy 339 (2023) 121030.

[7] J. Schein, S.T. Bushby, N.S. Castro, J.M. House, A rule-based fault detection method for air handling units, Energy and Buildings 38 (12) (2006) 1485–1492.

[8] J.M. House, H. Vaezi-Nejad, J.M. Whitcomb, An expert rule set for fault detection in air-handling units, ASHRAE Transactions 107 (1) (2001) 858–871.

[9] J. Wen, S. Li, Tools for evaluating fault detection and diagnostic methods for air-handling units, ASHRAE Research Project RP-1312 Final Report, ASHRAE, Atlanta, GA, 2011.

[10] J. Granderson, G. Lin, Y. Chen, A. Casillas, J. Wen, Z. Chen, P. Im, S. Huang, J. Ling, A labeled dataset for building HVAC systems operating in faulted and fault-free states, Scientific Data 10 (2023) 342.

[11] K.-P. Lee, B.-H. Wu, S.-L. Peng, Deep-learning-based fault detection and diagnosis of air-handling units, Building and Environment 157 (2019) 24–33.

[12] K. Yan, J. Huang, W. Shen, Z. Ji, Unsupervised learning for fault detection and diagnosis of air handling units, Energy and Buildings 210 (2020) 109689.

[13] K. Yan, A. Chong, Y. Mo, Generative adversarial network for fault detection diagnosis of chillers, Building and Environment 172 (2020) 106698.

[14] G. Li, Q. Yao, C. Fan, C. Zhou, G. Wu, Z. Zhou, X. Fang, An explainable one-dimensional convolutional neural networks based fault diagnosis method for building heating, ventilation and air conditioning systems, Building and Environment 203 (2021) 108057.

[15] S. Srinivasan, P. Arjunan, B. Jin, A.L. Sangiovanni-Vincentelli, Z. Sultan, K. Poolla, Explainable AI for chiller fault-detection systems: gaining human trust, Computer 54 (10) (2021) 60–68.

[16] D. Chakraborty, H. Elzarka, Early detection of faults in HVAC systems using an XGBoost model with a dynamic threshold, Energy and Buildings 185 (2019) 326–344.

[17] A. Montazeri, S.M. Kargar, Fault detection and diagnosis in air handling using data-driven methods, Journal of Building Engineering 31 (2020) 101388.

[18] C. Fan, X. Liu, P. Xue, J. Wang, Statistical characterization of semi-supervised neural networks for fault detection and diagnosis of air handling units, Energy and Buildings 234 (2021) 110733.

[19] S.M. Lundberg, S.-I. Lee, A unified approach to interpreting model predictions, in: Advances in Neural Information Processing Systems 30, 2017, pp. 4765–4774.

[20] S.M. Lundberg, G. Erion, H. Chen, A. DeGrave, J.M. Prutkin, B. Nair, R. Katz, J. Himmelfarb, N. Bansal, S.-I. Lee, From local explanations to global understanding with explainable AI for trees, Nature Machine Intelligence 2 (1) (2020) 56–67.

[21] M.T. Ribeiro, S. Singh, C. Guestrin, “Why should I trust you?”: explaining the predictions of any classifier, in: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 1135–1144.

[22] R.R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, D. Batra, Grad-CAM: visual explanations from deep networks via gradient-based localization, in: Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 618–626.

[23] M. Sundararajan, A. Taly, Q. Yan, Axiomatic attribution for deep networks, in: Proceedings of the 34th International Conference on Machine Learning, PMLR 70, 2017, pp. 3319–3328.

[24] A. Shrikumar, P. Greenside, A. Kundaje, Learning important features through propagating activation differences, in: Proceedings of the 34th International Conference on Machine Learning, PMLR 70, 2017, pp. 3145–3153.

[25] D.P. Kingma, M. Welling, Auto-encoding variational Bayes, in: International Conference on Learning Representations, 2014.

[26] K. Sohn, H. Lee, X. Yan, Learning structured output representation using deep conditional generative models, in: Advances in Neural Information Processing Systems 28, 2015, pp. 3483–3491.

[27] J. An, S. Cho, Variational autoencoder based anomaly detection using reconstruction probability, Special Lecture on IE 2 (1) (2015) 1–18.

[28] L. Xu, M. Skoularidou, A. Cuesta-Infante, K. Veeramachaneni, Modeling tabular data using conditional GAN, in: Advances in Neural Information Processing Systems 32, 2019.

[29] T.-Y. Lin, P. Goyal, R. Girshick, K. He, P. Dollár, Focal loss for dense object detection, in: Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 2980–2988.

[30] G. Ke, Q. Meng, T. Finley, T. Wang, W. Chen, W. Ma, Q. Ye, T.-Y. Liu, LightGBM: a highly efficient gradient boosting decision tree, in: Advances in Neural Information Processing Systems 30, 2017, pp. 3146–3154.

[31] T. Chen, C. Guestrin, XGBoost: a scalable tree boosting system, in: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016, pp. 785–794.

[32] T. Akiba, S. Sano, T. Yanase, T. Ohta, M. Koyama, Optuna: a next-generation hyperparameter optimization framework, in: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2019, pp. 2623–2631.

[33] J. Bergstra, R. Bardenet, Y. Bengio, B. Kégl, Algorithms for hyper-parameter optimization, in: Advances in Neural Information Processing Systems 24, 2011, pp. 2546–2554.

[34] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A.N. Gomez, Ł. Kaiser, I. Polosukhin, Attention is all you need, in: Advances in Neural Information Processing Systems 30, 2017, pp. 5998–6008.

[35] S. Hochreiter, J. Schmidhuber, Long short-term memory, Neural Computation 9 (8) (1997) 1735–1780.

[36] V. Petsiuk, A. Das, K. Saenko, RISE: randomized input sampling for explanation of black-box models, in: Proceedings of the British Machine Vision Conference, 2018.

[37] D. Alvarez-Melis, T.S. Jaakkola, On the robustness of interpretability methods, arXiv:1806.08049, 2018.

[38] S. Wachter, B. Mittelstadt, C. Russell, Counterfactual explanations without opening the black box: automated decisions and the GDPR, Harvard Journal of Law & Technology 31 (2) (2018) 841–887.

[39] D. Chicco, G. Jurman, The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation, BMC Genomics 21 (2020) 6.

[40] N.V. Chawla, K.W. Bowyer, L.O. Hall, W.P. Kegelmeyer, SMOTE: synthetic minority over-sampling technique, Journal of Artificial Intelligence Research 16 (2002) 321–357.

[41] L.S. Shapley, A value for n-person games, in: H.W. Kuhn, A.W. Tucker (Eds.), Contributions to the Theory of Games II, Princeton University Press, 1953, pp. 307–317.

[42] G. Erion, J.D. Janizek, P. Sturmfels, S.M. Lundberg, S.-I. Lee, Improving performance of deep learning models with axiomatic attribution priors and expected gradients, Nature Machine Intelligence 3 (7) (2021) 620–631.

[43] K.W. Roth, D. Westphalen, P. Llana, M. Feng, The energy impact of faults in U.S. commercial buildings, in: International Refrigeration and Air Conditioning Conference, Purdue University, 2004, Paper 665.

[44] F.T. Liu, K.M. Ting, Z.-H. Zhou, Isolation forest, in: Proceedings of the 8th IEEE International Conference on Data Mining, 2008, pp. 413–422.

[45] B. Schölkopf, J.C. Platt, J. Shawe-Taylor, A.J. Smola, R.C. Williamson, Estimating the support of a high-dimensional distribution, Neural Computation 13 (7) (2001) 1443–1471.

[46] L. Breiman, Random forests, Machine Learning 45 (1) (2001) 5–32.

[47] S. Li, J. Wen, A model-based fault detection and diagnostic methodology based on PCA method and wavelet transform, Energy and Buildings 68 (2014) 63–71.

[48] S. Wang, F. Xiao, AHU sensor fault diagnosis using principal component analysis method, Energy and Buildings 36 (2) (2004) 147–160.

[49] Z. Du, B. Fan, X. Jin, J. Chi, Fault detection and diagnosis for buildings and HVAC systems using combined neural networks and subtractive clustering analysis, Building and Environment 73 (2014) 1–11.

[50] R. Guidotti, A. Monreale, S. Ruggieri, F. Turini, F. Giannotti, D. Pedreschi, A survey of methods for explaining black box models, ACM Computing Surveys 51 (5) (2018) 93.

[51] M. Madhikermi, A.K. Malhi, K. Främling, Explainable artificial intelligence based heat recycler fault detection in air handling unit, in: Explainable, Transparent Autonomous Agents and Multi-Agent Systems (EXTRAAMAS 2019), Lecture Notes in Computer Science 11763, Springer, 2019, pp. 110–125.

How to cite this paper

Mehboob Ali Khan "Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution" Iconic Research And Engineering Journals Volume 10 Issue 6 2026 Page 164-201 https://doi.org/10.64388/ire1726028
Mehboob Ali Khan "Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution" Iconic Research And Engineering Journals, vol. 10, no. 6, Dec. 2026, doi: https://doi.org/10.64388/ire1726028
Mehboob Ali Khan (2026). Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution. Iconic Research And Engineering Journals, 10(6). doi: https://doi.org/10.64388/ire1726028
Mehboob Ali Khan "Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution" Iconic Research And Engineering Journals, vol. 10, no. 6, Dec. 2026. Crossref, https://doi.org/10.64388/ire1726028
@article{1726028,
      author = {Mehboob Ali Khan},
      title = {Explainable Machine Learning Framework for Fault Detection and Diagnosis of Air Handling Units Using SHAP-Based Feature Attribution},
      journal = {Iconic Research And Engineering Journals},
      year = {2026},
      volume = {10},
      number = {6},
      pages = {164-201},
      issn = {2456-8880},
      url = {https://www.irejournals.com/formatedpaper/1726028.pdf},
      abstract = {Air handling units (AHUs) are major contributors to HVAC faults, with undetected issues potentially wasting 15–30% of building HVAC energy. Existing machine-learning fault detection and diagnosis (FDD) models often lack interpretability, generalize poorly to unseen fault severities and imbalanced data, and provide limited diagnostic confidence. To address these limitations, this paper proposes the SHAP-Attributed Temporal Explainable Fault Diagnosis Network (SHAPE-FDNet), an integrated framework comprising three components: (i) a physics-aware, operating-mode-conditioned variational autoencoder (VAE) for fault detection using reconstruction probabilities and adaptive thresholds; (ii) a hybrid 1D-CNN–Transformer encoder integrated with AHU Performance Assessment Rules (APAR) residuals and a LightGBM classifier, enhanced through CTGAN augmentation, focal loss, and Optuna-based optimization; and (iii) a Multi-Granular SHAP Attribution Layer combining TreeSHAP, DeepSHAP, Integrated Gradients, and SHAP interaction values to generate diagnostic explanations and confidence scores. Evaluation on two real benchmark datasets, the experimental ASHRAE RP-1312 data and the LBNL single-duct AHU dataset, demonstrates macro-F1 scores of 0.755 and 0.718 and MCC values of 0.738 and 0.698, outperforming competing approaches. The framework also demonstrates improved detection of unseen fault severities, with fault-free-trained detection AUCs of 0.885 and 0.901. Although its explanations achieve the highest insertion AUC (0.599), they exhibit lower stability and expert agreement than feature-level TreeSHAP. Cross-building transfer remains stronger for statistical-feature-based XGBoost. The complete framework processes each window in 133.88 ms on a two-core CPU.},
      keywords = {Air handling unit, Fault detection and diagnosis, Explainable artificial intelligence, SHAP, Variational autoencoder, Transformer, LightGBM, Class imbalance},
      month = {December},
      doi = {https://doi.org/10.64388/ire1726028}
  }