We propose a game where two players take turns assigning precincts to districts. In a simplified setting where districts have no geographic constraints, both players have a strategy that allows them to win a number of districts proportional to their number of voters. For the game in real maps (with geographic constraints) we are developing a player based on neural networks and reinforcement learning that aims to learn how to optimally play this game through self-play (inspired by AlphaZero). As in other simulations-based gerrymandering research, the difficulty in this approach is the size of the problem. In fact, we show that the problem of deciding whether
there exists a 'fair map' in the set of 'legal maps' (for appropriate simple definitions of 'legal' and 'fair') is actually NP-complete.
Capitol Tech U Doctoral Presentation - April 2024.pptx
Quantitative Redistricting Workshop - Machine Learning for Fair Redistricting- Soledad Villar, October 9, 2018
1. Machine learning for fair redistricting
Soledad Villar
Center for Data Science
Courant Institute of Mathematical Sciences
Workshop on Quantitative Gerrymandering
October 9, 2018
2. A few lines of research
Statistical/computational analysis of random maps.
Compare current maps properties with those of random maps.
Demonstrate mathematically that certain maps are unfair.
3. A few lines of research
Statistical/computational analysis of random maps.
Compare current maps properties with those of random maps.
Demonstrate mathematically that certain maps are unfair.
Theoretical analysis.
How much can one party gerrymander with constraints.
How different constraints interact.
Effect of geographic distribution on the gerrymandering power.
Computational hardness.
Understanding the limits of the problem.
4. A few lines of research
Statistical/computational analysis of random maps.
Compare current maps properties with those of random maps.
Demonstrate mathematically that certain maps are unfair.
Theoretical analysis.
How much can one party gerrymander with constraints.
How different constraints interact.
Effect of geographic distribution on the gerrymandering power.
Computational hardness.
Understanding the limits of the problem.
Algorithms for “fairer redistricting”.
Analyzed by simulations or game theory.
Provide a baseline to compare maps.
Provide a way to compute fair maps.
5. This talk
Hardness result: “fair” redistricting is NP-hard.
Use ideas from k-means clustering in the plane is NP-hard.
Game for fair redistricting.
Goal: train a neural network to learn how to play the game.
Question: other ways machine learning can be useful here?
6. Fair redistricting is hard
Joint work with Richard Kueng and Dustin Mixon
Redistricting is connected to NP-hard problems. [Altman 1997]
Argument against “automatic redistricting”.
Computational intractability is inherent to the redistricting problem.
Worst-case complexity says very little about real-world maps, but
identifies the limits of the problem.
What performance guarantees are possible for redistricting
algorithms?
7. Fair maps among legal compliant maps
Compliant maps
all districts have approximately the same population
mild notion of geographic compactness
Fair maps
both parties receive at least some level of representation.
8. Fair maps among legal compliant maps
Compliant maps
all districts have approximately the same population
mild notion of geographic compactness
Fair maps
both parties receive at least some level of representation.
Theorem
Deciding whether there exists a fair redistricting among compliant
maps is NP-hard.
9. Proof idea: reduction from planar 3-SAT
Inspired by Mahanjan, Minbhorkar and Varadarajan proof that planar k-means is NP-hard
3-SAT: Deciding whether there exists a boolean assignment that
satisfies a formula of the form:
(¬x1 ∨ x2 ∨ ¬x4) ∧ (¬x2 ∨ ¬x4 ∨ ¬x3) ∧ . . .
10. Proof idea: reduction from planar 3-SAT
Inspired by Mahanjan, Minbhorkar and Varadarajan proof that planar k-means is NP-hard
3-SAT: Deciding whether there exists a boolean assignment that
satisfies a formula of the form:
(¬x1 ∨ x2 ∨ ¬x4) ∧ (¬x2 ∨ ¬x4 ∨ ¬x3) ∧ . . .
Planar 3-SAT: Consider the bipartite graph: V={variables, clauses}
11. Proof idea: reduction from planar 3-SAT
Inspired by Mahanjan, Minbhorkar and Varadarajan proof that planar k-means is NP-hard
3-SAT: Deciding whether there exists a boolean assignment that
satisfies a formula of the form:
(¬x1 ∨ x2 ∨ ¬x4) ∧ (¬x2 ∨ ¬x4 ∨ ¬x3) ∧ . . .
Planar 3-SAT: Consider the bipartite graph: V={variables, clauses}
Planar 3-SAT is NP-complete.
12. Reduction
Every planar 3-SAT instance can be posed as deciding whether there exists a fair
redistricting.
Town Pop D R
Big: L L 0
Small: 2γ
3
L 2γ
3
L 0
Adjacent: L
2
+ γL
6
L
4
L
4
+ γL
6
Edge: L
2
L
2
− γL
4
L
2
+ γL
4
Population per district ∈ [L, L+γ].
D wins at most 2k districts
even with almost half of the vote and Total pop 2k
Formula is satisfiable iff D wins 2k districts.
14. Ideas illustrate what Jonathan Rodden was saying yesterday.
Next: Algorithms for fairer maps.
15. Example 1: Shortest-Splitline Algorithm
Idea:
Even number of districts. Split among the shortest line that
divides the population in half.
Odd number of districts. Split among the shortest line that
divides the population in appropriate proportion.
Smith and Ryan, Center for Range Voting, http://www.rangevoting.org/GerryExamples.html
16. Example 1: Shortest-Splitline Algorithm
Idea:
Even number of districts. Split among the shortest line that
divides the population in half.
Odd number of districts. Split among the shortest line that
divides the population in appropriate proportion.
Example
Smith and Ryan, Center for Range Voting, http://www.rangevoting.org/GerryExamples.html
17. Example 2: “I-Cut-You-Freeze” protocol
Two political parties sequentially divide up a state:
First player divides a map of a state into the allotted number
of districts, each with equal numbers of voters.
Second player chooses one district to “freeze,” so no further
changes could be made to it, and re-map the remaining
districts as it likes.
Pedgen, Procaccia and Yu, A partisan districting protocol with provably nonpartisan outcomes
18. “I-Cut-You-Freeze” protocol
Leverages the competition between Republicans and
Democrats to produce an equitable result1.
Each party can pursue a strategy that guarantees it something
that it wants.
Is it possible to produce a protocol that no player has an
advantage even in the finite district setting?
1
When the number of districts goes to infinity no player has an advantage with
respect to the other one
19. Ongoing work with Dustin Mixon
Game: Two players take turns assigning precincts to districts so
that:
Districts are always connected.
In the end all district have equal population.
In the end districts satisfy some form of compactness.
20. Theorem
In the symmetric non geometrically constrained setting no player
has an advantage.
Conjecture: players have a strategy that allows them to win the
proportion of seats corresponding with their proportion of voters.
21. Theorem
In the symmetric non geometrically constrained setting no player
has an advantage.
Conjecture: players have a strategy that allows them to win the
proportion of seats corresponding with their proportion of voters.
Compare to efficiency gap [Stephanopoulos, McGhee]
EG is minimized at doubly proportionality [Bernstein, Duchin].
EG=0 ⇒ 55% of vote share → 60% of seats
22. Theorem
In the symmetric non geometrically constrained setting no player
has an advantage.
Conjecture: players have a strategy that allows them to win the
proportion of seats corresponding with their proportion of voters.
Compare to efficiency gap [Stephanopoulos, McGhee]
EG is minimized at doubly proportionality [Bernstein, Duchin].
EG=0 ⇒ 55% of vote share → 60% of seats
Is it true for the geometrically constrained case?
23. Goal: run this game in real maps with machine learning
Reinforcement learning
There exists a function (unknown):
Q : (states, actions) → R
The objective is to maximize the cumulative reward:
R =
∞
t=0
γt
Qt, (γ ∈ [0, 1] discount rate)
Learn a policy π : S × A → [0, 1] where π(s, a) gives the
probability of taking action a while in state s.
25. Learning how to play
Let Q be a neural network:
Q(s, a) = ρ(AL(. . . ρ(A1(s, a)) . . .))
Idea:
Train Q through self-play.
Explore the space of states via
Monte-Carlo Tree Search
26. Difficulties
The game is too large.
Combine large scale strategy with small scale strategy.
Locally valid moves produce maps that will be invalid later.
Ask players for a witness that shows that the map can be
completed.
27. Difficulties
The game is too large.
Combine large scale strategy with small scale strategy.
Locally valid moves produce maps that will be invalid later.
Ask players for a witness that shows that the map can be
completed.
Challenging for gerrymandering and for machine learning.