Hidden in Plain Text
LLM-Assisted Detection of Discriminatory Local Laws
In cities across the United States, plainly discriminatory laws sit untouched. Occasionally they surface and shock residents. But the country's municipal codes run to millions of words, more than any reader could finish in decades. Comprehensive review, one scholar writes, is “practically impossible.”
Scale hides the law. So we went looking.
About
In cities, counties, and towns across the United States, discriminatory laws persist. Litigators, reformers, and city officials alike have reason to target these laws for repeal, particularly where they deprive people of their constitutional rights. Yet identifying such laws across thousands of jurisdictions is daunting, given the scale of local law and the difficulty of searching it.
Stanford RegLab gathered local codes from over 9,000 jurisdictions and developed an LLM-assisted human review method to bring to light laws buried in sprawling, rarely-read local codes.
RegLab’s tool flagged nearly 10,000 laws for human review, and in that review we found a striking range of discriminatory laws.
We find laws spanning the decades, from early-1900s morality ordinances targeting “lewd women” to mid-century laws referring to those with disabilities in now archaic terms. We find cities restricting non-citizens from a strikingly miscellaneous set of trades: operating go-cart tracks, bowling alleys, taxi or limousine services, bus or tow truck companies, casinos, pawnshops, used car dealerships, hotels, bars, arcades, dance halls, cabarets, massage parlors, jewelry shops, tattoo studios, boarding houses, and private investigator agencies. We find slurs and demeaning language, and ordinances reflecting a shameful history like those licensing “freak” and “minstrel” shows.
We also surfaced laws where the equal protection analysis is more contested: laws criminalizing people based on socioeconomic or perceived social status, and zoning restrictions on residences serving people with disabilities or medical conditions. Our search also incidentally turned up laws that raise First Amendment concerns, like laws against slandering “any female of chaste character.”
We hope this survey helps local governments identify and revisit provisions that may no longer reflect their communities' values or current law. We have included these laws in our provision explorer to browse.
Provisions Explorer
We categorize these provisions into their recurring patterns: citizenship and alienage restrictions, gendered roles and benefits, retirement discrimination, racial classifications, voting exclusions, language-based discrimination, disability and medical-condition discrimination, sexuality and gender-expression discrimination, and offensive language.
Method Overview
A six-step pipeline turns millions of code sections into candidates for review.