计算机科学 ›› 2026, Vol. 53 ›› Issue (11A): 260400164-163.doi: 10.11896/jsjkx.260400164

• 人工智能 • 上一篇    下一篇

基于变分自编码器的因果反事实解释模型

陈洛1, 鲁统宇2, 姚晓阳1   

  1. 1 中国计量大学管理科学与工程学院 杭州 310018
    2 中国计量大学经济学院 杭州 310018
  • 出版日期:2026-11-16 发布日期:2026-11-16
  • 通讯作者: 鲁统宇(lutongyu@cjlu.edu.cn)
  • 作者简介:(724119732@qq.com)
  • 基金资助:
    国家自然科学基金面上项目(72571253,72071186,72471212);国家市场监督管理总局科技计划项目(2023MK232)

Causal Counterfactual Explanation Model Based on Variational Autoencoder

CHEN Luo1, LU Tongyu2, YAO Xiaoyang1   

  1. 1 College of Management Science and Engineering,China Jiliang University ,Hangzhou 310018,China
    2 School of Economics,China Jiliang University,Hangzhou 310018,China
  • Published:2026-11-16 Online:2026-11-16
  • About author:CHEN Luo,born in 2001,postgraduate.His main research interest is interpretable machine learning.
    LU Tongyu,born in 1978,professor.His main research interests include financial engineering and interpretable machine learning.
  • Supported by:
    This work was supported by the General Program of the National Natural Science Foundation of China(72571253,72071186,72471212) and Science and Technology Program of the State Administration for Market Regulation(2023MK232).

摘要: 反事实解释是可解释机器学习领域的一个研究热点。传统的反事实解释基于数学优化方法求解,较少考虑特征之间的因果约束,所生成的反事实实例可能在现实世界不可行。考虑基于因果解释的反事实生成模型,将特征之间的因果关系纳入反事实生成过程中,通过构建结构因果模型并引入因果距离度量,确保能够生成具有因果一致性的可行反事实解释。区别于传统方法,本文采用变分自编码器(VAE)生成反事实实例,使生成的反事实更接近原始数据分布。实证结果表明,与主流反事实生成模型相比,所提模型在因果约束效果和可解释性方面优势显著,尤其在因果路径上,模型生成的反事实变化更符合因果事实。所提因果反事实解释方法能够为重要决策领域的可解释性分析提供新参考。

关键词: 可解释机器学习, 反事实解释, 因果推断, 生成模型

Abstract: Counterfactual explanation is a research hotspot in the field of interpretable machine learning.Traditional counterfac-tual explanations are solved based on mathematical optimization methods,with little consideration of the causal constraints between features.As a result,the generated counterfactual instances may not be feasible in the real world.This paper proposes a counterfactual generation model based on causal explanation,incorporating the causal relationships between features into the counterfactual generation process.By constructing a structural causal model and introducing causal distance,the model ensures the generation of feasible counterfactual explanations with causal consistency.Unlike traditional methods,the proposed method employs a variational autoencoder(VAE) to generate counterfactual instances,making the generated counterfactuals closer to the original data distribution.Empirical results show that,compared with mainstream counterfactual generation models,the proposed model has significant advantages in terms of causal constraint effects and interpretability,especially along causal paths,where the counterfactual changes generated by the model are more consistent with causal facts.The proposed causal counterfactual explanation method can provide new references for interpretability analysis in important decision-making fields.

Key words: Interpretable machine learning, Counterfactual explanation, Causal inference, Generative model

中图分类号: 

  • TP181
[1] LECUN Y,BENGIO Y,HINTON G.Deep learning[J].Nature,2015,521(7553):436-444.
[2] GOODFELLOW I,POUGET-ABADIE J,MIRZA M,et al.Generative adversarial nets[C]//Advances in Neural Information Processing Systems,2014:2672-2680.
[3] ARRIETA A B,DÍAZ-RODRÍGUEZ N,DEL-SER J,et al.Explainable Artificial Intelligence(XAI):Concepts,taxonomies,opportunities and challenges toward responsible AI[J].Information Fusion,2020,58:82-115.
[4] PANIGUTTI C,PEROTTI A,PEDRESCHI D.Doctor XAI:anontology-based approach to black-box sequential data classification explanations[C]//Proceedings of the 2020 Conference on Fairness,Accountability,and Transparency.2020:629-639.
[5] JIANG F W,LIN Y H,MA T.Corporate bond default risk inthe context of “de-gang”:machine learning early warning and economic mechanism research [J].Financial Research,2023(10):85-103.
[6] LIU J J,ZHENG C R,HONG Y M.How can machine learningempower management research?-the front both at home and abroad and future [J].Management World,2023,33(9) :191-216.
[7] GOODMAN B,FLAXMAN S.European Union regulations onalgorithmic decision-making and a “right to explanation”[J].AI Magazine,2017,38(3):50-57.
[8] STEPIN I,ALONSO J M,CATALA A,et al.A survey of cont-rastive and counterfactual explanation generation methods for explainable artificial intelligence[J].IEEE Access,2021,9:11974-12001.
[9] ESHETE B.Making machine learning trustworthy[J].Science,2021,373(6556):743-744.
[10] XIAO H J.Algorithm:theory into,panoramic portrait and go-vernance paradigm [J].Management World,2022,38(4):200-226.
[11] DE BOCK K W,COUSSEMENT K,DE CAIGNYA,et al.Ex-plainable AI for operational research:A defining framework,methods,applications,and a research agenda[J].European Journal of Operational Research,2024,317(2):249-272.
[12] CHEN Y,CALABRESE R,MARTIN-BARRAGAN B.Inter-pretable machine learning for imbalanced credit scoring datasets[J].European Journal of Operational Research,2024,312(1):357-372.
[13] DOSHI-VELEZ F,KIM B.Towards a rigorous science of interpretable machine learning[J].arXiv:1702.08608,2017.
[14] CHEN C H,SHE C X,WANG Q Y.Overview of trusted machine learning[J].Industrial Engineering,2024,27(2):14-26.
[15] RIBEIRO M T,SINGH S,GUESTRIN C.“ Why should i trust you?” Explaining the predictions of any classifier[C]//Procee-dings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.2016:1135-1144.
[16] LUNDBERG S M,LEE S I.A unified approach to interpreting model predictions[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems.2017:4768-4777.
[17] BUSSMANN N,GIUDICI P,MARINELLI D,et al.Explainable machine learning in credit risk management[J].Computational Economics,2021,57(1):203-216.
[18] BASTOS J A,MATOSS M.Explainable models of credit losses[J].European Journal of Operational Research,2022,301(1):386-394.
[19] LEI X N,LIN L F,XIAO B Q,et al.Re-exploration of Default Characteristics of Small and Micro Enterprises:A Machine Learning Model Based on SHAP Interpretation Method [J].Chinese management science,2024,32(5):1-12.
[20] RUDIN C.Stop explaining black box machine learning modelsfor high stakes decisions and use interpretable models instead[J].Nature Machine Intelligence,2019,1(5):206-215.
[21] WACHTER S,MITTELSTADT B,RUSSELL C.Counterfactual explanations without opening the black box:Automated decisions and the GDPR[J].Harv.JL & Tech.,2017,31:841.
[22] MOTHILAL R K,SHARMA A,TAN C.Explaining machine learning classifiers through diverse counterfactual explanations[C]//Proceedings of the 2020 Conference on Fairness,Accoun-tability,and Transparency.2020:607-617.
[23] KANAMORI K,TAKAGI T,KOBAYASHI K,et al.Orderedcounterfactual explanation by mixed-integer linear optimization[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2021:11564-11574.
[24] KANAMORI T,SUZUKI J.Counterfactual explanation tree:A scalable method for generating counterfactual explanations for multiple instances[C]//Proceedings of the 2021 International Joint Conference on Artificial Intelligence.2021:2503-2511.
[25] JIANG Z,XU J,ZHANG S,et al.FedCFA:Alleviating Simpson’s Paradox in Model Aggregation with Counterfactual Fede-rated Learning[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2025:17662-17670.
[26] GUIDOTTI R.Counterfactual explanations and how to findthem:literature review and benchmarking[J].Data Mining and Knowledge Discovery,2024,38(5):2770-2824.
[27] KEANE M T,SMYTH B.Good counterfactuals and where to find them:A case-based technique for generating counterfactuals for explainable AI(XAI)[C]//28th International Conference Case-Based Reasoning Research and Development(ICCBR 2020).Salamanca,Spain.Springer International Publishing,2020:163-178.
[28] USTUN B,SPANGHER A,LIU Y.Actionable recourse in linear classification[C]//Proceedings of the Conference on Fairness,Accountability,and Transparency.2019:10-19.
[29] RUSSELL C.Efficient search for diverse coherent explanations[C]//Proceedings of the Conference on Fairness,Accountability,and Transparency.2019:20-28.
[30] PEARL J.Causal inference in statistics:An overview[J].Statistics Surveys,2009,3:96-146.
[31] PETERS J,JANZING D,SCHÖLKOPF B.Elements of Causal Inference:Foundations and Learning Algorithms[M].MIT Press,2017.
[32] KARIMI A H,SCHÖLKOPF B,VALERA I.Algorithmic re-course:From counterfactual explanations to interventions[C]//Proceedings of the 2021 ACM Conference on Fairness,Accoun-tability,and Transparency.2021:353-362.
[33] CHO S H,SHIN K.Feature-weighted counterfactual-based explanation for bankruptcy prediction[J].Expert Systems with Applications,2023,216:119390.
[34] KOMMIYA M R,MAHAJAN D,TAN C,et al.Towards unifying feature attribution and counterfactual explanations:Different means to the same end[C]//Proceedings of the 2021 AAAI/ACM Conference on AI,Ethics,and Society.2021:652-663.
[35] TONG Q H,ZHOU P,ZHANG Y P.Consider causality constraint exception object against the facts explain [J].Computer system application,2024(10):140-151.
[36] DANDL S,MOLNAR C,BINDER M,et al.Multi-objectivecounterfactual explanations[C]//International Conference on Parallel Problem Solving from Nature.Cham:Springer International Publishing,2020:448-469.
[37] DE-OLIVEIRA R M B,SÖRENSEN K,MARTENS D.A model-agnostic and data-independent tabu search algorithm to generate counterfactuals for tabular,image,and text data[J].European Journal of Operational Research,2024,317(2):286-302.
[38] WANG D,CHEN Z,FLORESCU I,et al.A sparsity algorithm for finding optimal counterfactual explanations:Application to corporate credit rating[J].Research in International Business and Finance,2023,64:101869.
[39] WANG B C,WU G W.Feature weighted counterfactual interpretation method:A case study of credit risk control scenario [J].Computer Science,2019,51(12):259-268.
[40] YOU D,NIU S,DONG S,et al.Counterfactual explanation generation with minimal feature boundary[J].Information Sciences,2023,625:342-366.
[41] ZHANG S,CHEN X,WEN S,et al.Density-based reliable and robust explainer for counterfactual explanation[J].Expert Systems with Applications,2023,226:120214.
[42] LAUGEL T,LESOT M J,MARSALA C,et al.Comparison-based inverse classification for interpretability in machine learning[C]//Information Processing and Management of Uncertainty in Knowledge-Based Systems.Theory and Foundations:17th International Conference.Springer International Publishing,2018:100-111.
[43] ATSMONY M,MOSHEIOV G.Common due-date assignment problems with fixed-plus-linear earliness and tardiness costs[J].Computers & Industrial Engineering,2024,188:109915.
[44] CHOU Y L,MOREIRA C,BRUZA P,et al.Counterfactuals and causability in explainable artificial intelligence:Theory,algorithms,and applications[J].Information Fusion,2022,81:59-83.
[45] MORAFFAH R,KARAMI M,GUO R,et al.Causal interpret-ability for machine learning-problems,methods and evaluation[J].ACM SIGKDD Explorations Newsletter,2020,22(1):18-33.
[46] PEARL J.Causality[M].Cambridge university press,2009.
[47] PEARL J,MACKENZIE D.The book of why:the new science of cause and effect[M].Basic books,2018.
[48] PEARL J.The seven tools of causal inference,with reflections on machine learning[J].Communications of the ACM,2019,62(3):54-60.
[49] ZANGA A,OZKIRIMLI E,STELLA F.A survey on causal discovery:theory and practice[J].International Journal of Approximate Reasoning,2022,151:101-129.
[50] BLÖBAUM P,GÖTZ P,BUDHATHOKI K,et al.DoWhy-GCM:An extension of DoWhy for causal inference in graphical causal models[J].Journal of Machine Learning Research,2024,25(147):1-7.
[51] MAHAJAN D,TAN C,SHARMA A.Preserving causal con-straints in counterfactual explanations for machine learning classifiers[J].arXiv:1912.03277,2019.
[52] DUONG T D,LI Q,XU G.Causality-based counterfactual explanation for classification models[J].Knowledge-Based Systems,2024,300:112200.
[53] LAURITZENS L.Local computations with probabilities ongraphical structures and their application to expert systems(with discussion)[J].J.Roy.Statis.,Soc.,B,1988,50(2):251-263.
[54] KINGMA D P.Auto-encoding variational bayes[J].arXiv:1312.6114,2013.
[55] YANG M,LIU F,CHEN Z,et al.Causalvae:Disentangled representation learning via neural structural causal models[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2021:9593-9602.
[56] VAN-LOOVEREN A,KLAISE J.Interpretable counterfactualexplanations guided by prototypes[C]//Joint European Conference on Machine Learning and Knowledge Discovery in Databases.Cham:Springer International Publishing,2021:650-665.
[57] YU Z,GG S W.Independent credit rating,bond pricing and default forecasting ability [J].Fudan Journal(Social Science Edition),2019,63(2):142-153.
[58] DHURANDHAR A,CHEN P Y,LUSS R,et al.Explanationsbased on the missing:Towards contrastive explanations with pertinent negatives[C]//NeurIPS.2018.
[59] POYIADZI R,SOKOL K,SANTOS-RODRIGUEZ R,et al.FACE:feasible and actionable counterfactual explanations[C]//Proceedings of the AAAI/ACM Conference on AI,Ethics,and Society.2020:344-350.
[60] AMIR-HOSSEIN K,SCHÖLKOPF B,VALERA I.Algorithmic recourse:from counterfactual explanations to interventions[C]//Proceedings of the 2021 ACM Conference on Fairness,Accountability,and Transparency.2021.
[61] AMIR-HOSSEIN K,JULIUS VON K,BERNHARD S,et al.Algorithmic recourse under imperfect causal knowledge:a probabilistic approach[C]//Neural Information Processing Systems.2020:265-277.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!