Elamur Research

Automatic Spanish Translation of SQuAD Dataset for Multi-lingual Question Answering

Paper · 2020 · Casimiro Pio Carrino, Marta R. Costa-jussà and José A. R. Fonollosa

Summary

An extractive question answering system answers a question by selecting words from a passage. Translating its training data therefore takes more than producing a readable passage and question. The answer must still occupy an identifiable place in the translated passage. A translation of the answer in isolation can differ from the expression the translator used in context, even when both convey the same information. The authors address this problem for Spanish, where they identify a shortage of large, annotated training collections. They start with the English reading comprehension dataset SQuAD.

Their method, Translate Align Retrieve, combines machine translation with word alignment. It translates the passages, questions and answers, then connects words in each English passage to corresponding words in Spanish. When the translated answer can be found as text, the method takes the answer from the Spanish passage. When that search fails, the word correspondences supply boundaries for extracting a span. The authors release the code and the resulting SQuAD-es v1.1 dataset. The full training set retains 87595/87599 of the English training examples. SQuAD-es-small, which keeps answers recovered by text matching, retains 46260/87599.

The authors adapt the same pretrained Multilingual BERT system to each Spanish training set and evaluate both versions on Spanish portions of two cross-lingual benchmarks. Training on the full collection reaches 68.1 F1 and 48.3 exact match on Spanish MLQA, and 77.6 F1 and 61.8 exact match on Spanish XQuAD. The full collection beats the smaller one on both metrics in both evaluations. It also exceeds the listed Multilingual BERT comparisons. On MLQA, the strongest listed XLM comparison scores slightly lower on F1 and higher on exact match.

A manual review explains the tradeoff behind these results. Text matching yields a cleaner subset in the articles the authors inspect. The alignment fallback recovers additional usable answers, along with examples whose spans are imprecise or point to the wrong text. Simple cleanup fixes many boundary errors. The benchmark results show that the extra examples were useful in this training setup despite their noise. The paper’s evidence for the method comes from that combination of near-complete training coverage, a direct inspection of the answers and evaluation on separate Spanish benchmarks.

Deep dive: Automatic Spanish Translation of SQuAD Dataset for Multi-lingual Question Answering

How Translate Align Retrieve turns English SQuAD into Spanish training data by recovering answer spans, and how that data performs on two benchmarks. · about 33 minutes to read

The problem and its context

Why a translated answer needs an address

SQuAD v1.1 presents reading comprehension as a task with a particular kind of output. A passage supplies the evidence, the question identifies what the reader should look for, and the answer is a continuous stretch of the passage. In the original collection, the question and its answer annotation are associated with a paragraph from Wikipedia. The answer record identifies both the text and its starting position. That location tells a training system which occurrence the annotator selected if the same words appear several times.

This format makes the source of an answer observable. A question about a person might require the reader to pick out a name from a sentence that also mentions several other people. A question about a date might require the date associated with a specific event, even when other dates occur nearby. Selecting words from the passage ties the response to one of those occurrences. The training annotation must preserve that connection as well as the wording of the answer. It is a form of linguistic annotation.

Translation changes both the wording and the location. Spanish can place a corresponding expression earlier or later in a sentence, expand a short English expression or render it with different surrounding punctuation. Once a paragraph has been translated, the English starting position describes the English paragraph alone. Even a name that appears unchanged in both languages may have a different offset because the words preceding it have changed. A translated example needs an answer and an address in the target text.

There is a second difficulty even after the paragraph and question have been translated well. The answer phrase is short and carries little context when sent to the translator on its own. Inside a longer sentence, the translator can choose its wording in response to the words that came before it. An isolated translation and an in-context translation may therefore express the same answer in different forms. A text search for the isolated version can fail while the Spanish paragraph still contains everything needed to answer the question.

An exact occurrence can be ambiguous too. Suppose the same expression occurs in several sentences of a paragraph. The question may concern just one of those sentences. A search through the entire paragraph can establish that the answer words occur somewhere, but the source annotation identifies a particular occurrence. Using the location of the original span to guide the search helps preserve that part of the example. The central problem is thus to transfer a relation among three pieces of text, with the support for the answer anchored to a location.

Why create a Spanish training collection

The paper describes a field in which performance on reading comprehension had improved by adapting pretrained architectures to annotated tasks. It cites work such as BERT, RoBERTa and XLNet as part of that setting. The training collection supplies task-specific supervision. A pretrained system may already be able to process the language, while passage, question and answer triples show it what to select for this task. The authors use Multilingual BERT, or mBERT, for the Spanish experiments. The approach to adapting it to an answer span follows the work on BERT.

The availability of that supervision differs by language. SQuAD v1.1 contains more than 100,000 questions across the original English collection. The authors describe large, carefully annotated corpora of this kind as scarce for languages other than English. Spanish is their case for studying what can be recovered from an existing English resource. Their aim is a Spanish training collection at roughly the scale of the English training split, with examples in the same extractive format.

The paper describes two broad approaches to the scarcity of target-language data. Cross-lingual learning transfers what a system learns from abundant examples in a source language. In a zero-shot setting, the task supervision comes from outside the target language. A few-shot setting adds a small amount of target-language supervision. These approaches treat transfer as part of the learning problem. They are one route to multilingual and cross-lingual NLP.

Synthetic data generation shifts part of the work into preparing the training collection. Translation produces examples in the language in which the system is meant to answer questions. The paper cites roundtrip consistency as one approach to generating synthetic question answering corpora, alongside other reported uses of translation for training data. TAR follows the synthetic-data route and concentrates on recovering the answers from translated passages. One related approach is synthetic QA corpus generation with roundtrip consistency.

The authors also mention a route that puts translation at test time. In that setting, translation participates when a system receives a question to answer. For TAR, translation takes place while an existing annotated resource is being converted into a new training collection. The finished Spanish passage, question and span can then be used directly in training. This timing matters because the procedure has access to the original answer and its location while it is constructing the Spanish label.

Why start with the training split

The structure of SQuAD v1.1 gives the procedure an explicit starting point. A training example already identifies the passage, the question and an annotated answer inside that passage. The work is to carry that annotation across languages. Keeping the original passage and question together also preserves the organization of the exercise. Several questions can refer to the same paragraph, and each can be processed with its own source answer positions against a shared translated paragraph.

The English development split serves a different role. The authors describe it as having at least two answers for each question to make evaluation more robust. Multiple acceptable responses are useful when people who agree on the substance of an answer may select slightly different boundaries. The paper focuses its automatic conversion on the English training data and evaluates on Spanish benchmark data prepared for cross-lingual assessment. The resulting setup lets the authors ask whether automatically constructed supervision is useful when the evaluation answers come from a separate resource.

That question is narrower than asking whether a translated corpus is equivalent to a newly authored one. A training collection can be useful when some of its labels need correction. Conversely, samples of fluent translations give limited information about whether the collection will teach a system to select spans on a separate benchmark. The paper addresses both levels. It inspects translated examples to understand the errors and uses the Spanish benchmarks to measure how well the resulting training resource works.

The method, step by step

Follow an example from English to Spanish

TAR begins with an English paragraph, a question about that paragraph and an annotated answer. The translator supplies Spanish versions of the paragraph and question. It also supplies a separate translation of the answer. That last translation acts as a candidate to look for in the paragraph. The answer ultimately stored in the Spanish example is taken from the Spanish paragraph itself.

To see why the intermediate candidate helps, consider the question in the paper’s Chopin example about the Latin form of his name. The corresponding name appears unchanged in the Spanish paragraph. A direct match can recover it from the target passage. The same paragraph also illustrates a different issue. The translated span for Chopin’s birthplace includes a trailing comma in the displayed example. It points to the intended village, and the annotation still needs a boundary decision about the comma. Successful retrieval and exact span boundaries are distinct parts of the job.

Word alignment supplies guidance from the English answer’s location. The procedure pairs words in each English sentence with corresponding words in its Spanish translation. Since the English answer has a known position, the alignment can identify where its words are expected to land. The target positions are useful both as a guide for finding the translated answer and as a way to extract it when the isolated translation fails to match.

The method therefore combines evidence from the candidate’s wording with evidence from the span’s location. The translated answer offers a specific string. The alignment estimates where the relevant content is and how far it extends. A match can give clean boundaries for a phrase the translator rendered consistently. An aligned interval can still identify the pertinent words when the paragraph expresses the answer differently from the isolated translation.

From English SQuAD annotations to Spanish answer spans

The steps in order.

From English SQuAD annotations to Spanish answer spansStep 1: Split English passages into sentences1. Split English passages into sentencesStep 2: Translate sentences, questions and answers2. Translate sentences, questions and answersStep 3: Align English sentences with Spanish translations3. Align English sentences with Spanish translationsStep 4: Rebuild passages and map word positions4. Rebuild passages and map word positionsStep 5: Search near the projected answer location5. Search near the projected answer locationStep 6: Extract an aligned span if matching fails6. Extract an aligned span if matching failsStep 7: Clean boundaries and discard empty answers7. Clean boundaries and discard empty answers

Build the English-to-Spanish translator

The authors train the translation component on paired English and Spanish sentences. A parallel sentence pair supplies the source expression and a rendering of it in the target language. The pairs come from translation resources outside the SQuAD task. They teach the system to translate sentences, while SQuAD later provides the passages, questions and answer locations to convert.

The authors begin with Wikipedia sentence pairs from WikiMatrix. As described in the paper, that resource uses LASER sentence representations to help find corresponding material across languages. A multilingual sentence representation gives the mining process a way to compare sentences expressed in different languages. The paper’s role for this step is data collection. TAR itself uses the resulting parallel sentences to train its translator. The mining resource is WikiMatrix.

The authors supplement those pairs with material available through OPUS. The final collection draws on 5 resources. Wikipedia is joined by TED-2013, News-Commentary, Tatoeba and OpenSubTitles. Those sources are used together for translation training. The paper evaluates the assembled translator as a single component and gives a score for its held-out translation test set. Among the sources it describes is OpenSubtitles2016.

Before training, the authors standardize punctuation and apply tokenization, which divides the text into units for processing. They also apply truecasing, a preprocessing step that standardizes how capitalization is represented. The final segmentation step is byte pair encoding, or BPE. It represents text with units that can include pieces of words. This gives the translator a way to work with a word by using units shared with other words. The English and Spanish sides use a joint segmentation with a maximum of 50k BPE symbols. The paper draws on work on subword tokenization.

The training preparation removes repeated English–Spanish pairs and filters out sentences longer than 80 tokens. The finished translation corpus contains nearly 6.5M parallel sentences in the training split, with 5k sentences for validation and 1k for testing. These are splits of the translation corpus. The SQuAD training examples enter later, once the translator can be applied to their text. The authors use scripts from Moses and Subword-nmt for preprocessing.

The translator has a Transformer architecture. An encoder represents the English input, and a decoder uses that representation to produce Spanish output. The authors use the default configuration in OpenNMT-py and train for 200k steps on a GeForce GTX TITAN X. They share the English and Spanish vocabularies and the associated embeddings between the encoder and decoder. An embedding is the numerical representation the system uses for a vocabulary item. The shared vocabulary makes the input and output units available through a common set of representations. The implementation is part of OpenNMT.

A checkpoint records the state of the system during training. The final translator is obtained by averaging the last three consecutive checkpoints. This produces the translation component used for the rest of TAR. The paper evaluates it on the held-out translation test sentences with a BLEU score, which compares generated translations with reference translations using overlap in their wording. The question answering experiments later measure something different, namely how well a system trained on TAR’s output can select a Spanish answer.

Learn correspondences between words

Translation supplies Spanish text. The next component supplies links between positions in the English and Spanish versions. The paper uses eflomal, an unsupervised word alignment method, through the efmaral implementation. Unsupervised here means the training data provide sentence pairs without hand-labeled links for each word. The aligner infers word correspondences from the parallel text.

The underlying approach is Bayesian and uses Markov chain Monte Carlo inference. In this setting, the task is to infer a plausible alignment when the sentences are observed and the word links are unknown. The implementation can save priors learned from the training corpus and use them when aligning new sentence pairs. A prior carries information learned before the particular SQuAD sentence is aligned. The authors train on tokenized sentences from the translation training corpus and use the resulting priors when processing SQuAD.

The translator and aligner thus use the same pool of parallel training material for different purposes. The translator learns to produce Spanish text from English input. The aligner works with English and Spanish texts that have already been paired and estimates which positions correspond. During dataset conversion, its input on the Spanish side comes from the translator. This order matters because an alignment can only connect text that is present in the pair. If the translation loses a detail, a link can point to nearby words, but the missing detail is unavailable to span extraction.

There is also a difference between a position in preprocessed text and a position in the original passage. The aligner connects tokens. The answer extraction procedure ultimately needs positions in the raw passage. Punctuation or segmentation can make token positions diverge from the word positions used for retrieval. For that reason, the authors create a mapping that links token positions to their corresponding word positions in the original context. With that conversion, a position in the annotated source answer can lead to a position in the raw Spanish paragraph.

Translate and rebuild the passages

The paper represents the original and target examples as corresponding triples.

(cₛᵣ꜀, qₛᵣ꜀, aₛᵣ꜀) → (cₜ₉ₜ, qₜ₉ₜ, aₜ₉ₜ)

Here c is the context paragraph, q is the question and a is the answer. The first subscript denotes the source language, English. The second denotes the target language, Spanish. The arrow denotes the conversion from the source example to the target example. In the data, an answer comes with its position in the corresponding context. The target answer in this representation is the span selected at the end of TAR.

The authors split each English paragraph into sentences before translating it. Each source sentence is paired with its translation and aligned. The sentence translations are then joined into the Spanish paragraph. The sentence-level links are combined into a paragraph-level alignment. As a result, TAR can use the manageable units on which the translator and aligner work while keeping the paragraph as the unit that the question refers to.

Reassembling the links along with the text is important. A position near the beginning of a translated sentence will have a different paragraph position depending on how much text precedes it. The procedure must locate an answer within its translated sentence and in the reconstructed paragraph. It can then use that paragraph for the training examples attached to all the questions about it. Each question and each annotated answer still has its own retrieval step.

The paper denotes the resulting context correspondence with the source and translated contexts as inputs.

align(c_src, c_tran)

Here align is the collection of links between positions in the paired paragraphs. c_src is the source context and c_tran is the context assembled from the translated sentences. The parentheses name the two contexts to which the links belong. These links are the result of merging sentence alignments and relating the token-level positions to positions in the raw contexts.

The Spanish question can be taken from the translator directly. For the answer, the English annotation remains available while the procedure works out the target location. This is the stage at which the separate translations serve different purposes. The translated question is an input in the final Spanish example. The separately translated answer is a candidate string that the procedure can look for, while the original answer identifies the portion of the English paragraph to project.

Locate the answer and choose its boundaries

TAR starts from the source span identified by the English annotation. The alignment gives target word positions corresponding to that span. A translation can change the order of words, so a word at the beginning of the source answer may align to a word near the end of its Spanish rendering. The procedure uses the minimum and maximum of the relevant target positions to establish the target boundaries.

The notation below spells out the boundary operations in the paper’s retrieval procedure.

a_tran′_start = min(P_tran)

Here a_tran′_start is the projected start of the answer in the translated context after the target positions have been ordered. P_tran denotes the target positions used for the projection of the source answer. min selects the earliest of those positions. The prime distinguishes the resulting boundary from a position obtained directly by following an alignment link.

a_tran′_end = max(P_tran)

Here a_tran′_end is the corresponding projected end in the translated context. P_tran is the same collection of projected target positions, and max chooses the latest. Together the operations define a single interval even when the order of the links differs from the order of the English words.

The search for the separately translated answer uses the projected location. In the paper’s description, the search starts from the corresponding position in the Spanish context. This helps when the same words appear in several sentences. For example, names or dates can recur in a passage. The fact that a string occurs somewhere establishes that it is available for extraction. The alignment helps associate it with the evidence that supported the English answer.

The authors also lower-case the answer candidate to improve matching. The candidate is useful as a way of locating the text in the paragraph. The paragraph supplies the span itself. This preserves its role as the source of the answer for the Spanish example, including when the capitalization of the standalone translation differs from the form within the sentence.

When the expected text is found, TAR uses that occurrence. When it fails to find the translated answer, the procedure extracts the interval between the projected boundaries.

a_tran ← c_tran[a_tran′_start : a_tran′_end]

Here a_tran is the retrieved answer and the left-pointing arrow assigns it the value on the right. c_tran is the translated paragraph. The brackets and the separator indicate extraction of the span delimited by a_tran′_start and a_tran′_end, the projected start and end. They express the span selection in the paper’s pseudocode. The substantive operation is to read the answer from the context between the computed boundaries.

This fallback handles a case in which the Spanish paragraph expresses the answer with different words from the isolated translation. If the word correspondences still locate the relevant portion of the paragraph, extraction can succeed. The same design makes the quality of the result depend on the boundary estimates. An interval includes the text between its extrema. An outer position that lands too far away can take additional words along with the answer. A projection that encloses only part of the intended phrase can yield a shortened answer. If the relevant fact has been omitted, an interval can still be produced even though there is no correct span to retrieve.

Clean the spans and keep both versions

The authors use the errors seen in inspection to design a cleanup pass. They trim answer words that belong to the following sentence and remove extra punctuation at the beginning and end of answers. They also discard empty answers produced during translation or retrieval. These are local edits to spans the procedure has already selected. They address cases such as a correct name ending in a comma or an answer that reaches into the next sentence.

The cleanup acts on visible signs of boundary problems. A complete answer surrounded by quotation marks can be narrowed to the words inside them. A wrong name or number that happens to sit inside a tidy span requires a different kind of repair. That distinction explains why the paper puts the cleanup together with an error analysis. Removing leading and trailing characters has a clear role when the intended words are already present, and the inspection shows how often the larger problems involve the translation or the location itself.

The standard SQuAD-es v1.1 collection contains the examples retained through both retrieval routes. SQuAD-es-small keeps the examples for which the separately translated answer could be matched in the context, excluding answers that required the alignment fallback. Both come from the same source training split and are prepared with the same translator. This creates a comparison between a broader training set and a more selective one, with the retrieval decision determining which examples the smaller set retains.

Experiments and results

Measure the translator and the training resource separately

The translation component obtains 45.60 BLEU on the authors’ held-out English-to-Spanish translation test set. That test comes from the parallel translation corpus described in the method. The score measures the translator on those sentence pairs. The authors take it as support for using the translator in TAR. The score leaves open the accuracy of any particular answer annotation, because it averages translation performance on that test set and does not measure whether a question’s supporting span survives in a translated SQuAD paragraph.

The dataset counts describe the reach of the conversion. SQuAD-es contains 87595/87599 of the examples in the original English training split. SQuAD-es-small contains 46260/87599. The authors describe the smaller collection as retaining about 53% of that source split. Its rule demands an answer that can be recovered by matching the separately translated text to the paragraph. The full collection also retains examples for which the span has to be projected.

The datasets differ slightly in average text length. For the full training collection, the paper reports averages of 140 tokens for the context, 13 for the question and 4 for the answer. For SQuAD-es-small, those averages are 138, 12 and 3 tokens respectively. These are statistics of the finished training sets. The smaller collection was formed by a match criterion, so the length differences describe which examples that criterion retained. The paper leaves the relationship between length and downstream performance unresolved.

The authors then carry out fine-tuning, which adapts an already pretrained system to the current task using labeled examples. They start with pretrained mBERT in both runs. One run uses the full SQuAD-es collection and the other uses SQuAD-es-small. Both use the Hugging Face Transformers implementation and the default settings of its training scripts. The paper reports training for three epochs on a GTX TITAN X. An epoch is one pass through the chosen training set, so the common epoch count goes together with different numbers of training examples per pass. The implementation is described in Transformers.

Read the benchmarks and scores

The Spanish MLQA evaluation comes from a multilingual collection of Wikipedia-based reading comprehension examples. The paper describes MLQA as having parallel material in 7 languages and providing development and test splits. The results it presents are for Spanish. The benchmark lets the authors ask how well the training data prepare a system to answer Spanish questions in a separately assembled evaluation collection. The resource is MLQA.

XQuAD provides a second test of the same training choices. It is drawn from the SQuAD v1.1 development set, and the paper describes professional translation into 10 languages, including Spanish. The SQuAD relationship is therefore different for training and evaluation. The authors automatically translate examples from the English training split to build the training corpus, while the Spanish XQuAD evaluation comes from professionally translated development material. XQuAD is described in On the Cross-lingual Transferability of Monolingual Representations.

The authors score the answers with F1 and exact match, abbreviated EM, using the multilingual evaluation script released with MLQA. Exact match asks whether the predicted answer matches a reference answer exactly under the scoring procedure. F1 gives credit for overlap between the predicted and reference words, balancing how much of the prediction belongs in the answer with how much of the reference the prediction recovered. An answer that contains the right expression plus some surrounding text can earn partial credit on F1. The two scores capture different consequences of span selection.

This matters when reading the results. A system can improve its recovery of the essential words while still selecting boundaries that disagree with the reference. Another system can have more exact hits and less overlap on the examples it misses. The pair of metrics describes those patterns in aggregate. It does not identify individual answers or tell which training examples led to them.

Spanish MLQA

The full TAR training collection yields 68.1 F1 and 48.3 EM on Spanish MLQA. The SQuAD-es-small run yields 65.5 F1 and 47.2 EM. The full collection has the stronger result on both measures, even though the manual review finds more errors in the coverage offered by the full retrieval procedure. The smaller system is still informative as a comparison because it shows how far direct answer matching can go with the same translation pipeline and the same starting mBERT system.

The paper gives two mBERT baselines on Spanish MLQA. The row labeled mBERT reports 64.3 F1 and 46.6 EM. The translate-train mBERT baseline reports 53.9 F1 and 37.4 EM. Both TAR training variants exceed both of these rows on both metrics. The translate-train comparison is especially relevant to the motivation for the method because it is also based on synthetic training data. It gives a comparison with another use of translation, alongside the more closely paired comparison between the authors’ own training sets.

Spanish MLQA F1 across TAR training settings and baselines

Full TAR training has the highest F1, with XLM close behind.

Spanish MLQA F1 across TAR training settings and baselinesTranslate-train mBERT: 53.9Translate-train mBERT53.9mBERT baseline: 64.3mBERT baseline64.3TAR with SQuAD-es-small: 65.5TAR with SQuAD-es-small65.5XLM with MLM and TLM: 68.0XLM with MLM and TLM68.0TAR with full SQuAD-es (this paper): 68.1TAR with full SQuAD-es (this paper)68.1
The numbers
System or settingF1
Translate-train mBERT53.9
mBERT baseline64.3
TAR with SQuAD-es-small65.5
XLM with MLM and TLM68.0
TAR with full SQuAD-es (this paper)68.1

The XLM system in the comparison uses MLM and TLM and is listed as covering 15 languages. It reports 68.0 F1 and 49.8 EM. The best TAR-trained system has the higher F1, while XLM has the higher exact match. The strongest MLQA result claimed for TAR is thus specific to F1. The mBERT comparisons are a separate point. The full TAR run improves on both listed mBERT baselines on each metric.

The contrast between overlap and exact match is relevant because the method builds its training labels by selecting spans. The measured MLQA outcome shows that the training resource was useful even with some imperfect boundaries. It leaves the source of the XLM exact-match advantage open. The benchmark scores compare complete systems and training conditions, and the paper does not trace the difference to particular predictions or annotation errors.

Spanish XQuAD

Training with full SQuAD-es reaches 77.6 F1 and 61.8 EM on Spanish XQuAD. The SQuAD-es-small run reaches 73.8 F1 and 59.5 EM. The full-set advantage over the selective set appears on this benchmark too. The individual scores are also higher than the respective results on MLQA. That comparison describes scores on different evaluation collections, each with its own examples and reference answers.

The XQuAD table includes several named vocabulary settings from the earlier comparisons. JointMulti with a 32k vocabulary scores 59.5 F1 and 41.3 EM. JointPair with a joint vocabulary records 68.3 F1 and 47.8 EM, and JointPair with a disjoint vocabulary records 72.5 F1 and 52.5 EM. The strongest baseline listed for both measures is JointMulti with a 200k vocabulary, at 74.3 F1 and 55.3 EM.

Spanish XQuAD F1 across TAR training settings and baselines

Full TAR training leads the listed settings on F1.

Spanish XQuAD F1 across TAR training settings and baselinesJointMulti 32k vocabulary: 59.5JointMulti 32k vocabulary59.5JointPair joint vocabulary: 68.3JointPair joint vocabulary68.3JointPair disjoint vocabulary: 72.5JointPair disjoint vocabulary72.5TAR with SQuAD-es-small: 73.8TAR with SQuAD-es-small73.8JointMulti 200k vocabulary: 74.3JointMulti 200k vocabulary74.3TAR with full SQuAD-es (this paper): 77.6TAR with full SQuAD-es (this paper)77.6
The numbers
System or settingF1
JointMulti 32k vocabulary59.5
JointPair joint vocabulary68.3
JointPair disjoint vocabulary72.5
TAR with SQuAD-es-small73.8
JointMulti 200k vocabulary74.3
TAR with full SQuAD-es (this paper)77.6

The result for the smaller TAR collection depends on the metric used to compare it with the strongest baseline. Its 73.8 F1 is below the 74.3 F1 of JointMulti with the 200k vocabulary. Its 59.5 EM is above that baseline’s 55.3 EM. Using the full collection produces the strongest value in the table for both scores. This is the benchmark on which the paper’s full-data configuration can claim the lead on exact match as well as F1.

Spanish XQuAD exact match across TAR training settings and baselines

Both TAR training sets exceed the strongest listed baseline on exact match.

Spanish XQuAD exact match across TAR training settings and baselinesJointMulti 32k vocabulary: 41.3JointMulti 32k vocabulary41.3JointPair joint vocabulary: 47.8JointPair joint vocabulary47.8JointPair disjoint vocabulary: 52.5JointPair disjoint vocabulary52.5JointMulti 200k vocabulary: 55.3JointMulti 200k vocabulary55.3TAR with SQuAD-es-small: 59.5TAR with SQuAD-es-small59.5TAR with full SQuAD-es (this paper): 61.8TAR with full SQuAD-es (this paper)61.8
The numbers
System or settingEM
JointMulti 32k vocabulary41.3
JointPair joint vocabulary47.8
JointPair disjoint vocabulary52.5
JointMulti 200k vocabulary55.3
TAR with SQuAD-es-small59.5
TAR with full SQuAD-es (this paper)61.8

Across both evaluations, the full versus small comparison is the closest test of the practical decision TAR introduces. The same pretrained starting point is adapted to two outputs of the same corpus construction process. The ranking is consistent across the Spanish benchmarks and the scoring measures. That supports retaining the examples made available by the fallback for this training setup. Comparisons with the published systems establish where the results stand among the rows the authors report, while changing more than the answer retrieval policy.

What the ablations show

What a person sees when a span goes wrong

The authors inspect answer quality by reading the translated questions, passages and extracted spans together. The answer is a convenient place to start because its failure can expose a problem at several points in the pipeline. A span can contain a phrase that never answers the question, or it can contain the answer with awkward edges. The question helps the reviewer distinguish a phrase that merely originates in the right area of the paragraph from one that actually supplies the information requested.

The paper calls its first category Type I, a misaligned span. The extracted text comes from the wrong place and misses the intended answer. A word alignment error can cause that outcome. So can a translation that shortens a sentence and removes the source information. In the latter case, a span is still extractable, but it has no way to recover words that the translator omitted. The category describes the failed answer and can arise from either component.

The Medill School of Journalism example shows what that distinction looks like. The English question calls for the name of a CBS correspondent. The Spanish rendering drops part of the passage’s list of journalists, including the relevant name. The procedure retrieves an NBC label from the translated text. The resulting span is present in the paragraph and still fails to answer the question. Cleaning punctuation around the label would leave the underlying problem intact.

A second example involves the Northwestern admissions paragraph. The English question asks about the share of enrolled students who ranked near the top of their high school class. The source answer is 91%, while the Spanish span selected for the question is 31%. In the translated passage, the latter appears in material about test scores after the source passage has been shortened. The case illustrates why the presence of the expected answer type, a percentage, is weak evidence that alignment has found the right fact.

The second error category, Type II, covers overlap with an intended span. These cases can include extra punctuation, additional words or missing words. They can also occur when the extraction carries text over from the next sentence. The designation says something about where the retrieved phrase landed. It allows for a range of practical severity, from an extra comma after a complete answer to a phrase whose missing content changes what it conveys.

The examples about dynasties illustrate overlap that extends beyond simple punctuation. For a question about who ruled the Liao dynasty, the Spanish extraction contains the ruler but surrounds it with a description of the dynasty. For the question about the Jin dynasty, it includes the words expressing that the dynasty was ruled by the group. A reader can find the requested information in either span. A span annotation can still prefer just the name of the group, with a correspondingly narrower boundary.

Punctuation examples show the mild end of the same category. In the Northwestern material, the admissions percentage can be surrounded by parentheses, and the phrase describing selectivity can come with quotation marks. The authors count some such cases as acceptable answers within the overlapping category. This judgment distinguishes whether an answer meets a reader’s needs from whether it has the boundaries expected in a carefully annotated extractive dataset.

Compare matched answers with the full retrieval output

The manual review uses three randomly selected articles from the English SQuAD collection. In the resulting set of 227 Spanish examples available with the full retrieval procedure, the authors record 15 Type I errors, reported as 7%, and 98 Type II errors, reported as 43%. The total is 113 errors, reported as 50%. Of the Type II answers in this full set, they judge 68 acceptable. The total error count thus combines plainly wrong spans with cases in which a person can still recover the intended answer.

The text-matched subset within this review contains 67 examples. It has 0 Type I errors, reported as 0%, and 7 Type II errors, reported as 10%. The total is 7 errors, also reported as 10%, and 4 of the overlapping cases are counted as acceptable. These figures describe the subset whose independently translated answer can be matched in the Spanish passage. They give a local view of the quality of answers that pass that matching condition.

The important comparison is between the full output and a subset selected from it. The 227 examples include the text-matched examples as well as answers that depend on the fallback. The 67 examples are the direct matches. As a result, the published proportions describe the two outputs a corpus builder could retain. They do not give a comparison between two independently sampled groups of equal difficulty. The span recovery problem itself helps determine which group an example enters.

A direct match is easiest when the translator makes compatible wording choices for the answer in isolation and in context. A failure can indicate a harmless wording difference, a harder alignment problem or a lost piece of information. The added examples can therefore be more difficult before span projection is attempted. The audit shows that the procedure which accepts them has more recorded errors and much broader coverage. It cannot assign every extra error to the aligner alone, especially where the translator has already changed or omitted the relevant content.

The audit counts are also specific to the articles inspected. In those articles, the difference in coverage between full retrieval and the text-matched subset is especially pronounced. In the released training resource as a whole, the authors report the smaller set as about 53% of the source training examples. The sample and release counts describe different populations. The small audit gives examples and a local error profile, while the release counts describe corpus retention at training scale.

Check what cleanup fixes

The paper counts overlapping-span errors again after post-processing. In the inspected full-output set, the Type II count goes from 98 before processing to 51 afterward. The authors report 47 corrections. In the inspected text-matched subset, the corresponding count goes from 7 to 4, with 3 corrections. These are counts of overlapping errors in the reviewed examples. They quantify the change made by the cleanup pass, separately from the downstream F1 and EM measurements.

The paper represents the count of corrected errors as a difference.

Δ = E_before − E_after

Here Δ is the number of corrected overlapping-span errors, E_before is their count before cleanup and E_after is the count afterwards. The minus sign denotes the difference between those counts for the same retrieval setting. The paper reports this quantity for the inspected full output and for the inspected text-matched subset.

The kinds of errors removed are consistent with the operations the paper describes. If a span includes the right answer and a comma, trimming the edge gives a more precise annotation. If it reaches into the following sentence, trimming that portion restores a boundary within the sentence that supports the answer. These repairs work from regularities visible in the extracted text. Type I cases, such as the lost correspondent’s name, require information from outside the extracted span and fall beyond the demonstrated scope of the cleanup.

The residual overlapping errors also matter. A span that includes an extra syntactic phrase can begin and end with ordinary words. The cleanup described in the paper may have no punctuation or sentence boundary to act on. The dynasty examples make the issue concrete. To narrow an answer to just the ruler, a procedure would have to recognize which part of the larger phrase answers the question. The reported cleanup count measures a set of boundary repairs and leaves more complex span decisions to the retrieval procedure as it stands.

Test whether the extra training examples help

The comparison of SQuAD-es and SQuAD-es-small takes the audit’s tradeoff into training. The selective version retains examples that have passed a text-matching check. The full version adds examples that would otherwise be lost, including a mixture of usable aligned spans and erroneous ones. The authors hold the pretrained starting point and the reported training configuration fixed, giving a practical test of whether to include that mixture.

The full dataset wins on F1 and EM for both Spanish benchmarks. The result favors the broader construction policy as a package. It supports the authors’ interpretation that mBERT can tolerate some noisy annotations under these conditions. Many of the overlapping spans still carry the information the question asks for, and the cleanup removes a portion of the boundary errors. The added examples may supply useful supervision alongside labels that a person would revise.

The comparison changes several properties together. The full collection contains more examples, contains examples selected through a different retrieval route, and has somewhat different average passage, question and answer lengths. Training both versions for the same number of epochs also means processing different amounts of material in a pass. The result therefore shows the benefit of using the larger output in the reported setup. Separate contributions from the amount of data, its composition and its error profile remain open.

The translate-train baseline on MLQA adds another point of comparison. Both TAR versions score higher than that baseline. This establishes that synthetic training examples can differ substantially in their utility in the reported comparisons. The closest evidence about the fallback, however, comes from the paired TAR runs. The translate-train row represents a separate training preparation, so the score difference there covers the combined effect of the conditions in those systems. The within-TAR comparison holds more of the procedure in common and answers the practical question of which released training set performed better.

Limitations

Limits the authors identify

The authors treat translation quality and word alignment quality as separate sources of error that interact. A poor translation can change part of a question, remove a fact from a passage or alter the wording needed to identify its answer. An imprecise alignment can then select the wrong location or wrong boundaries even when the Spanish text has enough information. The manual review documents both mechanisms. This places a clear condition on data coverage. A retained record shows that TAR produced a nonempty span, while its semantic correctness depends on what survived translation and where the procedure placed the answer.

The authors observe translation errors when source material exceeds the average length of the sentences used for translation training. Their examples include shortened Spanish passages in which relevant details disappear. They present this as an observation from the error analysis. How frequently details disappear at each length, and how the relationship changes with a different translator, remain open. The translation score on a held-out parallel corpus provides an aggregate quality check for the component.

The paper describes the manual counts as a rough estimate, based on three articles. That scope is adequate for demonstrating the existence and variety of the errors the authors describe. Estimating how often each error occurs across the entire release would require broader coverage. The review’s acceptance judgments likewise describe the examined answers. An answer with a little extra text may be useful to a reader, but the proportion that is acceptable across the dataset remains uncertain.

The authors frame wider application as future work. They propose extending TAR to SQuAD v2.0 and to Natural Questions, and they plan to test the method with languages other than Spanish. The components are modular in the sense that a translator and an aligner can be prepared for a different language pair. The evidence in the paper is for English-to-Spanish conversion of answerable SQuAD v1.1 training examples. Supporting other languages and addressing benchmark designs that include unanswerable questions are separate empirical tasks. The proposed extensions are SQuAD with unanswerable questions and Natural Questions.

Limits visible in the comparisons

The full and small datasets reveal the effect of a practical selection policy, with dataset quality and quantity varying together. A size-matched comparison could clarify whether examples recovered by alignment provide a different kind of supervision from directly matched examples. Likewise, a downstream comparison before and after cleanup could isolate the value of the repairs. The paper measures cleanup through error counts and measures the complete training resources through benchmark scores. Those are direct observations at different stages of the pipeline.

The direct-match subset is a plausible source of cleaner answers, and matching verifies a narrow property. It shows that the independently translated string can be found in the translated paragraph. The passage and question still have to preserve the source meaning. A string may survive even when wording elsewhere in the question or context has changed. The inspection uses the question to assess such examples where possible, with answer errors serving as its principal diagnostic. The study leaves the rate of question and context translation errors across the finished collection unmeasured.

Exact reproduction of the retrieval behavior depends on implementation details beyond the short algorithm description. The prose describes searching from a projected location to help distinguish repeated occurrences. The pseudocode compresses the match branch into a test for presence in the translated context and summarizes boundary projection with the extrema. Read together, they explain the use of a matching route and an alignment fallback. Fine details of how repeated matches are resolved and how boundary indexing is applied belong to the implementation, which the authors release as TranslateAlignRetrieve.

The evaluation has a defined task and language scope. Both benchmarks used for the reported comparison assess extractive answering in Spanish. One comes from multilingual Wikipedia-based question answering, and the other from professionally translated SQuAD development material. This gives two relevant checks on the usefulness of the training resource. Performance on questions composed in other settings, on passages from other domains or on tasks that require generating an answer outside the passage remains unresolved.

The benchmark tables also set the bounds for the paper’s performance claims. Full TAR training leads the listed XQuAD settings on both metrics. On MLQA, it leads the listed F1 scores, while the XLM row has the stronger exact match. The paper reports point scores for these configurations. Variation across repeated training runs and the uncertainty around close comparisons are unquantified. In particular, the very close MLQA F1 results establish the ordering in the reported table.

Finally, almost complete conversion and strong benchmark scores are two different observations. The corpus count records how many English training examples yielded retained Spanish records. The benchmark scores record how accurately a system learned to answer on separate Spanish evaluation material. Together they demonstrate the usefulness of SQuAD-es for the reported training setup. A corpus-wide estimate of how many individual translations preserve every question, supporting fact and answer boundary would require a different measurement.

What came after

The later work on French asks about the usability of Transformer-based systems for a French question answering task. Its connection to Carrino and colleagues is the evaluation of question answering in a language beyond English. The Spanish paper supplies a precedent for measuring usefulness on a target-language task after confronting the shortage of task-specific examples. The French work cites that precedent and takes French question answering as its own subject. The citation establishes the connection, while the adoption of TAR’s particular alignment and extraction steps remains unspecified. On the Usability of Transformers-based Models for a French Question-Answering Task

The later work on Tigrinya takes up both a benchmark dataset and question answering systems for a language it describes as low-resourced. The point of contact with SQuAD-es is the importance of data as part of establishing a question answering task. Carrino and colleagues create a Spanish training resource and assess its usefulness on separate benchmarks. The Tigrinya paper addresses a benchmark and systems for Tigrinya and cites the Spanish study. The specific way it constructs its benchmark, including whether it applies any of TAR’s span recovery steps, remains unspecified. Question-Answering in a Low-resourced Language: Benchmark Dataset and Models for Tigrinya

Cite

Cite as Casimiro Pio Carrino, Marta R. Costa-jussà and José A. R. Fonollosa. 2020. Automatic Spanish Translation of SQuAD Dataset for Multi-lingual Question Answering. Proceedings of the Twelfth Language Resources and Evaluation Conference.

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

@inproceedings{carrino2020automatic,
  title = {{Automatic Spanish Translation of SQuAD Dataset for Multi-lingual Question Answering}},
  author = {Casimiro Pio Carrino, Marta R. Costa-jussà and José A. R. Fonollosa},
  booktitle = {Proceedings of the Twelfth Language Resources and Evaluation Conference},
  year = {2020},
  url = {https://aclanthology.org/2020.lrec-1.677/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/carrino-2020-automatic-spanish-translation-squad-dataset/