Pile of Law: Learning Responsible Data Filtering from the Law and a 256GB Open-Source Legal Dataset
Not on the map. Why?
Abstract (arXiv)
One concern with the rise of large language models lies with their potential for significant harm, particularly from pretraining on biased, obscene, copyrighted, and private information. Emerging ethical approaches have attempted to filter pretraining material, but such approaches have been ad hoc and failed to take context into account. We offer an approach to filtering grounded in law, which has directly addressed the tradeoffs in filtering material. First, we gather and make available the Pile of Law, a 256GB (and growing) dataset of open-source English-language legal and administrative data, covering court opinions, contracts, administrative rules, and legislative records. Pretraining on the Pile of Law may help with legal tasks that have the promise to improve access to justice. Second, we distill the legal norms that governments have developed to constrain the inclusion of toxic or private content into actionable lessons for researchers and discuss how our dataset reflects these norms. Third, we show how the Pile of Law offers researchers the opportunity to learn such filtering rules directly from the data, providing an exciting new research direction in model-based processing.
Key facts. Cited by 113 papers in the map (data through 14 Oct 2026). Builds on 51 of its 135 references that are in the map. First posted on arXiv 1 Jul 2022.
Builds on
51 of 135 references.
References · 51
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,307
- 2021On the Opportunities and Risks of Foundation Modelscited by 4,033
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,202
- 2018Model Cards for Model Reportingcited by 1,080
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 864
38 more
- 2022Quantifying Memorization Across Neural Language Modelscited by 763
- 2018Federated Learning for Mobile Keyboard Predictioncited by 572
- 2019CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Datacited by 548
- 2019Quantifying the Carbon Emissions of Machine Learningcited by 521
- 2021Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpuscited by 492
- 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 422
- 2019Bias in Bios: A Case Study of Semantic Representation Bias in a High-Stakes Settingcited by 349
- 2019Differential Privacy Has Disparate Impact on Model Accuracycited by 316
- 2022Deduplicating Training Data Mitigates Privacy Risks in Language Modelscited by 314
- 2021LexGLUE: A Benchmark Dataset for Legal Language Understanding in Englishcited by 310
- 2020The Pushshift Reddit Datasetcited by 292
- 2020Towards the Systematic Reporting of the Energy and Carbon Footprints of Machine Learningcited by 249
- 2021CUAD: An Expert-Annotated NLP Dataset for Legal Contract Reviewcited by 236
- 2020Information Leakage in Embedding Modelscited by 203
- 2021When Does Pretraining Help? Assessing Self-Supervised Learning for Law and the CaseHOLD Datasetcited by 201
- 2022What Does it Mean for a Language Model to Preserve Privacy?cited by 195
- 2022Lifting the Curse of Multilinguality by Pre-training Modular Transformerscited by 146
- 2019Europarl-ST: A Multilingual Corpus For Speech Translation Of Parliamentary Debatescited by 114
- 2019Large-Scale Multi-Label Text Classification on EU Legislationcited by 104
- 2021Exploring the Limits of Large Scale Pre-trainingcited by 104
- 2018A General Approach to Adding Differential Privacy to Iterative Training Procedurescited by 84
- 2021Differential Privacy for Text Analytics via Natural Text Sanitizationcited by 77
- 2018Towards Robust and Privacy-preserving Text Representationscited by 75
- 2018CLAUDETTE: an Automated Detector of Potentially Unfair Clauses in Online Terms of Servicecited by 73
- 2022Do Language Models Plagiarize?cited by 73
- 2020Differentially Private Representation for NLP: Formal Guarantee and An Empirical Study on Privacy and Fairnesscited by 67
- 2021Towards generalisable hate speech detection: a review on obstacles and solutionscited by 66
- 2018All You Need is "Love": Evading Hate-speech Detectioncited by 56
- 2018Challenges for Toxic Comment Classification: An In-Depth Error Analysiscited by 56
- 2018Privacy-preserving Neural Representations of Textcited by 54
- 2022Whose Language Counts as High Quality? Measuring Language Ideologies in Text Data Selectioncited by 53
- 2022Data Governance in the Age of Large-Scale Data-Driven Language Technologycited by 33
- 2021ADePT: Auto-encoder based Differentially Private Text Transformationcited by 31
- 2018LexNLP: Natural language processing and information extraction for legal and regulatory textscited by 28
- 2020A Benchmark for Lease Contract Reviewcited by 26
- 2021Context-Aware Legal Citation Recommendation using Deep Learningcited by 12
- 2017Understanding State Preferences With Text As Data: Introducing the UN General Debate Corpuscited by 11
- 2020Research Challenges in Designing Differentially Private Text Generation Mechanismscited by 7
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2022: 5; 2023: 26; 2024: 36; 2025: 24; 2026: 22.
113 papers.
Sort:
By area:
- 2023Scaling Data-Constrained Language Modelscited by 403
- 2023Visual Adversarial Examples Jailbreak Aligned Large Language Modelscited by 328
- 2024Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Toolscited by 176
- 2024Large Legal Fictions: Profiling Legal Hallucinations in Large Language Modelscited by 150
- 2024SaulLM-7B: A pioneering Large Language Model for Lawcited by 142
- 2023Skill-it! A Data-Driven Skills Framework for Understanding and Training Language Modelscited by 121
- 2023Foundation Models and Fair Usecited by 116
- 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systemscited by 76
- 2023The MiniPile Challenge for Data-Efficient Language Modelscited by 75
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2023LEXTREME: A Multi-Lingual and Multi-Task Benchmark for the Legal Domaincited by 68
38 more
- 2024MAP-Neo: Highly Capable and Transparent Bilingual Large Language Model Seriescited by 67
- 2023MultiLegalPile: A 689GB Multilingual Legal Corpuscited by 60
- 2023Opening up ChatGPT: Tracking openness, transparency, and accountability in instruction-tuned text generatorscited by 56
- 2023LeXFiles and LegalLAMA: Facilitating English Multinational Legal Language Model Developmentcited by 54
- 2023Adapting Large Language Models to Domains via Reading Comprehensioncited by 50
- 2023Training Data Extraction From Pre-trained Language Models: A Surveycited by 45
- 2024Natural Language Processing for the Legal Domain: A Survey of Tasks, Datasets, Models, and Challengescited by 42
- 2024D-CPT Law: Domain-specific Continual Pre-Training Scaling Law for Large Language Modelscited by 41
- 2022Pre-trained Language Models for the Legal Domain: A Case Study on Indian Lawcited by 39
- 2024SaulLM-54B & SaulLM-141B: Scaling Up Domain Adaptation for the Legal Domaincited by 39
- 2024Nearest Neighbor Speculative Decoding for LLM Generation and Attributioncited by 25
- 2022Law Informs Code: A Legal Informatics Approach to Aligning Artificial Intelligence with Humanscited by 23
- 2024NLP Systems That Can't Tell Use from Mention Censor Counterspeech, but Teaching the Distinction Helpscited by 20
- 2024Lossless data compression by large modelscited by 20
- 2025Common Corpus: The Largest Collection of Ethical Data for LLM Pre-Trainingcited by 20
- 2023PanGu-π: Enhancing Language Model Architectures via Nonlinearity Compensationcited by 17
- 2025Unveiling Super Experts in Mixture-of-Experts Large Language Modelscited by 17
- 2023One Law, Many Languages: Benchmarking Multilingual Legal Reasoning for Judicial Supportcited by 16
- 2024BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of Expertscited by 16
- 2026Autodata: An agentic data scientist to create high quality synthetic datacited by 16
- 2023Walking a Tightrope -- Evaluating Large Language Models in High-Risk Domainscited by 15
- 2024Data Authenticity, Consent, & Provenance for AI are all broken: what will it take to fix them?cited by 15
- 2023Large Language Models are legal but they are not: Making the case for a powerful LegalLLMcited by 12
- 2024AIR-Bench: Automated Heterogeneous Information Retrieval Benchmarkcited by 12
- 2022Incorporating Context into Subword Vocabulariescited by 11
- 2024The Responsible Foundation Model Development Cheatsheet: A Review of Tools & Resourcescited by 11
- 2024Data, Data Everywhere: A Guide for Pretraining Dataset Constructioncited by 11
- 2025L-MARS: Legal Multi-Agent System with Agentic Search and Citation-Faithfulness Auditcited by 11
- 2023Unifying Corroborative and Contributive Attributions in Large Language Modelscited by 10
- 2024LawInstruct: A Resource for Studying Language Model Adaptation to the Legal Domaincited by 10
- 2025Privacy Ripple Effects from Adding or Removing Personal Information in Language Model Trainingcited by 10
- 2025Large Language Models Meet Legal Artificial Intelligence: A Surveycited by 10
- 2025Stratum: System-Hardware Co-Design with Tiered Monolithic 3D-Stackable DRAM for Efficient MoE Servingcited by 10
- 2023Legal Extractive Summarization of U.S. Court Opinionscited by 9
- 2023LexGPT 0.1: pre-trained GPT-J models with Pile of Lawcited by 9
- 2024ProgressGym: Alignment with a Millennium of Moral Progresscited by 9
- 2025DivScore: Zero-Shot Detection of LLM-Generated Text in Specialized Domainscited by 9
- 2023Large Language Models as Fiduciaries: A Case Study Toward Robustly Communicating With Artificial Intelligence Through Legal Standardscited by 8
50 most cited of 113 All 113 (JSON)
- 2026How Much is a Human Right Worth? ECtHR-NPD: A Benchmark for Predicting Non-Pecuniary Damage Awards16 Sep 2026
- 2026Dynamic-Programming-Guided Hierarchical BPE and Empirical Analysis of Vocabulary Pruning7 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026Toward Human Rights Benchmarking for LLMs: A Pilot Methodology10 Aug 2026
- 2026ImmigrationReason: A Structured Dataset of U.S. Immigration Appeals for Legal Reasoning Research30 Jun 2026
- 2026Autodata: An agentic data scientist to create high quality synthetic data24 Jun 2026
- 2026Freeing the Law with LOCUS: A Local Ordinance Corpus for the United States17 Jun 2026
- 2026Retrievable Gradients: Continual Post-Training Without Cumulative Weight Drift14 Jun 2026
- 2026Muonp: Muon with Fractional Spectral Powers11 Jun 2026
- 2026IR3DE: A Linear Router for Large Language Models4 Jun 2026
- 2026ImmigrationQA: A Source-Grounded Dataset and Small-Model Adaptation for U.S. Immigration Law28 May 2026
- 2026Cross-Architecture Steering Transfer in Language Models: A Systematic Empirical Study26 May 2026
38 more
- 2026MAP-Law: Coverage-Driven Retrieval Control for Multi-Turn Legal Consultation2 May 2026
- 2026ComplianceNLP: Knowledge-Graph-Augmented RAG for Multi-Framework Regulatory Gap Detection26 Apr 2026
- 2026EvoSpec: Evolving Speculative Decoding via Real-Time Vocabulary and Parameter Adaptation17 Apr 2026
- 2026HUKUKBERT: Domain-Specific Language Model for Turkish Law6 Apr 2026
- 2026Retrieval Improvements Do Not Guarantee Better Answers: A Study of RAG for AI Policy QA25 Mar 2026
- 2026MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptation24 Feb 2026
- 2026LEMUR: A Corpus for Robust Fine-Tuning of Multilingual Law Embedding Models for Retrieval10 Feb 2026
- 2026EcoGym: Evaluating LLMs for Long-Horizon Plan-and-Execute in Interactive Economies10 Feb 2026
- 2026Confundo: Learning to Generate Robust Poison for Practical RAG Systems6 Feb 2026
- 2026OpenExempt: A Diagnostic Benchmark for Legal Reasoning and a Framework for Creating Custom Benchmarks on Demand19 Jan 2026
- 2025Cross-Document Topic-Aligned Chunking for Retrieval-Augmented Generation8 Nov 2025
- 2025Forging GEMs: Advancing Greek NLP through Quality-Based Corpus Curation22 Oct 2025
- 2025From Answers to Guidance: A Proactive Dialogue System for Legal Documents22 Oct 2025
- 2025Stratum: System-Hardware Co-Design with Tiered Monolithic 3D-Stackable DRAM for Efficient MoE Serving6 Oct 2025
- 2025Large Language Models Meet Legal Artificial Intelligence: A Survey12 Sep 2025
- 2025L-MARS: Legal Multi-Agent System with Agentic Search and Citation-Faithfulness Audit31 Aug 2025
- 2025Optimal Transport Depth Up-Scaling11 Aug 2025
- 2025Evaluating Customized vs. Generalist Transformer-based Models for Legal Contract Classification11 Aug 2025
- 2025Unveiling Super Experts in Mixture-of-Experts Large Language Models31 Jul 2025
- 2025Teach Old SAEs New Domain Tricks with Boosting17 Jul 2025
- 2025ModelCitizens: Representing Community Voices in Online Safety7 Jul 2025
- 2025DivScore: Zero-Shot Detection of LLM-Generated Text in Specialized Domains7 Jun 2025
- 2025Common Corpus: The Largest Collection of Ethical Data for LLM Pre-Training2 Jun 2025
- 2025Minifinetuning: Low-Data Generation Domain Adaptation through Corrective Self-Distillation30 May 2025
- 2025Learning Dynamics in Continual Pre-Training for Large Language Models12 May 2025
- 2025Identifying Legal Holdings with LLMs: A Systematic Study of Performance, Scale, and Memorization4 May 2025
- 2025Transformer-Based Extraction of Statutory Definitions from the U.S. Code23 Apr 2025
- 2025The KL3M Data Project: Copyright-Clean Training Resources for Large Language Models10 Apr 2025
- 2025A Perplexity and Menger Curvature-Based Approach for Similarity Evaluation of Large Language Models5 Apr 2025
- 2025LRAGE: Legal Retrieval Augmented Generation Evaluation Tool2 Apr 2025
- 2025Computational Law: Datasets, Benchmarks, and Ontologies6 Mar 2025
- 2025Compressing Language Models for Specialized Domains25 Feb 2025
- 2025LegalBench.PT: A Benchmark for Portuguese Law22 Feb 2025
- 2025Privacy Ripple Effects from Adding or Removing Personal Information in Language Model Training21 Feb 2025
- 2024CaseSumm: A Large-Scale Dataset for Long-Context Summarization from U.S. Supreme Court Opinions30 Dec 2024
- 2024A Comprehensive Framework for Reliable Legal AI: Combining Specialized Expert Systems and Adaptive Refinement29 Dec 2024
- 2024AIR-Bench: Automated Heterogeneous Information Retrieval Benchmark17 Dec 2024
- 2024Interpretable Next-token Prediction via the Generalized Induction Head31 Oct 2024
50 newest of 113 All 113 (JSON)
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systemscited by 76
- 2025LRAGE: Legal Retrieval Augmented Generation Evaluation Toolcited by 5
- 2026Confundo: Learning to Generate Robust Poison for Practical RAG Systemscited by 5
- 2025Cross-Document Topic-Aligned Chunking for Retrieval-Augmented Generationcited by 1
- 2024Retro-li: Small-Scale Retrieval Augmented Generation Supporting Noisy Similarity Searches and Domain Shift Generalizationcited by 0
- 2026Retrieval Improvements Do Not Guarantee Better Answers: A Study of RAG for AI Policy QAcited by 0
- 2026Retrieval Improvements Do Not Guarantee Better Answers: A Study of RAG for AI Policy QA25 Mar 2026
- 2026Confundo: Learning to Generate Robust Poison for Practical RAG Systems6 Feb 2026
- 2025Cross-Document Topic-Aligned Chunking for Retrieval-Augmented Generation8 Nov 2025
- 2025LRAGE: Legal Retrieval Augmented Generation Evaluation Tool2 Apr 2025
- 2024Retro-li: Small-Scale Retrieval Augmented Generation Supporting Noisy Similarity Searches and Domain Shift Generalization12 Sep 2024
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb 2024
- 2023Scaling Data-Constrained Language Modelscited by 403
- 2024Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Toolscited by 176
- 2024Large Legal Fictions: Profiling Legal Hallucinations in Large Language Modelscited by 150
- 2024SaulLM-7B: A pioneering Large Language Model for Lawcited by 142
- 2023Skill-it! A Data-Driven Skills Framework for Understanding and Training Language Modelscited by 121
- 2023Foundation Models and Fair Usecited by 116
- 2022Language Generation Models Can Cause Harm: So What Can We Do About It? An Actionable Surveycited by 80
- 2023The MiniPile Challenge for Data-Efficient Language Modelscited by 75
- 2023SILO Language Models: Isolating Legal Risk In a Nonparametric Datastorecited by 71
- 2023LEXTREME: A Multi-Lingual and Multi-Task Benchmark for the Legal Domaincited by 68
- 2024MAP-Neo: Highly Capable and Transparent Bilingual Large Language Model Seriescited by 67
- 2023MultiLegalPile: A 689GB Multilingual Legal Corpuscited by 60
12 most cited of 89 All 89 (JSON)
- 2026How Much is a Human Right Worth? ECtHR-NPD: A Benchmark for Predicting Non-Pecuniary Damage Awards16 Sep 2026
- 2026Dynamic-Programming-Guided Hierarchical BPE and Empirical Analysis of Vocabulary Pruning7 Sep 2026
- 2026Cracks in the Foundation: Seemingly Minor Architectural Choices Impact Long Context Extension10 Aug 2026
- 2026Toward Human Rights Benchmarking for LLMs: A Pilot Methodology10 Aug 2026
- 2026ImmigrationReason: A Structured Dataset of U.S. Immigration Appeals for Legal Reasoning Research30 Jun 2026
- 2026Freeing the Law with LOCUS: A Local Ordinance Corpus for the United States17 Jun 2026
- 2026Retrievable Gradients: Continual Post-Training Without Cumulative Weight Drift14 Jun 2026
- 2026Muonp: Muon with Fractional Spectral Powers11 Jun 2026
- 2026IR3DE: A Linear Router for Large Language Models4 Jun 2026
- 2026ImmigrationQA: A Source-Grounded Dataset and Small-Model Adaptation for U.S. Immigration Law28 May 2026
- 2026MAP-Law: Coverage-Driven Retrieval Control for Multi-Turn Legal Consultation2 May 2026
- 2026ComplianceNLP: Knowledge-Graph-Augmented RAG for Multi-Framework Regulatory Gap Detection26 Apr 2026
12 newest of 89 All 89 (JSON)