Generating Likely Counterfactuals Using Sum-Product Networks

Jiri Nemecek, T. Pevný, Jakub Mareček
2/12/2026

No official code found. Best implementation: Epanemu/LiCE (0 stars, last commit 2025-04-24).

Abstract

The need to explain decisions made by AI systems is driven by both recent regulation and user demand. The decisions are often explainable only post hoc. In counterfactual explanations, one may ask what constitutes the best counterfactual explanation. Clearly, multiple criteria must be taken into account, although"distance from the sample"is a key criterion. Recent methods that consider the plausibility of a counterfactual seem to sacrifice this original objective. Here, we present a system that provides high-likelihood explanations that are, at the same time, close and sparse. We show that the search for the most likely explanations satisfying many common desiderata for counterfactual explanations can be modeled using Mixed-Integer Optimization (MIO). We use a Sum-Product Network (SPN) to estimate the likelihood of a counterfactual. To achieve that, we propose an MIO formulation of an SPN, which can be of independent interest. The source code with examples is available at https://github.com/Epanemu/LiCE.

View on arXivView PDF

Code Implementations(1)

Epanemu/LiCECommunity100%

Likely Counterfactual Explanations - a MIO-based method for CE generation, using Sum-Product Networks to ensure plausibility

00Python, Jupyter NotebookMay 27, 20241 years ago
counterfactual-explanationsexplainable-aimixed-integer-linear-programmingmixed-integer-optimizationmixed-integer-programming+1 more

Cite this paper

@article{nemecek2026generating,
  title  = {Generating Likely Counterfactuals Using Sum-Product Networks},
  author = {Jiri Nemecek and T. Pevný and Jakub Mareček},
  year   = {2026},
  eprint = {2401.14086},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2401.14086},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.14086.svg)](https://codeofpaper.com/paper/2401.14086)

Discussion