Fairness Hacking: The Malicious Practice of Shrouding Unfairness in Algorithms
Kristof Meding, Thilo Hagendorff
TL;DR
This work analyzes how fairness metrics can be deliberately manipulated, formalizing two hacking modes: intra-metric (within a single metric) and inter-metric (across multiple metrics). It demonstrates these hacks with synthetic data and real MEPS data, showing how confidence intervals and metric choice can mask or exaggerate fairness. The authors advocate pre-registration, balanced datasets, comprehensive reporting (including effect sizes and confidence intervals), and sociotechnical contextualization to mitigate misuse. They highlight that fairness metrics embed normative assumptions and stress community-wide practices to reduce harm from biased AI systems.
Abstract
Fairness in machine learning (ML) is an ever-growing field of research due to the manifold potential for harm from algorithmic discrimination. To prevent such harm, a large body of literature develops new approaches to quantify fairness. Here, we investigate how one can divert the quantification of fairness by describing a practice we call "fairness hacking" for the purpose of shrouding unfairness in algorithms. This impacts end-users who rely on learning algorithms, as well as the broader community interested in fair AI practices. We introduce two different categories of fairness hacking in reference to the established concept of p-hacking. The first category, intra-metric fairness hacking, describes the misuse of a particular metric by adding or removing sensitive attributes from the analysis. In this context, countermeasures that have been developed to prevent or reduce p-hacking can be applied to similarly prevent or reduce fairness hacking. The second category of fairness hacking is inter-metric fairness hacking. Inter-metric fairness hacking is the search for a specific fair metric with given attributes. We argue that countermeasures to prevent or reduce inter-metric fairness hacking are still in their infancy. Finally, we demonstrate both types of fairness hacking using real datasets. Our paper intends to serve as a guidance for discussions within the fair ML community to prevent or reduce the misuse of fairness metrics, and thus reduce overall harm from ML applications.
