Lune

FSE2024Top-tier venue

MirrorFair: Fixing Fairness Bugs in Machine Learning Software via Counterfactual Predictions

Ying Xiao, Jie M. Zhang, Yepang Liu, Mohammad Reza Mousavi, Sicen Liu, Dingyuan Xue

Abstract

With the increasing utilization of Machine Learning (ML) software in critical domains such as employee hiring, college admission, and credit evaluation, ensuring fairness in the decision-making processes of underlying models has emerged as a paramount ethical concern. Nonetheless, existing methods for rectifying fairness issues can hardly strike a consistent trade-off between performance and fairness across diverse tasks and algorithms. Informed by the principles of counterfactual inference, this paper introduces MirrorFair, an innovative adaptive ensemble approach designed to mitigate fairness concerns. MirrorFair initially constructs a counterfactual dataset derived from the original data, training two distinct models—one on the original dataset and the other on the counterfactual dataset. Subsequently, MirrorFair adaptively combines these model predictions to generate fairer final decisions. We conduct an extensive evaluation of MirrorFair and compare it with 15 existing methods across a diverse range of decision-making scenarios. Our findings reveal that MirrorFair outperforms all the baselines in every measurement (i.e., fairness improvement, performance preservation, and trade-off metrics). Specifically, in <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn93</mml:mn> mml:mo%</mml:mo> </mml:math> of cases, MirrorFair surpasses the fairness and performance trade-off baseline proposed by the benchmarking tool Fairea, whereas the state-of-the-art method achieves this in only <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn88</mml:mn> mml:mo%</mml:mo> </mml:math> of cases. Furthermore, MirrorFair consistently demonstrates its superiority across various tasks and algorithms, ranking first in balancing model performance and fairness in <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"> mml:mn83</mml:mn> mml:mo%</mml:mo> </mml:math> of scenarios. To foster replicability and future research, we have made our code, data, and results openly accessible to the research community.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Fairness Is Not Just Ethical: Performance Trade-Off via Data Correlation Tuning to Mitigate Bias in ML Software cites Software Fairness Dilemma: Is Bias Mitigation a Zero-Sum Game?
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Fairness Is Not Just Ethical: Performance Trade-Off via Data Correlation Tuning to Mitigate Bias in ML SoftwareYing Xiao, Shangwen Wang, Sicen Liu, Dingyuan Xue et al.ICSE 2026
  2. Software Fairness Dilemma: Is Bias Mitigation a Zero-Sum Game?Zhenpeng Chen, Xinyue Li, Jie M. Zhang, Weisong Sun et al.FSE 2025

Related papers

  1. MAAT: a novel ensemble approach to addressing fairness and performance bugs for machine learning softwareZhenpeng Chen, Jie M. Zhang, Federica Sarro, Mark HarmanFSE 2022 · 65 citations
  2. Fairea: a model behaviour mutation approach to benchmarking bias mitigation methodsMax Hort, Jie M. Zhang, Federica Sarro, Mark HarmanFSE 2021 · 75 citations
  3. Counterfactual Fairness by Combining Factual and Counterfactual PredictionsZeyu Zhou, Tianci Liu, Ruqi Bai, Jing Gao et al.NeurIPS 2024 · 11 citations
  4. Diversity Drives Fairness: Ensemble of Higher Order Mutants for Intersectional Fairness of Machine Learning SoftwareZhenpeng Chen, Xinyue Li, Jie M. Zhang, Federica Sarro et al.ICSE 2025 · 2 citations
  5. Do the machine learning models on a crowd sourced platform exhibit bias? an empirical study on model fairnessSumon Biswas, Hridesh RajanFSE 2020 · 96 citations
Dusk over the sea between two cliffs drawn in fine vertical lines