---
title: "How Well Can BERT Learn the Grammar of an Agglutinative and"
description: "Urbizu and colleagues test how well BERT learns Basque grammar from different amounts of text, using sentences corrected by teachers."
canonical: "https://research.elamur.ai/free/en/papers/urbizu-2024-how-well-can-bert-learn/"
---
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/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/urbizu-2024-how-well-can-bert-learn/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / How Well Can BERT Learn the Grammar of an Agglutinative and Flexible-Order Language? The Case of Basque.

# How Well Can BERT Learn the Grammar of an Agglutinative and Flexible-Order Language? The Case of Basque.

Paper · 2024 · Gorka Urbizu, Muitze Zulaika, Xabier Saralegi et al.

**Authors:** [Gorka Urbizu](https://md.research.elamur.ai/free/en/authors/gorka-urbizu/), [Muitze Zulaika](https://md.research.elamur.ai/free/en/authors/muitze-zulaika/), [Xabier Saralegi](https://md.research.elamur.ai/free/en/authors/xabier-saralegi/) and Ander Corral · **Year:** 2024 · **Venue:** Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024) · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024) · [licence](https://creativecommons.org/licenses/by-nc/4.0/)

- [Publisher's page](https://aclanthology.org/2024.lrec-main.731/)
- [PDF](https://aclanthology.org/2024.lrec-main.731.pdf)

## Summary

Basque grammar gives a reader clues in both the forms of words and their arrangement. A suffix can mark the role of a phrase, and several arrangements of the same words can be grammatical. Some constructions still require a particular order. Urbizu and colleagues ask how well [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) learns to distinguish these possibilities during pretraining. They vary how much Basque text it sees, how often it sees that text, how large the network is, and whether meaningful parts of inflected words are separated before training.

The authors build BL2MP, a Basque grammar test drawn from essays by learners. Each item pairs a sentence containing a learner’s error with its teacher-corrected counterpart. The changes concern declension, verb forms, or sentence structure and order. BERT scores each version by hiding its tokens in turn and estimating how probable the original token is in the remaining context. A pair counts as correct when the teacher-corrected sentence receives the higher score. The evaluation uses pairs whose two versions contain the same number of tokens after segmentation, so that both sentence scores sum the same number of terms.

The amount of pretraining text has a larger effect on BL2MP accuracy than increasing network size beyond the middle configuration. Repeated passes through the available text also matter. Among the systems trained by the authors, BERT with 8 layers reaches 94.7% on BL2MP after training on 125M words, and BERT with 12 layers reaches 95.6% with that corpus. Two interventions expose difficulties that are more visible with less text. On the 5M-word corpus, [lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/) with explicit suffix separation improves overall accuracy, with a particularly clear benefit for declension. Requiring BERT to identify the same error in different word orders is also harder at that corpus size. Both effects diminish as the corpus grows.

On BL2MP, examples from beginners are generally easier for BERT than examples from intermediate or advanced learners when training text is limited. The latter groups have similar results, and the beginner advantage largely disappears with the 125M-word corpus. These findings concern a specific ability acquired in pretraining: preferring a teacher’s correction to a nearby alternative. The test gives a view of where that ability is reliable across the sampled constructions, and where it depends on how much text and what form of text BERT sees.

## Deep dive: How Well Can BERT Learn the Grammar of an Agglutinative and Flexible-Order Language? The Case of Basque.

Urbizu and colleagues test how well BERT learns Basque grammar from different amounts of text, using sentences corrected by teachers. · about 33 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 grammar from ordinary text

The study starts with a distinction between knowing the forms of a language and knowing how to use language to accomplish things. Recognizing a plausible verb form or a well-formed phrase belongs to formal linguistic competence in the authors’ account. Applying world knowledge or reasoning in a real situation belongs to functional competence. The distinction helps define the experiment. A system can rank a corrected sentence above a learner’s original and thereby demonstrate sensitivity to something about the language, while the ability to carry on a conversation or reason about what the sentence describes remains a separate question.

The authors are interested in the competence that emerges during pretraining. In [masked language modeling](https://md.research.elamur.ai/free/en/concepts/language-model/), the training signal comes from text with parts hidden. BERT learns to predict the hidden material from its context. The text can supply many examples of words occurring with particular suffixes, verbs appearing in particular forms, and phrases taking particular positions. Whether these patterns will support a preference for the grammatical member of a new sentence pair is an empirical question. A prediction task supplies examples of usage. A grammatical comparison asks whether the predictions distinguish a licensed use from a closely related error.

The paper places this question in the tradition of studies that examined the structure of BERT’s internal representations. It cites work on what information appears in those representations, including evidence about [syntax](https://md.research.elamur.ai/free/en/topics/syntax-grammar/) and [semantics](https://md.research.elamur.ai/free/en/concepts/semantics/). Such studies give a reason to expect that grammatical information is available somewhere in a pretrained system. The Basque experiments ask how reliably that information affects a decision between whole sentences. Reading out a feature from a representation and observing a preference between a correction and an error are different ways of testing what pretraining has accomplished. [BERT Rediscovers the Classical NLP Pipeline](https://md.research.elamur.ai/free/en/papers/tenney-2019-bert-rediscovers-classical-nlp-pipeline/) and [What Does BERT Learn about the Structure of Language?](https://md.research.elamur.ai/free/en/papers/jawahar-2019-what-does-bert-learn-about/) are among the studies the authors discuss.

Earlier work also gave the authors a reason to vary the amount of text. The paper describes English experiments in which corpora of 10M to 100M words supported the acquisition of many syntactic and semantic capacities. It contrasts those capacities with commonsense reasoning and factual knowledge, for which the cited work found larger data requirements. The paper also describes small [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/) systems trained on language-acquisition corpora of 5M and 10M words. The cited studies report grammatical performance comparable to a pretrained RoBERTa-base under their own evaluations. These findings make it reasonable to look for grammar learning at relatively modest scales, though the examples, training material, and evaluation in those studies differ from the Basque setup. [When Do You Need Billions of Words of Pretraining Data?](https://md.research.elamur.ai/free/en/papers/zhang-2021-when-do-you-need-billions/) and [BabyBERTa](https://md.research.elamur.ai/free/en/papers/huebner-2021-babyberta-learning-more-grammar-small/) provide that background.

#### Why Basque changes the question

Basque gives the study a way to examine two sources of difficulty together. The first is its [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), or the way words and phrases take different grammatical forms. In the paper’s account of declension, a suffix can express a relation such as where something is, where it came from, or whom an action concerns. The same case also has forms associated with singular, plural, and indefinite reference. A learner has to recognize the relationship being expressed and the form that expresses it in that context. A system trained on surface text has to find regularities across words whose written endings can vary.

The second source of difficulty is word order. The paper illustrates flexibility with a sentence in which a cat eats a mouse. The phrases identifying the participants can change position while the sentence still describes the same event. Yet the scope for rearrangement depends on the construction. Within a noun phrase, the order of its members can be constrained. The arrangement of elements in a compound sentence can also determine whether a construction is well formed. The learning problem therefore involves recognizing where position matters and where other cues preserve the grammatical relationship across a change of position.

Earlier findings about word order give reasons for different expectations. As the authors describe it, one line of work found considerable tolerance for disrupted order and attributed much of the systems’ downstream success to patterns of words occurring together. Other work found that BERT could use grammatical features when lexical expectations alone were insufficient and order carried information about grammatical roles. In Basque, the same system needs to be sensitive to illegal order within a construction and tolerant of legal variation elsewhere. A useful experiment must be able to observe those behaviors separately. [Masked Language Modeling and the Distributional Hypothesis](https://md.research.elamur.ai/free/en/papers/sinha-2021-masked-language-modeling-distributional-hypothesis/) is one side of the comparison discussed in the paper.

There was already evidence that a neural system could learn some Basque grammatical dependencies. The earlier Basque study identified by the authors used LSTMs to examine agreement, including verb number prediction and suffix recovery. It reported success and found the task harder in Basque than its English counterpart. Agreement provides a focused test because the form chosen in one part of a sentence depends on grammatical information elsewhere. The present paper extends the inquiry to a wider collection of learner errors and uses the same BERT training family across its main comparisons. [Can LSTM Learn to Capture Agreement? The Case of Basque](https://md.research.elamur.ai/free/en/papers/ravfogel-2018-can-lstm-learn-capture-agreement/) provides the earlier evidence.

#### Choosing what a grammar benchmark should measure

The paper distinguishes two ways of evaluating [linguistic acceptability](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/). In one, the system receives a sentence and must classify it as acceptable or unacceptable after supervised training for that task. CoLA, part of the English GLUE benchmark, uses a binary classification setup. The paper also discusses the Mixed Signals Generalization Set, which uses ambiguous training signals to probe whether a system learns a linguistic generalization. Such designs can answer questions about how pretrained representations support classification. The examples supplied during [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) also become part of the explanation for the final behavior. [GLUE](https://md.research.elamur.ai/free/en/papers/wang-2018-glue-multi-task-benchmark-analysis/) and [Learning Which Features Matter](https://md.research.elamur.ai/free/en/papers/warstadt-2020-learning-which-features-matter-roberta/) exemplify the approaches the paper discusses.

The other approach tests a pretrained system directly on pairs. BLiMP, the English benchmark that inspires BL2MP, contrasts an acceptable sentence with a near-identical sentence that violates a targeted grammatical condition. Because the two versions share much of their wording and meaning, ranking them gives a more focused comparison than assigning scores to unrelated sentences. There is also no need to train a classifier on examples labeled for acceptability. A separate Grammar Test Suite discussed in the paper likewise uses paired sentences to isolate aspects of syntax and morphology. [BabyBERTa](https://md.research.elamur.ai/free/en/papers/huebner-2021-babyberta-learning-more-grammar-small/) describes that suite.

The authors review comparable efforts for languages beyond English, including Chinese, Arabic, Japanese, Indonesian, and Tamil. They also point to Russian and Scandinavian resources that follow the classification approach more closely. Together these precedents show that one can transfer a general evaluation design across languages while selecting grammatical contrasts appropriate to each language. They also explain why the authors build a Basque test from local evidence. A list of phenomena selected for English would give a partial view of Basque suffixes and order. [CLiMP](https://md.research.elamur.ai/free/en/papers/xiang-2021-climp-benchmark-chinese-language-model/) and [ScandEval](https://md.research.elamur.ai/free/en/papers/nielsen-2023-scandeval-benchmark-scandinavian-natural-language/) illustrate the two approaches outside English.

BL2MP adds a choice about where to obtain the errors. A benchmark designer can start with a grammatical construction and create a violation. Here, the errors already exist in essays, and a teacher has already proposed a correction. The authors select examples for which that correction yields an appropriately close pair. This gives them contrasts that learners actually produced. It also makes the content of the test depend on what those learners tried to say, what they found difficult, and what the teachers corrected. That dependence matters both for interpreting the results by proficiency and for defining the scope of the benchmark.

### The method, step by step

#### From a teacher’s correction to a scored item

The authors start with essays from the bai&by language academy. When a learner’s sentence contains a grammatical error and a teacher provides a local correction, the before and after versions can become the two sides of an item. The authors randomly select examples subject to the minimal-pair requirement and the desired balance across learner levels and error categories. The corrected sentence is the designated grammatical choice. The original sentence supplies the alternative BERT must distinguish from it.

The starting collection contains 1,800 items. The authors use A for beginners, B for intermediate learners, and C for advanced learners. They cross these levels with E1 for declension, E2 for verbs, and E3 for structure and order. Each combination contains 200 items, and each error category contains 600 before filtering. This construction makes it possible to inspect accuracy by proficiency or by error category while starting with the same number of examples in each group. Later, tokenization determines which items can be scored under the equal-length rule.

From corrected essays and pretraining text to BL2MP accuracy The steps in order.

A declension example in the paper changes `Nik` to `Ni` in a sentence about being pleased. The correction preserves what the learner wanted to say and changes how a participant is marked. The surrounding words give BERT a context in which to judge whether the original or corrected form fits better. Across the declension category, the grammatical question can concern different relations expressed by suffixes. An item asks about the particular form in its particular context, which is a more specific judgment than recognizing that two endings belong to different cases.

A verb example concerns having somebody’s car keys. The teacher replaces `daukat` with `dauzkat` while keeping the rest of the sentence. The example shows how much a short correction can ask of a predictor. Both versions use words that fit the subject matter. The suitability of the verb form depends on information carried by other parts of the sentence. More generally, the authors group verb errors involving person, number, tense, mood, and aspect. Person and number concern participants, tense places an event in time, mood conveys distinctions such as an assertion or a desire, and aspect concerns how an event unfolds. The resulting category therefore covers several reasons why a verb form can be inappropriate.

The structure-and-order category brings together order within phrases and the assembly of more complex sentences. The paper’s example about a view from a balcony changes the position of `ederra` relative to `bista` within the expression describing the view. The correction is informative precisely because Basque permits flexibility elsewhere. A broad preference for allowing rearrangement would miss a restriction inside the phrase. The category also includes issues in compound constructions, such as relative clauses and indirect questions. Accuracy for E3 consequently summarizes behavior on a mixture of structural contrasts.

An item supplies both the candidate correction and the competing original. BERT locates no error span and proposes no new wording in this procedure. Its task is to prefer one supplied sentence. That choice keeps the test focused on a useful question about pretraining. Given almost identical versions of what someone meant to say, does the grammatical change alter how probable the surrounding sequence appears?

#### What BERT sees during pretraining

The authors use Basque corpora of 5M, 25M, and 125M words. Their source mix is 75% news and 25% Wikipedia. The training material thus has a different purpose from the essays used in BL2MP. The corpora supply examples of Basque usage for predicting tokens, while the essays supply matched contrasts for measuring the consequences of that training. The use of the same source proportions across corpus sizes makes text quantity a clearer variable than it would be if growing the corpus also meant moving to a different overall mix of sources.

The networks share the BERT design, based on the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). The authors vary depth and reduce other dimensions in proportion when constructing the smaller configurations, including the dimensions of hidden representations and the number of attention heads. BERT 12L has 12 hidden layers and 124M parameters. BERT 8L has 8 layers and 51M parameters. BERT 4L has 4 layers and 16M parameters. Each size is trained on each corpus so that the authors can inspect changes in text quantity at fixed network size, and changes in network size at fixed corpus size. Since the network dimensions move together, a comparison between sizes reflects the full configuration rather than the effect of adding layers in isolation.

Each corpus has a cased vocabulary of 50K tokens learned using Kudo’s unigram-based [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/). A sub-word vocabulary allows a written word to be represented by smaller pieces. The same number of vocabulary entries does not mean that corpora of different sizes yield the same entries or that the resulting systems divide a given sentence in the same way. This matters later because the evaluation checks length after the segmentation chosen by each vocabulary. [Subword Regularization](https://md.research.elamur.ai/free/en/papers/kudo-2018-subword-regularization-improving-neural-network/) supplies the segmentation method.

During masked pretraining, the authors use whole-word masking. When a word is chosen for masking, its sub-word pieces are treated together for the masking decision. The paper uses a duplication factor of 10, creating training variants with different masks. The batch size is 256 and the sequence length is 512. The learning rate is given as `1e−4`, with optimizer coefficients `0.9` and `0.999` and weight decay `0.01`. The training runs on a v3-8 TPU. These settings specify how the authors turn each text collection into repeated prediction exercises.

An epoch measures a pass through the training material, while an update step measures progress through the optimization schedule. The authors aim for around 500K steps and choose endpoints at powers of two in epochs. For the 125M-word corpus, the run ends after 640,000 steps and 512 epochs. For the 25M-word corpus, it ends after 512,000 steps and 2048 epochs. For the 5M-word corpus, it reaches 409,600 steps and 8192 epochs. A smaller corpus can go through many more epochs within a broadly similar number of updates because each pass is shorter.

The schedule begins with a warm-up that occupies 6.25% of training. The paper places the endpoint of that phase at 40,000 steps, or 32 epochs, for the 125M corpus. The corresponding figures are 32,000 steps and 128 epochs for the 25M corpus, and 25,600 steps and 512 epochs for the 5M corpus. The authors evaluate checkpoints across training and plot test accuracy alongside losses on the pretraining and development data. This lets them distinguish the time when prediction loss starts improving from the time when BERT reliably prefers the grammatical member of a pair.

#### Giving suffixes a consistent representation

For the preprocessing comparison, the authors prepare another version of each corpus with Eustagger, which performs Basque morphological analysis and [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/). The transformation focuses on nouns and adjectives. It separates a [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/), the base form used to represent a word, from the information expressed by its declension suffix. The intended benefit is that BERT can encounter the same word base and the same grammatical category in a more consistent form across contexts.

The analyzer supplies a morphosyntactic category, and the authors use that category to choose a written suffix. They select the most frequent suffix for the category in the corpus. This extra step matters because the written ending associated with a case can vary from one word to another. A representation that separated the surface endings without standardizing them would still preserve some of the variation the authors want to reduce. Their version uses a representative suffix, making the common grammatical function visible through a common textual form.

The paper illustrates this with a phrase about the door of a house. The analysis separates the forms into bases including `Etxe` and `ate`. The category marking the relation to the house receives the representative suffix `ko`. The category that marks location at the door receives `an`, the suffix selected for the inessive singular. In the resulting representation, the base and suffix stand apart before the normal subword-tokenization stage. The separation retains a sign of the grammatical relation. Reducing each inflected form to its base alone would remove the very marking that the declension items frequently test.

The comparison uses BERT 8L at each corpus size. Its two conditions use original text and text processed through the lemma-and-suffix pipeline. Both use sub-words, and one introduces linguistic analysis before sub-word segmentation. Hence a change in performance concerns the combined decision to recover bases, separate grammatical information, and standardize how that information is written. The experiment compares those choices as a package.

#### How BERT scores a sentence

BERT is trained to recover missing material. To assign a score to an intact sentence, the authors turn it into a series of masked prediction problems. They hide the first token and find the probability assigned to the original token. Then they restore it, hide the next token, and repeat. Each prediction can use the rest of the sentence as context, including words on both sides of the masked position. A token whose form fits its surroundings well should receive a higher conditional probability than a form that those surroundings make unlikely.

The score is the pseudo-log-likelihood, or PLL, following Salazar and colleagues. The authors compute it with minicons. [Masked Language Model Scoring](https://md.research.elamur.ai/free/en/papers/salazar-2020-masked-language-model-scoring/) and [minicons](https://md.research.elamur.ai/free/en/papers/misra-2022-minicons-enabling-flexible-behavioral-representational/) provide the scoring method and its implementation, respectively.

```
PLL(W) = Σₜ log Pₘₗₘ(wₜ ∣ W∖t; Θ)
```

`PLL(W)` is the pseudo-log-likelihood of sentence `W`, represented as a sequence of tokens. `Σₜ` means to add the contribution from every token position `t`. `log` takes the logarithm of the probability that follows. `Pₘₗₘ` denotes the probability assigned by the masked language predictor, and `wₜ` is the original token at position `t`. The vertical bar means “conditioned on.” `W∖t` denotes the context formed from `W` with position `t` masked, so that the original token is unavailable at that position. `Θ` is the set of learned parameters used to make the prediction. The equals sign identifies the score with the sum.

The score is called a pseudo-log-likelihood because each summand comes from a different masked version of the sentence. Collectively, those terms provide a way to rank complete sentences using a system that predicts hidden tokens from their context. A local correction can influence the score in more than one place. When the changed token is hidden, BERT has to predict it from the sentence around it. When an unchanged token is hidden, the corrected form becomes part of the context used to predict that unchanged token. The scoring rule consequently lets a grammatical change affect how well several parts of the sentence fit together.

The evaluation restores and masks tokens individually, even though whole words were the unit of the masking decision during pretraining. Both stages use prediction from context, with different choices about what to hide. This distinction is relevant for inflected forms. A masked token in a split word can have other pieces of that word available as context during scoring. A sentence-level preference can therefore reflect both relationships between words and relationships among pieces of a word.

The authors calculate PLL for each sentence in a pair. A success requires the corrected sentence to score strictly higher. Accuracy is the proportion of evaluated pairs on which that happens. The unit is the pair, so a very large preference on one item carries the same weight in accuracy as a small preference in the same direction on another. The method establishes whether the system prefers the intended answer, while the aggregate percentage summarizes how frequently that preference occurs.

Length matters because the sentence score is a sum. When two sentences split into unequal numbers of tokens, one score has more probability terms. The authors screen out such comparisons by retaining only tokenized pairs of equal length. A single edit in the written sentence can still change the number of sub-words. The filter therefore takes effect even when the two versions contain the same number of written words. It protects the comparison against one simple length effect and makes the resulting accuracy conditional on the items that survive segmentation.

#### Testing a change of order

The separate word-order test starts from 200 BL2MP pairs. The authors call the original-order set `200_BL2MP_1`. For each of its pairs, they manually create another pair in a different grammatical order and keep the same contrast between the acceptable and unacceptable versions. The paper demonstrates the procedure with the sentence about a cat and a mouse. The alternate order exchanges the positions of the phrases naming the cat and the mouse. Within either order, the correct and incorrect sentences still differ in the choice between `zuen` and `zen`.

The second set, `200_BL2MP_2`, associates each item with both versions. Success on the original-order set requires the grammatical sentence to win its original comparison. Success on the expanded set requires it to win in both orders. Conceptually, the unit is still the underlying item. An original that BERT handles correctly can cease to count as a success if the same error fools it after rearrangement. This tests the stability of a judgment across a controlled change of context. The authors make BL2MP, the raw and lemmatized corpora, the pretrained systems, and the evaluation code publicly available.

### Experiments and results

#### More training text and larger networks

The primary experiment follows the BERT configurations through pretraining on the news and Wikipedia corpora and evaluates them on BL2MP. Around one-third of the examples are discarded during this evaluation because the corrected and uncorrected sentences have different tokenized lengths. The reported percentages apply to the retained test comparisons. Random guessing provides a reference near 50% for selecting between the two sentences. Early checkpoints often lie near that reference, giving a starting point for interpreting the subsequent improvements.

The corpora make a clear difference when BERT’s size is held fixed. For BERT 8L trained on 25M words, the overall BL2MP score reaches 91.5% at epoch 1024. This is the value used for that system in the comparison with published baselines. The last checkpoint of that run, at epoch 2048, scores 91.4%. With 125M training words, BERT 8L reaches 94.7% at the final checkpoint, epoch 512. The two runs have different schedules, but both show what the authors can obtain from the respective training configurations over the checkpoints they examine.

The depth comparison on 125M words gives a complementary view. The 4-layer configuration finishes below the 8-layer configuration. The 12-layer configuration scores higher again, with a smaller change in the reported accuracy. Because the corpus and final epoch match for all the systems in this comparison, the result directly describes the network-size tradeoff on that corpus. It does not assign the same marginal value to every increase in the number of parameters.

BERT configurations at epoch 512 on BL2MP after pretraining on 125M words The increase in accuracy is larger from the smallest network to the middle one than from the middle one to the largest.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| BERT 4L | 89.6 |
| BERT 8L | 94.7 |
| BERT 12L (this paper) | 95.6 |

The authors see a consistent benefit from moving from BERT 4L to BERT 8L across the corpus sizes. They characterize the further gain from BERT 12L as limited. The 25M-word runs illustrate why the paper assesses size through the trajectories as well as the endpoints. On that corpus, BERT 12L reaches 91.1% on BL2MP at epoch 512 and finishes at 88.9% at epoch 2048. The BERT 8L run reaches 91.5% later and retains nearly the same score at its final checkpoint. Greater capacity can change both the speed of improvement and what happens during continued training. The authors use BERT 8L for the remaining experiments because it requires fewer computational resources and performs close to BERT 12L in the comparisons that motivate the choice.

#### The shape of learning during pretraining

The checkpoint curves include an early dip. The authors report that accuracy commonly begins around chance, declines in early epochs, then rises towards the end of warm-up or afterward. For BERT 8L trained on 125M words, BL2MP accuracy is 43.1% at epoch 1 and 40.2% at epoch 8. It reaches 84.1% at epoch 32 and 90.4% at epoch 64. These results show that early predictions can become systematically unhelpful on the paired test before they become reliable. The paper traces that pattern through the checkpoints and loss curves. It leaves the reason for the early preference errors open.

BERT 8L trained on 25M words illustrates the same delay on a different schedule. At epoch 64, it scores 43.0% on BL2MP. It reaches 78.1% at epoch 128, near the scheduled end of warm-up, and 88.5% at epoch 256. With 125M words, the increase is already visible at earlier epoch counts. An epoch on the larger corpus contains more text and more updates than an epoch on the smaller corpus. The finding is that BL2MP performance rises after fewer passes when more distinct text is available under these schedules.

The authors find that repeated exposure matters at all the corpus sizes they test. The early checkpoint is a poor guide to the grammatical preferences that will be available after extended pretraining. At the same time, continued updates have different effects depending on the stage of the run. Large gains accompany the first sustained improvement in BL2MP accuracy, while later checkpoints can approach a plateau or fall back from a better result. The practical meaning of repeated passes in this experiment comes from those trajectories. A long run gives a small-corpus system time to develop its preferences, and an individual late checkpoint can still be weaker than an earlier one.

Training and development losses provide a separate view. A divergence between them suggests that BERT is fitting the training material better than it predicts held-out development material. The paper observes such signs especially with the 5M corpus and, to a lesser extent, with the largest network trained on 25M words. The authors find that these signs can coexist with successful grammar judgments on BL2MP. Development loss reflects token prediction across its own collection. BL2MP accuracy depends on which sentence in a specially chosen pair comes out ahead. Improvement or deterioration in one measure can therefore occur without an identical movement in the other.

#### Accuracy across types of learner error

The error-category analysis compares checkpoints from BERT 8L on declension, verbs, and structure and order. Within a training run, the categories begin to improve around similar epochs. Their eventual scores can differ. At epoch 1024 of the 5M-word run, BERT 8L scores 83.3% on the structure-and-order items, 79.0% on declension, and 77.4% on verb items. All three percentages are BL2MP test accuracies for the indicated subset at that checkpoint. Together they locate the lower scores in the raw-text setting in the categories involving inflected forms.

The aggregates should be read at the level of the labels. For example, the verb value covers a mixture of person, number, tense, mood, and aspect errors. A preference on agreement items could be reliable even if some tense items remain difficult, or the reverse. The score identifies where difficulty collects in this benchmark. The structure-and-order result likewise describes the E3 corrections that learners produced. The separate rearrangement experiment asks a further question about maintaining the same judgment when the sentence is put in another permitted order.

For proficiency, the paper follows A, B, and C items through the same BERT 8L runs. Examples at all levels begin to yield useful judgments at roughly the same stage of a given run. At the smaller corpus sizes, beginner examples tend to receive higher accuracy. The intermediate and advanced groups give similar results, even though the authors expected advanced examples to be harder. With 125M pretraining words, performance becomes comparable across the groups. The author’s category marks the student’s course level, so the result describes an association between the origin of the error and BERT’s performance on the corresponding pair.

#### How stable are the judgments after reordering?

In the word-order analysis, the two metrics answer related questions. Accuracy on `200_BL2MP_1` measures success in the original order. Accuracy on `200_BL2MP_2` measures success in both the original and rearranged orders for the same underlying contrasts. At epoch 1024, BERT 8L trained on 5M words scores 83.3% under the original-order criterion and 78.4% under the requirement to succeed in both orders. The stricter criterion exposes cases in which a preference that was correct in the original order fails to hold after the sentence is rearranged.

At epoch 1024 for the 25M-word run, the corresponding subset accuracies are 94.5% in the original order and 92.1% when both orders must be correct. At the 125M-word run’s final checkpoint, epoch 512, they are 94.5% and 92.7%, respectively. These comparisons are made within each checkpoint. The exact scores change over training, but the paper finds the cost of requiring success in both orders more pronounced with the smallest corpus. The larger-corpus systems maintain a correct preference for more of the tested contrasts after rearrangement.

The apparent likeness between some of these numbers and those elsewhere in the paper should not erase their denominators. For instance, the 94.7% overall BL2MP accuracy for BERT 8L on the 125M corpus is a result on the retained main benchmark items. The 92.7% figure is a result on the word-order subset with the requirement that both versions succeed. The latter makes an additional demand on each retained contrast and comes from a selected group of items.

#### Accuracy with morphological preprocessing

In the 5M-word comparison, the BERT 8L checkpoint at epoch 1024 obtains 80.1% overall BL2MP accuracy with original text and 82.6% with lemmatization and suffix separation. The appendix also reports 77.6% for the raw-text condition and 82.0% for the segmented condition at epoch 2048. Early in training, the segmented condition can trail the raw condition. The later values show why following checkpoints is useful. The result of the preprocessing comparison depends in part on whether each system has had time to develop the grammatical preferences being tested.

BL2MP accuracy at epoch 1024 for BERT 8L trained on 5M words Separating word bases and representative suffixes improves accuracy at this checkpoint.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Original text | 80.1 |
| Text with lemma and suffix separation (this paper) | 82.6 |

The difference is smaller on 25M words, and the trajectories can cross. The two conditions score 91.5% for original text and 91.1% for segmented text at epoch 1024. At epoch 2048, they score 91.4% and 92.2%, respectively. On the 125M corpus, both conditions score 93.7% at epoch 256. At the final checkpoint, the original-text condition reaches 94.7% and the segmented one reaches 94.5%. These overall BL2MP numbers support the authors’ description of diminishing benefit as more text becomes available. The largest improvement is concentrated in the smallest corpus, and the largest corpus shows little separation under the conditions tested.

#### How the study’s systems compare with published baselines

The authors also run BL2MP on existing masked predictors that support Basque. The strongest overall result in that comparison is 96.5% for ElhBERTeu-base, trained on a corpus listed at 350M words. ElhBERTeu-medium, listed with the same corpus size, obtains 95.4%. The newly trained BERT 8L and BERT 12L systems using 125M words score 94.7% and 95.6%, respectively. That puts them in the range of the stronger published systems on this benchmark, with the best published score still higher.

Other Basque-specific baselines occupy a similar range. BERTeus scores 94.8% with a corpus of 225M words. Roberta-euscrawl-B and Roberta-euscrawl-L, both listed at 289M words, score 95.9% and 95.5%. The ordering of the two Roberta-euscrawl variants is another example of a benchmark result in which the larger version has a lower score. As a comparison across published systems, it describes their observed performance. The controlled changes in the authors’ own BERT runs furnish the closer evidence about network size. [Give your Text Representation Models some Love: the Case for Basque](https://md.research.elamur.ai/free/en/papers/agerri-2020-give-your-text-representation-models/) describes BERTeus.

Among the multilingual baselines, mBERT scores 58.9%, while XLM-RoBERTa base and large score 75.1% and 82.4%. The paper lists the Basque corpus for mBERT as `∼30M` and leaves the corpus sizes for the XLM-RoBERTa variants unknown in this comparison. IXAmBERT, which includes 3 languages, scores 94.4% with a listed corpus of 225M words. It comes much closer to the Basque-specific systems than the massively multilingual baselines tested here. The scores establish how these published systems rank on BL2MP under the paper’s procedure. Their different training histories leave several possible reasons for that ranking. [Unsupervised Cross-lingual Representation Learning at Scale](https://md.research.elamur.ai/free/en/papers/conneau-2020-unsupervised-cross-lingual-representation-learning/) describes XLM-RoBERTa.

### What the ablations show

#### Corpus size, capacity, and repeated exposure

The most direct comparison changes corpus size while holding a BERT configuration fixed. The score improves with a larger corpus, and the improvement in the checkpoint curves appears after fewer epochs. Conversely, one can hold the corpus fixed and compare the sizes of BERT. That comparison shows a substantial benefit from moving out of the smallest configuration and less consistent returns beyond the middle one. Together the two views support the authors’ conclusion about the relative importance of corpus size and network size in these experiments. Looking only at the best newly trained BERT would hide both effects because that system uses the largest corpus and the largest network.

The epoch analysis separates access to more distinct text from repeated exposure to the text already available. At a fixed corpus size, later checkpoints use the same text collection after more training. Their ability to recover from early below-chance BL2MP results shows that seeing the available text early in the schedule is insufficient to produce the final preferences. Across corpus sizes, the number of passes required before accuracy rises changes with how much material those passes contain. The study therefore gives evidence for both repeated training and corpus size, with each comparison answering a different question about what BERT has encountered and what it has had time to learn.

There is an additional distinction between learning a usable preference and continuing to optimize the token prediction objective. Consider two checkpoints that both often rank a correction above an error. Further reductions in pretraining loss could correspond to more confident predictions on sentences the system already ranks correctly, giving little change in BL2MP accuracy. A checkpoint could also improve on ordinary prediction contexts while making a specific class of paired contrasts harder. The paper’s curves establish that the metrics follow different trajectories. They leave the individual token-level contributions to those trajectories unmeasured.

#### What the preprocessing comparison localizes

The lemma-and-suffix comparison is the closest test of whether a more explicit representation of morphology helps. The architecture stays at BERT 8L and the starting corpus size stays fixed within each comparison. The altered condition adds a morphological analysis before sub-word segmentation. If the benefit appeared uniformly across error types and corpus sizes, there would be little reason to connect it specifically with access to declension cues under limited data. The reported pattern is more selective.

With 5M words of raw text, BERT handles structure and order more reliably than declension or verbs. In the segmented condition, the structure-and-order result stays broadly similar. The verb category improves slightly, bringing it closer to structure and order. Declension improves more clearly and becomes the strongest category for that condition. This aligns the category most affected by the intervention with the linguistic material it directly changes. Nouns and adjectives carry the declensional information that the preprocessing explicitly exposes and standardizes. Verb improvements can also arise when surrounding context is represented differently, though the comparison does not isolate that explanation.

On 25M words, the differences between categories and the benefit of preprocessing are less pronounced. On 125M words, the authors describe the category distinctions associated with preprocessing as disappearing. One interpretation consistent with the results is that standardized exposure is most valuable when examples of surface forms are scarce. Seeing more raw text can supply additional evidence about how related forms pattern. The accuracy values show where preprocessing helped. Establishing that BERT recovered the same internal representation from raw text would require a different measurement.

There is also a distinction between making suffixes explicit and making their written forms more consistent. Separating `an` from a word base changes the visibility of that category in the sequence. Using `an` as a representative across different surface realizations changes which observations get pooled under that form. Since the study implements both choices together, the result does not identify which would have supplied the benefit on its own. It gives a more specific empirical claim: under the tested 5M-word configuration, a pipeline that does both improves the ranking of corrections, and that improvement is concentrated in the expected category.

#### What the word-order comparison holds fixed

In the deliberate rearrangement experiment, the authors keep the relevant grammatical contrast and the sentence’s lexical material while changing how the phrases are ordered. That holds the problem closer to constant than comparing two unrelated sets of sentences with different typical orders. BERT must still prefer the same kind of correction in the altered context. A failure after rearrangement shows that the judgment was sensitive to some aspect of the original configuration, even though it does not identify the precise cue the system used.

Requiring both judgments to be correct makes the metric a joint success rate. The reduction from the original-order score is informative because an item can lose credit when an original success fails in the alternative order. It is not a direct estimate of accuracy on natural reordered sentences taken on their own. An item that already failed in the original order cannot contribute to joint success even if the rearranged version happens to be easier. The paper’s comparison consequently measures how frequently a successful grammatical preference carries over under the particular rearrangement the authors made.

That distinction helps connect this analysis to the error categories. An acceptable alternative order tests tolerance where variation is permitted. An E3 correction can require sensitivity where variation is restricted, such as inside a noun phrase. High E3 accuracy and some loss on the joint order test can coexist because a system can recognize familiar structural violations while still relying on order as a cue in other judgments. This is why the two experiments together say more about Basque word order than either does on its own.

#### What learner level can explain

The proficiency analysis groups existing test pairs by who produced the original error. Within each corpus condition, the authors compare the same BERT 8L training run across those groups. The beginner advantage at smaller corpus sizes and the similar results for intermediate and advanced learners show that course level is an incomplete ordering of item difficulty for BERT. A progression for students can involve many factors beyond the particular grammatical change selected for a minimal pair. The analysis can identify a group that is easier on average, while the score of an individual item still depends on the construction and its wording.

The improvement curves also suggest that there is no clear separation into stages in which BERT first becomes sensitive to beginner errors and only later acquires preferences on advanced examples. Under a given training configuration, the groups tend to improve around the same epochs. Their accuracies can differ at those epochs. The 125M-word result reduces those differences further. Thus the analysis supports an association between beginner items and easier judgments in the more data-limited settings, without establishing a parallel between the way adults become proficient and the way BERT acquires its preferences during masked pretraining.

### Limitations

#### Limits the authors state

The training comparisons use the BERT architecture. The authors say that establishing whether the same effects hold in other systems would require repeating experiments with other masked architectures and with autoregressive systems. The inclusion of published RoBERTa variants in the BL2MP comparison provides reference accuracies, but those variants were not put through the same changes to corpus size, preprocessing, and training schedule. Their results establish how they perform as published on this test. They give little leverage on whether each of those interventions would affect them as it affects the authors’ BERT configurations.

The authors also characterize their evaluation as intrinsic. Its outcome is a comparison between sentences under the pretrained scoring rule. A downstream task has its own inputs, supervision, and success criterion. The capacity of the network and the point reached during pretraining can matter again when it is fine-tuned for that task. The authors therefore leave open how closely BL2MP accuracy predicts fine-tuned performance. Even an error-correction task would place a different demand on the system if it had to discover which words were wrong and generate a correction without seeing one.

Finally, the authors state that the source of the test shapes its coverage. The pairs come from adults learning Basque as a second language, and most of those learners are native Spanish speakers. The collected errors reflect the population that wrote the essays. A balanced selection across the chosen levels and categories can ensure visibility for each group. It does not make the benchmark a sample of all Basque speakers, all kinds of Basque writing, or every grammatical difficulty a learner could encounter.

The paper also rules out a direct ranking of languages from their benchmark scores. Existing evaluations differ in how they generate sentences and in the phenomena they test. A score from Basque learner essays and one from a benchmark designed around a different set of constructions can reflect different item difficulties. The authors’ motivation is that rich morphology and flexible order could complicate learning. A cross-language claim about how much harder Basque is would need evaluations comparable enough to distinguish a language difference from a difference in test design.

#### Further limits of the design

The equal-token-length filter narrows the population of items used for accuracy. This is consequential in a study of inflection because adding, removing, or changing an ending can also change how a word splits. The paper reports how much of the collection is discarded approximately, but the main aggregate scores do not establish equally good coverage of all the phenomena in the original collection. The filter and the vocabulary together determine which contrasts remain. Where vocabularies differ, identical eligibility rules can produce differing sets of retained items. Cross-configuration comparisons therefore include the effect of evaluating under each configuration’s segmentation.

Sentence scoring also leaves the basis of an individual judgment underdetermined. A correction may win because BERT is sensitive to the intended grammatical dependency, because its local pieces fit familiar sequences, or because both effects contribute. Minimal pairs control much of the content and make the edit the focus of comparison. The probability sum still lets information from the whole sentence influence the outcome. Accuracy identifies the direction of the preference, and the category analyses show where preferences are reliable. Neither measurement identifies a particular rule inside the network or the context words that drove it.

The data-size comparison has a similar boundary. The authors preserve the overall domain proportions and train toward a broadly similar number of steps, but the runs differ in their exact update totals, warm-up lengths, and number of passes. The vocabularies are learned for the corpora as well. The result establishes the advantage of the larger-corpus configurations as trained. An estimate of the effect of distinct text alone, with a common vocabulary and identical optimization schedule, would answer a narrower question. Likewise, the size comparison changes depth together with other dimensions, so its evidence concerns practical BERT configurations rather than depth in isolation.

The word-order subset gives each contrast a manually constructed alternative order. That is enough to detect loss of a preference under those changes. It samples a limited portion of the orders and constructions Basque allows. Joint success on the tested original and alternative orders does not establish that the judgment will hold across every permitted ordering, and the joint score cannot show whether some failed originals would have been repaired by a more familiar order. The experiment is therefore strongest as a comparison of stability across corpus sizes under the same rearrangement procedure.

Finally, the category and proficiency analyses aggregate several sources of variation. The E1 result combines different case relations, E2 combines several properties of verbs, and E3 includes both phrase order and the structure of compound constructions. Course level can also coincide with changes in vocabulary, construction, or the kinds of corrections a teacher makes. The early improvements observed across groups and the later differences in accuracy can guide more focused questions, but they do not tell us which individual construction accounts for a group’s result. Conclusions about a specific suffix, verb feature, or permitted order need evidence at that level.

### What came after

There is no documented follow-up to trace here. The authors make future comparisons possible by releasing the paired judgments, the pretraining corpora in their original and segmented forms, the pretrained BERT configurations, and the scoring code. Their proposed extensions are to repeat the controlled comparisons with other architectures and to relate BL2MP judgments to performance after fine-tuning. Those extensions remain open questions in the paper.

## Cite

Cite as Gorka Urbizu, Muitze Zulaika, Xabier Saralegi and Ander Corral. 2024. How Well Can BERT Learn the Grammar of an Agglutinative and Flexible-Order Language? The Case of Basque. Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024).

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

```bibtex
@inproceedings{urbizu2024how,
  title = {{How Well Can BERT Learn the Grammar of an Agglutinative and Flexible-Order Language? The Case of Basque.}},
  author = {Gorka Urbizu, Muitze Zulaika, Xabier Saralegi and Ander Corral},
  booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
  year = {2024},
  url = {https://aclanthology.org/2024.lrec-main.731/}
}
```

> 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)
