Region-Preserving Latent Counterfactual Explanations for Image Classification
A Grad-CAM-Guided Latent Optimization Approach
- DOI
- 10.2991/978-94-6239-828-3_3How to use a DOI?
- Keywords
- Counterfactual explanation; Explainable AI; Latent space optimization; Variational auto encoder; Region preservation; Grad-CAM
- Abstract
Counterfactual explanations help users understand image classifiers by showing how an input would need to change to alter a model prediction. Pixel-space adversarial methods achieve high flip rates, but their perturbations are often imperceptible and semantically meaningless. Latent-space generative approaches produce more natural images, yet without spatial constraints they may modify background regions unrelated to the object of interest. We propose a region-preserving latent counterfactual explanation method that optimizes a VAE latent code while keeping the classifier and generator frozen, using a Grad-CAM-derived mask to penalize changes outside salient object regions. The objective combines target-class flip loss, pixel similarity, latent proximity, perceptual similarity, background preservation, and total variation regularization. Experiments on STL-10 with an EfficientNet-B0 classifier demonstrate that the proposed method preserves the high flip rate of latent counterfactuals while improving spatial localization and background stability relative to unconstrained latent perturbation. Ablation studies quantify the roles of perceptual and background-preservation terms.
- Copyright
- © 2026 The Author(s)
- Open Access
- Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
Cite this article
TY - CONF AU - Rinaldi Pramandika Komber AU - I Wayan Ivan Zenatmaja AU - Abdurrahman Harish AlMauqy AU - Wayan Firdaus Mahmudy AU - Novanto Yudistira PY - 2026 DA - 2026/11/04 TI - Region-Preserving Latent Counterfactual Explanations for Image Classification BT - Proceedings of the 2026 11th International Conference on Sustainable Information Engineering and Technology (SIET 2026) PB - Atlantis Press SP - 18 EP - 31 SN - 2589-4900 UR - https://doi.org/10.2991/978-94-6239-828-3_3 DO - 10.2991/978-94-6239-828-3_3 ID - Komber2026 ER -