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 bar for granting loans to white and minority applicants, with a higher inferred threshold for minorities indicative of discrimination. This technique, however, requires fitting a complex Bayesian latent variable model for which inference is often computationally challenging. Here we develop a method for fitting threshold tests that is two orders of magnitude faster than the existing approach, reducing computation from hours to minutes. To achieve these performance gains, we introduce and analyze a flexible family of probability distributions on the interval [0, 1] -- which we call discriminant distributions -- that is computationally efficient to work with. We demonstrate our technique by analyzing 2.7 million police stops of pedestrians in New York City.

Introduction

Proving "taste-based discrimination"—where decision-makers apply different standards to different groups—is a persistent challenge in statistics. Traditional approaches often suffer from significant flaws. Benchmark tests, which compare stop or search rates across groups, are vulnerable to omitted variable bias because underlying rates of illegal activity may differ. Outcome tests, which compare "hit rates" (success rates of searches), suffer from "infra-marginality": a group might have a higher hit rate simply because more of its members are far above a common search threshold, not because a higher standard was applied.

The threshold test addresses these issues by using a Bayesian latent variable model to estimate the actual decision thresholds applied to different groups. It models the probability that an individual possesses contraband as a latent signal.

Likelihood of possessing contraband distributions for two groups, illustrating the threshold test concept.

However, the original implementation of the threshold test relied on Beta distributions. While flexible, Beta distributions are computationally expensive to evaluate during Hamiltonian Monte Carlo (HMC) sampling, often requiring hours of computation. This bottleneck limits the ability of researchers to perform the extensive robustness checks necessary for policy-grade evidence.

Methodology: Discriminant Distributions

To overcome these computational hurdles, we introduce a novel family of distributions called discriminant distributions. Inspired by Linear Discriminant Analysis (LDA), these distributions assume that individuals belong to one of two classes (e.g., "carrying contraband" vs. "not") and emit signals following normal distributions. The probability of belonging to the positive class is then a function of this signal.

The primary advantage of discriminant distributions lies in their mathematical properties. Unlike Beta distributions, their Cumulative Distribution Functions (CDFs) and conditional means have simple analytical forms based on the standard normal distribution. Since HMC requires calculating gradients of these functions thousands of times, this shift provides a massive computational shortcut.

Discriminant distributions (solid lines) effectively approximating a variety of other distribution shapes (dashed lines).

Crucially, this speed does not come at the cost of accuracy. As shown above, discriminant distributions are expressive enough to approximate logit-normal and beta distributions almost perfectly, allowing for complex modeling without the associated computational burden.

Data and Application

We applied this method to a massive real-world dataset: 2.7 million police stops of pedestrians in New York City between 2008 and 2012. To model the initial decision to stop an individual (where the "non-stopped" population is unknown), we incorporated 2010 U.S. Census data to estimate the racial composition of precincts. This allowed us to extend the threshold test beyond search decisions to the initial detention phase.

Key Results

Our approach yielded several significant findings:

  • Performance Gains: The new method is 75x to 100x faster than previous state-of-the-art techniques. Inference that previously took two hours now completes in less than a minute.
  • Evidence of Racial Bias: In the NYC stop-and-frisk data, the model inferred consistently lower search thresholds for Black and Hispanic pedestrians compared to White pedestrians. This indicates that minority pedestrians were often searched based on less evidence than their white counterparts.
  • Scalability: We demonstrated the model's scalability by fitting it to 22 million traffic stops in just 30 minutes—a task that was previously computationally prohibitive for a single model.

Discussion and Limitations

While the speedup enables unprecedented rigor through extensive sensitivity analyses and placebo tests, some limitations remain. The "stop" model relies on Census residential data as a proxy for the population on the street, which may not account for commuters or tourists. Additionally, the current model assumes a single threshold for each race within a precinct; future work could explore modeling individual officer-level variation.

Beyond policing, discriminant distributions offer a general-purpose solution for any Bayesian latent variable model where Beta distributions create a computational bottleneck, opening doors for faster and more robust analysis in various high-stakes decision-making domains.

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