AI Legal Review Says Millions Live Under Discriminatory Local Laws
(Originally published by The Stanford Institute for Human-Centered AI on September 8, 2026.)
In Michigan, it is against the law for a non-citizen of the U.S. to become a licensed private investigator. In Memphis, Tennessee, the board of education is still required to “provide and maintain separate schools for the use and accommodation of the white and colored youths of the City.” In Valparaiso, Florida, it is still legal to collect poll taxes. These are but a few examples from a new study that used AI to comb the law books of more than 9,600 local jurisdictions looking for discriminatory statutes. The search turned up some 10,000 suspect laws for potential review.

“We estimate that at least 50 million Americans are living in cities, counties, or towns governed by overtly discriminatory laws that violate constitutional protections based on race, gender, citizenship, age, and disability,” says Yasmine Mabene, a research fellow at the Stanford RegLab. “The AI pipeline we developed can find these laws and help get them off the books.”
Mabene is first author of the paper, “Hidden in Plain Text: LLM-Assisted Detection of Discriminatory Local Laws,” published in the proceedings of the International Conference on Artificial Intelligence and Law (ICAIL), describing the remarkable findings of the team’s AI-assisted analysis. The research was sponsored in part by the Stanford Institute for Human-Centered AI (HAI).
“Laws that single out people by protected categories can long outlive the eras in which they were written,” says Stanford Law professor Daniel Ho, director of the RegLab and associate director at Stanford HAI, and the study’s senior author. “While many manual efforts have focused on reforming federal and state laws, local laws stay on the books because no one has had the time to look and take action.”
For instance, as recently as 2019, it took an entire Virginia commission made up of law students from three universities, staff from the governor’s office, several practicing attorneys, and a sitting judge to compile a list of discriminatory laws passed between 1900 and 1960.
Unprecedented Effort
The researchers first had to consolidate the written laws from 9,623 local jurisdictions around the country and develop an AI pipeline to evaluate them. Those jurisdictions govern approximately 75 percent of the U.S. population, they estimate. They then developed a multi-stage AI workflow to pore over the laws, search for potentially discriminatory laws, and spotlight them for review by human legal experts.
“No comparable effort, to our knowledge, has ever been done across local codes. There are simply too many,” Mabene says. “Finding the laws on the local books would have been incredibly time consuming without the help of AI.”
The research team designed the LLM framework to review all 9 million legal sections in multiple steps: First, flag any statutes that reference a protected category (i.e., race, religion, sex/gender/sexual orientation, marital status, national origin/alienage, genetic information, age, or disability), and second, determine if those laws treat people differently based on those characteristics. Human reviewers then filtered out acceptable differences – like disability accommodations or gender-neutral language updates – and LLMs ranked the remaining laws as low, medium, or high priority for human legal experts to review.
“This was more than simple word search for discriminatory language,” Mabene says of what sets this approach apart from conventional text-based searches. “We had to design an approach that could work through the same legal questions a human reviewer could ask, distinguishing between laws that actually discriminate versus laws that simply mention protected groups by name.”
Eye-Opening Results
Among the highlights, the pipeline found over 2,000 laws that bar non-citizens from obtaining professional licenses or from specific occupations, where citizenship should not matter (e.g., running a bowling alley). It also found numerous laws discriminating based on sex or gender, including laws that make prostitution a crime only for women. Likewise, many laws still discriminate based on race, such as a Georgia statute that directs its clerk to keep “separate lists of white and colored voters, who are entitled to vote” and a North Carolina law that requires “separate cemeteries for white and black.”
Additionally, the authors say, the pipeline found more than 30,000 laws that contain offensive language, including one Ohio town’s housing statute referencing intellectually disabled residents as “feeble-minded, insane, lunatics, imbeciles or idiots.” The companion website allows users to explore such detected provisions.
The approach was powerful, but not perfect. Human review is still required. The authors acknowledge their method does not identify facially neutral laws with discriminatory effects, nor does it address the discriminatory enforcement of otherwise neutral laws. But it did achieve over 90 percent accuracy in finding differential legal treatment and correctly flagged 88 percent of the provisions the human annotators also deemed to be “high priority.” With further development iterations, the researchers are hopeful AI can be improved and offer even greater assistance in statutory review tasks and legal reasoning.
Policy Sludge

The researchers emphasize that this is not just a matter of understaffed local officials failing to remove outdated and clearly discriminatory laws from the books. Many of the laws are still being enforced. For example, a Massachusetts ruling that recently denied a liquor license to a green-card-carrying Brazilian family based on national origin mirrors numerous laws surfaced from this pipeline.
Ho calls such laws “policy sludge,” noting that local codes can be particularly “sticky” due to lack of local resources. With AI’s help, however, such sludge is easier to identify than ever before. The researchers now hope local officials and national non-governmental legal organizations will work to reform and remove discriminatory laws.
“To find discriminatory laws, even the most patient law student would need a lifetime to get through millions of laws we’ve gathered in this study. But AI can help,” Ho says. “Here, we deliver a structured workflow for large-scale statutory review by AI with humans in the loop that makes necessary reform an approachable problem, not an intractable one.”
