Elamur Research

Measuring Spurious Correlation in Classification: “Clever Hans” in Translationese

Paper · 2023 · Angana Borah, Daria Pylypenko, Cristina España-Bonet et al.

Summary

A classifier can tell whether a German paragraph was originally written in German or translated from Spanish and still leave a linguistic question unanswered. The two sets of paragraphs may discuss different places, and the place names alone may give away which set a paragraph came from. Borah and colleagues investigate how much such clues can account for in a German parliamentary corpus. Their concern is that a high score on this task can reflect both sensitivity to translationese, the recurring linguistic differences associated with translation, and sensitivity to the subjects that happen to be discussed by each group.

The authors first look for a shortcut without specifying in advance which subjects might supply it. They group paragraphs into topics using methods that leave the original and translated labels out of the grouping process. Afterward, they count how many paragraphs in each topic belong to each class. If each topic predicts its own majority class, the share of paragraphs it gets right is the clustering measure known as purity. The strongest topic grouping reaches an alignment of 0.62, compared with 0.5 for a grouping in which every topic is evenly divided between the classes. The authors propose using 0.62 as a more demanding baseline for this corpus, which they call a topic floor. It measures what can be recovered from the topic assignments they examined. The calculation itself leaves open what a separately trained translationese classifier actually uses.

The authors then intervene on a clue that earlier work had already identified. They automatically replace names of places, people and organizations with their entity types, and vary whether this replacement applies during training, testing or both. The unmasked BERT classifier reaches test accuracy of 0.92. The configurations that introduce name masking reach 0.89 or 0.90. Names contribute measurably to performance, yet the remaining accuracy is high. An analysis of the inputs that support individual predictions finds that Spanish place names disappear from the highest-ranked cues for translated paragraphs under masking. Past-tense verbs become prominent in that ranking, while some possible location fragments remain among the cues for originals.

A separate experiment replaces surface words throughout the text with grammatical tags. A BERT classifier prepared and trained for these sequences reaches test accuracy of 0.78 with detailed German tags and 0.768 with the more general Universal tags. Grammatical sequences therefore retain considerable information about translation status in these data. Taken together, the experiments distinguish the opportunity to use a topic shortcut, the effect of suppressing an identified source of topical information, and the predictive evidence that survives a much broader removal of vocabulary.

Deep dive: Measuring Spurious Correlation in Classification: “Clever Hans” in Translationese

Borah and colleagues measure how much topic can reveal about a text’s translation status and test what changes when names and words are masked. · about 32 minutes to read

The problem and its context

What translationese classification is meant to detect

Translationese concerns differences between texts originally produced in a language and texts brought into that language through translation. Both sides of the comparison can be fluent. A translator may favor a construction that is readily available in the source language, follow target-language conventions especially closely, or state a connection that the source leaves implicit. The paper describes effects at levels ranging from individual words and syntactic patterns to meaning and the organization of discourse. A paragraph may show only a few of these effects, particularly when the translation is professional.

Those effects motivate a task in which a system receives a text and predicts its origin. The paper calls the two classes O for original and T for translated. In this experiment, the text is German whichever label it receives. The classifier has to distinguish between two histories for the German paragraph. The common output language is essential to the question because a distinction between German and Spanish passages would be a different classification task. A comparison within the same genre and style also makes the labels more useful for studying translation. This is the setting for the paper’s experiments in text classification.

The paper situates the problem in both linguistics and cross-lingual evaluation. Corpus research uses recurring tendencies to characterize translated language. Applied research has examined how translated material affects tasks that rely on cross-lingual data, including the use of translated test material. An evaluation can change when a test set includes translations, and that makes the distinction consequential beyond the ability to assign a label to a paragraph. The introduction points to earlier work on translation artifacts in cross-lingual transfer and on the role of translationese in machine translation.

Even with language and genre held steady, documents differ for many reasons. Authors have their own habits. Speakers address different subjects. Organizations and places come up when they are relevant to the debate. These differences can be easier to detect than the cumulative effect of translation on grammar or style. If the two labeled groups differ systematically in what they talk about, a classifier has a second route to the correct decision.

How earlier classifiers made their decisions visible

Earlier work on the task often began with a hand-built representation. A researcher could count sequences of words or tags, record how frequently grammatical categories appeared, or derive features from other statistical descriptions of text. Decision trees and support vector machines then used those features to distinguish the classes. A sequence of adjacent units used this way is an n-gram.

Selecting the inputs by hand also gave researchers ways to investigate their results. They could inspect which features received substantial weights in a support vector machine, examine how features contributed to tree-based decisions, or run separate classifiers with different inputs and compare their accuracies. A useful feature might point to a grammatical or stylistic pattern worth examining in the underlying texts. The paper describes this interplay between prediction and explanation as a recurring part of the earlier research.

Later work described by the authors learned representations of the text during training. This changed the scope of the comparison. A system could make use of combinations of text properties that a researcher had never entered as explicit features. An earlier study by Pylypenko and colleagues found a large advantage for a BERT-based approach over one using engineered features and a support vector machine. Subsequent work by Amponsah-Kaakyire and colleagues traced the performance difference to the features learned from text. The architecture used to obtain those representations was BERT.

The opportunity to discover useful features also opened up a way to discover accidental ones. Amponsah-Kaakyire and colleagues used Integrated Gradients, a technique that assigns input elements a share of the support for a prediction, to inspect decisions about the same German data. They found prominent Spanish place names among the cues for translations from Spanish. German places tended to occur in the originals. The setting lets a classifier learn something genuinely predictive about this collection of paragraphs even though the place a speech discusses is a different property from the linguistic effect of translating it.

This is the behavior the authors call Clever Hans. A system appears to perform a target task because its answers are frequently correct, while a cue incidental to the intended task helps produce those answers. The word spurious is important in this sense. The association between the cue and the label can be real in the corpus. What makes it spurious is the reason it is predictive and the risk of taking a correct answer as evidence that the classifier recognized translationese. The earlier discovery of geographical cues makes this a question of both interpretability and experimental design.

Why topic calls for a separate measurement

Finding a conspicuous place name demonstrates a possible failure of interpretation, but leaves several questions open. It gives little indication of how much predictive information the rest of the corpus contains about topics. It also leaves open how well a classifier would do if those names were unavailable. Some decisions may use the names. Others may be recoverable from the grammar of the same paragraphs. Still others may have several cues pointing to the same label, so that obscuring one of them changes the evidence while leaving the predicted class intact.

The authors also discuss earlier evidence of differences between original and translated text in the geometry of word representations. In some of that work, grammatical categories stood in for the words themselves to reduce the potential influence of subject matter. That approach suggests a useful way to investigate translationese even when the signal is distributed across many words. It also raises a design choice about how much to remove. A researcher who hides only entity names leaves most of the language intact. A researcher who hides every surface form asks how much can be learned from sequences of part-of-speech tags.

The paper addresses the broader problem through two questions with different starting points. When researchers lack prior knowledge of the relevant topics, they can ask what classes are recoverable from an independently derived grouping of the corpus. When previous analysis has identified a particular clue, they can alter the input and observe how much prediction changes. The first question is about the distribution of evidence in the data. The second requires a classifier, a particular intervention and a comparison across conditions. Either can change how a score should be understood, even though each measures something different.

The method, step by step

Establishing the comparison in German

The authors use the German portion of a German–Spanish subset of the Multilingual Parallel Direct Europarl corpus, abbreviated MPDE. It contains 42k paragraphs, divided evenly between German originals and German translations from Spanish. A training example has an average length of 80 tokens. Both groups come from parliamentary proceedings in the same genre and style. The classifier sees German throughout, with translation status supplied separately as the target label.

MPDE uses material from before 2004 for this comparison. With later material, the source language of a translation may itself represent an earlier translation. The cutoff reduces the quantity of available text and gives the authors a clearer basis for treating the German originals as originals and the Spanish-to-German translations as direct translations. This matters because the interpretation of a score begins with how securely the two classes are defined.

The paragraph is also the unit of topic assignment. When the paper talks about a document in a topic analysis, the document is a single paragraph. The unit stays the same when the authors later count labels inside topics. With the label attached at this level, the comparison asks whether the accumulation of evidence within a paragraph, topical or linguistic, is enough to identify its origin.

Discovering topics before looking at labels

The first analysis begins with the combined corpus. A topic method groups paragraphs by patterns in the text, without using the O and T labels to construct the groups. Only after a grouping has been obtained do the authors bring the labels back. For each topic, they ask how many of the assigned paragraphs are originals and how many are translations. This order gives the experiment its diagnostic role. Any association with the target appears in a grouping constructed for a separate purpose, through topic modeling.

Imagine that the grouping procedure produces two topics. If the paragraphs in each topic are evenly split between originals and translations, knowing a topic gives no preference between the two labels. If one topic contains originals only and the other contains translations only, topic identity settles the question everywhere in the data. A common intermediate case is a topic with a clear majority and a substantial minority. A guess based on that topic is usually right, and it makes a predictable set of errors.

In this example, topic identity is the whole input to the hypothetical decision rule. Each topic gets its own majority label. A topic can favor the same label as another topic, and the method works with topics of different sizes. A small, nearly uniform group is good at predicting the labels of its own paragraphs. A much larger group with weaker alignment can have more influence on the corpus score because it covers more paragraphs.

Measuring translation-status alignment from unsupervised topics

The steps in order.

Measuring translation-status alignment from unsupervised topicsStep 1: Combine original and translated German paragraphs1. Combine original and translated German paragraphsStep 2: Discover topics without using translation labels2. Discover topics without using translation labelsStep 3: Assign each paragraph its highest-probability topic3. Assign each paragraph its highest-probability topicStep 4: Count original and translated paragraphs within topics4. Count original and translated paragraphs within topicsStep 5: Give each topic its majority class5. Give each topic its majority classStep 6: Weight each topic by its corpus share6. Weight each topic by its corpus shareStep 7: Read the resulting purity as topic alignment7. Read the resulting purity as topic alignment

Turning the topic counts into a score

The scoring procedure assumes two partitions of the same collection. Every paragraph belongs to O or T, and every paragraph has one selected topic. Each partition covers the whole collection, and its groups are disjoint. The topic procedure may give graded evidence for several topics, but the authors use the highest-probability topic to obtain the single assignment needed for these counts.

alignₒ,ₜ(topᵢ) = max(|topᵢ ∩ O|, |topᵢ ∩ T|) / |topᵢ|

Here topᵢ is the set of paragraphs assigned to the topic indexed by i. O is the set of German originals, and T is the set translated into German. The symbol ∩ takes the intersection of two sets, and vertical bars count their members. The max function selects the larger of the two intersections. Dividing by the number of paragraphs in topᵢ gives alignₒ,ₜ, the share that would be correctly labeled under the topic’s majority-class prediction. The subscripts ₒ,ₜ indicate which classification the topic is being aligned with.

An individual topic’s score ranges from 0.5 to 1. At 0.5, the two class counts tie, so either choice would give the same number of correct assignments. At 1, all paragraphs in the topic share a label. The maximum makes the measure symmetric with respect to the names of the labels. If the class counts within a topic exchange places, the larger count and the topic size still determine the same score.

The paper then weights each topic by how much of the corpus it contains.

wᵢ = |topᵢ| / |Data|

wᵢ is the weight of topic i. The numerator |topᵢ| is the number of paragraphs assigned to that topic, and |Data| is the total number of paragraphs in the combined collection. The division expresses the topic’s size as a share of the collection.

avg_alignₒ,ₜ(tops) = ∑ᵢ₌₁ⁿ wᵢ × alignₒ,ₜ(topᵢ)

tops denotes the collection of topic groups. avg_alignₒ,ₜ gives their aggregate alignment with the original and translated classes. The summation sign ∑ adds the terms from the first topic, indexed by i = 1, through the last, indexed by n, the number of topics. Each term multiplies topic i’s corpus share wᵢ by its class alignment alignₒ,ₜ(topᵢ). Every paragraph enters the overall calculation through its assigned topic.

Weighting also clarifies the role of class imbalance. If one class dominates the corpus, a high aggregate alignment can arise partly because that same class dominates many topics. The computation can accommodate this distribution because it uses the observed counts. The interpretation of the resulting score still depends on the overall class frequencies. For the roughly balanced corpus used here, 0.5 is the relevant reference point for the case in which every topic splits evenly. In an imbalanced corpus, the global majority class would be an important comparison in its own right.

Why the score is cluster purity

The same calculation applies when the groups are arbitrary clusters and the external labels are arbitrary classes. The paper first expresses the general score as a weighted average. The group’s weight comes from its size, and the group’s alignment comes from the fraction of its members that belong to its largest class.

avg_align_Class(Cluster) = ∑clu∈Cluster w_clu × align_Class(clu)

Cluster is the set of clusters and Class is the set of external classes. clu denotes one cluster, and ∈ means that it belongs to Cluster. w_clu is its share of the data. align_Class(clu) is its majority-class fraction. The summation runs over all clusters, adding the product of those two quantities for each one.

Substituting the component definitions shows which counts matter in the final expression. The cluster size enters the weight as a numerator and the cluster alignment as a denominator. Those factors cancel, leaving the sum of the majority-class counts divided by the total number of items.

purity(Cluster, Class) = (1 / M) × ∑clu∈Cluster max_cla∈Class |clu ∩ cla|

purity is the clustering measure. M is the total number of data items. For each cluster clu, cla ranges over the classes in Class, and max_cla∈Class chooses the class whose intersection with the cluster has the most members. Vertical bars give that intersection’s count. The sum adds the chosen counts over Cluster. Multiplication by 1 / M expresses the result as a fraction of all items. In the paper’s application, Cluster consists of the hard topic groups and Class consists of O and T.

The majority decision establishes the maximum number of correct classifications available when the only input is the assigned topic and the decision is evaluated on these groups. Any other class choice for a group yields at most its majority count. This is the immediate sense in which alignment puts an upper bound on the predictive value of the assignments. It also explains why the authors call the observed level a floor for evaluating a translationese classifier. A credible baselining comparison has to account for the fact that class information is already accessible at that level through the group assignments. The bound and the floor describe different sides of the same comparison.

Producing the topic assignments

The main topic method is Latent Dirichlet Allocation, or LDA. It represents a document as a mixture of topics and each topic as a distribution over words. A document–term matrix records terms by column and paragraphs by row. The fitted representation describes both how the topics are distributed across paragraphs and how words are distributed within topics. During estimation, word occurrences receive latent topic assignments, meaning assignments to groups inferred from the data. The resulting topic mixture gives the authors a basis for selecting one topic per paragraph. They use the Gensim implementation of Mallet LDA for Latent Dirichlet Allocation.

Two parameters govern the distributions discussed in the paper. The parameter α controls the distribution of topics within a document. The parameter β governs the distribution of words within a topic. These distributions concern different things: which themes share a paragraph and which terms characterize a theme. The topic count n is an additional setting, specified before fitting LDA. The authors examine counts from 2 through 500, using intermediate settings to observe what happens at different granularities.

The second topic procedure can derive the count from the data. It first represents text with contextual sentence embeddings, which are numerical representations computed from the text in context. UMAP reduces the number of dimensions in those representations, and HDBSCAN groups the reduced representations. A count-based vectorizer and a class-based term weighting procedure help describe the resulting groups by their characteristic terms. The authors use the T-Systems-onsite/cross-en-de-roberta-sentence-transformer embedding component and otherwise retain the default settings of BERTopic.

The two procedures group paragraphs using different information. LDA looks for recurring word distributions. BERTopic first uses a contextual representation and groups paragraphs that are close within the resulting space. Letting BERTopic select its own count gives the authors a check on the range explored with LDA and another way to look for label-aligned topics. The scoring stage treats the outputs alike. It selects the highest-probability topic for each paragraph, then counts labels in the resulting groups.

Suppressing a cue identified in advance

The second part of the paper begins with the earlier finding about places. A method that specifically hides named entities can suppress the precise identity of a place while preserving that the sentence refers to a location. The same operation applies to people and organizations. The system that recognizes the spans is evaluated separately from the translationese classifier, using German Europarl sentences that people annotated with the relevant entity information. The preprocessing task is named entity recognition.

The authors choose BERT-German on the basis of its recognition scores. They replace each detected span with [LOC], [PER] or [ORG], according to whether the recognizer assigns it to a location, person or organization. A sentence about a named speaker visiting a named city can still express the same grammatical relation between a person and a place. The classifier has lost the names in the replaced spans, while retaining role information carried by the entity tags and all of the ordinary words that surround them.

The authors add these tags to BERT’s tokenizer as special tokens. The tokenizer controls how the input is divided into the units the classifier receives. Treating an entity tag as one unit keeps the same representation every time a span of that type is masked. It also keeps the tag from being processed as several pieces. This detail makes the intervention consistent at the level of tokenization.

Training and testing are varied independently. In the unmasked–unmasked condition, the classifier learns and is tested with the original text. In masked–masked, it learns and is tested with the substituted tags. In unmasked–masked, the classifier encounters the substitution at test time after training on ordinary text. In masked–unmasked, training limits access to detected names, and the original text is available at testing. The matched conditions compare systems prepared for the text each will see. The crossed conditions expose each system to a change in representation between training and testing.

The translationese classifier starts from BERT-base-multilingual-uncased. The unmasked baseline as reproduced uses 12 attention heads and 12 layers, with a hidden size of 768. Using Hugging Face software, the authors fine-tune the pretrained classifier on the relevant training set in batches of 16, with Adam’s ϵ set to 1 · 10⁻⁸ and the learning rate set to 4 · 10⁻⁵. The learning rate controls the scale of parameter updates, and ϵ is Adam’s numerical stability parameter. This adaptation of a pretrained system to a labeled task is fine-tuning.

Replacing the vocabulary with grammatical tags

Name masking leaves most of the vocabulary accessible. Full grammatical masking asks what evidence survives a far more extensive change. A SpaCy tagger using the detailed inventory associated with the TIGER Treebank supplies tags for the German text. In the paper’s example, a short sentence becomes a sequence including an adverb, a finite modal verb, an article, a noun and later verb forms. The ordering of the categories survives, together with the distinctions expressed by individual tags. The lexical forms that supplied those categories are absent from the classifier’s input.

The authors prepare BERT for this representation before training it for translationese classification. The pretraining material comes from 3% of the German Wikipedia dump, amounting to 1.5 million sentences. The text is converted to tags, and the system is trained for 2 epochs to recover masked inputs. Since its inputs are grammatical tags, the recovery task concerns missing tags in their contexts. The tokenizer is BertWordPieceTokenizer. For the smaller vocabulary, the authors use 6 encoder layers in place of 12, a learning rate of 5.10⁻⁶ and Adam with ϵ set to 1.10⁻⁸.

They then fine-tune the resulting classifier on the POS-tagged MPDE data, using the same fine-tuning settings as in the other classification experiments. The test sequences are also tagged. A parallel run follows the same procedure with the more general categories of Universal POS. The comparison asks whether the additional distinctions in the detailed German tag inventory help identify translation status, and whether a coarser tag sequence also supports the task.

Inspecting what supports individual predictions

The last analysis applies Integrated Gradients to classifiers trained with masked input. In general terms, the method attributes a prediction to the input by accumulating sensitivity as the input moves from a reference representation to the observed one. Here the authors use it to identify words, word pieces or grammatical tags that support predictions in the original and translated classes. They average attribution scores across the relevant test data and rank the input units separately for the two classes.

This evidence has a different scale from classification accuracy. Accuracy counts correct decisions across test paragraphs. Attribution asks what parts of the input support a decision and which of those parts receive high scores on average. A mask can change the ranking of influential cues even when the classifier reaches the same label on many of the affected paragraphs. The paper therefore uses the rankings to examine how the evidence available to the classifier changes as names or surface words are removed.

Experiments and results

How much the topic assignments reveal

The LDA sweep uses topic counts of 2, 5, 10 and 20 at its lower end, then examines 30, 50, 100 and 200. It also fits settings with 300, 400 and 500 topics. The BERTopic run used in the comparison yields 207. With the assignments in hand, the authors evaluate average alignment against the O and T labels of the German paragraph collection. The topic counts belong to the grouping procedures, while the alignment scores concern the resulting distribution of translation labels.

The observed alignment ranges from 0.55 to 0.62. The highest score is BERTopic’s 0.62 at 207 topics. The strongest LDA settings are at 10, 20 and 30 topics, with scores in the range from 0.611 to 0.618. The authors report a range for these LDA settings, which is sufficient to see that the highest-scoring LDA groupings reach close to the BERTopic result. They also show that a large topic count is unnecessary for strong alignment in this corpus.

The comparison line at 0.5 in the paper’s figure represents the case in which topics are evenly divided between originals and translations. The other end of the scale, 1, would mean that each topic identifies translation status perfectly. The observed groupings are between these reference points. They contain useful label information even though a majority assignment by topic would still misclassify many paragraphs. On this basis, the authors suggest that a score at or below 0.62 deserves caution as evidence for learning translationese in this particular dataset.

The paper compares this floor with previously reported translationese classifiers. Most of the classifiers cited in that discussion reach accuracy of at least 0.9. Their scores remain substantially above the stronger reference point. This comparison shows the size of the opportunity presented by hard topic assignments from the two procedures. It leaves separate questions about other topical information available in a paragraph and how that information interacts with linguistic evidence in the higher-scoring systems.

Whether BERT can recover the topic assignments

The authors run a second task using the discovered topics as labels. They fine-tune BERT to predict which topic was assigned to a paragraph. The appendix says they use a similar split ratio for each topic to the translationese experiment’s training, development and test sizes of 29580:6336:6344. This creates a held-out test of topic recognition, with a baseline that always predicts the largest topic class for the particular grouping.

With 2 LDA topics, topic-prediction test accuracy is 0.832±0.00 against a largest-class baseline of 0.50. With 10 LDA topics, it is 0.636±0.01 against 0.18. For 20 LDA topics, the classifier scores 0.417±0.00 against 0.13, and for 30 it scores 0.442±0.00 against 0.11. With the 207 BERTopic labels, test accuracy is 0.569±0.00, again above the largest-class baseline reported for that setting.

The topic task has its own accuracy scale in the sense that the number and relative size of the classes vary. A result for the setting with 2 topics concerns a different prediction problem from a result for the setting with 207. The within-setting baseline is what makes each comparison informative. Across all these settings, BERT can recover meaningful information about the groupings when explicitly trained on their labels. This makes the suggested shortcut plausible for a BERT classifier that receives the same kind of paragraphs. Direct evidence about the decision process for translation status comes from the masking and attribution experiments.

How well the recognizer finds entities to mask

The entity-recognition evaluation uses 800 German Europarl sentences with 433 manually annotated entities. The annotations follow the guidelines of the CoNLL-2002 and CoNLL-2003 shared tasks. This evaluation gives the authors a reference from their domain for choosing a recognizer before running the downstream experiment. The annotation procedures are associated with the CoNLL-2002 shared task and the CoNLL-2003 shared task.

Precision measures how frequently the recognizer’s proposed entities are correct. Recall measures how much of the annotated set it recovers. F1 summarizes performance across both. The authors compare several recognizers so the choice of mask generator reflects its agreement with this manual evaluation. BERT-German, adapted on German WikiANN data, gives the highest F1 and highest precision among the evaluated systems. It has the second-highest recall.

Named entity recognizers on the annotated German Europarl sentences

The selected BERT-German recognizer has the highest F1.

Named entity recognizers on the annotated German Europarl sentencesSpaCy: 0.35SpaCy0.35FLERT: 0.37FLERT0.37mBERT-large: 0.32mBERT-large0.32XLM-R-base: 0.25XLM-R-base0.25XLM-R-large: 0.24XLM-R-large0.24DistilBERT-large: 0.32DistilBERT-large0.32BERT-German (this paper): 0.52BERT-German (this paper)0.52
The numbers
System or settingF1
SpaCy0.35
FLERT0.37
mBERT-large0.32
XLM-R-base0.25
XLM-R-large0.24
DistilBERT-large0.32
BERT-German (this paper)0.52

BERT-German’s precision is 0.65 and its recall is 0.42 on the annotated sentences. SpaCy has the highest recall, 0.56, alongside precision of 0.26. The tradeoff matters for the downstream intervention. A recognizer that proposes a broad set of spans can recover more names while also obscuring words outside the intended categories. A recognizer with incomplete recall leaves some names available. The authors choose by F1, so the subsequent experiment assesses the masking produced by that choice.

The paper reports 202,036 named entities in the training data, 42,072 in development and 43,489 in testing. These are counts associated with the automatic identification procedure across the translationese splits. The separate manually annotated evaluation characterizes how well the procedure recognizes entities. It gives context for interpreting what the masks cover and what linguistic material can still remain available afterwards.

Accuracy after name masking

The authors use bootstrap resampling with 100 samples and report 95% confidence intervals. Bootstrap resampling uses repeated samples to estimate how much a score varies under resampling of the evaluation data. The resulting intervals provide context for differences that can look small in the rounded accuracy column. Each row of the chart gives test accuracy on the German MPDE translationese task. The first condition in each label refers to training and the second refers to testing.

Named entity masking conditions on German MPDE translationese test accuracy

The unmasked baseline scores highest, while every condition using masking retains high accuracy.

Named entity masking conditions on German MPDE translationese test accuracyMasked training, masked test: 0.89Masked training, masked test0.89Masked training, unmasked test: 0.89Masked training, unmasked test0.89Unmasked training, masked test: 0.90Unmasked training, masked test0.90Unmasked training, unmasked test baseline (this paper): 0.92Unmasked training, unmasked testbaseline (this paper)0.92
The numbers
System or settingaccuracy
Masked training, masked test0.89
Masked training, unmasked test0.89
Unmasked training, masked test0.90
Unmasked training, unmasked test baseline (this paper)0.92

The 95% confidence interval for masked–masked is [0.88,0.89]. For masked–unmasked it is [0.89,0.90], and for unmasked–masked it is [0.90,0.91]. The interval for unmasked–unmasked is [0.91,0.93]. The authors report that the baseline comparison with each masked condition is statistically significant. In their account of the unrounded effects, they give the absolute drop relative to the unmasked baseline as 0.026-0.032 across the masking conditions.

The accuracy loss shows that the name intervention affects the task despite the substantial evidence still available. At the same time, a score of 0.89 in the matched masked condition shows how much classification survives when detected entity identities are hidden during both training and testing. This result is consistent with the authors’ account of a valuable but limited contribution from the particular named-entity cues targeted by the experiment.

Accuracy from grammatical sequences

The fully delexicalized experiments use German MPDE test paragraphs with every word represented through a part-of-speech sequence. The detailed TIGER setting reaches test accuracy of 0.78 ± 0.00, with a 95% confidence interval of [0.77, 0.79]. The Universal POS setting reaches 0.768 ± 0.00, with a 95% confidence interval of [0.76, 0.77]. The paper describes the latter result as slightly lower.

Full grammatical masking on German MPDE translationese test accuracy

Detailed TIGER tags yield higher test accuracy than the coarser Universal POS inventory.

Full grammatical masking on German MPDE translationese test accuracyUniversal POS tags: 0.768Universal POS tags0.768Detailed TIGER tags (this paper): 0.78Detailed TIGER tags (this paper)0.78
The numbers
System or settingaccuracy
Universal POS tags0.768
Detailed TIGER tags (this paper)0.78

Both scores show that a classifier can use the grammatical representation to distinguish originals and translations in these data. Both are also below the name-masked scores. This fits the scope of the transformations. Entity masking retains most words and replaces some spans by their types. Full masking preserves grammatical categories and their sequence, so the classifier has a much narrower description of each paragraph. The form of the remaining distinction is examined with attribution rather than inferred from the accuracy alone.

What the ablations show

A topic can be predictive without a named geographical theme

Varying the number of LDA topics tests the dependence of the alignment measure on a choice the researcher makes before grouping the data. The best LDA results occur among moderate topic counts in the sweep. The finest partitions examined do not provide the strongest overall alignment. BERTopic arrives near the same score through a different grouping procedure and a different count. This comparison establishes that the observed association can be recovered by either procedure, while the exact groups and their alignment depend on how the grouping is produced.

The authors inspect the terms associated with selected topics to see what the groups look like. In the LDA output they find little clear evidence of geographical topics. Several BERTopic groups have a visible geographical focus. The discussion gives examples centered on Turkey and Kurdish issues, on Israel and Palestine, and on Cuba. The characteristic terms show that at least some of the automatic groups reflect the subject matter of debates.

This inspection adds an interpretation that the purity calculation alone cannot supply. Similar overall alignment can coexist with different kinds of groups. A set of paragraphs may have a prominent geographical theme, or a more diffuse combination of shared terms can yield a comparable preference for originals or translations. The score counts paragraphs by class. Inspection of the terms gives separate evidence about what the groups represent.

Withholding names at training and test time

The four name conditions vary both the data from which the classifier can learn and the input to which it later applies what it learned. Unmasked–masked is informative about a system that encounters the intervention after regular training. Some names available in training are now replaced at prediction time, so any learned distinctions among them cease to be directly accessible where the recognizer supplies a mask. Its score remains high while giving evidence of a loss relative to the unmasked baseline.

Masked–unmasked asks a different question. The training condition makes detected entity identities unavailable, and the test inputs then present ordinary surface text. Any difficulty here can reflect both the constraint on the evidence seen in training and the change in representation at test time. Masked–masked is the comparison in which the learner has the opportunity to adapt to the same intervention that will apply during evaluation. Its strong performance establishes that the remaining inputs provide considerable evidence after retraining.

The common direction of the comparisons supports the conclusion that the identified broad family of name cues matters. The close scores also help set the scale of the effect in the configurations tested. This is an intervention on the replacement of detected entities as a whole. It can affect access to identity, input length when a span becomes a single tag, and the consistency of representation across training and testing. The observations concern that bundled change.

Which cues become prominent after masking

The Integrated Gradients rankings help explain what changes in the matched name-masked setting. Among the top-20 attributed inputs for the translated class, the authors find no Spanish or other place names. Earlier analysis of unmasked data had brought Spanish geographical terms to the top. The shift in rankings provides evidence that the mask suppresses prominent instances of the shortcut that motivated the experiment.

The lists also expose residual geographical material. For the original class, the authors identify alpen and fragments such as ##enland as possible location cues. A word piece is a segment the tokenizer can use to represent part of a word. When an entity survives the recognizer, a segment of that entity’s name can still receive a high score. This result connects the incomplete recognition measured on the annotated sentences to what remains visible in actual translationese decisions.

In translated paragraphs, the authors see a stronger presence of German simple past, or Präteritum, forms in the attribution rankings. The highly ranked cues include besuchte with an average attribution score of 0.61 and entdeckte at 0.60, as well as schrieb at 0.37. The authors draw attention to both regular and irregular verbs in this pattern. Earlier work connected the simple past to a possible preference for a more written style when translators render transcribed speeches. The rankings show that the classifier assigns considerable importance to examples of that form. The account of translators’ stylistic choices remains an interpretation of the pattern.

What changes when the words themselves are removed

Full masking changes the question to whether grammatical categories in context provide enough information to predict the classes. The detailed TIGER tag condition retains fine distinctions among categories. Its top attribution for translations is APPO, the tag for postpositions, at 0.32. For originals, ADV, the adverb tag, leads at 0.21. Other high-ranked translation cues include attributive tags for possessives, relatives and demonstratives. Several of these map to the broader category of determiners.

These findings are consistent with the earlier results the paper discusses about adverbs, adpositions and determiners. The earlier experiments ranked such properties among features associated with translationese predictions in multilingual settings. Here a similar set of categories comes to the fore in a German tag sequence. Attribution in this comparison reflects the contribution of the tags in their sequence context. The prior findings about relative frequencies supply an independent interpretation at a different level of analysis.

With the coarser Universal inventory, pronouns reach an average attribution score of 0.12 for translations. The group also features determiners and subordinating conjunctions. The original class includes prominent scores for the miscellaneous X category and for adverbs, with average attributions of 0.31 and 0.16, respectively. Particles and adjectives also appear among the original cues. The two inventories thus produce related patterns while assigning different amounts of detail to a tag.

The detailed inventory yields the higher test accuracy of the pair. Its finer distinctions also make certain cues easier to inspect, such as a subtype of adposition or determiner. The broader inventory still supports accurate classification in this corpus. Together the comparisons show that the grammatical evidence is distributed across a representation that can survive some loss of tag detail. They also show why there is more to the experiment than a vocabulary of frequent place names. A classifier operating on grammatical tags keeps enough structure to recover much of the original versus translated distinction.

Limitations

Limits identified by the authors

The authors explicitly distinguish strong topic alignment from reliance on topic by a translationese classifier. Their calculation measures how well the derived grouping can account for the corpus labels. The fact that BERT can learn to recover these groups when trained to do so makes the shortcut credible. Training on translation status could lead it to use the same patterns, but the topic-prediction experiment has a different target and therefore supplies evidence of capability. The paper leaves the extent of actual topic use by the translationese classifier unresolved.

The authors also allow that part of the alignment may come from genuine translationese. The grouping procedures receive text that contains both subject matter and linguistic traces of translation. LDA can group paragraphs using recurring lexical forms, some of which may be associated with the more written style or verbal patterns discussed in the attribution analysis. A cluster’s labels may align in part because of such features. Calling the observed score a topic floor is consequently a cautious reading of what the grouping can recover, with unknown contributions from the phenomena the researchers want to distinguish.

Automatic entity recognition supplies another stated limitation. A scalable intervention uses tags created by a recognizer whose performance is imperfect on the annotated Europarl sentences. Some names escape the mask, and the attributions for originals give concrete examples of geographical strings or possible fragments that are still accessible. The evaluation also shows that some predicted entities can be incorrect. The effect reported for name masking is therefore an effect of applying the selected recognizer and its replacement scheme to this corpus.

The authors note that BERTopic is stochastic because its UMAP stage can vary. The number of topics changes across runs, although they describe the differences as small. The 207-topic result characterizes the reported run. Topic count in LDA, by comparison, is a setting supplied in advance. The two methods therefore provide different ways to choose a granularity, and neither gives a unique set of paragraph groups that the alignment statistic must use.

There is also a reason the full POS experiments use matched data. The paper considers mixed conditions inappropriate for a classifier that has been prepared around grammatical tags throughout. Going from tags to ordinary text or from words to a tag vocabulary would change the entire representation. The POS results tell the reader how well the task works within each complete tag-based setup.

Limits visible in the experimental setup

The numerical topic floor is tied to a corpus, a grouping procedure and the choice to keep one topic per paragraph. The majority count uses the known labels of the paragraphs in those groups. It is an upper bound for decisions based solely on a fixed set of hard assignments evaluated that way. A prospective predictor would have to estimate the topic-to-class rule from labeled training data and then apply it to new examples. The purity number itself measures corpus alignment, leaving the held-out performance of such a predictor open.

The single-assignment rule also limits what the bound covers. A paragraph can contain signals of several topics. Two paragraphs with the same highest-scoring topic might have very different secondary topics or different words related to the topic. A classifier receiving the original text could use those distinctions. The best observed alignment therefore bounds the majority rule for the observed groups, while a more detailed representation of content could have a different predictive association with the labels. The paper’s results provide a reference for the topic extraction procedures it evaluates.

For the same reason, the results do not partition BERT’s accuracy into additive contributions from topic and translationese. A paragraph can support the correct label through both a topic cue and a grammatical cue. The decision might remain correct if either cue were removed individually, or the classifier might need their combination. A diagnostic based on topic groups, an accuracy change following entity masking, and an accuracy measured on tags each answer a different question. Treating their scores as pieces of a single total would require an additional design for identifying shared and interacting evidence.

Partial masking also leaves multiple routes to recovering content. The classifier sees entity types, ordinary words outside the masked spans and the surrounding language of each debate. The type tags can themselves carry information about the kinds and density of references in a paragraph. Conversely, an entity replacement can remove a surface form that contributed to a stylistic or linguistic distinction as well as to a geographical one. The measured accuracy loss supports a claim about the practical substitution described in the paper. It does not isolate a separate effect for Spanish locations, German locations, personal names or organizations.

The crossed train–test conditions have a further interpretive constraint. As soon as the transformation occurs on only one side, a change in the input distribution is part of the experiment. A classifier trained on surface words may behave differently when a whole span is replaced by one tag, even in a sentence where the particular identity would have contributed little. The two matched conditions answer a cleaner question about the performance of classifiers prepared for each representation. Those conditions still permit the systems to acquire different substitutes for the information affected by masking.

The comparison between the word-based and POS-based experiments also changes several ingredients together. The POS run has its own Wikipedia pretraining on tags, a smaller encoder and a different vocabulary. Its score demonstrates what that tag-based setup can recover. The gap from the unmasked score cannot be assigned uniquely to the removal of surface forms. The closer TIGER and Universal comparisons follow the same general procedure and primarily ask what can be recovered when the tag inventory changes.

Part-of-speech tags can reflect structure that is characteristic of a topic, style or group of speakers as well as of translation. More precise tags often offer more ways to describe the distinctions a corpus happens to contain. The prominence of postpositions, pronouns and adverbs gives linguistic material to investigate, while the origin of each pattern remains a matter for interpretation. An average attribution score records how strongly the trained classifier relies on a unit in the evaluated contexts. It does not provide the frequency of that construction or identify the cause of the distribution it captures.

Finally, the empirical setting is one direct translation direction, Spanish into German, within parliamentary text. The restriction yields well-defined labels and a shared genre. It also means the authors have no comparison here with German translated from another source language, or with originals and translations drawn from another genre. A different corpus could associate places, subjects and grammatical patterns with its labels in different ways. The paper establishes that a stronger topic-based baseline matters in this corpus and that targeted masking changes the corresponding classifier’s evidence and accuracy. The specific floor, masking effects and cues belong to the conditions under which they were measured.

What came after

No later study is identified that extends the paper’s topic-alignment measure or its masking experiments.

Cite

Cite as Angana Borah, Daria Pylypenko, Cristina España-Bonet and Josef van Genabith. 2023. Measuring Spurious Correlation in Classification: “Clever Hans” in Translationese. Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing.

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

@inproceedings{borah2023measuring,
  title = {{Measuring Spurious Correlation in Classification: “Clever Hans” in Translationese}},
  author = {Angana Borah, Daria Pylypenko, Cristina España-Bonet and Josef {van Genabith}},
  booktitle = {Proceedings of the 14th International Conference on Recent Advances in Natural Language Processing},
  year = {2023},
  url = {https://aclanthology.org/2023.ranlp-1.22/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/borah-2023-measuring-spurious-correlation-classification-clever/