Plausible Counterfactual Explanations of Recommendations

Jakub Cerný, Jiri Nemecek, Ivan Dovica, Jakub MarecekarXiv 2025 · DOI

Introduction

As recommender systems (RS) become integral to digital experiences, providing transparent explanations for their outputs is essential for building user trust and ensuring regulatory compliance, such as GDPR. Counterfactual Explanations (CEs) offer an intuitive approach by answering: "How would my input have to change for this recommendation to be different?" For example, in a banking app providing cashback offers, a user might wonder why they were recommended a specific restaurant based on their transaction history.

Example of a merchant recommendation explanation in a banking context.

The Challenge of Plausibility

A significant hurdle in generating CEs is ensuring they are plausible. While a model might mathematically justify a change—such as "If you hadn't visited a cinema, we wouldn't recommend McDonald's"—this explanation is only useful if it reflects a realistic scenario for the user. Existing methods often ignore the underlying data distribution, leading to explanations that are technically correct but practically nonsensical. This research introduces a framework to generate CEs that are both valid and highly probable given actual user data distributions.

Methodology: MIO and SPNs

The proposed method, adapted from the LiCE (Likely Counterfactual Explanations) framework, rests on two pillars:

  1. Mixed-Integer Optimization (MIO): Finding a counterfactual is treated as an optimization problem. The goal is to identify the minimal set of changes to a user's history (e.g., removing a past transaction) that causes a recommended item to fall out of the top-$k$ ranking. MIO is ideal for the discrete nature of user-item interactions.
  2. Sum-Product Networks (SPNs): To ensure plausibility, the authors employ SPNs—tractable probabilistic models—to estimate the likelihood of the proposed counterfactual history.

To handle the inherent sparsity of recommender data, the authors aggregate items into categories using functions like sum, mean, or disjunction (logical OR) before processing them through the SPN. The "disjunction" strategy proved most effective for modeling binarized category inputs efficiently.

Key Insights

  • Plausibility vs. Similarity: There is an inherent trade-off. Generating a realistic explanation (high log-likelihood) often requires slightly larger changes to the user profile ($\ell_1$ distance) compared to finding the absolute nearest mathematical boundary. Plausibility comes at a small cost to sparsity.
  • User Preferences: Qualitative studies revealed that users value conciseness. Shorter explanations involving fewer items were perceived as clearer and more helpful than complex, multi-item ones.
  • Niche Insights: Explanations involving niche merchants or specific local patterns were found more insightful than those relying on global, ubiquitous chains, which can feel generic.

Results and User Validation

The framework was tested on public benchmarks (Yelp, Amazon, Netflix) and a proprietary banking dataset. The MIO solver achieved a 100% success rate in finding optimal CEs for the Amazon and Netflix datasets within a reasonable timeframe, with a median runtime of just 11 seconds.

In a user study involving 20 participants, the generated explanations received high marks, averaging over 4 out of 6 on a "makes sense" scale. Crucially, the framework significantly enhanced perceived transparency, with the vast majority of users agreeing that the explanations made the system's decisions more reliable.

User agreement levels regarding whether the counterfactual framework improved recommender transparency.

Conclusion and Future Work

While the system shows great promise for enhancing user trust, challenges remain regarding worst-case latency (up to 10 minutes) and popularity bias in explanations. Future research will explore using plausible counterfactuals for in-distribution data augmentation and mitigating inherent biases within recommender systems.

Summary updated

BibTeX
@misc{cerny2025plausible,
  author = {Jakub Cerný and Jiri Nemecek and Ivan Dovica and Jakub Marecek},
  title = {{Plausible Counterfactual Explanations of Recommendations}},
  year = {2025},
  eprint = {2507.07919},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.07919},
}
Figure