---
title: "The unreasonable effectiveness of machine learning in Moldavian"
description: "A study of how well classifiers distinguish written Moldavian from Romanian, which clues they use, and how well those clues carry over to tweets."
canonical: "https://research.elamur.ai/free/en/papers/gaman-2021-unreasonable-effectiveness-machine-learning-moldavian/"
---
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/gaman-2021-unreasonable-effectiveness-machine-learning-moldavian/)

[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/) / The unreasonable effectiveness of machine learning in Moldavian versus Romanian dialect identification

# The unreasonable effectiveness of machine learning in Moldavian versus Romanian dialect identification

Paper · 2021 · Mihaela Găman and Radu Tudor Ionescu

**Authors:** Mihaela Găman and [Radu Tudor Ionescu](https://md.research.elamur.ai/free/en/authors/radu-tudor-ionescu/) · **Year:** 2021 · **Venue:** International Journal of Intelligent Systems · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

International Journal of Intelligent Systems · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [DOI 10.1002/int.22746](https://doi.org/10.1002/int.22746)
- [arXiv 2007.15700](https://arxiv.org/abs/2007.15700)

## Summary

A news article from the Republic of Moldova can look much like one from Romania, particularly after names and places have been masked. The paper asks why automated classifiers are nevertheless so successful at telling the articles apart. Written Moldavian and Romanian share a literary standard, and many of the differences a listener might recognize are hard to see on the page. To understand what the classifiers pick up, the authors test whether their performance holds when the text gets shorter and when the source changes from news websites to Twitter. They also ask native speakers to make the same kind of dialect judgment on news openings.

The authors start with MOROCO, a corpus of news articles whose dialect labels come from the national web domains of the publications. They compare systems that look for recurring character sequences with neural classifiers that process characters, words, or parts of words. They also test an ensemble that learns how to combine the component predictions, a procedure called stacking. For dialect identification, the stacked ensemble leads across the test settings. The paper reports scores above 94% for complete articles, above 86% for article openings, and up to 70% for tweets. The volunteers average 53.2% accuracy on a balanced set of article openings. The human and tweet results come from different test samples, so they illustrate the scale of the gap under short-text conditions without measuring it on identical inputs.

To see what might account for the performance, the authors examine which stretches of text matter to a character-level convolutional classifier. Some highlighted passages contain spelling differences or a preference for one expression over another. For instance, Moldavian news writers may use *întreprindere* where their Romanian counterparts would favor *companie*, even though both words are available to writers in both places. Other passages point to events or public debates associated with a country. The examples show how regional language habits and subject matter can both help a classifier predict where an article came from.

The paper also tests a different judgment on the news corpus: assigning an article to a topic, either within one dialect or across the two. The volunteers do considerably better at recognizing topics than at identifying dialect, and stacking has a less consistent advantage on topic classification than it does on dialect identification. Together, the experiments show that some clues to regional origin survive the move from news to tweets, while the decline in scores gives a sense of how much easier the original article benchmark is.

## Deep dive: The unreasonable effectiveness of machine learning in Moldavian versus Romanian dialect identification

A study of how well classifiers distinguish written Moldavian from Romanian, which clues they use, and how well those clues carry over to tweets. · about 36 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

#### What the written distinction amounts to

The labels Moldavian and Romanian can suggest a cleaner division than the text warrants. In the linguistic account the authors adopt, Moldavian is a variety within Daco-Romanian, the branch that includes the Romanian spoken in Romania. Speakers of Moldavian live in the Republic of Moldova and in the northeast of Romania. The benchmark, in contrast, divides news by the country of the publishing website. The labels are convenient for describing the task, but the geographical reach of the spoken variety and the rules for labeling the corpus answer different questions.

The authors explain that many of the features traditionally used to distinguish Moldavian are phonetic. A reader of a news article has access to spelling and to choices about which words and expressions to use. The reader has much less access to the differences in pronunciation a listener might hear. The shared literary standard makes the written distinction still less conspicuous. A sentence can be grammatical and ordinary enough to understand on either side of the border while containing a wording that is more customary on one side. In the paper’s account, differences in spelling and vocabulary give a classifier grounds to make a decision even when readers see no obvious regional marker.

That difference between a recognizable rule and a recurring preference matters. A spelling convention can give the reader a visible letter to look for. A lexical preference may only emerge across many occasions when writers could have chosen either of two familiar words. Someone who understands both words may read straight past the choice. A classifier trained on many articles can reward an association with a label even when the choice has little effect on the meaning of any one sentence. The paper investigates whether associations of that kind help explain the success of [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/) on this task.

The authors also consider evidence that has little to do with how writers express a thought. Publications may cover different events, use different editorial conventions, or draw on writers with distinctive habits. An entire article provides many opportunities for such clues to appear. Masking named entities reduces the most direct evidence, such as a place name, while leaving much of the surrounding language intact. A classifier can still recognize a story or a political debate from its description. High benchmark scores therefore raised a question about the evidence behind the predictions as well as about the features of written Romanian.

#### From dialect research to shared benchmarks

The paper places Romanian dialect identification in a wider research tradition that includes both speech and writing. It describes work on Arabic varieties that drew on sound patterns, commentary corpora, travel text, and social media. It also notes the success of character-based string comparisons in Arabic shared tasks. In the Chinese and Spanish work discussed by the authors, several examples concern the distinction between varieties in speech. The Spanish literature also includes a corpus of informal language from speakers in several countries. These examples establish the range of settings the authors had in mind when they moved from edited news to shorter, less directly comparable texts.

For Romanian, the authors trace a different progression. They describe linguistic work on the geographical and historical relationships among varieties, alongside work on specific features such as Aromanian syllable structure. The study they identify as the main computational predecessor to the VarDial news tasks compares phonetic and spelling differences using a dataset of 108 words. Its unit of evidence was the word. An online news corpus introduces articles on different subjects, and with them the possibility that the circumstances of publication help determine the label.

MOROCO supplied that larger benchmark. Its creators, Butnaru and Ionescu, assigned both a dialect label and a topic label to each article. The benchmark supported a binary task that asked which of the two dialect labels applied, as well as topic tasks that asked what a document was about. The 2019 VarDial campaign used the corpus for the Moldavian versus Romanian Cross-Dialect Topic Identification shared task, abbreviated MRC. The paper follows up on both tasks, with dialect identification as its main concern.

Participants in MRC tried several ways of turning text into evidence. Some used learned representations of words or characters. Others used recurring stretches of characters or combined decisions based on selected statistical properties of the text. The original corpus study had already compared a character-level neural classifier with a method based on string similarity. This gave the follow-up a set of established systems to compare under common changes in input, instead of treating the performance of any one architecture as the whole phenomenon.

The paper also situates topic labeling within [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/), the assignment of pre-defined labels to text. The related work covers applications in several languages and methods ranging from statistical classifiers to attention-based neural networks. For the Romanian setting, the authors identify earlier MOROCO work as the direct precedent for asking whether news topics can be recognized within and across the two written varieties.

#### Why the direction of transfer matters

In the dialect task, both labels have to be available during training. The system learns to associate text with Moldavian or Romanian and then makes that choice for an unseen item. In cross-dialect topic classification, the label vocabulary is about subject matter. A system can learn to recognize topics from Moldavian reporting and then predict those same topic labels for Romanian reporting. The reverse direction is a separate test. Within-dialect topic classification keeps training and evaluation on the same side.

The move from news to tweets is a different kind of transfer. The output is still the dialect label, but the kind of text changes. News openings and tweets are both short compared with complete articles. Tweets also come from different sources and a different period. A classifier that succeeds there has found associations that hold under those changes, whatever their precise linguistic or topical origin. The authors use the two kinds of transfer to ask distinct questions about the portability of evidence. For topics, the writing variety changes. For dialect, the genre and collection circumstances change.

### The method, step by step

#### Start with a labeled piece of text

The pipeline starts with a piece of writing whose label is known during training. For dialect identification, the news label reflects where the publisher is based, as represented by its web domain. For topic classification, the label is the category assigned in MOROCO. The experiments can keep the full article as the input or replace it with its first sentence. In the cross-genre dialect test, the classifiers learn from article openings and are evaluated on tweets. The news and tweet collections are both preprocessed to mask named entities.

The authors give the same task to systems that represent the input in different ways. One system asks how much a string resembles examples it has already seen. Another learns to recognize local sequences of characters. Others read representations of words in order, look for informative parts of a document, or use a Romanian version of BERT adapted to the task. Each system can make its own prediction. The stacking procedure takes those answers as fresh input and learns a final decision rule.

How the stacked classifier predicts a label The steps in order.

Masking is a property of the prepared collections. The paper’s comparison changes the scope of text used from those collections, alongside the training and evaluation conditions. A first sentence is still associated with the label of its article. It can contain a complete lead, a short introduction that depends on later context, or remnants of an expression interrupted by a placeholder. The change preserves the number of news items while altering which evidence survives in each one.

#### Compare strings by their shared character sequences

The string-kernel systems work with character [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/), consecutive runs of a specified length. Looking at the text this way makes spelling and word fragments directly available. A six-character pattern can be part of a word or can span a word boundary where the string representation includes the separator. The method has no need to declare in advance whether a particular pattern represents a suffix, a distinctive word, or a piece of a recurring phrase.

One way to use such patterns is to imagine a table with a column for every possible sequence and an entry indicating whether the sequence meets a condition in a particular text. This can be a very large representation. The kernel stores comparisons between text samples. Conceptually, it gives the same inner product that the explicit representation would give, so the classifier can work with similarities without maintaining that full table of features. This is the dual form used by the authors.

The paper writes the presence-bits kernel as follows.

```
k⁰⁄¹(xᵢ, xⱼ) = ∑_{g ∈ Sⁿ} #(xᵢ, g) · #(xⱼ, g)
```

The symbol `k` denotes the kernel, and its `0/1` superscript identifies the binary-valued features behind the comparison. The strings being compared are `xᵢ` and `xⱼ`, with `i` and `j` indexing the two items. `S` is the character set, `n` is the length of a sequence, and `Sⁿ` is the set of sequences of that length. The index `g` runs through that set. The notation `∈` means that `g` belongs to the set, `∑` adds the terms across those sequences, and `·` multiplies the two binary indicators for each sequence. The equals sign gives the resulting similarity. In the paper’s explicit definition, `#(x, g)` returns `1` when the sequence `g` occurs in string `x` more than once, and `0` otherwise. Hence, in the displayed definition, a sequence contributes when it meets the threshold in both strings.

The authors use character 6-grams for both classifiers built on this representation. For the support vector machine, or SVM, the kernel entries provide the similarities used to learn a separating boundary. The SVM places that boundary so as to favor a large margin between the two classes. The training examples near the boundary help determine where it falls. The paper uses the custom kernel in place of an explicitly constructed character-feature representation and describes its SVM as mathematically equivalent to the corresponding primal approach in the earlier shared-task submission. For topic classification, it uses the one-versus-one scheme, in which separate decisions are learned for pairs of categories.

Kernel ridge regression, or KRR, uses the same text comparisons with a different learning rule. Ridge regression fits a numerical response while penalizing the size of the fitted coefficients. The kernel allows it to learn using the similarity representation. In the binary dialect task, the authors convert the continuous prediction to a class by rounding it to a label from the set `{-1, 1}`. For topic classification, they use one-versus-rest, which treats each topic in turn as the category to distinguish from all the others. The shared kernel puts both classifiers in contact with the same character patterns, while the different objectives give them different ways of using that evidence.

Where possible, the authors reuse settings from the prior studies that supplied the methods. They use validation data to choose settings when they lack enough detail to reproduce a choice. For the SVM, the selected value of the regularization parameter `C` is `10^2`. The grid runs from `10^{-3}` to `10^3`, with successive values obtained by multiplying by `10`. For ridge regression, `λ` is the regularization strength. Its search goes from `10^{-5}` to `10^{-1}`, also by a factor of `10`, and the selected value is `10^{-2}`.

#### Learn local patterns directly from characters

The character-level convolutional neural network, or CNN, takes a sequence of characters and learns a numerical vector for each character. The embedding layer turns a text into a sequence of those vectors. A convolution then moves filters along the sequence to produce activations, which indicate where a learned pattern responds to the input. Later filters receive the outputs of earlier ones and can respond to more elaborate combinations of local patterns. Max pooling keeps strong activations from nearby positions while reducing the resolution of the sequence.

This representation gives the CNN a different route to a spelling difference than the string kernel. The kernel compares texts through its fixed inventory of character sequences. The CNN learns what combinations to recognize while training on the labels. Its activation maps still retain a relation to positions in the original sequence. That property is what makes the authors’ later inspection possible. They can trace a contribution back to part of a word or a group of neighboring words and ask whether it is intelligible as a clue.

The CNN is based on the architecture used in the original MOROCO study. The article setting uses an input size of 5000 characters, and the first-sentence setting uses 1000 characters. Each character receives a vector with 128 components. There are three convolutional blocks, each with 128 filters and a stride of 1. The filter widths, in order, are 7, 7 and 3. Every block also uses a size-3 filter for max pooling. Squeeze-and-Excitation follows each convolutional block. This operation adjusts the importance of feature channels, the parallel responses produced by the filters. The reduction ratio, written `r` in the paper, is 64.

After the convolutional stages, two fully connected layers each have 128 units. Both use dropout with a probability of 0.3, which means that during training some units are temporarily suppressed to regularize the classifier. The prediction layer uses Softmax to turn its outputs into class probabilities. It has 2 units for dialect identification or 6 for topic classification, with one output per class. Training runs for 50 epochs, or passes through the training data, using mini-batches of 128 examples and a learning rate of `2·10^{-4}`.

#### Represent words and their context

The word-based systems start with pretrained [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). An embedding associates a word with a vector whose components encode a learned representation. The motivation is to give words that occur in similar contexts related representations. This is useful for seeing how different words can provide evidence about the same subject. In a dialect task, however, a difference between two near-synonyms can itself be informative. The classifier still has to learn which aspects of the input representation matter for the assigned label.

The authors try three sources of Romanian embeddings with each recurrent or hierarchical architecture. CoRoLa supplies vectors of size 300 and a vocabulary of 250,942 tokens. The training procedure for those embeddings represents words using sums of their character sequences. The Common Crawl and Wikipedia option, abbreviated CC, also uses vectors of size 300. It comes from FastText and covers what the paper describes as 2 million words. The NLPL option uses vectors of size 100 with a vocabulary of 2,153,518 words. The vectors were learned with the Skip-gram procedure from the Romanian CoNLL17 corpus, associated with [Universal Dependencies](https://md.research.elamur.ai/free/en/concepts/universal-dependencies/).

The long short-term memory network, or LSTM, reads a sequence while carrying an internal state that can preserve information from previous steps. Its gates regulate what enters that state, what is retained, and what can influence the output. The paper uses successive LSTM layers with 256 and 512 units, both with tanh activations. The second is followed by dropout at 0.3. A dense layer with 512 units uses the rectified linear activation known as ReLU. A final Softmax layer assigns probabilities to the dialect or topic classes.

The bidirectional gated recurrent unit network, or BiGRU, also uses gates to manage information across the sequence. Its bidirectional layer reads in both directions, so a position can be represented with information from what precedes and follows it. The implemented system begins with a GRU layer of 256 units followed by the bidirectional layer of 512 units. Both use tanh. Batch normalization follows the recurrent layers, and dense layers of 512 and 1024 units follow, with dropout at 0.3 after each dense layer. A Softmax layer makes the classification.

The hierarchical attention network, or HAN, uses the structure of a document explicitly. Its first encoder works on words within a sentence. Attention gives more influence to word representations judged relevant for the decision. A second encoder and attention stage work on the resulting sentence representations. For this architecture, the authors use a bidirectional GRU with 200 units in each encoder. The reported word sequence limit is 150 words and also applies to the other word-based architectures. The HAN document encoder accepts up to 20 sequences. A first-sentence task leaves the architecture with a much simpler document structure than the full-article task for which the hierarchy was designed.

Combining each architecture with each of the pretrained embedding sets produces 9 independent classifiers. They train for 20 epochs with mini-batches of 50 examples. Keeping the embedding sources as separate alternatives lets the authors compare ways of representing the words without committing all recurrent systems to a single vocabulary or pretraining corpus. In the ensemble, the resulting predictions remain separate inputs even where two components share their word vectors.

#### Adapt Romanian BERT to the labels

Ro-BERT uses the Romanian version of BERT, a pretrained [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). Attention lets it combine information from different positions of a token sequence when forming contextual representations. The Romanian version discussed by the authors was trained on more than 15GB of Romanian text. They use [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/) to adapt those pretrained parameters to the supervised task, with a Softmax output for the dialect or topic categories.

The fine-tuning uses batches of 32 examples and a maximum input of 128 tokens. The authors truncate longer sequences at the end and pad shorter ones with zeros to reach the input size. This detail affects the interpretation of the full-article comparison. Full articles are the source inputs for that condition, but Ro-BERT can use only the portion that fits its input window. A first sentence is selected at an article boundary defined by the text, whereas truncation is governed by the token limit.

The authors use Adam with a learning rate of `5·10^{-5}`. Its numerical stabilization parameter, `ε`, is `10^{-8}`. Fine-tuning lasts at most 30 epochs, with an early stopping rule based on accuracy failing to improve for at least 5 epochs. The classifier can therefore stop when continued training ceases to yield the improvement monitored by the experiment.

#### Combine the predictions

The simplest ensemble gives each component an equal vote and chooses the label with the most votes. This is plurality voting. Every component contributes the same weight, even if some are less reliable overall or several tend to agree because they represent text in the same way. A narrow preference and a confident preference have the same effect on that vote.

Stacking uses the outputs of the individual systems as the input to another classifier. The paper calls the component outputs hard labels and soft scores. A hard label is the category a component chooses. The soft scores describe how it rates the possible categories. The authors concatenate those outputs into a vector and use a multinomial logistic regression classifier to learn the final decision. The extra classifier can give different weight to different outputs. For a reader following an individual prediction, the distinction is that the stack can take the pattern of votes and scores into account after the components have processed the text.

The authors tune the regularization parameter `C` for logistic regression from `10^{-3}` through `10^3`, using a factor of `10` between candidates. They generally find `L₂`, the squared-coefficient penalty, preferable on validation data to `L₁`, which penalizes absolute coefficient sizes. Moldavian within-dialect topic classification is the exception they report. The typically selected values of `C` are `10^{-1}` or `1`. For sentence-level dialect identification, they select `10^{-3}`. The equal-vote rule has no comparable setting to tune.

The premise of stacking is that components can be right on different inputs. A character classifier and a contextual word classifier can arrive at the same label using different information. They can also fail on different cases. Training uses their predictions to estimate how to combine them. The performance of that combination is an empirical question because different architectures can still depend on the same cues. The paper evaluates the combination alongside its components so that an improvement can be traced to the decision rule that was actually tested.

### Experiments and results

#### The news and tweet collections

MOROCO contains 33,564 news articles collected from leading websites in Romania and the Republic of Moldova. Its web-domain labels use `.ro` for Romanian and `.md` for Moldavian. The official split contains 21,719 training articles, 5921 validation articles and 5924 test articles. The topic labels cover culture, finance, politics, science, sports and tech. The split and the categories serve different roles. The split controls which examples are available for fitting and evaluation. The categories determine what counts as the correct answer for the topic tasks.

The accompanying dataset introduced by the authors is MOROCO-Tweets. Its validation split has 215 tweets, of which 113 carry the Moldavian label and 102 the Romanian label. The test split has 5,022 tweets, with 2,499 labeled Moldavian and 2,523 labeled Romanian. Tweets are collected from both countries in a period different from that of the news articles. Named entities are masked in the target data as well. The tweet collection has dialect labels and no topic labels, so it supports the cross-genre dialect experiment alone.

For dialect identification, the authors train and test with complete articles, then train and test with first sentences, and finally test the classifiers trained on first sentences on the tweets. In the news experiments, the unit is still the underlying MOROCO item when the input is reduced to its opening. In topic classification, the experiments distinguish news from each dialect separately and test transfer in both directions. Each topic comparison is made for complete articles and for first sentences.

Accuracy is the proportion of correct decisions. Macro F₁ starts from a separate F₁ score for each class and gives each class equal weight in the average. F₁ balances precision, how frequently a prediction of a class is correct, with recall, how frequently the system recovers examples of that class. In the paper’s single-label tasks, micro F₁ is equivalent to accuracy. The choice of averaging matters especially for topics because the categories are unevenly represented in MOROCO. A classifier can improve its accuracy by getting more of a common topic right without improving its performance on the others to the same extent. VarDial used macro F₁ as its official measure.

#### Dialect identification gets harder as the input changes

The earlier MRC result that motivates the study is a macro F₁ of 0.895 for the leading dialect submission at VarDial 2019. The paper also cites the original MOROCO string-kernel baseline at 0.941 macro F₁. These are results from the earlier news benchmark. The follow-up evaluates the SVM and KRR string-kernel classifiers, the character CNN, the word-based recurrent and hierarchical systems, and fine-tuned Ro-BERT. The two ensembles combine those predictions under the equal-vote and learned rules.

On the MOROCO test with complete articles, the SVM, KRR, character CNN and Ro-BERT all clear 90% in both accuracy and macro F₁. Both ensembles also pass that threshold. This establishes the performance that the more restrictive tests seek to explain. The high scores are shared by classifiers with quite different representations. An explanation that requires all of them to understand the overall meaning of an article would have to account for the success of the string comparisons, which can work from repeated character patterns.

Using only the first sentence of each article generally lowers both metrics. The authors describe the drop for almost all systems as approximately 10%. The HAN shows a smaller decline and begins from relatively low full-article scores. The relative positions of the leading individual approaches also change. Ro-BERT overtakes both string-kernel systems on the first-sentence task, even though those systems are particularly strong across the dialect experiments as a whole. The shorter news setting changes the advantage available from each representation.

The tweet test brings another decline. Some classifiers, including HAN, approach chance, while stronger ones are near 70% on both accuracy and macro F₁. The string-kernel methods remain among the strongest, with Ro-BERT close behind them in the overall comparison and the CNN behind those individual approaches. Plurality voting fails to beat the leading pair of individual systems in each setting. Stacking leads on dialect identification in all of them.

The paper summarizes the stacked ensemble’s dialect-identification scores as above 94% for the full MOROCO news test and above 86% for the MOROCO first-sentence test, with scores up to 70% on the MOROCO-Tweets test. These figures describe the reported performance levels across the settings. They are bounds and a reported high point, so replacing them with exact bars for accuracy or macro F₁ would misrepresent the precision of the comparison.

#### Running time for full articles

The paper measures full-article inference as the average time to extract the relevant features and label an article. Training time includes feature extraction and fitting. The measurements come from the authors’ machine with an Intel Xeon CPU, Nvidia GeForce GPUs and 256 GB of RAM. They concern the full-article experiment.

Mean inference time per article for selected classifiers in the full-article MOROCO dialect experiment The character CNN has the lowest reported latency among these classifiers.

**The numbers**

| System or setting | ms |
| --- | --- |
| Character CNN (this paper) | 1 |
| Ro-BERT | 5 |
| String-kernel SVM | 26 |
| String-kernel KRR | 26 |

The LSTMs with pretrained word vectors each take less than 10 ms per article. The paper identifies HAN as the least efficient individual system and the character CNN as the quickest to train, followed by the LSTM and BiGRU alternatives. The times illustrate that training cost, single-item inference cost, and classification performance give different orderings. The CNN offers fast predictions and is also the system selected for the feature visualizations. The leading dialect scores come from a combination that includes much slower components.

Both ensembles take about 0.5 seconds to label a news article. Their measured times are slightly lower than adding each component’s time by itself. The string-kernel calculation can be shared between its two users, and each set of pretrained word vectors can be prepared once for the systems that use it. Even equal voting requires running the component classifiers. Its simple final decision rule therefore does little to remove the shared expense of obtaining their predictions.

#### Topic classification within and across dialects

Within a dialect, the authors generally find higher topic scores for Moldavian news than for Romanian news. In the full-article Moldavian test, all classifiers except HAN exceed 90% accuracy. On both dialects’ full articles, the LSTM using CoRoLa vectors has the highest accuracy. The LSTM using CC vectors has the highest accuracy for first sentences in both dialects. In these experiments, the best system by accuracy can differ from the best one by macro F₁.

The string-kernel systems tend to place better by macro F₁ than by accuracy relative to many neural systems. The strongest individual approach by macro F₁ in the reported within-dialect comparison is generally Ro-BERT. Stacking attains the highest macro F₁ in most of the within-dialect experiments, with Moldavian first sentences an exception in which Ro-BERT is slightly ahead. The result makes the objective of the comparison consequential. A system that is best at getting the largest number of articles right need not be the same one that performs best when every topic receives equal weight.

When training uses one dialect and evaluation uses the other, much of the same pattern recurs. LSTMs frequently provide the strongest accuracy. SVM and KRR generally improve in the relative ordering when macro F₁ is the measure, and Ro-BERT is consistently ahead of them on that metric. Stacking gives the highest macro F₁ in both transfer directions for complete articles. Ro-BERT slightly surpasses it when the transfer test uses only opening sentences. The dialect-identification result for stacking thus describes a more consistent advantage than the topic experiments do.

#### How the annotators performed

Ten volunteers each label 120 MOROCO first sentences for dialect and topic. Nine are native speakers of Romanian and one is a native speaker of Moldavian. The study uses 60 items from the Romanian side of the corpus and 60 from the Moldavian side, with 10 items for each of the 6 topics within each dialect. Each participant sees the same type of material as in the first-sentence condition, with names replaced by the special token `ne`. The paper uses this short format both to keep annotation manageable and to reduce the contextual evidence available to the participants.

Human dialect accuracy on the 120 MOROCO news openings Even the highest-scoring volunteer finds the dialect labels difficult to recover from news openings.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Lowest individual accuracy | 48.3 |
| Mean annotator accuracy | 53.2 |
| Highest individual accuracy (this paper) | 58.3 |

The averages pool performance across volunteers, who each make judgments on the balanced set. The paper compares these judgments with automated dialect results on tweets because both involve short text. In that comparison, the best human annotator scores above the LSTM and HAN in accuracy, while the strongest kernel classifiers and stacking score higher than the annotator. A common test set would be needed to measure the human–classifier gap on the same items.

The topic scores show a different range. Individual topic accuracy is between 63.3% and 75.0%, and individual topic macro F₁ is between 62.7% and 74.8%. These are results for the same volunteers and balanced set of openings. The paper finds them broadly comparable to the sentence-level automated results, and says that the volunteers generally score higher in macro F₁ than the systems tested on cross-dialect topic classification of sentences. Here, too, the composition of the human set and the automated evaluation matters. The human set is designed to balance topics and dialects, whereas the original news corpus has an uneven topic distribution.

### What the ablations show

#### Shortening the input preserves the news source

The paper varies the amount of text, the evaluation genre and the way predictions are combined, and it examines which characters the CNN uses; it does not report a feature-removal ablation that isolates individual dialect cues.

The move from complete articles to first sentences is the closest comparison to removing part of an input. Both versions retain the underlying MOROCO items and labels. The shorter versions remove later mentions, repeated expressions, topic developments and stretches of prose that may be characteristic of a publication or author. Both training and testing change to use the shorter texts, so the comparison asks how much success is possible when the system learns from shorter examples as well as receiving shorter examples at prediction time.

The result supports the importance of having more evidence per article. It leaves room for several explanations of what the lost evidence was. A later paragraph might contain a regional spelling or word choice. It might identify an event indirectly, contain a telltale editorial expression, or repeat a phrase enough times to affect a character comparison. All can disappear together when only the opening is kept. The score changes show how much harder the resulting task is under the paper’s setups. They do not assign the change to any one category of feature.

An opening can also be rich in clues of its own. A news lead often introduces the event or the institution involved, sometimes even when names are masked. The author’s choices in that opening are still present. For systems that use a fixed input limit, the contrast is between the first sentence and a bounded representation of the full article. The CNN also uses a different character input size for the two conditions. The test controls the underlying items more tightly than it controls every detail of how the architecture receives them.

#### Moving to tweets changes where the clues come from

A classifier trained on news openings and tested on tweets can no longer count on reproducing the distinction between the same news publishers in the same collection period. The source, time and genre have changed, while the dialect distinction is still the target. This makes the transfer test useful for confronting the authors’ concern that systems may be recognizing the newspapers. The remaining performance shows that some evidence learned on the news openings travels beyond that original collection.

The comparison cannot disentangle everything that changes with the new dataset. Tweets may contain different kinds of spelling, different lengths of text and different subjects from edited openings. Country-linked references can still appear in forms other than named entities. Writers in either genre can discuss local topics. The lower results are therefore compatible with losing publisher-specific evidence, with changes in general language use, and with other differences between the collections. The important residual finding is that the strongest systems can still make meaningful use of the short text after those shifts.

The different rankings also matter. HAN’s poor cross-genre performance shows that an architecture designed to make use of words within sentences and sentences within documents offers little assurance of transfer to short social posts. The string-kernel methods remain strong even in that setting. Their success makes a case for the value of recurring character patterns while leaving open which patterns are doing the work. A sequence that captures a spelling preference and a sequence that captures a political term enter the similarity calculation in the same way.

#### Learned combination helps more consistently than equal voting

The voting and stacking results compare methods of aggregating predictions from a diverse collection of classifiers. Equal voting gives each classifier a say regardless of the task or what the others predict. The learned combination can use the harder distinction between a label and the scores behind it and can weight outputs according to their usefulness during fitting. The contrast is informative because adding more votes by itself gives mixed results, whereas learning how to combine the predictions gives the best dialect outcomes.

The paper’s language about complementarity is an interpretation of this success. When the stack surpasses the components, the combination has found useful structure in their outputs. This could arise because different systems recognize different passages, because their confidence scores contain additional information, or because the fitted decision rule handles systematic tendencies in the component predictions. The comparison changes the use of scores as well as the way the predictions are weighted. It provides no isolated estimate of how much comes from each change.

The topic experiments qualify the case for stacking. With short cross-dialect inputs, Ro-BERT is slightly stronger by macro F₁. An LSTM can lead on accuracy even where the ensemble leads by macro F₁. Those outcomes show how the value of combining predictions depends on the label being predicted, the input, and the metric. Diversity makes differences between predictions available to the ensemble. It does not make every combination more accurate than its most suitable component.

#### The annotators make revealing errors

The authors examine pooled confusion matrices to see which human mistakes recur. On dialect identification, the volunteers assign the Romanian label to 63.5% of the 120 sentences they each receive on average, despite the balanced sampling. The authors suggest that the composition of the group, with Romanian speakers in the majority, may be related to the tendency to choose Romanian in the absence of evidence to the contrary. The judgments also contain errors in the other direction, including a Romanian item whose unfamiliar vocabulary leads all the annotators to choose Moldavian.

The examples with broad agreement illustrate different routes to a correct or incorrect answer. In one Moldavian sentence, a reference to the local currency contains the adjective *moldovenesc*, which points readers towards the expected label. Another example mentions European funds, which the authors say can direct readers towards the Romanian source. These clues concern the referent or subject. A reader can follow them without recognizing a difference in how the same thought would normally be expressed. Conversely, a Moldavian sentence about scientists receives a unanimous Romanian judgment even though the authors see no clear feature of the sentence that warrants it. Other examples divide the readers, sometimes even when the sentence is long enough to seem as though it should contain some evidence of origin.

Human topic judgments reveal more accessible cues. The annotators often recognize sports immediately, with an average of 1.6 false negatives per annotator for that category. The paper describes an example in which a footballer’s name survives preprocessing, and the volunteers unanimously give the sports label. Finance and politics are often confused with each other, as are science and tech. A report about taxes and a governing coalition can point toward two categories depending on which part the reader treats as the focus. Similarly, references to an online market can evoke technology or finance. The errors show how reasonable topic interpretations can diverge even among readers who understand the words.

The human analysis helps explain why the same readers do better on topics. A phrase about an election or smartphones can directly indicate a subject, and the meaning matters to understanding the sentence. A slightly less familiar synonym can leave the sentence equally intelligible and pass without comment. This account is consistent with the judgments and the examples. The volunteers’ annotations do not reveal a complete inventory of what each reader noticed or how the reader weighed it.

#### Character visualizations point to spelling, wording and subjects

For the analysis of [interpretability](https://md.research.elamur.ai/free/en/topics/interpretability/), the authors adapt Grad-CAM to their character-level CNN. Grad-CAM is a technique for locating parts of an input that are influential for a convolutional classifier’s prediction. The paper uses the last convolutional layer, where the learned activations still preserve information about position. It maps importance to regions of the text and groups the display into 10 levels of shading. Darker regions indicate higher importance. Spaces are left uncolored for readability. The resulting display shows where to look in an example; the reader still has to decide what the highlighted characters have in common with those in other examples.

One recurring feature is the use of *î* inside Moldavian words. The paper illustrates this with pairs such as *mîna* and *mâna*, and *mîncare* and *mâncare*. For a classifier that reads characters, words with this difference can provide related evidence even when they concern different subjects. Each form puts a different character into the corresponding portion of the input. The examples also include Moldavian *sînt* and Romanian *sunt*, which the authors discuss separately because the contrast also involves the sound represented by the spelling.

A sizeable part of the discussion concerns choices among words that can express similar things. In a Romanian sentence about beginning a process, a highlighted form is *demarat*. The authors propose *început* as a likely Moldavian choice in that context. They point out that *început* also occurs in Romanian. The neighboring word for production is highlighted as well, which makes a context-sensitive reading more plausible than treating the highlighted verb as an exclusive regional word. Likewise, their comparison of *companie* and *întreprindere* concerns relative preferences in news writing. The significance lies in which term a writer is likely to choose in the situation.

Other highlights span expressions. The authors associate *contra cost*, used to indicate that something requires payment, with Romanian usage. They also identify a Romanian proverb in another example. On the Moldavian side, they discuss a phrase for the cabinet of ministers and an expression for going bankrupt that uses a different verb from the one the authors expect in Romanian. They give a comparable example of approval expressed with *a avizat pozitiv*, where Romanian might use *a aprobat*. A preference may thus be visible in a sequence of ordinary words even when none is remarkable in isolation. The discussion also offers a possible word-order difference, with a phrase concerning how much money is spent placed at the beginning of a Moldavian sentence. That interpretation comes from the authors’ reading of the example.

The researchers find some strong highlights that have an explanation in the subject of the news. A Romanian protest and a public debate over the definition of family give the classifier clues linked to Romanian events. A Moldavian example contains a reference to the republic that the authors also treat as topical evidence. The distinction is clearest where an event effectively locates the news, and more tentative where a word may be both a regional preference and part of recurring local reporting. The visual analysis supports the authors’ view that genuine language differences are present in the corpus and used by the CNN, while also giving concrete examples of the alternative explanations that motivated the study.

### Limitations

#### Limits identified by the authors

The conclusions are about written dialect identification. The authors describe speech as a future direction because pronunciation would make other cues available and could support a study of further Romanian varieties, including those in Ardeal or Oltenia. The paper’s experiments measure what can be recovered from written news and tweets. Its account of phonetic differences explains why their investigation is difficult; those differences are outside the evidence the classifiers receive.

The authors also recognize that many things besides dialect can influence a prediction on MOROCO. They describe plausible contributions from publication, author and subject. A shorter sample still comes from an identifiable article with an opening that can reveal its subject. The strongest protection the paper offers against dependence on the original publishers is the tweet experiment, which uses other sources from a different period. The authors regard that more difficult condition as a fairer and more realistic assessment. The examples in their discussion retain a role for subjects that happen to be associated with one country.

The human study is intentionally small and short. The paper describes the volunteers’ time as a reason to use article openings. That decision also removes context the annotators might have used. They can understand both varieties, but the study includes more native speakers of Romanian than of Moldavian. The authors note that this imbalance might have encouraged the observed preference for the Romanian label. The study measures how this group judged this sample under those conditions.

The authors also qualify their case for stacking. They motivate it by the prospect of combining systems that excel on different inputs, and they recognize that the method offers no general guarantee of superior results. The topic comparisons illustrate that limit within the paper itself. Even when a learned combination performs especially well in the dialect experiments, its relative position can change when the text has to be sorted by subject.

#### Limits visible in the design

A central measurement issue is the difference between a geographical source label and a dialect judgment made by a linguist. MOROCO uses national web domains as labels for the articles. Those labels give the benchmark a consistent answer for every item, including a sentence with shared usage and no visible regional features. They cannot establish that a particular sentence was written by a speaker of the corresponding variety, or that the wording would strike readers as regionally marked. An annotator who chooses a different label may be wrong under the benchmark’s rule even when the sentence itself gives little basis for deciding.

The benchmark can demonstrate generalization to its particular test material. Strong tweet scores show transfer beyond the news publishers and period used for training, but the experiment changes genre, source and time together. Without independent comparisons changing each of those conditions, the effect of any one is undetermined. Both collections still come from countries with their own public institutions and local discussion. Surviving geographical clues can travel across the corpus boundary along with spelling and vocabulary.

Masking names reduces some direct evidence of origin. The paper’s football example shows that masking can miss a name, and a successfully masked sentence can still contain recognizable institutional or topical language. The study does not estimate how much of the remaining performance comes from such clues. The Grad-CAM examples demonstrate that the CNN’s predictions make use of plausible dialect cues in specific cases. They do not provide a systematic count of how frequently regional language, topic or writing style is the decisive evidence in the news and tweet tests.

There is a further distance between what is visible in a heatmap and what an intervention would establish. A highlighted stretch can contain a word, a neighboring expression and a topical reference at the same time. If the authors’ interpretation is that the chosen synonym matters, a test that substitutes the alternative while preserving the rest of the sentence would answer a narrower causal question. The paper offers the visualization and its reading of the evidence. It does not report that substitution test. Nor do the CNN’s highlights by themselves explain the decisions made by the string-kernel classifiers or the stacked ensemble.

The experiment comparing humans and automated systems is also affected by how the samples were chosen. The volunteers see a balanced group of news openings. The paper’s particularly striking automated comparison uses tweets. Since people and classifiers did not make judgments side by side on the same tweet items, the results do not establish whether they would favor the same cues, which examples only one group would get right, or how their relative accuracy would change on those identical items. The human results establish difficulty for the volunteers under the news-opening protocol.

For topic classification, the human set’s balance makes each topic equally prominent in the collection the volunteers receive. The original news data used in automated evaluation are imbalanced by topic. Macro F₁ addresses one aspect of that problem by giving each category equal weight in the score, but the examples behind the scores can still have very different levels of difficulty. A direct claim about relative skill across all topics would depend on matched items and conditions as well as on a common metric.

Finally, the precision of the methodological account differs across components. The authors list the inputs to the stack and the settings they validate for logistic regression. The description does not specify whether the level-one training predictions were generated out of fold, drawn from a held-out split, or obtained in some other way. Those choices determine how much the stack sees predictions on examples already known to its components. The reported comparisons establish how the implemented ensemble scored. The description leaves that part of the fitting procedure uncertain for a reader seeking to reproduce it closely.

### What came after

The paper documents the use of its tweet collection in successive Romanian Dialect Identification campaigns. This is a continuation of the benchmark described by the authors. It gives a record of how the data were used to test transfer under different conditions, with no documented subsequent adoption of the paper’s stacked ensemble or its feature interpretations.

At VarDial 2020, the Romanian Dialect Identification task used tweets from the collection for final testing. The earlier MOROCO training and validation sets supplied training news. Participants also received the original MOROCO test set and 200 tweets as validation material. Giving them some target-genre examples allowed development on material closer to what the final evaluation would contain. The shared task and the paper’s own experiment therefore use the same underlying idea of a news-to-tweet test with different roles for the available data.

The 2020 participants cited in the paper pursued several ways of coping with that shift. Popa and Stefănescu combined representations from multilingual and Romanian Transformers in an SVM system, using individual sentences as training examples and adjusting decision thresholds for macro F₁. Jauhiainen and colleagues used the relative frequencies of character sequences. Zaharia and colleagues combined character, FastText and Romanian BERT representations in a recurrent classifier. These systems show the range of solutions prompted by cross-genre evaluation. The paper draws on that surrounding work when selecting Ro-BERT and comparing character-based and word-based approaches.

At VarDial 2021, the task supplied all of MOROCO for training, repurposed the tweet collection described in the paper as validation material, and reserved newly collected tweets for final testing. Participants could therefore see substantially more material from the target genre before the evaluation. The authors report that the overall results did not improve markedly compared with the previous campaign. The leading submission, from Jauhiainen and colleagues, used character n-gram frequencies and an adaptation procedure. It reached a macro F₁ of 0.777 on that campaign’s tweet test. Zaharia and colleagues used Transformers and knowledge distillation, achieving a macro F₁ of 0.732 on the same test.

Because the test tweets and the availability of development data changed across campaigns, those scores describe different evaluation conditions from the news-to-tweet experiment in the paper. The documented continuation lies in making cross-genre dialect identification a recurring benchmark. Reusing the earlier tweets for development while collecting new ones for testing kept the question of transfer central even as participants gained more opportunities to tune their systems on the target genre.

## Cite

Cite as Mihaela Găman and Radu Tudor Ionescu. 2021. The unreasonable effectiveness of machine learning in Moldavian versus Romanian dialect identification. International Journal of Intelligent Systems.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1002/int.22746](https://doi.org/10.1002/int.22746) · [arXiv 2007.15700](https://arxiv.org/abs/2007.15700)

```bibtex
@article{gaman2021unreasonable,
  title = {{The unreasonable effectiveness of machine learning in Moldavian versus Romanian dialect identification}},
  author = {Mihaela Găman and Radu Tudor Ionescu},
  journal = {International Journal of Intelligent Systems},
  year = {2021},
  doi = {10.1002/int.22746},
  eprint = {2007.15700},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1002/int.22746}
}
```

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