M2D2: A Massively Multi-Domain Language Modeling Dataset
Machel Reid, Victor Zhong, Suchin Gururangan, Luke Zettlemoyer
Abstract
We present M2D2, a fine-grained, massively multi-domain corpus for studying domain adaptation in language models (LMs). M2D2 consists of 8.5B tokens and spans 145 domains extracted from Wikipedia and Semantic Scholar. Using ontologies derived from Wikipedia and ArXiv categories, we organize the domains in each data source into 22 groups. This two-level hierarchy enables the study of relationships between domains and their effects on in-and out-of-domain performance after adaptation. We also present a number of insights into the nature of effective domain adaptation in LMs, as examples of the new types of studies M2D2 enables. To improve in-domain performance, we show the benefits of adapting the LM along a domain hierarchy; adapting to smaller amounts of fine-grained domainspecific data can lead to larger in-domain performance gains than larger amounts of weakly relevant data. We further demonstrate a tradeoff between in-domain specialization and outof-domain generalization within and across ontologies, as well as a strong correlation between out-of-domain performance and lexical overlap between domains. 1 * Currently at Google Research 1 We release our dataset publicly at https://github. com/machelreid/m2d2 . S o c ie ty a n d s o c ia l s c ie n c e s Human activites Te ch n o lo g y a n d a p p lie d sc ie n ce s Cu ltu re an d the art s H is to ry a n d e v e n ts Natural and physical sciences P h ilo so p h y a n d th in ki n g
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Evaluating Large Language Models on Controlled Generation Tasks cites Controlled Text Generation with Natural Language Instructions
- TRAM: Bridging Trust Regions and Sharpness Aware Minimization cites S2ORC: The Semantic Scholar Open Research Corpus
- Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled Corpus cites Don't Stop Pretraining: Adapt Language Models to Domains and Tasks
- Don't Stop Pretraining: Adapt Language Models to Domains and Tasks cites S2ORC: The Semantic Scholar Open Research Corpus
Cited by top-tier papers9
- xLSTM: Extended Long Short-Term MemoryMaximilian Beck, Korbinian Pöppel, Markus Spanring, Andreas Auer et al.NeurIPS 2024 · 703 citations
- Controlled Text Generation with Natural Language InstructionsWangchunshu Zhou, Yuchen Eleanor Jiang, Ethan Wilcox, Ryan Cotterell et al.ICML 2023 · 121 citations
- OLMo: Accelerating the Science of Language ModelsDirk Groeneveld, Iz Beltagy, Evan Pete Walsh, Akshita Bhagia et al.ACL 2024 · 52 citations
- Evaluating Large Language Models on Controlled Generation TasksJiao Sun, Yufei Tian, Wangchunshu Zhou, Nan Xu et al.EMNLP 2023 · 13 citations
- TRAM: Bridging Trust Regions and Sharpness Aware MinimizationTom Sherborne, Naomi Saphra, Pradeep Dasigi, Hao PengICLR 2024 · 6 citations
Builds on3
- S2ORC: The Semantic Scholar Open Research CorpusKyle Lo, Lucy Lu Wang, Mark Neumann, Rodney Kinney et al.ACL 2020 · 424 citations
- Don't Stop Pretraining: Adapt Language Models to Domains and TasksSuchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo et al.ACL 2020 · 93 citations
- Documenting Large Webtext Corpora: A Case Study on the Colossal Clean Crawled CorpusJesse Dodge, Maarten Sap, Ana Marasovic, William Agnew et al.EMNLP 2021 · 18 citations
Related papers
- Leveraging High-Resource English Corpora for Cross-lingual Domain Adaptation in Low-Resource Japanese Medicine via Continued Pre-trainingKazuma Kobayashi, Zhen Wan, Fei Cheng, Tsuta Yuma et al.EMNLP Findings 2025
- Few-shot Adaptation Works with UnpredicTable DataJun Shern Chan, Michael Pieler, Jonathan Jao, Jérémy Scheurer et al.ACL 2023 · 2 citations
- M2QA: Multi-domain Multilingual Question AnsweringLeon Engländer, Hannah Sterz, Clifton Poth, Jonas Pfeiffer et al.EMNLP Findings 2024
- Temporal Adaptation of BERT and Performance on Downstream Document Classification: Insights from Social MediaPaul Röttger, Janet B. PierrehumbertEMNLP Findings 2021 · 47 citations
- DS-TOD: Efficient Domain Specialization for Task-Oriented DialogChia-Chien Hung, Anne Lauscher, Simone Paolo Ponzetto, Goran GlavasACL Findings 2022 · 15 citations
