When Can Memorization Improve Fairness?

Bob Pepin, Christian Igel, Raghavendra SelvanarXiv 2024 · DOI

Abstract

In machine learning, fairness is often measured by group-level statistical averages. This paper explores a critical vulnerability in these metrics: "memorization." By achieving perfect accuracy on a carefully selected subset of the population, a model developer can artificially eliminate the fairness gap of an otherwise biased model. This theoretical work provides a framework for understanding how much of a population must be memorized to "game" a metric and demonstrates that while some metrics are easily manipulated, others, like equalized odds, are significantly more robust against such strategic optimization.

Introduction

As machine learning models are increasingly deployed in high-stakes domains such as hiring, lending, and criminal justice, the need for robust fairness auditing has never been greater. Standard practice involves calculating additive metrics—such as statistical parity (ensuring equal prediction rates across groups) or equal opportunity (ensuring equal true positive rates). However, these metrics are often criticized for being "coarse" averages that do not account for the distribution of error within a group.

This paper investigates whether these metrics can be intentionally or unintentionally manipulated through "memorization." In this context, memorization refers to a model providing perfect predictions for a specific, hand-picked subset of the data. The authors ask a provocative question: Can a developer hide systemic bias by simply "fixing" the model's performance on a small, strategic slice of the population?

The Memorizing Classifier Framework

To analyze this phenomenon, the authors propose a theoretical "Memorizing Classifier." This model is treated as an ensemble of two components:

  1. The Memorizer: A component that provides 100% accurate predictions for individuals within a specific "memorized set" ($S$).
  2. The Base Classifier: A standard, potentially biased model used for all individuals outside the memorized set.

By defining the final model as a combination of these two, the authors derive explicit mathematical expressions (notably Theorem 8) that relate the final fairness gap to the composition of the memorized set. This allows for a formal study of how the size and selection of $S$ influence the overall fairness metrics of the system.

The Mechanics of "Gaming" Metrics

The core insight of the paper is that fairness can be viewed as a "budgeting" problem. If a base model exhibits a certain degree of bias against a protected group, that bias can be offset by memorizing a specific number of individuals from that group for whom the model would otherwise have failed.

The authors show that the influence of memorization is amplified by group imbalance. In populations where one group is significantly smaller than another, memorizing only a tiny fraction of the total population can have a disproportionately large impact on the group-level fairness metric. For example, if a model is significantly biased, a developer might only need to ensure perfect performance on a mere 5% of the data to make the entire model appear perfectly fair on paper. This "gaming threshold" represents a significant risk for regulators and auditors who rely solely on aggregate statistics.

Theoretical Results and Linear Programming

The paper provides a rigorous mathematical characterization of these "fair" memorized sets. The authors frame the search for a "perfectly fair" memorized set as a system of linear equations and inequalities. This allows the problem of finding the smallest or most efficient subset to memorize to be solved using standard Linear Programming algorithms, such as the Simplex method.

Furthermore, the authors derive several Corollaries (10, 11, 13, and 14) that serve as existence bounds. These formulas act as a "litmus test" for auditors: based on the base model's error rates, they tell you whether it is even mathematically possible to achieve perfect fairness by memorizing a certain percentage of the data.

Resilience of Equalized Odds

While metrics like Statistical Parity and Equal Opportunity can often be zeroed out through strategic memorization, the authors find that Equalized Odds is much more resilient. Equalized Odds requires both the true positive rate and the false positive rate to be equal across groups simultaneously.

According to Theorem 15, satisfying this metric through memorization is only possible under very specific and unlikely mathematical conditions. This suggests that Equalized Odds is a more robust metric for auditors looking to protect against the "gaming" of fairness results, as it is significantly harder to satisfy via a small memorized subset.

Conclusion and Limitations

This research highlights a significant tension between model performance and metric-based fairness. It warns that "fairness" can sometimes be "bought" by over-optimizing on small slices of data, potentially masking systemic biases that affect the majority of a protected group.

However, the study notes several limitations. It assumes "perfect" memorization (100% accuracy), whereas real-world models may only achieve "near-perfect" performance on subsets. Additionally, the paper focuses on the mathematical possibility of manipulation rather than providing a tool to detect intent. Future work is needed to develop numerical methods that can help auditors distinguish between a model that has genuinely improved through hard-case learning and one that has been strategically adjusted to satisfy a regulatory threshold.

Summary updated

Abstract

We study to which extent additive fairness metrics (statistical parity, equal opportunity and equalized odds) can be influenced in a multi-class classification problem by memorizing a subset of the population. We give explicit expressions for the bias resulting from memorization in terms of the label and group membership distribution of the memorized dataset and the classifier bias on the unmemorized dataset. We also characterize the memorized datasets that eliminate the bias for all three metrics considered. Finally we provide upper and lower bounds on the total probability mass in the memorized dataset that is necessary for the complete elimination of these biases.
BibTeX
@misc{pepin2024when,
  author = {Bob Pepin and Christian Igel and Raghavendra Selvan},
  title = {{When Can Memorization Improve Fairness?}},
  year = {2024},
  eprint = {2412.09254},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.09254},
}
Figure