Counterfactual explanation for fairness in recommendation

Xiangmeng WANG, Qian LI, Dianer YU, Qing LI, Guandong XU

Research output: Contribution to journalArticlespeer-review


Fairness-aware recommendation alleviates discrimination issues to build trustworthy recommendation systems. Explaining the causes of unfair recommendations is critical, as it promotes fairness diagnostics, and thus secures users' trust in recommendation models. Existing fairness explanation methods suffer high computation burdens due to the large-scale search space and the greedy nature of the explanation search process. Besides, they perform feature-level optimizations with continuous values, which are not applicable to discrete attributes such as gender and age. In this work, we adopt counterfactual explanations from causal inference and propose to generate attribute-level counterfactual explanations, adapting to discrete attributes in recommendation models. We use real-world attributes from Heterogeneous Information Networks (HINs) to empower counterfactual reasoning on discrete attributes. We propose a Counterfactual Explanation for Fairness (CFairER) that generates attribute-level counterfactual explanations from HINs for item exposure fairness. Our CFairER conducts off-policy reinforcement learning to seek high-quality counterfactual explanations, with attentive action pruning reducing the search space of candidate counterfactuals. The counterfactual explanations help to provide rational and proximate explanations for model fairness, while the attentive action pruning narrows the search space of attributes. Extensive experiments demonstrate our proposed model can generate faithful explanations while maintaining favorable recommendation performance. Copyright © 2024 held by the owner/author(s).

Original languageEnglish
Article number106
JournalACM Transactions on Information Systems
Issue number4
Early online dateJan 2024
Publication statusPublished - Mar 2024


Wang, X., Li, Q., Yu, D., Li, Q., & Xu, G. (2024). Counterfactual explanation for fairness in recommendation. ACM Transactions on Information Systems, 42(4), Article 106.


  • Explainable recommendation
  • Fairness
  • Counterfactual explanation
  • Reinforcement learning