NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Formally Verified Algorithmic Fairness Using Information-Flow Tools

Samuel Teuber, Bernhard BeckertEWAF 2023

Introduction

As algorithms increasingly manage sensitive decisions like hiring and credit scoring, ensuring their fairness has become a critical challenge. Most current fairness assessments are empirical, relying on specific datasets which cannot guarantee fairness across all possible inputs. This paper presents a novel approach by bridging software security and algorithmic fairness. By treating protected attributes (such as race or gender) as "secret" inputs, researchers can leverage mature Information-Flow Analysis (IFA) tools to formally prove that a program is fair.

Bridging Security and Fairness

The core innovation of this work is the mapping of security concepts onto fairness requirements. In computer security, noninterference ensures that secret data does not influence public outputs. The authors prove that this property is a strictly stronger condition than demographic parity: if a program satisfies unconditional noninterference regarding a protected attribute, that attribute has zero influence on the outcome, mathematically guaranteeing fairness.

To handle programs that are "mostly fair" but not perfect, the authors adapt security metrics for information leakage into a new fairness metric: Fairness Spread. This metric quantifies the maximum disparity in treatment between the most and least advantaged groups. By integrating these concepts into existing off-the-shelf tools like KeY (deductive verification), Joana (static analysis), and counterSharp (model counting), the researchers provide a scalable framework for fairness verification.

Experimental Evaluation and Results

The methodology was evaluated using two programmatic examples rather than traditional machine learning datasets:

  1. A Credit Allocation Algorithm: A simple program used to demonstrate how the Fairness Spread metric responds to changes in a threshold parameter $T$.
  2. A Complex Hiring Algorithm: An "unintelligible" score-based algorithm designed to test whether formal tools can find fairness guarantees in code too complex for human auditing.
Figure 2: The study utilizes programmatic examples, including a complex hiring algorithm (a) and an unfair credit algorithm (b), to demonstrate how tools can calculate the Fairness Spread (c) across different parameters.

Key results include a formal lemma showing that noninterference implies demographic parity for any input distribution. Using the counterSharp tool, the authors successfully mapped the Fairness Spread of the credit algorithm, identifying specific threshold values that minimize bias. Furthermore, the KeY tool successfully verified the complex hiring algorithm for certain input ranges, despite its obfuscated logic and "magic constants."

Key Insights

  • Security $\implies$ Fairness: Passing a security audit for noninterference regarding a protected attribute provides a mathematical guarantee of demographic parity.
  • Scalability: Tools like Joana can handle codebases exceeding 100,000 lines, suggesting this approach is viable for large-scale enterprise software.
  • Metric Utility: Fairness Spread satisfies essential requirements for a bias metric: it reaches a minimum at perfect fairness, increases with bias, and is compatible with existing model-counting tools.

Limitations and Future Work

The current model assumes independence between protected and unprotected attributes, which does not account for "proxy" variables (e.g., zip code correlating with race). Future work aims to incorporate Bayesian networks to model these dependencies. Additionally, while the current tools analyze explicit source code (Java/C), the authors plan to extend these techniques to analyze machine learning models and black-box systems directly.

Summary updated

BibTeX
@inproceedings{teuber2023formally,
  author = {Samuel Teuber and Bernhard Beckert},
  title = {{Formally Verified Algorithmic Fairness Using Information-Flow Tools}},
  booktitle = {EWAF},
  year = {2023},
  url = {https://openreview.net/forum?id=3deccGLWHY},
}

Loading related content...

Figure