Structure-Aware Robust Counterfactual Explanations via Conditional Gaussian Network Classifiers
Zhan-Yi Liao, Jaewon Yoo, Hao-Tsung Yang, Po-An Chen
TL;DR
This work targets robust, structure-consistent counterfactual explanations for continuous Bayesian network classifiers by leveraging structure embedded CGNCs. It formulates counterfactual search as a robust optimization problem under a distribution-aware distance, and solves it via a convergence-guaranteed cutting-set framework that alternates between a master problem and an adversarial problem. To achieve global optimality despite nonconvexity, it employs a piecewise McCormick relaxation that yields a MILP, with bound-tightening to balance relaxation accuracy and computational tractability. Empirical results across multiple datasets demonstrate that the CGNC-based counterfactuals maintain structural fidelity and robustness, with MILP-based solutions offering stable and scalable performance relative to nonconvex approaches.
Abstract
Counterfactual explanation (CE) is a core technique in explainable artificial intelligence (XAI), widely used to interpret model decisions and suggest actionable alternatives. This work presents a structure-aware and robustness-oriented counterfactual search method based on the conditional Gaussian network classifier (CGNC). The CGNC has a generative structure that encodes conditional dependencies and potential causal relations among features through a directed acyclic graph (DAG). This structure naturally embeds feature relationships into the search process, eliminating the need for additional constraints to ensure consistency with the model's structural assumptions. We adopt a convergence-guaranteed cutting-set procedure as an adversarial optimization framework, which iteratively approximates solutions that satisfy global robustness conditions. To address the nonconvex quadratic structure induced by feature dependencies, we apply piecewise McCormick relaxation to reformulate the problem as a mixed-integer linear program (MILP), ensuring global optimality. Experimental results show that our method achieves strong robustness, with direct global optimization of the original formulation providing especially stable and efficient results. The proposed framework is extensible to more complex constraint settings, laying the groundwork for future advances in counterfactual reasoning under nonconvex quadratic formulations.
