Fairness as a Program Property

Aws Albarghouthi, Loris D'Antoni, Samuel Drews, Aditya V. NoriarXiv 2016

Abstract

Algorithmic fairness is typically evaluated against static datasets, which may fail to represent the true population distribution. This paper proposes a formal verification approach that treats fairness as a program property. By combining a decision-making program with a probabilistic population model, the authors introduce FairSquare, a tool that uses SMT-based volume computation to provide rigorous proofs of fairness or unfairness.

Introduction

As automated systems increasingly influence critical life outcomes in hiring, lending, and law enforcement, ensuring algorithmic fairness has become a primary societal concern. Traditional fairness audits rely on testing models against specific datasets. However, a dataset is merely a snapshot; if it is biased or non-representative, the resulting fairness metrics may be misleading.

This research advocates for a paradigm shift: verifying fairness against a population model—a probabilistic program describing the distribution of traits within a society. This approach allows developers and regulators to verify if a program is fair for a defined population, rather than just a specific spreadsheet of historical data.

The FairSquare Framework

The authors developed FairSquare, the first tool designed to provide formal fairness guarantees for programs with real-valued inputs. The framework operates by taking three primary inputs: a decision-making program ($P$), a probabilistic population model ($M$), and a formal fairness property.

Overview of the FairSquare fairness verification process.

Fairness is formalized as a postcondition in a program verification context. For instance, "Group Fairness" is defined by comparing the probability of positive outcomes across different demographic groups defined in the population model.

Verification via Volume Computation

To verify these properties, FairSquare translates the interaction between the program and the population model into a logical formula ($\phi$). This formula represents a set of polyhedra in an $n$-dimensional space, where the volume corresponds to the probability of specific outcomes.

Computing the exact volume of such high-dimensional polyhedra is computationally intensive (#P-hard). To address this, FairSquare leverages the Z3 SMT solver to perform an under-approximation of the space using hyperrectangles.

Visualization of a formula $\phi$ in $\mathbb{R}^3$ and its under-approximation as a union of hyperrectangles.

By finding hyperrectangles that fit within the bounds of the formula, the tool establishes lower and upper bounds on the probability of outcomes. These hyperrectangles serve as "proof certificates" that external auditors can verify independently.

Key Insights and Results

A significant contribution of this work is the conceptualization of fairness as a hyperproperty. While standard safety properties concern single executions, fairness often relates multiple executions (e.g., individual fairness requires similar inputs to yield similar outputs), making it a more complex verification challenge.

The authors demonstrated FairSquare's versatility by verifying various classifiers, including linear SVMs and neural networks with ReLU activations. In a hiring case study, the tool successfully identified "hidden" unfairness. Even when a program did not explicitly use a sensitive attribute like ethnicity, FairSquare detected bias arising from features (such as college rank) that were strongly correlated with ethnicity within the population model.

Conclusion

By decoupling fairness logic from static data, FairSquare provides a robust mechanism for algorithmic accountability. Future work aims to scale these techniques to higher-dimensional models and explore "Automated Fairness Repair," where the system not only detects unfairness but also suggests code modifications to rectify it while preserving the original logic's intent.

Summary updated

BibTeX
@misc{albarghouthi2016fairness,
  author = {Aws Albarghouthi and Loris D'Antoni and Samuel Drews and Aditya V. Nori},
  title = {{Fairness as a Program Property}},
  year = {2016},
  eprint = {1610.06067},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1610.06067},
}
Figure