Skip to main content

Distribution-Aligned Sequential Counterfactual Explanation with Local Outlier Factor

  • Conference paper
  • First Online:
PRICAI 2024: Trends in Artificial Intelligence (PRICAI 2024)

Abstract

Sequential counterfactual explanation is one of the counterfactual explanation methods suggesting how to sequentially change the input feature vector to obtain the desired prediction result from a trained classifier. To show realistic sequential change, existing methods construct a neighborhood graph and obtain a path from the original feature vector to reach a sample for which the model outputs the desired result. However, constructing an appropriate neighborhood graph is challenging and time-consuming in practice. This study proposes a new sequential counterfactual explanation method that generates a realistic path without constructing a neighborhood graph. To evaluate the reality of the suggested path, we first define a cost function based on the Local Outlier Factor (LOF) that assesses how much each vector in the path deviates from the underlying data distribution. Then, we propose an algorithm for generating a path by iteratively decreasing our cost function. Since our cost function is non-differentiable due to LOF, we use a local linear approximation to obtain a local descent direction. Our numerical experiments demonstrated that our method could generate a realistic path that aligns with the data distribution, and its computational time was more stable than the existing method.

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. Alotaibi, H., Singh, R.: Metrics for evaluating actionability in explainable AI. In: Proceedings of the 20th Pacific Rim International Conference on Artificial Intelligence, pp. 481–487 (2023)

    Google Scholar 

  2. Becker, B., Kohavi, R.: Adult (1996). https://doi.org/10.24432/C5XW20

  3. Breunig, M.M., Kriegel, H.P., Ng, R.T., Sander, J.: LOF: identifying density-based local outliers. ACM SIGMOD Rec. 29(2), 93–104 (2000)

    Article  Google Scholar 

  4. Brughmans, D., Leyman, P., Martens, D.: NICE: an algorithm for nearest instance counterfactual explanations. Data Min. Knowl. Disc. (2023). https://doi.org/10.1007/s10618-023-00930-y

  5. Chen, T., Guestrin, C.: XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd International Conference on Knowledge Discovery and Data Mining, pp. 785–794. ACM (2016)

    Google Scholar 

  6. Dandl, S., Molnar, C., Binder, M., Bischl, B.: Multi-objective counterfactual explanations. In: Proceedings of the 16th International Conference on Parallel Problem Solving from Nature, pp. 448–469 (2020)

    Google Scholar 

  7. Dhurandhar, A., et al.: Explanations based on the missing: towards contrastive explanations with pertinent negatives. In: Proceedings of the 32nd International Conference on Neural Information Processing Systems, pp. 590–601 (2018)

    Google Scholar 

  8. Dhurandhar, A., Pedapati, T., Balakrishnan, A., Chen, P.Y., Shanmugam, K., Puri, R.: Model agnostic contrastive explanations for structured data. arXiv preprint (2019). https://doi.org/10.48550/arxiv.1906.00117

  9. Guidotti, R.: Counterfactual explanations and how to find them: literature review and benchmarking. Data Min. Knowl. Disc. (2022). https://doi.org/10.1007/s10618-022-00831-6

  10. Hastie, T., Tibshirani, R., Friedman, J.: The Elements of Statistical Learning Data Mining, Inference, and Prediction, 2nd edn. Springer, New York (2009). https://doi.org/10.1007/978-0-387-84858-7

    Book  Google Scholar 

  11. Kanamori, K., Takagi, T., Kobayashi, K., Arimura, H.: DACE: distribution-aware counterfactual explanation by mixed-integer linear optimization. In: Proceedings of the 29th International Joint Conference on Artificial Intelligence, pp. 2855–2862 (2020)

    Google Scholar 

  12. Kshetry, N., Kantardzic, M.: What-if XAI framework (WiXAI): from counterfactuals towards causal understanding. J. Comput. Commun. 12(06), 169–198 (2024)

    Article  Google Scholar 

  13. Moro, S., Cortez, P., Rita, P.: A data-driven approach to predict the success of bank telemarketing. Decis. Supp. Syst. 62, 22–31 (2014)

    Article  Google Scholar 

  14. Nguyen, T.D.H., Bui, N., Nguyen, D., Yue, M.C., Nguyen, V.A.: Robust Bayesian recourse. In: Proceedings of the 38th Conference on Uncertainty in Artificial Intelligence (PMLR), vol. 180, pp. 1498–1508 (2022)

    Google Scholar 

  15. Pawelczyk, M., Broelemann, K., Kasneci, G.: Learning model-agnostic counterfactual explanations for tabular data. In: Proceedings of the Web Conference 2020, pp. 3126–3132 (2020)

    Google Scholar 

  16. Poyiadzi, R., Sokol, K., Santos-Rodriguez, R., De Bie, T., Flach, P.: Face: feasible and actionable counterfactual explanations. In: Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society, pp. 344–350 (2020)

    Google Scholar 

  17. Tsiourvas, A., Sun, W., Perakis, G.: Manifold-aligned counterfactual explanations for neural networks. In: Proceedings of the International Conference on Artificial Intelligence and Statistics (PMLR), vol. 238, pp. 3763–3771 (2024)

    Google Scholar 

  18. Van Looveren, A., Klaise, J.: Interpretable counterfactual explanations guided by prototypes. In: Machine Learning and Knowledge Discovery in Databases, Research Track, pp. 650–665 (2021)

    Google Scholar 

  19. Verma, S., Boonsanong, V., Hoang, M., Hines, K.E., Dickerson, J.P., Shah, C.: Counterfactual explanations and algorithmic recourses for machine learning: a review. arXiv preprint (2020). https://doi.org/10.48550/arxiv.2010.10596

  20. Wachter, S., Mittelstadt, B., Russell, C.: Counterfactual explanations without opening the black box: automated decisions and the GDPR. Harvard J. Law Technol. 31(2), 841–887 (2018)

    Google Scholar 

  21. Zhang, S., Chen, X., Wen, S., Li, Z.: Density-based reliable and robust explainer for counterfactual explanation. Expert Syst. Appl. 226, 120214 (2023)

    Article  Google Scholar 

Download references

Acknowledgments

This work was supported by JSPS KAKENHI Grant Number 24K17465.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Ken Kobayashi , Kentaro Kanamori , Takuya Takagi , Yuichi Ike or Kazuhide Nakata .

Editor information

Editors and Affiliations

Ethics declarations

Disclosure of Interests

The authors have no competing interests to declare that are relevant to the content of this article.

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

Yamao, S., Kobayashi, K., Kanamori, K., Takagi, T., Ike, Y., Nakata, K. (2025). Distribution-Aligned Sequential Counterfactual Explanation with Local Outlier Factor. In: Hadfi, R., Anthony, P., Sharma, A., Ito, T., Bai, Q. (eds) PRICAI 2024: Trends in Artificial Intelligence. PRICAI 2024. Lecture Notes in Computer Science(), vol 15281. Springer, Singapore. https://doi.org/10.1007/978-981-96-0116-5_20

Download citation

  • DOI: https://doi.org/10.1007/978-981-96-0116-5_20

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-96-0115-8

  • Online ISBN: 978-981-96-0116-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics