On the Impact of Cross-Domain Data on German Language Models

Amin Dada, Aokun Chen, Cheng Peng, Kaleb E. Smith, Ahmad Idrissi-Yaghir, Constantin Marc Seibold, Jianning Li, Lars Heiliger, Xi Yang, Christoph M. Friedrich, Daniel Truhn, Jan Egger, Jiang Bian, Jens Kleesiek, Yonghui Wu · DOI

Abstract

While scaling laws for Large Language Models (LLMs) often emphasize sheer data volume, this research demonstrates that for German language models, data diversity is a more potent driver of performance than data quality alone. By curating a cross-domain dataset—incorporating automatically translated medical and legal texts—the authors introduce "GeBERTa," a suite of models that set new state-of-the-art (SOTA) benchmarks for German NLP. The results suggest that exposure to diverse linguistic domains, even when augmented by "noisy" machine translation, allows models to outperform those trained on significantly larger but more homogenous web-crawl datasets.

Introduction

In the current landscape of Natural Language Processing, the standard recipe for improvement has been the simultaneous scaling of parameters and data. However, for languages other than English, high-quality, domain-specific data—such as medical records or legal filings—is often scarce. Previous German models, including GBERT and GottBERT, relied heavily on general web crawls (e.g., OSCAR) or Wikipedia. While these datasets provide scale, they lack the linguistic variety found in specialized fields or informal social media.

This paper addresses a critical trade-off: Is it more effective to train on a massive volume of "clean" general-purpose data, or a smaller, "noisier" set that spans multiple distinct domains? To answer this, the researchers developed GeBERTa, exploring how data heterogeneity impacts model robustness and downstream performance.

Methodology

Architecture

The GeBERTa models utilize the DeBERTa (Decoding-enhanced BERT with disentangled attention) architecture. Unlike standard BERT or RoBERTa, DeBERTa uses a "disentangled attention" mechanism that represents each word using two vectors—one for its content and one for its relative position. This separation allows the model to better capture complex syntactic structures and dependencies, providing a stronger architectural foundation for German's nuanced grammar.

Data Curation Strategy

The core of the study lies in the comparison between two distinct training sets:

  1. $D_{quality}$: A baseline focused on high-quality, formal German text, including Wikipedia, news articles, and filtered web crawls.
  2. $D_{variety}$: A "variety-enhanced" dataset that adds four specialized domains: Informal (Reddit, reviews), Medical (theses, abstracts, clinical notes), Legal (court cases), and Literature (fiction).

To overcome the scarcity of native German medical and literary data, the authors employed automatic translation (using the WMT’19 English-to-German model) to port massive English datasets, such as MIMIC-III and BooksCorpus, into German. They also utilized a 5-gram filtering approach to extract relevant medical snippets from general web crawls, ensuring the model was exposed to domain-specific jargon and structures.

Evaluation and Benchmarking

The models were evaluated across a comprehensive benchmark of eight downstream tasks, categorized by domain:

  • Formal: GermEval 2014 (Named Entity Recognition) and GQuAD (Question Answering).
  • Informal: GermEval 2018 (Hate Speech detection) and Tweet Sentiment analysis.
  • Medical: GGPONC (Clinical NER), GRASCCO (Clinical cases), and Jsyncc (Textbook classification).
  • Literature: DROC (Character reference resolution in novels).

Key Insights

Heterogeneity Trumps Homogeneity

Models trained on the cross-domain dataset ($D_{variety}$) consistently outperformed those trained on $D_{quality}$, even when total token counts were comparable. This suggests that exposure to different "dialects" of a language—from legal jargon to Reddit slang—helps the model build a more robust and flexible internal representation of the language.

Translation as a Valid Augmentation Tool

A significant finding was that "noisy" automatically translated data improved performance in specialized tasks. Despite potential "translationese" biases, the underlying semantic structure of specialized domains like medicine provides valuable signals that general web text cannot replicate. This validates machine translation as a viable strategy for low-resource domain adaptation.

Efficiency and Scaling

The GeBERTa-V base model (122M parameters) achieved results comparable to much larger previous SOTA models. When scaled to the xlarge version (750M parameters), the model achieved the highest average score across the eight-task benchmark (77.98% F1), demonstrating that diverse data curation scales effectively with model size.

Results

The GeBERTa models established several new benchmarks:

  • GQuAD Leap: GeBERTa-V achieved a 4.45% improvement in F1 score on the German Question Answering dataset over previous benchmarks.
  • Medical Performance: On the GRASCCO clinical dataset, the model improved performance by 2.4%, highlighting the efficacy of the translated training data.
  • General SOTA: GeBERTa-V outperformed previous leaders like GBERT and GottBERT on nearly all evaluated tasks, proving the superiority of the variety-driven approach.

Conclusion and Future Work

The study concludes that for non-English language models, the focus should shift from pure data volume to domain diversity. While the authors acknowledge the environmental costs of training and the ongoing need for native-language specialized datasets, the success of GeBERTa provides a roadmap for more efficient NLP. Future research will explore whether these cross-domain curation techniques yield similar benefits for decoder-only generative models (e.g., Llama-style architectures) and how to further mitigate biases introduced by translated training data.

Summary updated

BibTeX
@inproceedings{dada2023impact,
  author = {Amin Dada and Aokun Chen and Cheng Peng and Kaleb E. Smith and Ahmad Idrissi-Yaghir and Constantin Marc Seibold and Jianning Li and Lars Heiliger and Xi Yang and Christoph M. Friedrich and Daniel Truhn and Jan Egger and Jiang Bian and Jens Kleesiek and Yonghui Wu},
  title = {{On the Impact of Cross-Domain Data on German Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.922},
}
Figure