TL;DR
The authors introduce LOCUS-v1, the first large-scale, open-source corpus of U.S. local ordinances, spanning over 2.2 million text chunks from 9,239 cities and counties. By digitizing and structurally harmonizing these highly fragmented local codes, this work fills a massive gap in legal AI, enabling models to analyze the everyday regulations that govern zoning, housing, and public health.
What Problem Does This Paper Address?
While legal AI has made massive strides in processing federal statutes, supreme court cases, and commercial contracts, it has completely missed one of the most impactful layers of American law: local ordinances. Local codes dictate everything from business licensing to noise complaints, yet they remain virtually invisible to large language models.
The barrier isn't that these laws are secret, but that they are practically inaccessible. Local codes are fragmented across dozens of commercial vendor platforms designed for manual in-browser reading rather than bulk data access. There is no central registry, no uniform document format, and no machine-readable index. LOCUS addresses this bottleneck by creating a unified, open-source geographic substrate for U.S. local law.
Methods
The authors built a highly scalable, automated pipeline to scrape, clean, and analyze over 9,000 PDFs totaling 7 million pages of legal text:
- OCR to Markdown: They utilized
LightOnOCR-2-1B, a vision-language model optimized for document parsing, to convert raw PDFs into clean Markdown while preserving natural reading order across complex layouts. - Segmentation & Classification: The text was segmented into individual laws. To categorize them, the authors used a cost-effective LLM-as-a-judge framework with
GPT-5.4-nanoto label 100,000 samples, which were then used to train an efficient, 100-million-parameterModernBERT-baseclassifier. - Dimensional Scoring: To evaluate the normative qualities of the laws, they used pairwise LLM comparisons combined with the TrueSkill rating system to score ordinances across four continuous dimensions: Opacity, Paternalism, Enforcement Discretion, and Problem Salience.
Datasets
- LOCUS-v1 Raw Corpus: Contains ordinance codes from 9,239 cities and counties.
- LOCUS-v1 County-Harmonized Access Layer: A curated subset of 2,211,516 text chunks covering 2,309 of the 3,144 U.S. counties (accounting for 94% of the population). It resolves overlapping jurisdictions by selecting the most substantial available code (by page length) per county.
- Derivative Models: Fine-tuned ModernBERT classifiers and regressors available publicly on Hugging Face.
Key Insights and Ideas
- The Architecture of Local Law: Local codes are not random assortments of rules; they follow a highly predictable national sequence. General provisions and government structures sit at the front, followed sequentially by business regulations, nuisances, zoning, and building codes.
- Functional Division of Labor: The corpus reveals distinct legal roles for different levels of local government. County codes are heavily weighted toward land use and zoning, whereas city codes focus on density, proximity, and public order (nuisances).
- Regional Institutional Anomalies: The Northeast deviates significantly from national trends. Northeastern counties are far less zoning-heavy and more enforcement-oriented because primary land-use authority historically remains at the town and municipal level.
- Macro-Scale Legal Trends: By embedding text with geographic data, the authors showed that legal styles vary by state. For example, Florida's local ordinances are exceptionally opaque compared to the rest of the country, yet they score low on paternalism.
Key Results
- High-Fidelity Scoring: The fine-tuned ModernBERT regressors achieved excellent Pearson correlation coefficients ($r = 0.82$ to $0.94$) against the TrueSkill evaluation metrics, proving that smaller encoder models can successfully replicate complex legal dimension scoring.
- Substantive Law Mapping: The pipeline successfully isolated structural noise (like tables of contents and headers) to categorize 1.4 million chunks as explicit "Rules" and 300,000 chunks as "Enforcement."
- Production Efficiency: By leveraging serverless infrastructure (Modal), the entire OCR and processing pipeline ran at a remarkably low cost of roughly $0.30 per 1,000 pages.
Limitations and Future Work
The primary limitation of LOCUS-v1 is its deliberate simplification of legal authority. To make the dataset immediately usable, the authors used document length as a proxy to choose between a county code or its largest city's code. In reality, local law is a complex, overlapping hierarchy where state preemption and jurisdictional conflicts frequently alter which law actually applies.
The authors note that future releases will focus on modeling these issue-specific hierarchies and conflicts, paving the way for advanced legal-reasoning benchmarks. Furthermore, while LLM-as-a-judge metrics proved highly effective for scaling, future validation will ideally incorporate direct evaluations from human lawyers and judges.
Summary updated