Table of Contents
Fetching ...

From Facts to Foils: Designing and Evaluating Counterfactual Explanations for Smart Environments

Anna Trapp, Mersedeh Sadeghi, Andreas Vogelsang

TL;DR

The paper addresses explainability in rule-based smart environments and the lack of counterfactual explanations for this domain. It formalizes counterfactual explanations and presents a generation framework that combines additive and subtractive strategies under a minimal-change principle, with a scoring and ranking mechanism using MCDM/TOPSIS. The framework is implemented as a SmartEx plug-in for Home Assistant and evaluated via a within-subject user study (N=17) contrasting counterfactuals with causal explanations, revealing context-dependent preferences. The findings show causal explanations excel in linguistic clarity under time pressure, while counterfactuals provide more actionable guidance when users want to effect change, supporting adaptive explanation strategies in practice and guiding future research on language quality and larger-scale validation.

Abstract

Explainability is increasingly seen as an essential feature of rule-based smart environments. While counterfactual explanations, which describe what could have been done differently to achieve a desired outcome, are a powerful tool in eXplainable AI (XAI), no established methods exist for generating them in these rule-based domains. In this paper, we present the first formalization and implementation of counterfactual explanations tailored to this domain. It is implemented as a plugin that extends an existing explanation engine for smart environments. We conducted a user study (N=17) to evaluate our generated counterfactuals against traditional causal explanations. The results show that user preference is highly contextual: causal explanations are favored for their linguistic simplicity and in time-pressured situations, while counterfactuals are preferred for their actionable content, particularly when a user wants to resolve a problem. Our work contributes a practical framework for a new type of explanation in smart environments and provides empirical evidence to guide the choice of when each explanation type is most effective.

From Facts to Foils: Designing and Evaluating Counterfactual Explanations for Smart Environments

TL;DR

The paper addresses explainability in rule-based smart environments and the lack of counterfactual explanations for this domain. It formalizes counterfactual explanations and presents a generation framework that combines additive and subtractive strategies under a minimal-change principle, with a scoring and ranking mechanism using MCDM/TOPSIS. The framework is implemented as a SmartEx plug-in for Home Assistant and evaluated via a within-subject user study (N=17) contrasting counterfactuals with causal explanations, revealing context-dependent preferences. The findings show causal explanations excel in linguistic clarity under time pressure, while counterfactuals provide more actionable guidance when users want to effect change, supporting adaptive explanation strategies in practice and guiding future research on language quality and larger-scale validation.

Abstract

Explainability is increasingly seen as an essential feature of rule-based smart environments. While counterfactual explanations, which describe what could have been done differently to achieve a desired outcome, are a powerful tool in eXplainable AI (XAI), no established methods exist for generating them in these rule-based domains. In this paper, we present the first formalization and implementation of counterfactual explanations tailored to this domain. It is implemented as a plugin that extends an existing explanation engine for smart environments. We conducted a user study (N=17) to evaluate our generated counterfactuals against traditional causal explanations. The results show that user preference is highly contextual: causal explanations are favored for their linguistic simplicity and in time-pressured situations, while counterfactuals are preferred for their actionable content, particularly when a user wants to resolve a problem. Our work contributes a practical framework for a new type of explanation in smart environments and provides empirical evidence to guide the choice of when each explanation type is most effective.

Paper Structure

This paper contains 18 sections, 3 figures, 4 tables.

Figures (3)

  • Figure 1: Reference architecture of SmartEx and the Counterfactual Explanation Service
  • Figure 2: Distribution of explanation type rankings across six scenes and 17 participants. It shows how often each explanation type was ranked 1st, 2nd, or 3rd across all participant–scene combinations (total: 102 per rank).
  • Figure 3: Number of times each explanation type was ranked 1st across all scenes, grouped by participants’ stated explanation preference.

Theorems & Definitions (1)

  • Definition 1