Nonparametric Detection of Gerrymandering in Multiparty Plurality Elections

Dariusz Stolicki, Wojciech Slomczynski, Stanislaw Szufa

Abstract

Partisan gerrymandering, i.e., manipulation of electoral district boundaries for political advantage, is one of the major challenges to election integrity in modern day democracies. Yet most of the existing methods for detecting partisan gerrymandering are narrowly tailored toward fully contested two-party elections, and fail if there are more parties or if the number of candidates per district varies. We propose a new method, applying nonparametric statistical learning to detect anomalies in the relation between (aggregate) votes and (aggregate) seats. Unlike in most of the existing methods, we propose to learn the standard of fairness in districting from empirical data rather than assume one a priori. Finally, we test the proposed methods against experimental data as well as real-life data from 17 countries employing the plurality (FPTP) system.

Introduction

Partisan gerrymandering—the intentional manipulation of electoral district boundaries to favor a specific political party—remains a significant threat to democratic integrity. Traditional detection tools, such as the "efficiency gap" or "mean-median difference," were primarily designed for the United States' rigid two-party system. These metrics often fail in "First-Past-The-Post" (FPTP) systems found globally, where regional parties, independent candidates, and partially contested districts are common.

This research introduces a flexible, data-driven framework that moves away from fixed mathematical formulas. By using nonparametric statistical learning, the method "learns" what constitutes a fair election from historical data, allowing for precise detection of electoral bias across diverse political landscapes.

Methodology

The core innovation lies in shifting from a priori models (like the "cube law") to an empirical definition of fairness. The pipeline consists of three stages:

1. Defining the Competition Pattern

To evaluate the fairness of a seat win, one must quantify the difficulty of the contest. The authors introduce the Effective Number of Competitors ($\phi$), derived from the Herfindahl-Hirschman index. This metric captures the "diversity" of the opposition in a district, recognizing that a 40% vote share carries different weight against one strong opponent versus several weak ones.

Distribution of effective number of competitors ($\phi$) against vote share ($v$) for different numbers of candidates ($m$).

2. Kernel Regression

The researchers employ locally-constant kernel regression to estimate expected seat shares. By analyzing a vast "training set" of historical elections, the model determines how many seats a party typically wins given a specific vote share and level of competition.

3. Electoral Bias p-Value

Rather than relying on raw seat-vote differences, the method calculates a p-value to measure the probability that an observed deviation occurred by chance. These party-level p-values are aggregated into a single election-level index using a weighted geometric mean.

Datasets and Empirical Standards

The study validates the model using a robust mix of simulated and real-world data:

  • Experimental Data: 192 "fair" plans generated via Monte Carlo algorithms and 128 "unfair" plans created using Integer Linear Programming.
  • Real-Life Data: Over 4,500 instances from Polish municipal elections (2014, 2018), nearly 3,000 US House election instances (1900–2022), and 206 national legislative elections from 15 other countries.
Empirical seat-vote curves across different electoral datasets, illustrating the context-dependent nature of fairness.

Key Results and Insights

The nonparametric approach successfully bridges the gap between US-centric metrics and global electoral science. Key findings include:

  • High Accuracy: On experimental datasets with known ground truths, the method achieved a precision of 0.896 and a recall of 0.912, demonstrating high reliability in identifying gerrymandering while minimizing false positives.
  • US Validation: In 2022 US Congressional data, the kernel method showed a high correlation (0.623) with a composite of nine traditional metrics, suggesting it effectively captures the core phenomenon of partisan bias.
  • Context-Dependent Fairness: The model accounts for the "natural" quirks of a country's political geography without requiring hard-coded rules, making it universally applicable to various multiparty environments.

Conclusion and Future Directions

While the method is highly effective at detecting electoral bias, it currently does not distinguish between intentional gerrymandering and "natural packing" caused by geographic voter density. Future research will focus on refining fairness benchmarks, testing against neutral simulations, and investigating discrepancies with traditional metrics to further understand the nuances of electoral distortion.

Summary updated

Abstract

Partisan gerrymandering, i.e., manipulation of electoral district boundaries for political advantage, is one of the major challenges to election integrity in modern day democracies. Yet most of the existing methods for detecting partisan gerrymandering are narrowly tailored toward fully contested two-party elections, and fail if there are more parties or if the number of candidates per district varies. We propose a new method, applying nonparametric statistical learning to detect anomalies in the relation between (aggregate) votes and (aggregate) seats. Unlike in most of the existing methods, we propose to learn the standard of fairness in districting from empirical data rather than assume one a priori. Finally, we test the proposed methods against experimental data as well as real-life data from 17 countries employing the plurality (FPTP) system.
BibTeX
@inproceedings{stolicki2024nonparametric,
  author = {Dariusz Stolicki and Wojciech Slomczynski and Stanislaw Szufa},
  title = {{Nonparametric Detection of Gerrymandering in Multiparty Plurality Elections}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=BJZE6UZv6s},
}

Loading related content...

Figure