Proceedings

Detection-Explanation-Improvement: A Closed-Loop Framework of Enhancing Anomaly Detection with Counterfactual Explanations

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 3303-3311.

https://doi.org/10.24963/ijcai.2026/367

Abstract

Many state‑of‑the‑art anomaly detection models operate as black boxes, limiting interpretability and hindering reliable deployment. While recent advances in explainable artificial intelligence have focused on explaining why individual instances are detected as anomalous, comparatively little attention has been paid to how such explanations can be systematically exploited to improve the detectors themselves. To address this gap, we propose EAD‑CE (Enhancing Anomaly Detection with Counterfactual Explanations), a model‑agnostic, closed‑loop framework that tightly integrates detection, explanation, and improvement. Specifically, given a trained anomaly detector and its detected anomalies, EAD‑CE generates minimal and semantically meaningful counterfactual explanations that reveal how targeted feature perturbations influence anomaly scores or decisions. Feature importance inferred from these counterfactual explanations is then used to guide a dynamic feature-weight optimization process, enabling detector refinement without modifying its underlying architecture. Extensive experiments on nine real‑world datasets and three anomaly detection models demonstrate that EAD‑CE accurately identifies anomaly‑driving features, substantially enhances interpretability, and consistently improves detection performance (average AUC increases by 6.9%, up to 23%). Implementation details are provided to support reproducibility.

  1. [Akula et al., 2020] Arjun Akula, Shuai Wang, and Song- Chun Zhu. Cocox: Generating conceptual and counter- factual explanations via fault-lines. In Thirty-Fourth AAAI Conference on Artificial Intelligence, volume 34, pages 2594-2601, 2020.
  2. [Alfano et al., 2025] Gianvincenzo Alfano, Adam Gould, Francesco Leofante, Antonio Rago, and Francesca Toni. Counterfactual explanations under model multiplicity and their use in computational argumentation. In Thirty-Fourth International Joint Conference on Artificial Intelligence, pages 4321-4329, 2025. IJCAI
  3. [Berns et al., 2020] Fabian Berns, Markus Lange- Hegermann, and Christian Beecks. Towards gaussian processes for automatic and interpretable anomaly detection in industry 4.0. In In Proceedings of the Inter- national Conference on Innovative Intelligent Industrial Production and Logistic, pages 87-92, 2020.
  4. [Boukerche et al., 2020] Azzedine Boukerche, Lining Zheng, and Omar Alfandi. Outlier detection: Methods, models, and classification. ACM Computing Surveys (CSUR), 53(3):1-37, 2020.
  5. [Breunig et al., 2000] Markus M. Breunig, Hans-Peter Kriegel, Raymond T. Ng, and Jörg Sander. Lof: Identify- ing density-based local outliers. In 2000 ACM SIGMOD International Conference on Management of Data, pages 93-104, New York, NY, USA, 2000. ACM.
  6. [Byrne, 2019] Ruth MJ Byrne. Counterfactuals in explain- able artificial intelligence (xai): Evidence from human reasoning. In Twenty-Eighth International Joint Confer- ence on Artificial Intelligence, pages 6276-6282. IJCAI
  7. Califor- nia, CA, 2019.
  8. [Chandola et al., 2009] Varun Chandola, Arindam Banerjee, and Vipin Kumar. Anomaly detection: A survey. ACM computing surveys (CSUR), 41(3):1-58, 2009.
  9. [Chen et al., 2021] Liang Chen, Wei Wang, and Yun Yang. Celof: Effective and fast memory efficient local outlier detection in high-dimensional data streams. Applied Soft Computing, 102:107079, 2021.
  10. [Cheng et al., 2024] Shitong Cheng, Xinyu Su, Baiyang Chen, Hongmei Chen, Dezhong Peng, and Zhong Yuan. Gbmod: A granular-ball mean-shift outlier detector. Pat- tern Recognition, page 111115, 2024.
  11. [Ernst, 2024] R. Ernst. Counterfactual generating variational autoencoder for anomaly detection. In xAI 2024 Late- breaking Work, Demos and Doctoral Consortium, volume 3793 of CEUR Workshop Proceedings, pages 353-360. CEUR-WS, 2024.
  12. [Gunning and Aha, 2019] David Gunning and David Aha. Darpa's explainable artificial intelligence (xai) program. AI magazine, 40(2):44-58, 2019.
  13. [Han et al., 2023] Xiao Han, Lu Zhang, Yongkai Wu, and Shuhan Yuan. Achieving counterfactual fairness for anomaly detection. In Pacific-Asia Conference on Knowl- edge Discovery and Data Mining, pages 55-66. Springer, 2023.
  14. [Kanamori et al., 2020] Kentaro Kanamori, Takuya Takagi, Ken Kobayashi, and Hiroki Arimura. Dace: Distribution- aware counterfactual explanation by mixed-integer linear optimization. In Twenty-Ninth International Joint Confer- ence on Artificial Intelligence, pages 2855-2862, 2020.
  15. [Kraiem et al., 2021] Inès Ben Kraiem, Faiza Ghozzi, André Péninou, Geoffrey Roman-Jimenez, and Olivier Teste. Human-interpretable rules for anomaly detection in time- series. In International Conference on Extending Database Technology, pages 457-462.
  16. [Li et al., 2023a] Zheng Li, Yue Zhao, Xiyang Hu, Nicola Botta, Cezar Ionescu, and George H. Chen. Ecod: Unsu- pervised outlier detection using empirical cumulative dis- tribution functions. IEEE Transactions on Knowledge and Data Engineering, 35(12):12181-12193, 2023.
  17. [Li et al., 2023b] Zhong Li, Yuxuan Zhu, and Matthijs Van Leeuwen. A survey on explainable anomaly detec- tion. ACM Transactions on Knowledge Discovery from Data, 18(1):1-54, 2023.
  18. [Lundberg and Lee, 2017] Scott M Lundberg and Su-In Lee. A unified approach to interpreting model predictions. In 31st Conference on Neural Information Processing Sys- tems, volume 30, pages 1-10, 2017.
  19. [Panagiotou et al., 2024] Emmanouil Panagiotou, Manuel Heurich, Tim Landgraf, and Eirini Ntoutsi. Tabcf: Counterfactual explanations for tabular data using a transformer-based vae. In 5th ACM International Confer- ence on AI in Finance, pages 274-282, 2024.
  20. [Pang et al., 2021] Guansong Pang, Chunhua Shen, Long- bing Cao, and Anton Van Den Hengel. Deep learning for anomaly detection: A review. ACM computing surveys (CSUR), 54(2):1-38, 2021.
  21. [Tang et al., 2023] Wenbing Tang, Jing Liu, Yuan Zhou, and Zuohua Ding. Causality-guided counterfactual debiasing for anomaly detection of cyber-physical systems. IEEE Transactions on Industrial Informatics, 20(3):4582-4593, 2023.
  22. [Tsiourvas et al., 2024] Asterios Tsiourvas, Wei Sun, and Georgia Perakis. Manifold-aligned counterfactual expla- nations for neural networks. In International Conference on Artificial Intelligence and Statistics, pages 3763-3771.
  23. PMLR, 2024.
  24. [Verma et al., 2024] Sahil Verma, Varich Boonsanong, Minh Hoang, Keegan Hines, John Dickerson, and Chirag Shah. Counterfactual explanations and algorithmic recourses for machine learning: A review. ACM Computing Surveys, 56(12):1-42, 2024.
  25. [Wachter et al., 2017] Sandra Wachter, Brent Mittelstadt, and Chris Russell. Counterfactual explanations without opening the black box: Automated decisions and the gdpr. Harv. JL & Tech., 31:841, 2017.
  26. [Xiao et al., 2023] Chunjing Xiao, Xovee Xu, Yue Lei, Kun- peng Zhang, Siyuan Liu, and Fan Zhou. Counterfactual graph learning for anomaly detection on attributed net- works. IEEE Transactions on Knowledge and Data En- gineering, 35(10):10540-10553, 2023.
  27. [Zhou et al., 2025] Peng Zhou, Qihui Tong, Shiji Chen, Yun- yun Zhang, and Xindong Wu. Eace: Explain anomaly via counterfactual explanations. Pattern Recognition, 164:111532, 2025.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards