Fast Threshold Tests for Detecting Discrimination

Emma Pierson, Sam Corbett-Davies, Sharad Goel

Abstract

Threshold tests have recently been proposed as a useful method for detecting bias in lending, hiring, and policing decisions. For example, in the case of credit extensions, these tests aim to estimate the minimum probability of repayment required for an applicant to receive a loan. If this threshold varies by race or gender, it provides evidence of discrimination. However, existing threshold tests are computationally expensive, often requiring hours or days to fit due to the complexity of modeling risk profiles with beta distributions. We introduce a novel statistical family called discriminant distributions that replaces these computationally expensive components, speeding up inference by over 100x. We apply our method to a dataset of 2.7 million police stops in New York City and find significant evidence of racial bias, demonstrating that our approach makes large-scale discrimination analysis both practical and rigorous.

Introduction

Detecting racial or gender bias in human decisions—such as policing, lending, or hiring—is a critical but statistically challenging task. Traditional methods often rely on "benchmark tests" (comparing decision rates across groups) or "outcome tests" (comparing success rates, like finding contraband). However, these methods suffer from significant flaws, including omitted variable bias and the problem of infra-marginality, where average success rates do not necessarily reflect the marginal criteria used for decisions.

The threshold test was developed to address these issues. It uses a Bayesian latent variable model to infer the actual decision threshold applied to different groups. For instance, if a police officer requires a 10% certainty of finding a weapon to search a white pedestrian but only a 5% certainty for a Black pedestrian, the difference in thresholds indicates bias.

Conceptual illustration of the threshold test, showing risk distributions and inferred decision thresholds.

Despite its theoretical advantages, the threshold test is computationally intensive. It typically relies on Hamiltonian Monte Carlo (HMC) sampling to infer risk profiles modeled as beta distributions. Calculating the gradients of these distributions is highly inefficient, often taking hours to fit even moderately sized datasets.

Methods: Discriminant Distributions

To overcome these computational bottlenecks, we introduce discriminant distributions. This new family of probability distributions on the interval [0, 1] is designed to replace beta distributions in the threshold test.

Discriminant distributions model the probability of an event by simulating a generative classification process. Imagine two classes (e.g., carrying contraband vs. not) that emit normally distributed "signals" with different means but equal variance. The posterior probability that an individual belongs to the positive class, given an observed signal, follows a discriminant distribution.

The primary advantage of this approach is mathematical tractability. In a threshold test, the two most frequent operations are calculating the search rate (probability that risk exceeds a threshold) and the hit rate (expected risk given a search). For beta distributions, these require complex numerical approximations. For discriminant distributions, these quantities map directly to the standard normal Cumulative Distribution Function (CDF). Evaluating the normal CDF and its gradients is extremely fast in modern autodiff frameworks, leading to a 100x speedup in model training.

Key Results

We applied the fast threshold test to the NYPD Stop-and-Frisk dataset, comprising 2.7 million stops between 2008 and 2012. By leveraging the speed of discriminant distributions, we were able to perform extensive robustness checks that would have previously taken months of computation.

Our analysis confirmed significant racial bias in NYPD practices. The inferred thresholds for frisking and stopping Black and Hispanic pedestrians were consistently and substantially lower than those applied to white pedestrians across various precincts.

Comparison of frisk thresholds for Black and Hispanic pedestrians versus white pedestrians across NYC precincts. Points below the dashed line indicate lower thresholds for minorities.

Specifically, switching to discriminant distributions reduced the time per effective Monte Carlo sample by a factor of 760. Total model fitting time for the frisk decision model dropped from approximately 2 hours to just 42 seconds. For the more complex "stop" decision model, which accounts for censored data, fitting time dropped from 4.4 hours to under 4 minutes.

Conclusion

The introduction of discriminant distributions transforms the threshold test from a computationally prohibitive method into a practical tool for policy analysis. By enabling full Bayesian inference at the speed of approximate methods, this approach allows researchers to maintain statistical rigor while analyzing massive datasets. Beyond policing, these efficient distributions could serve as drop-in replacements for beta distributions in a wide variety of Bayesian modeling tasks.

Summary updated

BibTeX
@inproceedings{pierson2018fast,
  author = {Emma Pierson and Sam Corbett-Davies and Sharad Goel},
  title = {{Fast Threshold Tests for Detecting Discrimination}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2018},
  url = {https://openreview.net/forum?id=v6earOaOrE0},
}
Figure