On the Impact of Cross-Domain Data on German Language Models
Paper · 2023 · Amin Dada, Aokun Chen, Cheng Peng et al.
Summary
A corpus can contain a great deal of good German prose and still give a language system little practice with clinical reports, online discussions, or fiction. A filter that favors writing like Wikipedia will tend to keep texts that resemble an encyclopedia. That makes sense when the aim is to collect readable web text, but it leaves open a question about what the resulting system can do. The authors ask whether a German language model learns more useful representations when some of that formal material is replaced with text from other domains. They are interested in whether the change helps on tasks drawn from those domains and whether it carries over to formal writing.
The authors build a quality-focused corpus from filtered German web text, news, and Wikipedia. They use it as the starting point for a second corpus with informal, medical, legal, and literary material. Some of the additions were already available in German. Others came from searching a web crawl for medical writing or translating English collections into German. The authors remove a random portion of the formal web text to keep corpus volume comparable. They then pretrain German DeBERTa encoders, which they call GeBERTa, and evaluate them on tasks that include question answering, named entity recognition, and classification. The matched comparisons use the base and large configurations. The xlarge configuration uses the broader corpus.
The broader mixture improves the reported average test score at both matched sizes. GeBERTa base rises from 75.53 with the quality-focused corpus to 76.51 with the broader one. The authors report gains of up to 4.45% over the earlier state of the art, with the largest cited gain on GermanQuAD question answering. The base comparison also favors the broader corpus on the GRASCCO clinical entity task, the DROC literary entity task, and the GermEval task built from Wikipedia and news. The large comparison is more mixed. Its quality-focused variant scores higher on GermanQuAD and Tweet Sentiment, while the broader variant has the higher overall average. The xlarge system records the highest average of the systems evaluated, while larger size brings no corresponding lead on the clinical entity tasks.
The central result concerns a practical choice about what to put into a modestly sized training corpus. Under the authors’ recipe, replacing some formal web text with several kinds of German writing improved performance across a range of tasks. The experiment tests the mixture as a package. Its strength is that the comparison runs through the same encoder family and evaluation procedure. The separate contributions of translated text, individual domains, and vocabulary changes remain open.
Deep dive: On the Impact of Cross-Domain Data on German Language Models
The GeBERTa study tests how mixing formal, informal, medical, legal and literary text affects performance on German language tasks. · about 37 minutes to read
The problem and its context
Why the choice of documents matters
A German encoder is often trained before its eventual assignment is known. During pretraining it receives text without labels for a particular application. Later, a developer adapts it to a dataset in which people have marked entity spans, assigned categories, or identified answers. The first stage gives the encoder experience with how words and passages fit together. The second asks it to use what it learned to make a particular kind of decision. The choice of text in the first stage therefore matters even though the task labels arrive in the second. This is the connection between pretraining and fine-tuning that the paper investigates.
Web crawls make it possible to assemble a large corpus without collecting every document by hand. They also raise a selection problem. A crawl can contain repeated passages, and documents that are easy to collect may differ considerably in usefulness. The German corpora discussed in the paper handle the selection problem in different ways. OSCAR applies filtering heuristics. The CC100 pipeline uses a statistical measure of resemblance to Wikipedia as part of its quality selection. GC4, the web corpus used for the formal portion of the authors’ experiment, comes from that pipeline.
Wikipedia is a useful reference if the desired text is fluent, edited prose. The significance of a poor match depends on why the document differs from that reference. Some text may be difficult to use because of noise. Some may simply come from a different setting. The wording of a disagreement on social media and the wording of a clinical note can both depart from encyclopedic conventions, for very different reasons. A quality filter that rewards the same reference style in both cases can undersample those settings even when it works as intended.
The authors frame diversity as a choice about composition under practical data constraints. In their account of scaling laws, larger systems and corpora had become a common route to improved language processing. They describe that tendency for decoder-only, encoder-only, and encoder–decoder designs. Institutions with limited access to data still have to decide what to put into a run that they can afford. At a given scale, a corpus with more examples of conventional prose offers a different learning opportunity from one that exchanges some of those examples for other types of writing.
That choice has implications for formal tasks too. If the only benefit of medical text were better handling of medical terminology, then the main reason to include it would be a known medical use. The authors want to know whether a training collection drawn from several settings improves the usefulness of the resulting encoder more generally. Formal evaluation tasks make that question testable. They can reveal whether a broader mix preserves or improves performance in the kinds of writing the starting corpus already emphasizes.
What earlier German encoders had established
The paper places GeBERTa in a line of German systems made possible by large multilingual web collections. Earlier German work produced GBERT and GELECTRA in base and large configurations. It drew on OSCAR, Wikipedia, the Open Parallel Corpus, and legal writing. The parallel corpus supplied some medical material as well. Those training collections thus already crossed domains. Their experiments asked about data quantity, leaving the effect of the domain mixture itself unresolved.
GottBERT provides a different reference point in the paper’s account. Its architecture follows RoBERTa, and its pretraining text came from German OSCAR. Comparing published scores from these German efforts offered only a narrow view. The original evaluations shared relatively few downstream datasets, and the authors of the present paper describe both earlier evaluations as forgoing hyper-parameter tuning. The same encoder can produce different scores when its learning rate, stopping point, or other fine-tuning choices change. A benchmark that adapts each system under a common procedure gives a clearer basis for comparing them.
There are consequently separate questions about the new systems and the new corpus. Comparing GeBERTa with GBERT, GELECTRA, or GottBERT asks how the new training package fares against systems that already exist. That package changes architecture as well as data. Comparing the quality-focused and variety-enhanced GeBERTa variants at the same size asks a narrower question about data choice under a shared architecture and pretraining schedule. The paper needs both comparisons because a strong benchmark score by itself gives little indication of which part of a new training package deserves credit.
The architecture on which the authors settle is DeBERTa. It belongs to the Transformer family and uses a form of attention that handles token content and position separately. In an encoder, attention lets a representation at a given place in the input depend on surrounding material. Treating information about position separately from information about the token gives the architecture a particular way to represent those relationships. The paper adopts an existing design so it can train corresponding variants on different German corpora.
Cross-domain pretraining and medical specialization
Earlier work on medical text pointed to several ways of using domain material. BioBERT takes a BERT starting point and continues pretraining on PubMed material. The clinical BERT work cited by the authors compares medical and general training backgrounds for clinical tasks. Another route, represented by domain-specific biomedical pretraining, starts with text from the intended specialist domain. These approaches make the relation between the pretraining material and the eventual use an explicit design choice. GeBERTa poses the corresponding question for an encoder expected to serve several domains. Publicly Available Clinical BERT Embeddings
The other strand of earlier work comes from generative systems. The paper describes The Pile as a collection in which web text is joined by sources such as forums and scientific publications. In this line of work, a mixed corpus gives one system access to multiple types of language during pretraining. The authors also cite work on careful curation as evidence that how data is selected warrants attention alongside its quantity. For the German encoder experiment, these examples supply a reason to compare dataset designs. The behavior of a generative system trained on a very different collection cannot settle the comparison.
The German setting adds a practical obstacle. Ready-made specialist collections are unevenly available across languages. The authors describe German public medical text as scarce and point to privacy restrictions as one reason why resources comparable to those used in English are hard to assemble. The study they cite puts the number of publicly accessible German-language medical documents at under 2 million. A recipe that depends on finding a large collection of openly available, native German clinical writing would therefore have limited room to work.
This scarcity shapes the paper's design. One option is to take a small set of known German medical texts and use it to find similar documents in a larger crawl. Another is to use machine translation to bring an existing English collection into the German mixture. Both routes increase coverage at the cost of introducing other sources of noise. That tradeoff is part of what the study wants to assess. The experiment asks whether the downstream benefit of the resulting material survives the compromises involved in obtaining it.
The method, step by step
Start with material that would otherwise form the training corpus
Imagine choosing a collection for a general German encoder. An obvious starting point is a supply of edited articles, together with web documents selected for resemblance to those articles. The authors build such a corpus, then use much of it again in the corpus that includes more specialist and everyday writing. This shared starting point matters. The broader variant still encounters news and encyclopedic prose during training, so the experimental change is a shift in what accompanies that prose and how much of the training collection it occupies.
The authors call the quality-focused corpus D quality. Its ingredients are the most Wikipedia-like GC4 snapshots, the German monolingual news crawl from WMT 2022, and the German Wikipedia dump identified as 20220301.de. The GC4 selection uses the preprocessed head portions of the crawl snapshots. A snapshot is a collection from a crawl at a particular point. Its head portion represents the documents that score highly under the Wikipedia resemblance filter. Using these portions is how the authors give their reference corpus a particular emphasis on formal, edited writing.
The authors call the second corpus D variety. It draws on the first corpus and adds informal, legal, medical, and literary material. They randomly remove some GC4 text to make the corpora comparable in volume. Random removal is consequential here. The authors could have removed particular formal topics or sources deliberately, but the reported operation is a random reduction of the GC4 component. The benchmark thus evaluates the practical intervention of reallocating part of the formal corpus to several kinds of writing.
At the end of the pipeline, the names GeBERTa Q and GeBERTa V identify which corpus a system received. Q denotes the quality-focused corpus and V denotes the variety-enhanced one. The size label indicates the architecture configuration. The paper describes systems ranging between 122M and 750M parameters. A parameter is an adjustable numerical weight learned during training. Using both the corpus and size labels is essential when reading the results, since an increase in size and a change in training mixture answer different questions.
From German corpus collection to downstream evaluation
The steps in order.
Remove repeated passages before building the broader mixture
Deciding what counts as a duplicate determines how much repetition remains. GC4 had already been cleaned using earlier procedures, including document hashes and comparisons across snapshots. A document hash can help identify an existing copy, while a repeated passage can turn up inside documents whose full contents differ. A page can carry the same long piece of text as another page even if the surrounding material has changed. The authors therefore carry out additional deduplication based on matching substrings.
They first process GC4 and the news crawl separately. They then deduplicate the combined collection. For the substring procedure, the minimum matching sequence is 100 tokens. Here a token is a unit of text produced by a tokenization procedure. The threshold describes the length of a repeated sequence that the algorithm is configured to detect. When a document contains an identified duplicate, the authors remove the document as a whole. That preserves intact documents in the retained collection, while also discarding any unique material that happened to accompany a repeated passage in a removed document.
The quantities give a sense of how much work this extra pass does. Earlier cleaning had removed 70% of the texts in each GC4 snapshot. The MongoDB deduplication across snapshots had then eliminated 46% of what remained. Even after those operations, among the 74.6 billion GC4 tokens considered for the authors’ additional processing, the paper identifies 35.3 billion as duplicates. The news data start with 16 billion tokens, with 9.3 billion identified as duplicates. At the combined-dataset stage the authors find 0.72 billion duplicate tokens. Those values refer to specific stages of the cleaning process. They describe repetition under the procedures that produced them.
The within-source counts and the count from the combined pass serve different purposes. The first stage prevents repeated text in a large source from dominating the material drawn from that source. The combined pass addresses remaining overlap when separately processed collections meet. Applying only the latter description to the entire procedure would obscure why the combined pass can find comparatively little repetition after the earlier passes have already handled much of it. The paper reports source sizes after preprocessing separately from these counts.
Add writing that the formal sources cover unevenly
The informal collection combines German Reddit material with holiday reviews. The Reddit part starts from submissions and comments in the Pushshift collection from 2019 to 2023. The authors decode escaped HTML, remove URLs, and discard texts shorter than 20 words. They then use fastText to identify German passages. A post has to reach a German identification score of 0.9 to stay in the collection. The procedure yields 15 million Reddit texts. The authors add 4.9 million texts from a published collection of reviews from a German holiday booking site.
These choices produce a particular sample of informal German. The Reddit portion contains entries that were long enough to pass the word filter and that the language identifier judged sufficiently likely to be German. A very short exchange can therefore fall outside the collection even though it is unmistakably informal. Holiday reviews bring in another context for opinions and personal accounts. Each stream broadens the training material in a different way, and the filtering rules still determine which part of that variety the encoder sees.
For legal writing, the authors use OpenLegalData, a collection of German cases and laws. They describe it as containing more than 250,000 documents, and their source inventory reports 308,228 documents for that entry. Its breadth comes from adding a recognizable source of legal prose, with no translation step for those records. The paper’s evaluation has no legal task. The reason for including the collection is to broaden pretraining, and its contribution can only appear indirectly in the reported downstream results.
The literary collection likewise has a German starting point. The Corpus of German-Language Fiction contributes 2,735 prose books from Gutenberg-DE and another 484 books that had been translated into German by people. The authors separately apply their automatic translation procedure to BooksCorpus, adding 11,038 books. Thus the literary portion combines an existing German-language corpus with another set of books made available to the encoder through English-to-German translation. The source inventory distinguishes the automatically translated books from the German fiction collection.
In medicine, the authors combine more routes because direct access to German material is limited. Public German sources include doctoral thesis abstracts, articles from Flexikon, and texts from the German Guideline Program in Oncology. They also collect 14,496 publicly available German medical dissertations. These collections give the authors both text to include and examples of the language they want to find elsewhere. In the paper’s terminology, the medical domain reaches across academic, reference, guideline, and clinical writing.
Search a large crawl for medical German
The medical crawl search applies the broad logic of the CC100 filter with a different reference. Instead of selecting for resemblance to Wikipedia, the authors use their German medical material as the basis for a 5-gram filter. An n-gram approach uses short consecutive sequences of tokens to describe local patterns. Its value here is that it lets the authors score a large candidate set using patterns estimated from a much smaller set of known medical writing.
The score used to rank documents is perplexity. In this setting a low value means that the sequences in the document are comparatively predictable under the language statistics learned from the medical examples. This gives the authors a way to prioritize documents whose wording resembles their examples without assigning a human label to every candidate. A low value expresses resemblance under this procedure. Clinical usefulness, document reliability, and the correctness of medical statements are separate properties.
The candidate pool is the latest OSCAR release used in the study, which the paper describes as containing 207 million documents. The authors retain the 2 million documents with the lowest perplexity according to the medical filter. That decision turns a large general crawl into a tractable source of additional German medical writing. It also makes the selection rule explicit. The retained material reflects which documents the local sequence statistics rank highly, given the medical texts available to train the filter.
The filter illustrates why “quality” and “variety” are tied to the purpose of a selection rule. A similarity measure trained on Wikipedia serves one corpus-building goal. A measure trained on medical material serves another. Both apply a numerical screen to web data. What changes is the kind of writing used as the reference, and with it the set of documents most likely to be retained. The medical filter supplies one part of the evidence about building a useful broader corpus from sources that are already available.
Translate sources with limited German equivalents
For more medical material, the authors translate PubMed abstracts, clinical notes, and patient-related text from existing English collections. In its account of the collection procedure, the paper describes an expanded dataset containing six million abstracts from PubMed. Clinical notes come from MIMIC-III, and the other patient text comes from PMC-Patients-ReCDS. The underlying sources serve different purposes. Research abstracts summarize studies, clinical notes describe care, and patient-related texts add another way of presenting medical information. The translation route brings those forms into the German encoder's training experience.
The authors first use Stanza to split each document into sentences. They group the sentences into chunks of at most 128 tokens, counting those tokens with the translation system's own tokenizer. This makes the length constraint apply to the units the translator actually receives. The authors report observing poorer translations when they used longer chunks. Sentence grouping therefore balances processing a useful stretch of connected text against the degradation they observed as inputs grew.
The translator is the Fairseq WMT’19 English-to-German system, with context length set to 156. The run uses a single beam. Beam search normally controls how many candidate continuations remain under consideration as a translation is produced. Keeping a single candidate reduces the search needed for each chunk, and the authors choose that setting for speed. The 128-token chunk bound and the context setting of 156 describe different parts of this setup. The former governs how the authors package the input, while the latter is a configuration of the translation system. The same procedure is used for the translated BooksCorpus material.
In the resulting corpus, translated passages supply German words and syntax associated with topics and forms that would otherwise be difficult to collect at this scale. They also carry the effects of the translation procedure. A chunk can be linguistically plausible while using expressions that a German writer in the same setting would phrase differently. The authors accept that possibility as part of the corpus comparison. The central experiment measures downstream performance after including such material, with the other additions and the removal of some GC4 happening in the same recipe.
Learn the vocabulary and pretrain the encoders
Before training GeBERTa, the authors use SentencePiece to learn how to represent the text as tokens. In subword tokenization, a frequent form can have its own vocabulary entry, while other words can be represented by pieces. The way those pieces are learned determines how particular strings are presented to the encoder. A corpus that contains more clinical or legal vocabulary can therefore affect the system's input representation as well as the text used for learning its weights.
For each corpus, the authors train a tokenizer on a random sample of 100M sentences. The base and large vocabularies contain 50k tokens. The xlarge vocabulary contains 128k tokens. Within the matched sizes, the vocabulary capacity is shared, while the actual learned entries can differ because the sentence samples come from different corpora. The xlarge configuration changes vocabulary capacity alongside changes to the network. That matters when interpreting its result as a comparison of configurations.
The authors train base and large DeBERTa encoders on each corpus. They train xlarge on D variety. The base encoder uses 12 layers and 12 attention heads, with a hidden size of 768. The large encoder has 24 layers, a hidden size of 1024, and 16 attention heads. The xlarge encoder also has 24 layers, with a hidden size of 1536 and 24 heads. Layers are successive representation transformations. Hidden size is the width of the representation carried through those layers. Attention heads offer parallel ways for positions in the sequence to attend to one another. The appendix lists a head size of 64 for each configuration.
The training objective is dynamic masked language modeling. A mask hides selected input tokens and gives the encoder a prediction target based on the original text. The surrounding tokens supply clues for that prediction. Dynamic masking varies the choices of hidden positions during training, so the task can differ when material is presented again. This provides training targets from the corpus itself before the encoder receives task-specific labels. The paper specifies the objective and recipe in words and settings. It gives no new mathematical formula for the masking, corpus selection, or DeBERTa attention.
The authors use AdamW, DeepSpeed ZeRO optimization, and the Hugging Face implementation of DeBERTa. AdamW controls how the learned weights are updated and applies weight decay as part of the training recipe. The authors state an accumulated batch size of 2048 and a run length of 1M steps. An accumulated batch lets contributions from several smaller processing batches be combined before an update. The appendix records 10k warmup steps, a period in which the learning rate ramps up, and linear learning rate decay. It gives the base learning rate as 2e-4 and the large and xlarge learning rates as 1e-4. The authors release the trained systems and the source code for assembling the pretraining data. Decoupled Weight Decay Regularization
Experiments and results
What the benchmark asks the encoders to do
The authors assemble a common evaluation benchmark covering several kinds of German text and several prediction formats. In an entity task, the encoder helps locate a text span and assign it a type. In text classification, it assigns a category to the whole input. In extractive question answering, it identifies a passage span that answers a question. A comparison across these formats gives more information than a single contest on one kind of prediction. It also prevents a score on one kind of formal prose from standing in for performance on all German text.
When a dataset already supplies training, development, and test partitions, the authors use them. Where those partitions are unavailable, the reported procedure randomly allocates 80% to training, 10% to validation, and 10% to test. The training partition supplies labeled examples for adaptation. The validation partition guides the choice of settings and stopping point. The test partition supplies the reported performance. For the GE18 validation set the authors stratify the split by label, which helps preserve representation of infrequent categories when creating that partition.
For formal writing, GermEval 2014, abbreviated GE14, uses German Wikipedia and news articles. It contains 590,000 tokens in 31,000 sentences and has 12 entity types, including people and places. The task asks the system to find spans of those kinds in text. It gives the experiment a test whose genre closely resembles material present in the quality-focused corpus. That makes it useful for checking whether changing the mixture alters performance where the original corpus already offers relevant examples of style.
GermanQuAD, or GQuAD, is the other formal test. It follows the Wikipedia passage-and-question pattern associated with SQuAD. Its German passages are drawn from articles corresponding to the English articles used by SQuAD. The system identifies the answer in the passage. The task raises the bar in a different way from entity recognition. A passage may contain several plausible spans of the same type, and the wording of the question determines which span is relevant.
For informal writing, GermEval 2018, or GE18, contains 5,009 German tweets. The authors evaluate its fine-grained hate-speech categories, a harder setting than the coarser annotations available for the same material. The label distribution is uneven. Insults account for 11.9% of the examples, and profanity accounts for 1.4%. The smaller classes make the score sensitive to the judgments made on relatively few examples, which is one reason the authors are concerned about the relation between validation and test performance.
The authors create a second informal benchmark, Tweet Sentiment, abbreviated TS, by combining sb10k and PotTS. The resulting collection has 14,980 tweets. Its label scheme uses positive, negative, and neutral categories. Although the paper introduces this benchmark in its discussion of hate-speech evaluation, the specified labels make it a sentiment classification task. It offers a second test of transfer to tweets, with a different distinction for the system to learn and a larger pool of examples.
The medical tasks include GGPONC 2.0, abbreviated GGP, and an annotated version of GRASCCO, abbreviated GRAS. GGP contains 1.8 million tokens from 10,000 oncology guideline documents. The annotations are available in variants that differ in the number of entity categories and the length of spans. The authors opt for the configuration that uses eight fine-grained semantic classes and long spans for entities. The GRAS dataset consists of synthetic clinical case reports annotated under the same scheme. For GRAS the authors again use the fine-grained classes and long spans. The shared annotation choices make the tasks comparable in what they ask a system to mark, while guidelines and case reports give it different kinds of passages to mark up.
The remaining medical task, Jsyncc, abbreviated JS, asks for a topic label on a medical textbook case. Copyright restrictions mean the dataset creators supply code to build the examples from the books. The GeBERTa authors obtain 7 of the 10 books. Their resulting evaluation collection contains 544 samples and six classes. The medical part of the benchmark consequently includes both span labeling and classification. A corpus change can affect them differently even when all the inputs concern medicine.
DROC tests character-reference recognition in German novels. It has about 393,000 tokens from 90 novels, with 52,079 tokens annotated as character references across four entity types. This task provides a direct question about literary language in the comparison. The pretraining mixture includes fiction, and the system has to find references to characters in held-out task examples after adaptation. Its scores show how those encoders fare on the annotated entity task. The paper includes no comparable test for the legal part of the training collection.
Compare systems under the same adaptation procedure
The external base comparators are GBERT, GELECTRA, and GottBERT. The large table includes GBERT and GELECTRA. The authors rerun task adaptation for these established systems and for GeBERTa, using a limited search over settings for each pairing of system and task. A hyper-parameter is a chosen setting of the training procedure. By searching separately for each pairing, the authors give each system a chance to use a learning rate and batch size suited to the task.
The search considers batch sizes of 16 and 32 and uses a warmup ratio of 6%. The main text sets the maximum training duration at 20 epochs. An epoch is a pass through the labeled training material. The appendix gives size-specific learning rate candidates. Base candidates span 1e-5 to 4e-5, large candidates span 7e-6 to 1e-5, and xlarge candidates span 5e-6 to 8e-6. The results for a given task consequently depend both on what an encoder learned in pretraining and on how effectively it can be adapted within this search.
The authors choose settings by validation performance. They then perform five runs with early stopping and average the test performance. Early stopping limits further training when the validation criterion ceases to favor it. Reporting a mean across runs reduces the influence of a particularly fortunate outcome. The paper also reports standard deviations, which describe run-to-run variability under the reported procedure. For a small or uneven dataset, the variation can be an important part of the result in its own right.
Most task columns report F1. Generally, F1 balances precision, the fraction of predicted positives that are correct, with recall, the fraction of the reference positives that are recovered. In question answering the tables give GQuAD F1 and exact match, abbreviated EM. Answer F1 gives credit for overlap between the prediction and the reference, while exact match checks whether the answer matches in full under the scoring procedure. Two systems can therefore trade places according to which of those notions of answer correctness is used. The tables also give an aggregate across tasks under the label “Avg.” It is useful for comparison when read alongside the individual scores.
What changes at base size
The reported aggregate places both GeBERTa base variants ahead of the earlier base comparators. The quality-focused variant performs strongly before the additional domains enter the comparison. This establishes a consequential reference point. The broader mixture has to improve on an encoder that was already competitive under the paper’s evaluation procedure.
Base encoders on the German downstream benchmark, reported average test score
The broader GeBERTa mixture leads the base encoders on the reported aggregate.
The numbers
| System or setting | average test score |
|---|---|
| GELECTRA base | 72.71 |
| GBERT base | 73.65 |
| GottBERT base | 74.05 |
| GeBERTa Q base | 75.53 |
| GeBERTa V base (this paper) | 76.51 |
GermanQuAD supplies a particularly clear example of why separating system comparison from corpus comparison matters. The best earlier base F1 in the authors’ table is 74.09, for GELECTRA base. GeBERTa Q base reaches 78.01, and GeBERTa V base reaches 78.54. The paper highlights +4.45% against the earlier result. Within the matched GeBERTa comparison, the scores are much closer. On GermanQuAD exact match the order of the pair changes, with 62.19 for Q and 62.06 for V. An account of the answer task therefore needs to name the metric when saying which system leads.
The other formal test gives 87.80 F1 to GeBERTa Q base and 88.06 to GeBERTa V base on GE14. Both the entity task and the F1 metric for question answering thus show a gain after part of GC4 is replaced, even though the tasks draw on writing akin to that in the quality-focused corpus. In GermanQuAD the increase concerns overlap with reference answers. In GE14 it concerns the entity predictions. These are useful tests of transfer because the new domains differ from the formal prose the tasks use.
On GE18, base test F1 is 51.81 with the quality-focused corpus and 53.16 with the broader one. On TS the scores are 74.70 and 74.83, respectively. The broader corpus moves both results in the same direction at this size. The settings are different enough that the score changes should be read individually. GE18 asks the classifier to distinguish fine-grained offensive categories, while TS asks about polarity. Even though both inputs are tweets, the learned distinctions are different.
The base medical results likewise favor the wider mixture in the point estimates, with effects that vary by dataset. On GGP the pair scores 78.08 and 78.13 in Q-to-V order. On GRAS the corresponding scores are 66.04 and 68.37. The paper highlights +2.4% on GRAS against an earlier base system. On JS the reported F1 is 80.13 for Q and 81.85 for V. The most pronounced change between the two GeBERTa medical entity results is therefore on synthetic case reports. The guideline task has a shared annotation scheme with it, but the score comparison shows why task labels alone give an incomplete account of the evaluation setting.
On DROC the base scores are 87.67 for Q and 89.14 for V. The move matters in relation to earlier encoders too. GottBERT base reaches 88.61, so the quality-focused GeBERTa trails that baseline and the variety-enhanced GeBERTa moves ahead of it. This is one of the clearest cases in which the changed treatment of the corpus shifts GeBERTa’s position relative to an existing system. The contribution of the literary subset itself remains a separate question, because all the new material enters together.
What changes at large and xlarge sizes
The large results are less uniform than the base results. The broader GeBERTa large has the higher aggregate, while the quality-focused large leads it on both GermanQuAD measures and on Tweet Sentiment. The xlarge variety-trained configuration leads the overall aggregate. The table also shows that the ranking can change again when the same systems are compared on an individual medical task.
Large and xlarge encoders on the German downstream benchmark, reported average test score
GeBERTa V leads at large size, and the variety-trained xlarge configuration has the highest average.
The numbers
| System or setting | average test score |
|---|---|
| GELECTRA large | 76.37 |
| GBERT large | 76.63 |
| GeBERTa Q large | 77.18 |
| GeBERTa V large | 77.67 |
| GeBERTa V xlarge (this paper) | 77.98 |
On GermanQuAD, GeBERTa Q large records 83.54 F1 and 67.40 exact match. GeBERTa V large records 82.52 F1 and 65.15 exact match. The paper highlights +1.02% for the quality-focused variant on F1. This reverses the ordering of F1 observed between the base variants. It illustrates that the effect of the mixture on a particular task can depend on the encoder configuration used to learn from it. On GE14 the broader large retains a small lead, with 88.84 against 88.69 for the quality-focused large.
The informal tests diverge at large size. GeBERTa V large reaches 53.76 F1 on GE18, compared with 51.84 for Q large. In the same evaluation, GELECTRA large reaches 55.41. The broader corpus improves the GeBERTa large result on that task while an older system still ranks higher. On TS, Q large reaches 75.70 and V large reaches 75.32. The gain on one tweet classification benchmark can thus coexist with a decrease on the other. Mere agreement in platform and broad genre provides an incomplete guide to the direction of transfer.
On medical tasks, Q large and V large score 78.13 and 78.35 on GGP, 68.91 and 70.02 on GRAS, and 81.07 and 82.16 on JS. On GGP both established large comparators are ahead, with GBERT large at 79.17 and GELECTRA large at 79.09. For literary entity recognition, V large reaches 90.39 on DROC and Q large reaches 89.57. The V large DROC result also exceeds the 90.29 recorded by GBERT large. Taken together, these results explain how the broader large comes out ahead on the aggregate despite its lower scores on GermanQuAD and TS.
The xlarge row in the results table belongs to GeBERTa V, consistent with the pretraining description. It reaches 85.05 F1 and 67.71 exact match on GermanQuAD. It also records 55.80 on GE18, 76.25 on TS, and 90.63 on DROC. On the clinical entity tasks, the xlarge results are 76.71 for GGP and 67.92 for GRAS. For GGP and GRAS, V large scores higher. The xlarge configuration therefore delivers the best recorded aggregate and several task leads, with exceptions concentrated on the clinical entity tests in this benchmark.
The paper also gives examples of how the common evaluation changes the scores of earlier systems. It reports improvements over previously reported GE18 results of 0.37% for GBERT base and 1.74% for GELECTRA base. The reported increase for GottBERT base on GE14 is 0.31%. In other cases the earlier published performance was higher. The authors point out that some GottBERT figures were selected as the best from several runs, whereas this evaluation reports the mean of five. A benchmark comparison depends on whether a score is a typical outcome under a procedure or the best outcome found with it.
What the ablations show
The matched corpus comparison
The main controlled comparison is the Q–V pair at each shared size. The authors keep the DeBERTa configuration and nominal training schedule fixed at that size, then change the material available for pretraining and learn its tokenizer from the corresponding corpus. Comparing this way gives the strongest evidence in the paper that the corpus recipe contributes to the gains. The separate comparison with earlier German encoders establishes how well the new systems perform overall, while bringing more differences into play.
Corpus volume is central to the interpretation. If the authors had retained all of the GC4 collection and simply put more material beside it, a downstream gain could easily reflect having more training material available. Removing a random portion of GC4 makes the experiment about allocating a comparable volume across different sources. What the encoder gains is exposure to more domains. What it gives up is exposure to some of the formal web material it would otherwise receive. The observed scores describe the outcome of both sides of that replacement.
The matched base results favor the broader corpus on the reported aggregate and on a range of task types. The formal results are important because they broaden the evidence beyond the simple expectation that domain exposure helps evaluations from the same domain. The broader corpus does well on literary and clinical examples, and on formal entity recognition and GermanQuAD F1. The effect is therefore broader than any individual domain-matching example in the benchmark. GermanQuAD exact match shows how even that statement depends on identifying the metric.
The large pair supplies a check on how stable the pattern is across capacities. The aggregate advantage persists, but the task-level order changes on GermanQuAD F1 and TS. Other tasks, such as GE18 and DROC, continue to favor V. It would be too strong to assign the reversal a mechanism from these comparisons. The paper suggests that the relevance of particular pretraining domains can vary for larger encoders. The results establish the variation in performance under the tested settings. An explanation in terms of how representations change would require evidence about those representations or tighter control over the sources.
There is no experiment that adds domains one at a time. The paper also gives no paired run in which the translated content is removed while the native German domain text remains, or in which the Wikipedia-like filtering is varied while corpus composition is otherwise held fixed. The matched comparison therefore estimates the combined effect of building and using the broader corpus. A gain on DROC is consistent with a contribution from fiction. Assigning a magnitude to that contribution would require its own comparison.
Which base gains are supported by the significance test
The paper reports a t-test for GeBERTa Q base and GeBERTa V base. A t-test uses observed variation to assess evidence about a performance difference under a stated null hypothesis. The appendix describes a directional comparison with the null phrased in terms of poorer performance for V base. Under the paper’s threshold of p-value < 0.05, it reports statistical relevance for 5/8 datasets. The test adds a measure of how discernible the base differences are under the authors’ evaluation procedure.
The reported p-values are 0.04 for GE14, <0.01 for GQuAD, 0.01 for GE18, 0.04 for GRAS, and <0.01 for DROC. Thus the comparisons that meet the threshold include formal, informal, medical, and literary tasks. That distribution gives the central result more support than a change concentrated in one domain would provide. The appendix gives GQuAD one p-value for the dataset. The score table gives two GQuAD metrics, so the test entry should be read at the level at which the paper reports it.
The other p-values are 0.42 for TS, 0.30 for GGP, and 0.27 for JS. Their mean test scores favor V base, while the significance test provides weaker evidence for those individual comparisons. TS and GGP have close means. JS has visibly variable scores across runs. This is a reason to keep several pieces of the result together: the direction of the mean answers which system scored higher in the reported experiment, the size of the scores describes the observed difference, and the significance test addresses the evidence for that difference given variation.
The p-values describe the tested system pairs. They do not identify which parts of the corpus account for a difference. They also cannot transfer the base comparison's statistical finding to the large pair. The paper's ranking at large size rests on its reported means and variations. Those are useful to see, especially where the order changes between tasks, while the formal test described in the appendix concerns the base variants.
Variation in the evaluation itself
The authors noticed that GE18 validation F1 was a poor guide to its test F1. They associate that behavior with the limited number of examples from underrepresented classes. Under such conditions, even a stratified validation split has relatively few chances to test how a classifier handles the rare categories. A choice of settings can look good on those examples and fare differently on the next set of examples. That makes the design of the evaluation part of the interpretation of the pretraining result.
The reported standard deviations are visibly different for the two informal benchmarks. GeBERTa V large, for example, has a test standard deviation of 1.86 on GE18 and 0.53 on TS. The paper describes this wider variation on GE18 across the systems evaluated. The smaller variation on TS shows that an informal task can offer more stable measurements under the same broad training and evaluation procedure. Since the tasks test different labels, the more stable benchmark adds evidence about performance on tweets without duplicating what GE18 measures.
There is a related comparison among the medical tasks. GGP and GRAS use the same broad annotation scheme, and both require long predicted spans. GGP uses oncology guidelines, while GRAS uses synthetic cases. The broader corpus helps the matched base system more on GRAS in the reported means, and the significance test reaches the authors’ threshold on GRAS. This indicates that the kinds of inputs to which an annotation scheme is applied can matter for the measured effect of pretraining. The common label scheme makes that difference easier to see, even though dataset size and other properties also vary.
Limitations
Limits the authors identify
The authors explicitly raise the energy cost of pretraining large encoders and the potential carbon footprint of the required computation. They suggest that a more effective corpus and architecture could deliver competitive performance with a smaller encoder. The empirical basis is a comparison of benchmark performance at different sizes. It supports a possibility about the resources needed to reach a given score. The paper gives no measured energy savings or emissions reduction for producing the encoders and their corpora.
The authors also emphasize a limit on transferring their data collection method to languages with fewer resources. The German mixture draws heavily on automatic translation and filtering of existing collections. The introduction attributes roughly 74% of the dataset to those routes. Even so, they depend on having something suitable to translate, a translator for the relevant languages, a large enough crawl to search, and examples that guide the filter. In a language setting where those ingredients are scarce, applying the same procedure can be considerably harder.
The collection account acknowledges a tradeoff in quality. Automatic translation, crawl filtering, and social media provide material that might be difficult to obtain by hand. They can also bring errors, less polished prose, and text whose domain label comes from a similarity score. The authors judge the resulting corpus through downstream performance. Their evidence concerns whether the additions were useful in the tested combination. The collection procedure leaves open how their usefulness relates to fluency, authenticity, and the accuracy of individual documents.
There are evaluation limits the authors identify in their task descriptions and results. GE18 shows substantial variability and a weak connection between validation and test results. For JS, the authors can assemble examples from only part of the intended book collection. Some earlier results also cannot be reproduced under their averaging procedure. These details matter when comparing absolute scores. The benchmark makes the procedure more consistent across the systems it reruns, while published figures from other procedures can describe a different selection of runs or examples.
Limits of what the experiment can distinguish
“Quality-focused” and “variety-enhanced” describe how the corpora were assembled. The experiment changes a group of properties together. It changes genres, sources, the share of translated material, and the amount of GC4. The vocabulary is then learned from the resulting collection. Each change could affect how the encoder sees a sentence during pretraining. The measured gain attaches to that bundle of choices. The study gives limited grounds for ranking diversity against an independent measure of text quality, because it does not vary those properties independently.
The tokenizer is a particularly important part of this interpretation. At a matched size, the vocabulary budget is fixed but the corpus used to learn the vocabulary differs. A term that becomes easier to represent in one vocabulary could improve the system's handling of particular kinds of inputs. Equally, a gain could come from seeing those inputs in their surrounding contexts during masked training. This design measures what happens when each corpus is used with its natural accompanying tokenization procedure. A shared-tokenizer experiment would address a narrower causal question.
Several useful distinctions also remain open inside the broader mixture. The significance results support gains on some tasks after the sources are added together. They do not show whether translated medical text matters more than the filtered German crawl, whether source balance matters more than the total amount of medical text, or whether improvements in formal tasks can be traced to particular additions. The large comparison reinforces the need to qualify broad causal claims. The direction of a change can differ between two sizes even when the corpus names and the task remain the same.
The size progression has a further design limit. A base and large Q–V pairing is available, but only the V corpus is used at xlarge size. That configuration also has a larger vocabulary and a wider hidden representation. Its benchmark score is evidence for the combined setup. A Q xlarge run would be needed to test the corpus contrast at that size. Separately, an experiment controlling vocabulary across the size configurations would help identify how much of the observed progression accompanies network capacity.
The external baselines help establish practical performance and provide weaker evidence about individual causes. The authors attribute some improvements, especially on question answering and entity tasks with long spans, to DeBERTa. Their results make that interpretation plausible because Q base is already competitive. An architecture comparison with the same data, vocabulary, training budget, and evaluation would be required to measure the architecture’s contribution on its own. Similarly, similar benchmark aggregates for a base GeBERTa and older large encoders cannot establish the costs of reaching those results once corpus preparation and training are included.
The benchmark also samples transfer unevenly. There are formal, informal, medical, and literary evaluations, with multiple medical tests and no standalone legal evaluation. Positive results in the aggregate cannot establish performance on legal cases or statutes. The clinical tasks use annotated guidelines, synthetic clinical cases, and textbook examples. Their results concern those evaluation conditions. Demonstrating performance on the German clinical records that motivated some of the collection work would require evaluation on such records.
Overlap between pretraining sources and evaluation material is another point the setup leaves unresolved. German Wikipedia appears in the training collection and underlies formal benchmark passages. The pretraining inventory includes oncology guideline material, while one medical benchmark is drawn from clinical oncology guidelines. A shared source family on its own establishes neither repeated passages nor contamination of scores. The corpus deduplication described in the paper addresses repetition within and among training sources. The paper reports no separate passage-level train–test overlap analysis that would establish whether benchmark texts or close variants appeared during pretraining.
Finally, the results concern an encoder adapted to labeled downstream tasks. The discussion proposes that generative systems might also benefit from a comparable multilingual data collection strategy. That is an extension of the question, since free generation changes the training objective and the evaluation. The present evidence shows what happened when the authors changed the source mixture for DeBERTa encoders and measured their fine-tuned German task performance.
What came after
German encoder design and pretraining corpora
Later work citing the study addresses related questions about architecture, data curation, domain specialization, and application. The forms of connection differ. A study can use GeBERTa to frame a choice about German encoder training, cite it as evidence that specialist data is worth collecting, or discuss it when motivating a particular task. The subjects of these papers establish those points of contact. The exact uses of GeBERTa checkpoints, corpora, or evaluation procedures are unspecified.
One later study compares ModernGBERT, a German encoder trained from scratch, with encoders converted using LLM2Vec. The comparison puts the starting point for a German encoder at the center of the design question. The GeBERTa study holds the encoder family fixed within its strongest corpus comparisons and changes the training material. This later comparison concerns another choice facing someone building a German encoder: whether to train it from the beginning or obtain it by converting an existing system. The two questions meet in the effort to understand which decisions account for a German encoder’s downstream performance. New Encoders for German Trained from Scratch
KletterMix takes German pretraining data itself as the subject of its full report, with an explicit emphasis on high-quality material. That makes it a continuation of the corpus-building problem that motivated the GeBERTa comparison. GeBERTa uses a quality-focused preparation as a reference point while testing additions that broaden the mixture. KletterMix’s stated focus brings attention back to the preparation and selection of German pretraining material. Its citation establishes that the earlier comparison belongs to the background of this work. The title and citation leave the relationship between its selection procedure and GeBERTa’s recipe unspecified. KletterMix
From mixed-domain training to focused applications
The German medical pretraining study The Word and the Way examines strategies for domain-specific BERT pretraining. Its scope follows one branch of the problem GeBERTa raises. The earlier paper asks whether medical material can contribute to a broadly useful German encoder alongside informal, legal, and literary writing. The medical study centers the pretraining decision on German medical language processing itself. That shift changes which outcomes are most relevant. A specialist study can organize its comparison around the needs of medical text, while GeBERTa's medical results sit within an evaluation spanning several domains. The Word and the Way
The study of ideology prediction in German political texts takes the discussion into a particular classification application. GeBERTa’s evaluation includes classification of tweets and medical cases, giving examples of how general pretraining can be assessed after an encoder is adapted to a labeled German task. Political ideology prediction concerns another kind of label and another kind of input. Its citation connects the application to earlier German encoder research, while leaving which systems and training resources it used unspecified. The task also illustrates the difference between broad coverage as a design goal for pretraining and the evidence needed to establish performance in one particular domain. Ideology Prediction of German Political Texts
Cite
Cite as Amin Dada, Aokun Chen, Cheng Peng, Kaleb Smith, Ahmad Idrissi-Yaghir, Constantin Seibold, Jianning Li, Lars Heiliger, Christoph Friedrich, Daniel Truhn, Jan Egger, Jiang Bian, Jens Kleesiek and Yonghui Wu. 2023. On the Impact of Cross-Domain Data on German Language Models. Findings of the Association for Computational Linguistics: EMNLP 2023.
@inproceedings{dada2023impact,
title = {{On the Impact of Cross-Domain Data on German Language Models}},
author = {Amin Dada, Aokun Chen, Cheng Peng, Kaleb Smith, Ahmad Idrissi-Yaghir, Constantin Seibold, Jianning Li, Lars Heiliger, Christoph Friedrich, Daniel Truhn, Jan Egger, Jiang Bian, Jens Kleesiek and Yonghui Wu},
booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2023},
year = {2023},
doi = {10.18653/v1/2023.findings-emnlp.922},
url = {https://doi.org/10.18653/v1/2023.findings-emnlp.922}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dada-2023-impact-cross-domain-data-german/