---
title: "EstBERT: A Pretrained Language-Specific BERT for Estonian"
description: "EstBERT learns from Estonian text and is tested against multilingual BERT and Estonian WikiBERT on tagging, classification, and parsing."
canonical: "https://research.elamur.ai/free/en/papers/tanvir-2021-estbert-pretrained-language-specific-bert/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/tanvir-2021-estbert-pretrained-language-specific-bert/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / EstBERT: A Pretrained Language-Specific BERT for Estonian

# EstBERT: A Pretrained Language-Specific BERT for Estonian

Paper · 2021 · Hasan Tanvir, Claudia Kittask, Sandra Eiche et al.

**Authors:** Hasan Tanvir, Claudia Kittask, Sandra Eiche and [Kairit Sirts](https://md.research.elamur.ai/free/en/authors/kairit-sirts/) · **Year:** 2021 · **Venue:** Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **25** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/tanvir-2021-estbert-pretrained-language-specific-bert/cited-by/) · Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.nodalida-main.2/)
- [PDF](https://aclanthology.org/2021.nodalida-main.2.pdf)

## Summary

A multilingual system can already help label Estonian text, even when there are relatively few annotated examples for the task at hand. Would it help to train a system specifically on Estonian? The authors test that question with EstBERT, a version of [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) that learns from Estonian text before it is adapted to individual tasks. They preserve the basic BERT design and change what it reads and how its vocabulary is built. Their starting material includes newspapers, other web text, and Wikipedia. After cleaning the collection, they have 1154M words for pretraining, the stage at which the system learns from text before seeing task-specific labels.

The authors teach EstBERT to recover hidden tokens using the surrounding text and to judge whether paired passages follow one another. They first train with a maximum input length of 128 tokens, select a saved version using development results, and continue training from that version with a maximum of 512. They then adapt both versions to Estonian tasks ranging from identifying the grammatical role of a word to assigning a news extract to a newspaper section. The evaluation also asks the systems to identify people, places, and organizations, and to recover the grammatical links between words.

EstBERT beats the strongest multilingual comparison, XLM-RoBERTa, on five tasks out of seven. It leads on the three grammatical tagging tasks, on newspaper section classification, and on identifying names. Its shorter version reaches 81.70% accuracy on newspaper sections, compared with 80.34% for XLM-RoBERTa at the same input limit. XLM-RoBERTa leads in sentiment classification and dependency parsing. The Estonian Wikipedia system, WikiBERT-et, loses to EstBERT on six tasks out of seven but wins on name recognition. Its strongest result there is 90.34 F1, compared with EstBERT’s 90.11 F1. F1 combines the reliability of the names a system marks with its coverage of the names recorded in the dataset.

The advantage of Estonian-only pretraining varies by task and by the system used for comparison. Several grammatical tagging scores are already close to one another, and extending the input limit helps some outcomes and hurts others. The Wikipedia comparison suggests that the amount and mix of Estonian pretraining text matter, although the study changes both together. The name recognition results make that distinction especially important. The authors suggest that Wikipedia may provide a relatively rich record of organization names, and they find errors in the reference labels that could affect close comparisons.

## Deep dive: EstBERT: A Pretrained Language-Specific BERT for Estonian

EstBERT learns from Estonian text and is tested against multilingual BERT and Estonian WikiBERT on tagging, classification, and parsing. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Learning from text before learning a task

To train a system to identify an organization name in a newspaper story, a researcher needs examples of what counts as a name and where it begins and ends. The same newspaper can supply text for a different kind of exercise without that annotation. Hide part of a sentence, let the system attempt to recover it, and use the original text to check the answer. The name recognition task and the word recovery exercise ask different questions, but both can benefit from a representation that registers how the words in a sentence relate to one another. EstBERT is an experiment in what that transfer can deliver for Estonian.

The paper places this approach in the line of work on [language models and pretraining](https://md.research.elamur.ai/free/en/topics/language-models/) represented by BERT and [ELMo](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/). The general procedure is to learn from a large collection of text and then adjust the resulting system for a particular job. The second stage is called [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). In the EstBERT study, this means modifying the pretrained parameters together with a task-specific component. A classifier trained to recognize names can therefore change the underlying representation as well as learn how to turn it into a name label.

The distinction between access to raw text and access to labeled text matters for [low-resource languages](https://md.research.elamur.ai/free/en/topics/low-resource-languages/). An Estonian collection can contain substantial amounts of writing while offering relatively few datasets in which someone has marked sentiment, grammatical features, or other properties. Pretraining gives those downstream datasets a different role. Their examples specify what to predict and how to judge the prediction, while much of the work of learning recurrent patterns from text happens beforehand. The paper treats both kinds of scarcity seriously. It needs a large enough collection for pretraining, and it needs annotated data varied enough to tell whether the result transfers.

#### Why test a dedicated Estonian system?

The Estonian starting point was stronger than the absence of a dedicated large pretraining effort might suggest. The authors describe previous work by Kittask and colleagues that evaluated systems from [multilingual and cross-lingual NLP](https://md.research.elamur.ai/free/en/topics/multilingual-nlp/) on Estonian tasks. A multilingual system learns from texts in several languages, with Estonian forming part of that training input. The earlier Estonian experiments examined grammatical tags, name recognition, and news classification. As the authors characterize the results, pretraining across languages had already improved performance over systems that did without this stage on many of the tasks. There was thus an established multilingual approach worth testing against.

EstBERT asks whether training for one language gives an additional benefit once that stronger starting point is available. The comparison addresses two practical choices. One is to take a system already pretrained on several languages and adapt it to Estonian annotations. The other is to invest in preparing a large Estonian collection, deriving a vocabulary specifically from that collection, and running pretraining from the beginning. The latter gives each piece of the pretraining pipeline an Estonian focus. Any gains need to be interpreted in light of the fact that the recipe changes several things at once.

Research on other languages motivated the question. The authors cite dedicated French efforts such as [CamemBERT](https://md.research.elamur.ai/free/en/papers/martin-2019-camembert-tasty-french-language-model/) and [FlauBERT](https://md.research.elamur.ai/free/en/papers/le-2019-flaubert-unsupervised-language-model-pre/), and Dutch work including [BERTje](https://md.research.elamur.ai/free/en/papers/de-vries-2019-bertje-dutch-bert-model/) and [RobBERT](https://md.research.elamur.ai/free/en/papers/delobelle-2020-robbert-dutch-roberta-based-language/). The closest procedural precedent is [FinBERT](https://md.research.elamur.ai/free/en/papers/virtanen-2019-multilingual-enough-bert-finnish/). The EstBERT authors draw on the Finnish work when deciding how to filter text and how long to train. These studies supply a reason to investigate language-specific pretraining for Estonian while leaving the Estonian comparison to be settled on its own data.

The review of earlier work also gives a reason to separate downstream tasks. The paper cites aggregated comparisons in which the average advantage of dedicated BERT systems ranges from 0.70 accuracy points for paraphrase identification to 6.37 accuracy points for sentiment classification. Those are figures from prior work across languages. They motivate an evaluation broad enough to show whether specialization helps some kinds of decisions more than others. EstBERT’s tasks make that variation visible rather than compressing it into a single number.

#### What the Estonian comparisons can reveal

There was also a dedicated Estonian system trained on Wikipedia, WikiBERT-et. Its presence creates a comparison with Estonian pretraining on both sides. EstBERT reads a larger collection drawn from a wider range of sources. This comparison can show whether a system built with that broader recipe offers something beyond a dedicated Wikipedia system. Because the collections differ in composition as well as size, the comparison also creates room for a task on which Wikipedia’s particular content matters more than the larger collection.

The authors reuse tasks from the previous multilingual study so that EstBERT’s results can be read against existing measurements. Among them are [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/), which identifies a word’s grammatical category, and tagging for [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), the grammatical information expressed by its form. [Named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/) marks passages referring to people, locations, and organizations. In [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/), the system assigns a label to a whole news extract. The paper also adds [dependency parsing](https://md.research.elamur.ai/free/en/concepts/dependency-parsing/), which identifies grammatical links between words and the type of each link.

These tasks turn a broad question about Estonian support into several concrete ones. A tagger must make a decision for each word. A name recognizer has to recover a span and a category. A news classifier produces a single judgment for a passage, whether it concerns sentiment or the newspaper’s editorial section. A parser has to connect words into a grammatical structure, so knowing what kind of word each token is only addresses part of the problem. Giving the same pretrained system these jobs tests how well its representations adapt at different levels of the text.

### The method, step by step

#### From a mixed corpus to a training collection

The process starts with the Estonian National Corpus 2017. The authors describe it as the largest Estonian text collection available when they began. It combines the Estonian Wikipedia Corpus 2017 and the Estonian Reference Corpus 1990-2008 with two web collections, the Estonian Web Corpus 2017 and its 2013 counterpart. The web collections account for the largest share of the material. The reference corpus contributes about 242M words, with about 75% of its material from newspapers and the remaining 25% from fiction, science, and legislation. The Wikipedia component contributes roughly 38M words. This is a mixture of sources and genres before the authors make any decisions about which documents to retain.

Cleaning begins by removing document markup and filtering by language. The authors use [EstNLTK](https://md.research.elamur.ai/free/en/papers/laur-2020-estnltk-1-6-remastered-estonian/) to strip XML and HTML tags and exclude documents whose language labels identify them as something other than Estonian. They use a separate language detection library to find further documents to exclude. The two checks use different information. One uses the language already recorded with the document. The other estimates the language from the document itself.

The next step removes duplicate documents. To compare them, the authors lower-case each document and compute a hash, a compact value used here as a key for detecting repetition. They maintain a set of hashes they have already encountered and retain the first document associated with each value. The lowercasing in this step makes differences of letter case irrelevant to duplicate detection. The retained text then goes through a separate casing procedure before it is used to build the vocabulary.

The authors apply hand-written filters taken from the Finnish pretraining work. The filters can reject documents with too few words or unusually many stopwords or punctuation marks. Stopwords in this context are common items used in the filtering rules. The authors carry over the Finnish thresholds as they are. The intent is to screen a large web-heavy collection for documents that look unsuitable as running text while keeping the filtering procedure practical at corpus scale.

Finally, they truecase the retained text, adjusting upper-case and lower-case according to an analysis of the words. EstNLTK produces a lemmatized copy, in which an inflected word is associated with a dictionary form called a [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/). The authors use the capitalization of that form to decide the case of the corresponding item in the original text. The copy supplies information about casing while training still proceeds on the original word forms with adjusted case. Thus a grammatical ending remains part of the text from which EstBERT learns. The authors’ purpose is to reduce the number of capitalized forms competing for places in the vocabulary.

The corpus initially contains 3.9M documents, 87.6M sentences, and 1340M words. After the cleaning and filtering, it contains 3.3M documents, 75.7M sentences, and 1154M words. These counts describe the material before its conversion into pretraining examples. They give the scale of the change across the pipeline as a whole. The paper reports the starting and ending counts, so the figures describe the combined effects of language filtering, duplicate removal, and the other cleanup decisions.

How the authors trained and adapted EstBERT The steps in order.

#### From cleaned text to prediction examples

A word in the cleaned corpus need not become a single unit in the system’s input. The authors use [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/), in which an input word can be represented by pieces drawn from a fixed vocabulary. This lets forms share pieces even when they appear as different words in the raw text. Vocabulary construction is part of the Estonian specialization because the inventory of reusable pieces is derived from the Estonian corpus.

The paper describes WordPiece as the original BERT tokenizer and explains its choice of the BPE tokenizer in SentencePiece as an available open-source alternative close to it. BPE, or byte pair encoding, here produces an inventory of text pieces for representing the corpus. The resulting vocabulary contains 50K sub-word tokens. This is a count of entries in the vocabulary, while the earlier corpus counts describe occurrences of words in the training material. The two counts characterize different stages of the preparation.

The authors use the original BERT utilities to write the pretraining examples in TFRecord format. They divide the data into four shards, or separately stored portions, to support parallel training on four GPUs. They prepare examples separately for an input length of 128 and an input length of 512. In each case the masking rate is 15%. The settings allow up to 20 masked predictions per sequence in the shorter examples and up to 77 in the longer ones. These are limits used to construct examples and configure training. They describe how much of an input can supply prediction targets.

The first training exercise is masked language modeling, abbreviated MLM. Some tokens are selected for prediction, and training rewards assigning higher probability to the original tokens at those positions. The context for a prediction can include words on both sides of the missing material. A word that could take several forms may become easier to identify when the words that come after it are visible along with the words that come before it. This use of both directions is why the paper describes the representation as bidirectional.

The second exercise is next sentence prediction, abbreviated NSP. In half the examples, the second sequence follows the first in the source text. In the other half, the two sequences are unrelated. The system predicts which relation holds. MLM supplies targets at selected token positions. NSP supplies a decision about the pair of sequences as a whole. Both targets can be derived during example construction, allowing the authors to use the large pretraining collection without assigning grammatical, sentiment, or entity labels to its text.

#### Architecture, optimization, and saved checkpoints

EstBERT follows the BERT Base architecture. The paper describes 12 [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) blocks with 768 hidden units per block and reports 110M trainable parameters. A block produces representations of the input tokens using information from the surrounding sequence. Repeating the operation through successive blocks gives the final layer representations that the downstream classifiers can use. The authors’ intervention centers on the training material, vocabulary, and training schedule within this established design.

Pretraining runs on four NVIDIA Tesla V100 GPUs distributed across two computing nodes at the University of Tartu. The shorter input configuration comes first. It uses a training batch size of 32, an input limit of 128, and up to 20 predictions for masked positions in a sequence. Batch size is the number of examples grouped for an update in the reported configuration. The authors choose 32 to fit the training computations within available GPU memory.

The shorter configuration runs in two phases of 900K steps each. The first starts with randomly initialized parameters. The second resumes from the last checkpoint of the first. A checkpoint is a saved state of the system’s learned parameters at a particular point in training. The authors link the phase length both to the Finnish precedent and to the amount of training that fit within an 8-day GPU allocation. They report around 192 hours for each phase. The division into phases therefore reflects the training budget as well as the schedule the authors had intended to follow.

For these phases they use Adam with weight decay, following BERT Base. The learning rate governs the size of parameter updates. It rises during warmup to a peak of 1e-4. The warmup is the first 1% of the phase, reported as 9000 steps. The authors save a checkpoint every 50K steps. Saving along the way lets them evaluate the effect of continuing pretraining even when the final version for a given input length may turn out to come from an earlier step.

#### Selecting the shorter and longer versions

A checkpoint can be judged by whether it performs its original training exercises well, or by how well it adapts to a labeled task. The authors use both kinds of evidence. For each checkpoint, they examine MLM and NSP and also fine-tune on the downstream tasks available for validation. This gives them development performance for grammatical tags, names, and classification in addition to measures tied directly to pretraining. The paper illustrates how development results change over the saved checkpoints with curves for universal grammatical tags and newspaper rubric classification.

For the tagging and name recognition checks, the authors use HuggingFace Transformers scripts. A randomly initialized fully connected layer reads the last hidden layer’s token representations and predicts labels. The checkpoint validation uses the scripts’ default settings of three epochs, a learning rate of 5e-5, and a batch size of 8. An epoch is a pass through the task’s training data. The classifier learns the output categories while the pretrained part also adjusts to the labeled examples.

News classification uses the sequence representation associated with the special first token, `[CLS]`. The authors adapt Google’s BERT classification scripts for these validation runs. The representation at `[CLS]` goes into a randomly initialized fully connected layer that predicts a document label. Validation once more runs for three epochs with batches of 32 and a learning rate set to 5e-5. In both families of tasks, performance measures how well the whole system adapts after the classifier is added. It does not measure what a classifier could extract from representations kept fixed throughout training.

The authors compare eighteen checkpoints from each phase of short-input training. They describe development performance as generally improving with more pretraining steps and select the checkpoint at 750K steps in the second phase. They report that it performs slightly better across the tasks they use for selection. This checkpoint becomes the final EstBERT version with the 128-token limit and also supplies the starting parameters for the longer input configuration.

For the 512-token configuration, pretraining continues for up to 600K steps. Longer inputs mean larger tensors, the arrays used for training computations, so the authors reduce the batch size to 16. The configuration allows up to 77 masked predictions per example. It uses 6000 warmup steps, a peak learning rate of 1e-4, and checkpoint saves every 50K steps. The authors repeat the validation procedure and choose the endpoint at 600K steps as the final longer version.

The two checkpoints are related by construction. The longer system inherits the training of the selected shorter one and then receives more updates under a different input and batch configuration. Each version can subsequently be adapted to the same task. The paper makes EstBERT available through HuggingFace Transformers, so the output of the pretraining effort is a reusable starting point for tasks beyond those used to select the checkpoints.

### Experiments and results

#### Datasets and the comparison procedure

The main evaluation measures what happens after fine-tuning. Each task has examples for training, examples for development decisions, and a test set for the final comparison. The study takes over the setup of the earlier Estonian multilingual evaluation where possible. This choice gives the scores a shared basis in dataset splits, preparation, and evaluation conventions. For the parsing experiment, which the earlier study lacked, the authors set up a separate comparison.

The general classification and tagging evaluation tunes the learning rate for AdamW and the batch size on the development set. The learning rate candidates are 5e-5, 3e-5, 1e-5, 5e-6, and 3e-6. The batch size candidates are 8 and 16. Early stopping uses a patience of 10 epochs. This procedure uses development performance to decide which run or training point advances to test evaluation. It differs from the fixed settings that made it possible to evaluate many pretraining checkpoints during selection.

EstBERT is compared with multilingual BERT, abbreviated mBERT, and XLM-RoBERTa, the strongest multilingual system in the earlier Estonian experiments. The authors take the multilingual results for the shared tasks from those experiments and fine-tune WikiBERT-et under the setup used for EstBERT. Results for the shared tasks are reported for both input limits. The paper uses [evaluation benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/) that span different units of prediction, so the meaning of a score depends on the task. A correct word tag, a recovered entity, and a correct dependency link are distinct outcomes.

#### Grammatical tags on the Estonian treebank

For grammatical tagging, the authors use the EDT part of Estonian [Universal Dependencies](https://md.research.elamur.ai/free/en/concepts/universal-dependencies/) at version 2.5. A treebank pairs sentences with [linguistic annotation](https://md.research.elamur.ai/free/en/concepts/annotation/), or information recorded about the words and their structure. This one includes lemmas, part-of-speech tags, morphological features, and dependency annotations. Its prescribed splits comprise 31,012 sentences and 344,646 tokens for training, 3128 sentences and 42,722 tokens for development, and 6348 sentences and 48,491 tokens for testing. Using the same version and splits as the earlier experiments supports the intended comparison with multilingual pretraining.

The study separates universal part-of-speech tags, or UPOS, from Estonian-specific part-of-speech tags, or XPOS. UPOS expresses a scheme shared across languages. XPOS uses the language-specific annotation scheme. Morphological tagging is evaluated separately and concerns grammatical features associated with word forms. The same treebank supports all these tasks and the parsing experiment, while each score answers a separate question about the annotations a system predicts. The authors score the tagging outputs with the Universal Dependencies evaluation script from the CoNLL 2018 Shared Task.

On the test split, EstBERT with the 128-token limit records 97.89% UPOS accuracy, 98.40% XPOS accuracy, and 96.93% morphological tagging accuracy. The 512-token version records 97.84% for UPOS, 98.43% for XPOS, and 96.80% for morphology. Thus the highest XPOS score comes from the longer version, while the highest UPOS and morphology scores come from the shorter one. EstBERT is ahead in every tagging column when the other systems are compared under the corresponding input limit.

The difference depends on the comparator. At the 128-token limit, WikiBERT-et and XLM-RoBERTa each score 97.78% on UPOS and 98.36% on XPOS. On morphology at that same limit, WikiBERT-et records 96.71% and XLM-RoBERTa records 96.53%, while mBERT records 96.24%. These scores give some substance to the overall finding of an EstBERT lead. The absolute tagging accuracies are already high, so a consistent ordering in the table can coexist with a narrow separation between the strongest systems.

The authors also discuss relative error reduction, which expresses the gain against the baseline’s remaining errors. They report a range of 16-18% for EstBERT against mBERT across the tagging comparisons. Against XLM-RoBERTa they describe smaller reductions, in the range of 2-5%, and single out short-input morphological tagging, for which they report 12%. The relative view is most informative alongside the underlying accuracy. It shows how much of an already limited error count the stronger tagging system removes.

#### Newspaper rubrics and sentiment

The Estonian Valence corpus contains 4085 extracts from Postimees Daily as described by the paper. Each extract has a rubric and a sentiment label. A rubric is an editorial category, with examples including Opinion, Crime, Sports, and Culture. Sentiment concerns the polarity attributed to the paper. The paper lists Positive, Negative, Neutral, and Ambiguous as the original sentiment labels. The two tasks use the same source text with different targets, so a system can perform well at identifying the kind of material a newspaper published while finding its polarity harder to judge.

The authors describe a 70/10/20 split into training, development, and test data, stratified over both kinds of labels. Stratification takes the label distributions into account when assigning examples to splits. The original sentiment statistics already show unequal category frequencies. The test counts in that description include 385 Negative and 175 Positive items, alongside 142 Neutral and 110 Ambiguous items. The authors also report a cleanup for the classification evaluation. They remove 17 duplicate items and exclude items with the Ambiguous label, following the earlier multilingual comparison. The original class counts describe the corpus splits, while the accuracy comparisons reflect the evaluation after the reported exclusions.

Rubric accuracy is the classification result on which EstBERT leads. The short-input version records 81.70% on the test data, with XLM-RoBERTa the strongest of the other systems in that column. Increasing EstBERT’s input limit gives 80.96% rubric accuracy, which still leads among the longer configurations. The ordering at the shorter limit shows that training on Estonian alone can yield quite different outcomes depending on what the Estonian system read. WikiBERT-et and EstBERT both specialize in the language, and their scores on newspaper rubrics are visibly separated.

Rubric classification on the Estonian Valence test set at the 128-token limit EstBERT leads on newspaper rubric classification, followed by XLM-RoBERTa.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| WikiBERT-et | 72.72 |
| mBERT | 75.67 |
| XLM-RoBERTa | 80.34 |
| EstBERT (this paper) | 81.70 |

Sentiment produces a different result. At the 128-token limit, EstBERT records 74.36% test accuracy and XLM-RoBERTa records 74.50%. At the 512-token limit, EstBERT reaches 74.50% and XLM-RoBERTa reaches 76.07%. The EstBERT score rises slightly with the longer configuration on this task, even though it falls on rubric classification. Its sentiment scores exceed those of WikiBERT-et and mBERT at both limits. The strongest multilingual comparison remains ahead.

Looking at both targets on the same corpus helps identify where the benefit is concentrated. Rubric classification and sentiment classification are distinct tests of what a representation can support when adapted to news. Their different rankings show that the benefit observed for editorial categories does not extend automatically to every label attached to the same text. Accuracy summarizes correct predictions across the evaluated items. It leaves open how errors are distributed among the sentiment categories.

#### People, locations, and organizations in news stories

The entity dataset comes from earlier work on [Estonian named entity recognition](https://md.research.elamur.ai/free/en/papers/tkachenko-2013-named-entity-recognition-estonian/). It consists of 572 news stories from Postimees and Delfi, covering domestic and international news. The training split contains 155,981 tokens, the development split 32,890, and the test split 28,370. Its entity types are PER for person, LOC for location, and ORG for organization. To do well, a recognizer has to mark the extent of an entity in the text and assign the appropriate type.

The authors use the CoNLL 2000 evaluation script. Entity-level precision measures how many of the predicted entities match the reference. Recall measures how many of the entities in the reference are recovered. F1 combines the two measures so that success depends on both. A recognizer can find more reference names by proposing more spans while also introducing extra predictions. The separate precision and recall figures show whether such a tradeoff accompanies a change in F1.

At the 128-token limit, EstBERT has 89.10 precision, 91.15 recall, and 90.11 F1 on the test set. WikiBERT-et achieves the best F1 with 90.34, combining 89.86 precision with 90.83 recall. XLM-RoBERTa achieves 91.19 recall in this setting, the highest recall in the column, but its precision of 87.55 accompanies an F1 of 89.34. This is a case in which the leading system depends on which aspect of recognition is examined. WikiBERT-et leads on F1 while XLM-RoBERTa recovers the greatest share of the reference entities among the shorter systems.

Entity recognition on the Estonian news test set at the 128-token limit WikiBERT-et has the highest entity F1, with EstBERT close behind.

**The numbers**

| System or setting | F1 |
| --- | --- |
| mBERT | 86.51 |
| XLM-RoBERTa | 89.34 |
| EstBERT (this paper) | 90.11 |
| WikiBERT-et | 90.34 |

WikiBERT-et also leads on F1 among the systems using the 512-token limit, with 89.61. XLM-RoBERTa reports 89.10 F1 and EstBERT reports 89.04. The latter two therefore change order when moving from the shorter configurations to the longer ones. mBERT moves from 86.51 F1 to 88.37 F1 across those settings. The overall finding that EstBERT beats the strongest multilingual comparator on entity recognition reflects the strongest scores in this experiment. The configuration matters if the question is how either system performs at a particular input limit.

#### Dependency parsing on Estonian text

The parsing comparison reuses the Estonian Universal Dependencies treebank and its test split. A dependency representation assigns each word a head, the word it is grammatically attached to, and a relation label. These are separate requirements. An attachment can point to the right head while expressing the wrong grammatical relation. The unlabeled attachment score, UAS, measures agreement on the head. The labeled attachment score, LAS, requires agreement on the head and the relation. The paper reports precision, recall, and F1 for the attachment measures and for individual relations.

The authors train the transformer-based systems using the parser in spaCy Nightly. A tagger is trained jointly with the parser, predicting a combined label made from the part of speech and the morphological features. Training uses the reference sentence and token boundaries. In evaluation, spaCy supplies those boundaries. The difference matters because the parser needs a sequence of tokens to attach, and an error in segmentation can affect the units on which the syntactic predictions are judged.

The parsing training recipe uses a batch size of 32 and a maximum of 20K steps. It stops early if development performance fails to improve for 1600 steps. The comparisons in this experiment are EstBERT, WikiBERT-et, XLM-RoBERTa, and Stanza. Stanza supplies a non-Transformer baseline trained on the same treebank. The paper adds it because the earlier Estonian multilingual work supplied no parsing result for the authors to carry over. The Stanza score is a comparison between complete parsing systems, with their own components as well as their different approaches to representing input.

XLM-RoBERTa leads the aggregate scores with 88.66 UAS F1 and 86.23 LAS F1. EstBERT records 86.70 UAS F1 and 83.94 LAS F1. WikiBERT-et has 86.60 UAS F1 and 83.67 LAS F1. Stanza records 86.68 UAS F1 and 83.63 LAS F1. The aggregate results put XLM-RoBERTa ahead and the other systems close to one another. The breakdown by grammatical relation reveals more variation than those totals suggest.

Labeled dependency attachment on the Estonian UDv2.5 test set XLM-RoBERTa leads on labeled attachment, with the other systems close together.

**The numbers**

| System or setting | LAS F1 |
| --- | --- |
| Stanza | 83.63 |
| WikiBERT-et | 83.67 |
| EstBERT (this paper) | 83.94 |
| XLM-RoBERTa | 86.23 |

Across all the evaluations, the seven tasks count universal and Estonian-specific part-of-speech tagging separately, alongside morphology, rubric, sentiment, entity recognition, and parsing. The metrics remain specific to each task. The paper’s tally therefore describes the breadth of EstBERT’s wins. The tables explain their size and identify cases where the same comparator changes position when the target, metric, or input limit changes.

### What the ablations show

The paper reports no formal ablation that removes an individual ingredient from the EstBERT recipe. Its analyses compare saved stages of training, the shorter and longer input configurations, and scores for individual entity types and grammatical relations. These comparisons help locate the strengths and weaknesses of the finished systems. Their ability to explain the cause of those differences depends on what changed between the runs.

#### Progress during pretraining and the effect of longer inputs

The short-input development curves give a view of what more optimization does within a single pretraining setup. The authors show examples for UPOS tagging and rubric classification, sampled from checkpoints saved every 50K steps. They describe the trajectory across the two short-input phases as generally improving, and their selected checkpoint at 750K steps of the second phase performs slightly better across the validation tasks than the alternatives. Saving several states lets them base this choice on the behavior of the adapted classifiers. The training endpoint serves as an additional candidate for evaluation rather than determining the selection on its own.

For the longer configuration, the endpoint at 600K steps is the chosen version. Comparing the final versions shows what the full continuation procedure contributes in practice. It provides the ability to accept a 512-token sequence, and downstream performance changes in different directions. XPOS accuracy and sentiment accuracy favor the longer EstBERT configuration. UPOS, morphology, rubric classification, and entity F1 favor the shorter one. The direction is therefore tied to the task even though both versions start from the same short-input training history.

The authors suggest that the shorter checkpoint may already have received enough training for the tasks being measured. That is one explanation for the limited gain from continuing. The comparison combines additional updates, longer examples, and a smaller batch, and the paper evaluates whole task splits. It can show the net outcome of the continuation recipe. It cannot reveal how much each change contributed or whether the longer input helps a particular subset of examples that requires more context.

#### Which entities account for the recognition results?

The entity-level analysis evaluates the shorter versions of EstBERT, XLM-RoBERTa, and WikiBERT-et by type. People are the easiest type for the systems to recognize in this test, while organizations are the hardest. EstBERT scores 95.28 F1 on people, 90.66 on locations, and 80.45 on organizations. The gap within a single system is more revealing about the kinds of entities it struggles with than the overall F1 alone. It also gives context for WikiBERT-et’s lead.

On organizations, WikiBERT-et records 82.25 precision and 81.61 recall. EstBERT records 78.38 precision and 82.64 recall on the same category. WikiBERT-et’s stronger result there comes with more reliable positive predictions and slightly lower coverage of the reference organizations. Its organization F1 is 81.92. XLM-RoBERTa scores 78.66 F1 on that type, and it also trails EstBERT and WikiBERT-et on locations. WikiBERT-et leads for both locations and organizations while the short-input EstBERT result is strong on people.

The authors propose that Estonian Wikipedia may contain organization names in a higher proportion than the other pretraining collections. Wikipedia content also appears in the data behind the other systems, but along with more genres for EstBERT and more languages for XLM-RoBERTa. This is a proposed connection between corpus composition and the precision pattern. The study gives the per-type scores and does not count exposure to organization names in comparable training samples or vary their prevalence in a controlled run. The observations establish which errors WikiBERT-et makes less often under this evaluation and give a specific hypothesis about how its training data might help.

#### Which grammatical relations account for the parsing results?

The parsing breakdown reports support for each relation, meaning how many instances of it are present in the test reference. This adds a useful scale to per-relation F1. A finding on a common relation represents many predictions, whereas a rare relation may display a large change in score after very few outcomes. The paper observes that XLM-RoBERTa often leads on relations with substantial support. Among the other systems, EstBERT frequently performs well on the common relations even though its aggregate attachment scores are close to WikiBERT-et’s and Stanza’s.

There are also specific relations for which Stanza is stronger. For the [adjectival modifier](https://md.research.elamur.ai/free/en/concepts/ud-amod/) relation, which has test support of 2411, Stanza reaches 90.57 F1. EstBERT reaches 82.05 and XLM-RoBERTa 84.73. For the [numerical modifier](https://md.research.elamur.ai/free/en/concepts/ud-nummod/) relation, with test support of 633, Stanza reaches 90.32 F1, EstBERT 83.63, and XLM-RoBERTa 88.84. These exceptions show how a system can have a lower aggregate attachment score while making a particular grammatical distinction well. The differences supply concrete targets for the further analysis the authors call for.

The per-relation results also put the tagging gains in perspective. The tagging evaluation checks whether individual words receive the right categories and features. Parsing checks how those words are connected, with the parser in this experiment also learning a related tagging task. Good grammatical tags can coexist with differences in structural predictions across systems. The strongest tagging and strongest attachment results in this study belong to different systems, so the empirical benefits need to be tracked at the level at which the downstream task is scored.

### Limitations

#### Limits the authors identify

The authors describe sparse labeled resources as a major constraint on evaluation. The Estonian treebank provides several kinds of grammatical annotation in one place. For semantic tasks, the available choices are more limited. The study uses a news corpus for both rubric and sentiment classification, so the semantic side of the evaluation depends heavily on the labels available in that collection. The authors mention a recently available Estonian dataset for [coreference resolution](https://md.research.elamur.ai/free/en/concepts/coreference-resolution/), the task of identifying expressions that refer to the same thing, as scope for further evaluation. The experiments reported here cover no such task.

The authors also qualify the quality of the Estonian Valence labels. They say the labels were derived semi-automatically from user ratings, which leaves uncertainty about the annotations. The evaluation removes ambiguous items in line with the earlier multilingual study. This makes the results comparable under the same processing choices. It also means the sentiment scores concern a version of the task with the explicitly ambiguous items excluded. There remains a distinction between reproducing the recorded labels and resolving the kinds of polarity judgments for which readers might disagree.

For entity recognition, the authors find incorrectly marked entity boundaries and entities left unlabeled. A sequence for a person name can start with `I-PER`, the label for continuing a span, where `B-PER`, the label for beginning one, is expected. They also notice text containing a name with no corresponding entity annotation. These problems directly bear on the scoring. A prediction of a real name can disagree with the reference when it is missing from the annotations, and malformed boundary labels complicate judgments about which exact span should match. The authors have no estimate of how common such errors are. They therefore caution against reading too much into small score separations in this dataset.

A further limitation concerns casing. EstBERT is pretrained on truecased text, while the annotated downstream datasets retain their original casing. The authors suggest that applying the same casing treatment before fine-tuning might help and describe comparing that workflow with the reported results as a way to test the idea. Casing can affect the input form of the same word, and the pretraining vocabulary was built after the casing adjustment. The paper provides evidence for the workflow it actually uses. The proposed alignment of casing across the stages has no measured result here.

The authors also discuss what was available for pretraining. They describe the Estonian National Corpus 2019 as a more recent and larger collection and suggest Oscar Crawl and the Estonian portion of the raw data from CoNLL 2017 as potential additional resources. They expect some overlap among the sources. These collections represent potentially available text, with the size of the useful increase dependent on the overlap and the treatment of duplicates. The study establishes what the Estonian National Corpus 2017 recipe can support and leaves the effect of the larger collection open.

#### Limits imposed by the comparisons

The closest the paper comes to a test of pretraining data volume is the comparison with WikiBERT-et. Both systems specialize in Estonian, and EstBERT wins on six tasks out of seven. The comparison changes the kinds of documents as well as the amount of text. The Wikipedia contrast supports the authors’ suggestion that more pretraining text can improve transfer across tasks. A strict estimate of the effect of quantity would require a comparison that varies the amount of text under a fixed recipe and composition. The entity result offers a reason to care about this distinction, because the smaller and more focused collection accompanies the strongest performance there.

The multilingual contrast likewise compares complete training recipes. Moving from mBERT or XLM-RoBERTa to EstBERT changes exposure to other languages at the same time as the composition of the corpus and the way input units are chosen. EstBERT demonstrates that one dedicated Estonian recipe can be competitive with multilingual systems and can outperform them on much of this task suite. The experiment leaves open how much of each difference comes from language specialization, vocabulary construction, or other training choices. This matters most for comparisons where the final scores are close.

The shorter and longer versions raise a related issue about input length. A longer maximum can matter only when a task can use evidence supplied by that larger input. The study reports scores by overall configuration, without a breakdown by example length or by how much relevant context each example needs. The training batch also changes, and the longer configuration receives additional pretraining. The results help a reader compare these two available versions for the evaluated tasks. They offer limited evidence about the value of longer context as an independent variable.

The metrics put further boundaries on interpretation. Classifier accuracy measures the fraction of correct decisions in the evaluated corpus. In the sentiment task the label distribution is uneven, so that metric leaves performance on individual classes unresolved. For name recognition, the per-type analysis helps distinguish which classes account for differences, with the reference quality caveat applying to that analysis as well. For parsing, the per-relation analysis improves on reading a single aggregate score, but relation support varies widely. The paper supplies individual scores and author observations. It does not report variation across training runs or statistical uncertainty for the comparative rankings.

The tested domains also constrain the broad claim about Estonian. News supplies the entity dataset and the two classification targets. The treebank supplies the grammar and parsing assessments. That range gives the authors several separate examinations of transfer but still leaves tasks and text types outside the study. Furthermore, the parsing evaluation includes segmentation and a jointly trained tagger, so its scores measure the assembled parser under these conditions. Differences there can reflect interactions among components as well as the choice of pretrained representation.

The authors’ proposal to initialize an Estonian RoBERTa from XLM-RoBERTa reflects the small gaps between the two systems and the multilingual system’s wins. Their idea is to continue from a system that already handles Estonian well and expose it to more Estonian text, aiming to retain the benefit of multilingual pretraining while improving its focus on Estonian. The paper offers this as a next experiment. Its reported results come from EstBERT and the systems used for comparison, so they establish the motivation for the proposed combination without measuring its outcome.

### What came after

#### From established Estonian tasks to new evaluation settings

The later citing work takes up a question EstBERT leaves open. Once Estonian pretraining is available, what kinds of Estonian text and what kinds of labels should be used to evaluate language processing? Some studies stay close to tasks in the original evaluation and change the data. Others move to decisions about meaning, such as choosing a plausible cause or effect. The paths below trace those changes in task and domain. A citation establishes a connection to EstBERT while leaving open whether the citing study used its weights, treated it as a baseline, or discussed it as precedent.

Two studies develop the name recognition problem in different directions. [Estonian Named Entity Recognition: New Datasets and Models](https://md.research.elamur.ai/free/en/papers/sirts-2023-estonian-named-entity-recognition-new/) focuses on expanding the available datasets and systems for the task. That is a direct continuation of the evaluation problem in EstBERT, where small differences were measured against a news dataset with known annotation defects. A wider evaluation base gives researchers a way to examine whether rankings depend on one collection. [Named Entity Recognition in Estonian Parish Court Records](https://md.research.elamur.ai/free/en/papers/orasmaa-2022-named-entity-recognition-estonian-19th/) moves the task to historical records, extending the domain beyond the contemporary newspaper stories used for EstBERT’s comparison. The research question there concerns the same general kind of annotation in a different kind of text.

[Comparison of Current Approaches to Lemmatization](https://md.research.elamur.ai/free/en/papers/dorkin-2023-comparison-current-approaches-lemmatization-case/) makes the recovery of dictionary forms the target of the comparison. In EstBERT, a lemma is information used during truecasing and is also available in the treebank. The grammatical tagging results concern parts of speech and morphological features. The later study takes [lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/) itself as an Estonian evaluation question. It extends the comparison of approaches to a task associated with the same word forms but judged by a different output.

[Help from the Neighbors](https://md.research.elamur.ai/free/en/papers/hamalainen-2022-help-neighbors-estonian-dialect-normalization/) approaches Estonian dialect normalization using a Finnish dialect generator. In EstBERT, the Finnish connection is a precedent for filtering Estonian training text and organizing pretraining. The dialect study puts a Finnish resource into a different role, bringing it to bear on Estonian dialect forms. The connection between the studies is the use of work in a neighboring language to address an Estonian resource problem, applied to different parts of the processing workflow.

[Estonian Language Understanding on the COPA Task](https://md.research.elamur.ai/free/en/papers/kuulmets-2022-estonian-language-understanding-case-study/) takes the evaluation into choice of plausible alternatives, where the task concerns causal plausibility. EstBERT’s news classifiers decide which category applies to a passage. COPA instead asks which candidate makes sense as a cause or effect. The later Estonian case study broadens the kinds of evidence available about [natural language understanding](https://md.research.elamur.ai/free/en/concepts/natural-language-understanding/). The original tagging and classification scores give little basis for inferring an outcome on that kind of task.

#### News labels, domains, and languages

The news studies also move from general labels attached to passages to stance on a subject. [Automated Stance Detection in Complex Topics and Small Languages](https://md.research.elamur.ai/free/en/papers/mets-2023-automated-stance-detection-complex-topics/) examines immigration in polarizing news media. [Political Stance Detection in Estonian News Media](https://md.research.elamur.ai/free/en/papers/luusi-2024-political-stance-detection-estonian-news/) treats political stance as the target in Estonian news. These evaluations share the broad setting of text classification with EstBERT’s Valence experiments. Their subject makes the task different. An extract’s general sentiment and its position on a political issue are separate pieces of information, so classifying polarity gives only partial context for why stance poses its own evaluation problem.

Other citing studies consider specialization outside Estonian. [BERTabaporu](https://md.research.elamur.ai/free/en/papers/costa-2023-bertabaporu-assessing-genre-specific-language/) examines genre-specific pretraining for Portuguese. The genre focus sharpens a question raised by the contrast between EstBERT and WikiBERT-et. Even after choosing a language, researchers still have to decide what kinds of writing will supply the most relevant training experience. [SwahBERT](https://md.research.elamur.ai/free/en/papers/martin-2022-swahbert-language-model-swahili/) takes up dedicated pretraining for Swahili, carrying the language-specific question to another language. [Bridging the Resource Gap](https://md.research.elamur.ai/free/en/papers/holmstrom-2023-bridging-resource-gap-exploring-efficacy/) examines English and multilingual systems for Swedish, another way to ask what support an existing system provides for a particular language.

[LEXTREME](https://md.research.elamur.ai/free/en/papers/niklaus-2023-lextreme-multi-lingual-multi-task/) takes a domain-centered approach by benchmarking several tasks and languages in the legal domain. It brings together the concerns of language coverage and evaluation breadth in a setting defined by the type of material. [Comparing Approaches to Automatic Summarization in Less-Resourced Languages](https://md.research.elamur.ai/free/en/papers/michel-2026-comparing-approaches-automatic-summarization-less/) carries the comparison of approaches into [summarization](https://md.research.elamur.ai/free/en/topics/summarization/), where the desired output is a condensed text. In both settings, the task and domain determine what the evaluation has to measure. EstBERT’s contribution to this line of work is a comparison grounded in several Estonian tasks, with enough variation across them to make clear where a language-specific advantage was established.

## Cite

Cite as Hasan Tanvir, Claudia Kittask, Sandra Eiche and Kairit Sirts. 2021. EstBERT: A Pretrained Language-Specific BERT for Estonian. Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{tanvir2021estbert,
  title = {{EstBERT: A Pretrained Language-Specific BERT for Estonian}},
  author = {Hasan Tanvir, Claudia Kittask, Sandra Eiche and Kairit Sirts},
  booktitle = {Proceedings of the 23rd Nordic Conference on Computational Linguistics (NoDaLiDa)},
  year = {2021},
  url = {https://aclanthology.org/2021.nodalida-main.2/}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
