On the Usability of Transformers-based Models for a French Question-Answering Task
Paper · 2021 · Oralie Cattan, Christophe Servan and Sophie Rosset
Summary
A system that answers questions from a passage has to identify which words in the passage supply the answer. Learning to do that takes examples that connect questions to the right passages and answer spans. The authors ask how well this approach works in French, where fewer annotated examples were available than in English. They also ask whether a reader small enough to require substantially less memory and training energy can still extract useful answers. Their study concerns extractive question answering, in which the passage is supplied and the answer is taken from its text.
The authors build FrALBERT, a French reader based on ALBERT. Its starting weights are learned from French Wikipedia, and it has 12 M parameters. To adapt pretrained systems to the task, the authors compare ordinary supervised training on FQuAD with two changes. They search for better training settings, and they enlarge the French training set by translating English question-answering examples. They also test whether multilingual readers can learn the task from English examples and apply it to French, with or without annotated French examples in task training.
The best setting depends on what counts as a correct answer. On FQuAD dev, tuned CamemBERT large reaches 90.2 F1, which gives credit for word overlap, while tuned XLM-R large reaches the highest Exact Match score in the French-training comparison, 75.8. On PIAF dev, where scores are lower throughout the study, tuned XLM-R large records 73.2 F1 and 45.8 Exact Match. A multilingual reader can also do well without French question-answer pairs in its supervised training. XLM-R base trained on English SQuAD records 81.3 F1 on FQuAD dev, compared with 82.1 when trained on FQuAD. The multilingual system has already undergone multilingual pretraining in both cases.
FrALBERT illustrates a different tradeoff. With the same French Wikipedia source as a CamemBERT base comparison, it earns less word-overlap credit on FQuAD dev under ordinary training but matches more answers exactly. Adding translated examples raises FrALBERT to 84.3 F1 and 70.5 Exact Match on that development set. In the measured FQuAD training run, FrALBERT uses 0.57 kWh and takes 3,816 seconds, compared with 1.08 kWh and 7,207 seconds for CamemBERT base. The answer scores and the measured training costs give separate grounds for choosing between the compact reader and the stronger large systems.
Deep dive: On the Usability of Transformers-based Models for a French Question-Answering Task
The paper compares compact and large Transformers for French question answering and tests how tuning, translation, and English training affect accuracy. · about 32 minutes to read
The problem and its context
The task starts with a passage
In the reading-comprehension task studied here, a reader is given a question together with a passage containing the answer. Its job is to locate the relevant text and choose where the answer begins and ends. A factual passage may contain several names, places or dates. Knowing that the question calls for a place only narrows the search. The reader still has to connect the question to the right event or relationship in the passage, and it has to select the words that express the answer. This setup lets researchers study passage interpretation while holding the choice of document outside the experiment.
A supervised example provides the question, the reading context and a span that an annotator has accepted as the answer. Each example therefore supplies evidence about relevance and about boundaries. The distinction matters when a prediction includes the core of a correct phrase but extends into surrounding text. Such an output may be useful to a reader and still fail a strict match against the reference. Conversely, choosing a short phrase with the expected kind of name or date does little good if it refers to the wrong part of the passage. The task combines the problems of locating the evidence and delimiting it.
The paper treats the shortage of examples as a property of the task in French. French text for learning general word and sentence representations was available to the authors. The scarcer resource was French text already paired with questions and annotated answers. Those resources serve different purposes. Reading Wikipedia during pretraining can help a system interpret wording and context. A labeled reading exercise teaches it what to select in response to a question. The English SQuAD collection gave researchers a much larger supply of the latter kind of evidence.
How pretrained readers changed the task
Earlier readers, as the authors describe them, usually divided the work into encoding, interaction and output. The encoder represented the words in a numerical space. An interaction component then modeled which parts of the question and passage were related. Finally, an output component turned those relationships into a prediction. Much of the architectural work went into that middle stage. Bidirectional Attention Flow, for instance, belongs to a line of systems that used attention to connect information from the question and the context. The paper also discusses systems that organized these interactions into several levels or revisited them during prediction.
In the recurrent readers reviewed in the paper, a word could enter the system with a static representation, such as a GloVe embedding. A recurrent encoder then built a representation that reflected the word's surroundings. Because this contextual work took place inside the task architecture, training still depended heavily on labeled reading examples. The authors point out that some such readers had far fewer parameters than BERT-based systems yet required substantial training time. The sequence of operations and the source of the initial representations therefore mattered alongside the number of weights.
The Transformer offered a different way to represent a passage and question. Its self-attention operations allow a token's representation to draw on other tokens in the input. Multiple attention heads give the network several ways to compute those interactions. The paper describes how Transformer layers can take over encoding and interaction in a question-answering system, removing the earlier reader's dependence on recurrence for those stages. Most of the machinery needed to build a contextual representation can then be learned before the system encounters labeled answer spans.
The paper uses BERT to illustrate the resulting training practice. General text supplies examples for pretraining objectives, such as predicting masked words or learning relationships between sentences. The learned weights then initialize supervised fine-tuning for a particular task. In extractive reading, the labeled examples teach the system how to turn contextual representations into answer boundaries. A researcher can reuse a pretrained reader across tasks by changing the task supervision and adapting the weights.
The authors distinguish the savings in labeled data from the cost of creating the pretrained starting point. They contrast the 110 million parameters and 16 gigabytes of pretraining text of BERT base with the 175 billion parameters and 45 terabytes of text they report for GPT-3. The examples illustrate the resource trend that motivated their study. The paper also draws on research about the time, financial cost and environmental impact of large training runs. It connects those costs to deployment because a system that must run remotely can incur communication and latency costs. The experiments themselves concentrate on a narrower question about reading accuracy and observed fine-tuning costs. Energy and Policy Considerations for Deep Learning in NLP.
Where efficiency and scarce supervision meet
The field had explored several ways to make readers cheaper to train, store or operate. Quantization reduces the precision used to represent numerical values. Pruning removes parts of a network, such as attention heads, with the aim of retaining predictive quality. Distillation trains a smaller system to reproduce behavior learned by a larger one. These approaches shrink or simplify a system through different mechanisms, so the label compact says little by itself about what was removed or retained. DistilBERT is the paper's prominent example of a distilled system.
Other work sought savings by changing what fine-tuning updates or by changing the architecture. Adapters allow task-specific parameters to carry the adaptation while the underlying pretrained network is reused. ALBERT reduces the number of distinct weights through factorization and sharing. Work such as Reformer addresses the cost of attention over long sequences. The authors point out that an attention approximation useful on long inputs can bring enough overhead to make it less attractive for shorter question-answering inputs. Efficiency depends on the workload as well as the design.
The authors frame English benchmarks as the main setting in which compact designs had been assessed. They name the GLUE comprehension tasks and SQuAD as examples. In the French setting, previous work on scarce supervision gave them a separate reason to revisit standard training practices. The paper cites studies in which fine-tuning became sensitive to choices such as training duration and which layers to update. With little task evidence, training can fit idiosyncrasies or errors in the labels, or lose some of the useful behavior acquired during pretraining. A compact architecture and a suitable fine-tuning procedure address different parts of this problem.
The paper also describes ways to obtain task supervision across languages. Researchers had used machine translation to build reading-comprehension datasets in languages including Italian, Spanish, Arabic and Korean by starting from annotated material in a better resourced language. Another approach translated target-language material into the language of a reader that was already trained. In the example discussed by the authors, alignment information from a translation system helped guide the selection of the answer. Both uses of translation inherit its errors, and an extractive corpus adds the requirement that the answer be identifiable in the translated passage.
A different line of cross-lingual NLP work sought to transfer the learned representations themselves. The paper traces the wider idea of pretraining and reuse through earlier recurrent systems, including Semi-supervised Sequence Learning, and through systems adapted from a source reading task to another domain. Multilingual pretrained readers such as mBERT and XLM-R offered a way to test reuse from one language to another without translating the task examples first. Their shared representations made that approach plausible, while earlier multilingual studies gave the authors reasons to check its effectiveness on a task with limited French supervision. How Multilingual is Multilingual BERT?.
The method, step by step
Turn reading into a boundary prediction
The experiments use the same basic output task across the different training strategies. Give the reader a question and a passage. Represent the text as tokens, the units on which the network operates. The Transformer produces a contextual vector at each position. A vector is a list of numerical values, and its role here is to encode information about that position in relation to the input around it. For the answer task, the reader learns how to use that information to tell whether a position looks like the start of an answer or the end.
This approach separates the two boundary decisions at the scoring stage. A position that looks like a plausible beginning can have a high start score and a low end score. The position at the other edge of a longer phrase may show the reverse pattern. Once the predicted boundaries are chosen, the words between them give the answer text. Training examples supply both boundaries, so even when several phrases in the paragraph use similar vocabulary, the reader receives supervision for the location that corresponds to the annotated answer.
Preparing and evaluating a French extractive reader
The steps in order.
The authors describe the BERT span-prediction procedure in words. The probability calculation they describe can be written for either boundary as follows.
pᵦ(i) = exp(hᵢ · wᵦ) / Σⱼ exp(hⱼ · wᵦ)
The symbol b, shown as the subscript ᵦ, denotes the boundary type, start or end. The index i identifies the token position being scored, and pᵦ(i) is the probability assigned to that position for the chosen boundary. The contextual representation at position i is hᵢ, and wᵦ is the learned vector for the boundary type. The dot · is a dot product, which multiplies the corresponding vector entries and adds the products to obtain a score. The function exp takes the exponential of that score. The symbol Σⱼ sums the exponentiated scores over the positions indexed by j, with hⱼ denoting the contextual vector at such a position. The denominator normalizes the scores into a probability distribution. The equals sign identifies the resulting value, the slash indicates division, and the parentheses indicate the position or the expression supplied to the function.
The function that performs this normalization is called a softmax. It turns a set of relative scores into competing probabilities for a start position, and it does the same separately for end positions. The score combines information learned during general pretraining with what the supervised examples teach the reader to attend to. The authors update the Transformer weights together with the start and end vectors during task training. The comparison is therefore about adapting the full reader under different sources and amounts of supervision, with a common kind of prediction at the output.
Build a compact French starting point
FrALBERT starts from an ALBERT architecture and is pretrained from scratch on French text. The paper emphasizes two ways to reduce the number of parameters. Factorization represents a large set of weights through smaller components. Sharing lets different parts of the computation reuse weights, so each layer need not store a separate set. These changes concern the structure of the reader before it is trained to locate any answer. They differ from distillation, where the training of a smaller reader is guided by a larger one, and from vocabulary reduction, where a multilingual reader is narrowed by retaining the entries relevant to selected languages.
For its pretraining source, the team chooses French Wikipedia. The authors give two reasons for this choice. They raise questions about the rights to use text from Common Crawl collections, and they regard an encyclopedia as suitable for factual reading. FrALBERT uses a collection of Wikipedia text totaling 4 GB across 17 million sentences. The pretraining batch size is 128, and the initial learning rate is 3.125 × 10⁻⁴. A batch is the group of examples processed for a training update. The learning rate controls how large a step the update takes. These are pretraining settings, distinct from the choices the paper later studies for supervised adaptation.
The resulting FrALBERT base has a vocabulary size of 32,005, 12 M parameters and a reported storage size of 50 MB. The authors include a CamemBERT base variant pretrained on French Wikipedia with the same reported 4 GB of text and vocabulary size of 32,005. That system has 110 M parameters and a reported size of 445 MB. A vocabulary size counts the token entries available to the reader. It belongs to the description of how text can be represented, while parameter count and storage size describe the learned numerical machinery. The similar corpus and vocabulary sizes make these two systems especially useful for examining the tradeoff with compactness.
The French comparisons also include CamemBERT checkpoints with broader pretraining sources. The base system in that group uses French OSCAR, with 138 GB of text. The large system uses French CCNet, with 135 GB of text, and the paper describes it as having more layers, hidden units and attention heads. These systems let the authors see how the compact Wikipedia reader fares against strong French alternatives in practice. The comparison also changes the nature and amount of pretraining data, which matters when interpreting the effect of size. CamemBERT and CCNet describe the earlier work behind those choices.
The multilingual group supplies the starting points for the language-transfer experiments. The paper uses XLM-R base and large, pretrained on CC-100, and mBERT base, pretrained on Wiki-100. For compact multilingual comparisons, it includes distil-mBERT and small-mBERT. The former is a distilled version of mBERT. The latter reduces the original vocabulary to English and French. Both can be evaluated on the French task, but their routes to compactness differ from each other and from FrALBERT's practice of sharing and reducing parameters. The authors make FrALBERT available through the HuggingFace model hub.
Translate supervision and recover the answer span
FQuAD supplies the native French examples for supervised training. English SQuAD supplies a larger set of labeled questions and answers from which the team can obtain more examples. The authors use a Transformer translation system developed with OpenNMT to produce the French resource they call SQuAD-fr train. The procedure translates the reading context, question and answer. After translation, however, the task example still needs an answer that occupies identifiable positions in the French passage.
An answer and its containing sentence can translate differently when processed separately. A standalone phrase may have a different inflection or wording from the same information embedded in a longer sentence. A translated answer can therefore be sensible French and still have no literal match in the translated paragraph. Training on that pair as though the boundaries had survived would leave the reader without a valid target span. This is the annotation problem that the authors' extraction step addresses.
The procedure first checks whether the translated answer is already present as a span in its context. The authors use this route where possible because many answers are entities. If a literal answer span is absent, they apply a method based on chrF, a measure of overlap between character sequences. An n-gram is a contiguous sequence of units. Character n-grams can overlap even when the full strings differ, and the procedure described in the paper also uses word n-grams. This gives the extraction method evidence for selecting passage text that resembles the translated answer without requiring an exact string match.
The authors assess the quality of the translated material by manually correcting errors in a sample of 890 question-answer pairs and 107 contexts. They then report BLEU scores of 68.89 for the translated questions and 72.38 for the translated contexts. BLEU measures agreement with reference wording through overlapping sequences. The reported comparison concerns the translation output against the corrected text. It offers a separate check on the new resource from the ultimate evaluation of the reader, which asks whether adding the translated training examples improves span extraction on French development data. The released SQuAD-fr resource contains 90K+ translated training pairs.
Vary the task supervision and training settings
The first family of comparisons starts with a reader trained on FQuAD train. One variation keeps that source and searches for better hyper-parameters, the settings that govern the training process. Another variation combines FQuAD train with SQuAD-fr train so the reader has additional French-language examples. These comparisons apply to both French and multilingual pretrained systems. Whatever the starting point, the translated examples come from English supervision and reach the reader as French text with aligned answer spans.
The second family uses only multilingual starting points. Its first configuration learns answer-span extraction from SQuAD-en train and is evaluated directly on the French development sets. The paper calls this zero-shot transfer because the supervised question-answering training in that condition uses English examples. The multilingual pretraining is a separate stage. A tuned variant changes the training settings while keeping the English source of supervision. A bilingual variant concatenates the original English SQuAD examples with French FQuAD training examples. This last route preserves the original wording of SQuAD and supplies native French task supervision in the same training collection.
For hyper-parameter optimization, the team uses population-based learning. The term population refers to a collection of training runs whose weights and training settings are optimized during the search. This makes the hyper-parameter choices part of the training procedure. The authors randomly take 10% of the training data to create a validation set for the search. The validation portion provides evidence for choosing training settings. The separately reported development results measure how readers trained under those settings perform on the French benchmarks.
The training comparisons separate decisions that could otherwise be confused. Translating SQuAD changes the material the reader sees and requires aligning answers again. Combining English and French corpora changes which languages supply task supervision. Tuning changes how the reader learns from the available examples. Replacing a checkpoint changes the representations and architecture from which training begins. These are distinct experimental interventions even when they all lead to a single pair of answer scores.
Experiments and results
The datasets and what the scores count
The authors use SQuAD v1.1 as the English source and call it SQuAD-en. The corpus description gives 100K+ question-answer pairs based on 442 English Wikipedia articles. The split used for supervised English training contains 87,342 questions and 87,599 answers, with the reading material organized into 18,891 paragraphs. These are counts of different units. A paragraph can provide the context for several questions, and the answer annotations are counted separately from the questions. SQuAD-fr is the translated training resource derived from the English material.
FQuAD v1.0 consists of crowdsourced question-answer pairs based on French Wikipedia. The experiments use FQuAD train for supervised learning and FQuAD dev for reporting. The training split has 117 article titles, 4,920 paragraphs and 20,088 questions. The development split has 18 titles, 768 paragraphs and 3,184 questions. Though both splits draw from the same kind of source, the evaluation asks the reader to interpret questions and passages it has held out from the task training. The authors use the development set because the test sets were unavailable to them.
PIAF v1.0 provides a separate French collection from French Wikipedia. PIAF dev has 191 article titles, 761 paragraphs and 3,812 questions. Its passages cover many more articles than the FQuAD development passages. The paper reports that the average PIAF dev answer contains 4.5 tokens, compared with 4.3 tokens on FQuAD dev. These statistics describe features of the evaluation material that can matter to the task. A broader collection of articles can present a wider range of topics, and the answer's extent affects how many boundaries and words have to agree with an annotation.
The first evaluation measure is Exact Match, or EM. The paper counts an output as an exact match if its normalized text agrees with a ground-truth answer. For both predictions and references, the authors lower-case the text and remove punctuation and a specified list of French determiners. That normalization means that exactness refers to the words left by the scoring procedure. The reader must still choose a span from the original passage. F1 combines precision, which asks how much of the predicted wording belongs to the reference, and recall, which asks how much of the reference wording the prediction captures. A span that includes some correct words and misses other words can earn F1 credit while failing Exact Match.
The human reference figures quoted for FQuAD are 92.6 F1 and 79.5 EM. The dataset table gives 90.5 F1 and 80.3 EM for SQuAD-en and supplies no human figure for PIAF. The human references help put the scores in context, with care about the version and split used for each result. The authors note that the earlier published FQuAD experiments concern v1.1, while their own supervised comparisons use v1.0 dev. Their experimental baselines are the pretrained readers fine-tuned with the ordinary training configuration on the designated corpus.
What French supervision gets before tuning
With FQuAD train as the only source of annotated task examples and ordinary fine-tuning, CamemBERT large reaches 81.2 F1 and 55.9 EM on FQuAD dev. The CamemBERT base checkpoint pretrained on OSCAR reaches 77.6 F1 and 52.5 EM on that split. The Wikipedia CamemBERT base reaches 74.2 F1 and 49.5 EM. On PIAF dev, the corresponding results are 68.1 F1 and 42.2 EM for CamemBERT large, 62.0 F1 and 37.5 EM for the OSCAR base, and 61.7 F1 and 37.3 EM for the Wikipedia base. The large checkpoint leads the French-only group under this baseline on both sets.
FrALBERT base gives that comparison a different shape. Under the same FQuAD training baseline, it records 72.6 F1 and 55.1 EM on FQuAD dev. Its word-overlap score trails the Wikipedia CamemBERT base, while its stricter matching score is higher. On PIAF dev, it records 61.0 F1 and 38.9 EM, showing the same ordering against the Wikipedia base on the two measures. These aggregate scores support a claim about observed answer accuracy for the compact checkpoint, and they expose the importance of looking at both measures. A ranking by F1 alone would hide its advantage in the frequency of exact answers.
The multilingual baselines show that a reader need not be pretrained solely in French to make good use of French question-answer pairs. With FQuAD train, XLM-R base reaches 82.1 F1 and 66.8 EM on FQuAD dev. XLM-R large reaches 86.8 F1 and 71.5 EM. On PIAF dev, the corresponding scores are 65.0 F1 and 39.6 EM for XLM-R base, and 70.4 F1 and 43.8 EM for XLM-R large. The multilingual large checkpoint leads the French monolingual large checkpoint on these baseline results. The base and large variants matter because the conclusion drawn from a multilingual comparison depends on which checkpoint enters it.
The multilingual compact systems give lower baselines than their larger alternatives in most of the relevant comparisons. On FQuAD dev after ordinary French training, mBERT base records 78.6 F1 and 61.8 EM, small-mBERT records 75.1 F1 and 55.7 EM, and distil-mBERT records 72.8 F1 and 56.0 EM. On PIAF dev, the same training gives 62.5 F1 and 37.8 EM for mBERT, 60.8 F1 and 35.6 EM for small-mBERT, and 52.3 F1 and 30.1 EM for distil-mBERT. The order of the compact pair can change with the metric, and the distilled checkpoint has particular difficulty on PIAF in this condition.
Tuning and translated data change the rankings
Tuning CamemBERT large on FQuAD train yields 90.2 F1 and 75.5 EM on FQuAD dev. The corresponding translated-data run gives 89.9 F1 and 75.2 EM. This is the highest F1 in the paper's French-training comparison. XLM-R large with tuning reaches 89.5 F1 and 75.8 EM, which gives it the highest EM in that comparison. With translated data, it reaches 87.3 F1 and 72.5 EM. The detailed results thus identify different leaders for partial overlap and exact agreement. The largest FQuAD F1 value and the largest FQuAD EM value come from different trained readers.
On PIAF dev, the French-trained CamemBERT large reaches 71.0 F1 and 44.8 EM with tuning, and 68.9 F1 and 42.5 EM with augmentation. XLM-R large instead reaches 73.2 F1 and 45.8 EM with tuning on FQuAD train. The same XLM-R checkpoint trained on the augmented French corpus reaches 72.6 F1 and 45.2 EM. The paper's prose highlights the CamemBERT large results in its discussion of tuning, while its detailed comparison reports the higher PIAF scores for XLM-R large. PIAF remains the more difficult evaluation even for the readers that lead both measures there.
For the French Wikipedia readers, translating extra task examples makes a different comparison possible. With only native French supervision and tuning, Wikipedia CamemBERT base reaches 80.7 F1 and 61.8 EM on FQuAD dev, while FrALBERT reaches 75.6 F1 and 64.8 EM. After training on the native and translated examples together, Wikipedia CamemBERT reaches 85.1 F1 and 69.5 EM, while FrALBERT reaches 84.3 F1 and 70.5 EM. A reader choosing between these systems on FQuAD dev could therefore see similar F1 after augmentation alongside a slight EM lead for FrALBERT.
FrALBERT and Wikipedia CamemBERT base on FQuAD dev by F1
Adding translated supervision brings FrALBERT close to the Wikipedia CamemBERT base reader.
The numbers
| System or setting | F1 |
|---|---|
| FrALBERT with FQuAD (this paper) | 72.6 |
| FrALBERT with tuned FQuAD training | 75.6 |
| FrALBERT with FQuAD and translated SQuAD | 84.3 |
| Wikipedia CamemBERT base with FQuAD | 74.2 |
| Wikipedia CamemBERT base with tuned FQuAD training | 80.7 |
| Wikipedia CamemBERT base with FQuAD and translated SQuAD | 85.1 |
On PIAF dev, FrALBERT rises from 61.0 F1 and 38.9 EM with ordinary FQuAD training to 62.1 F1 and 39.5 EM with tuning, and then reaches 66.9 F1 and 43.7 EM in the augmented condition. Wikipedia CamemBERT base reaches 65.9 F1 and 41.0 EM with the same combination of native and translated training sources. The compact French reader is ahead of the matched-source CamemBERT on both measures in this condition. The ranking of those two readers thus depends on the evaluation set, the training recipe and the kind of answer agreement being scored.
The smaller multilingual readers also improve in several augmented conditions. For instance, on FQuAD dev, mBERT base reaches 84.1 F1 and 68.6 EM, while small-mBERT reaches 81.6 F1 and 64.6 EM. On PIAF dev, distil-mBERT goes from 52.3 F1 and 30.1 EM under the ordinary French baseline to 58.3 F1 and 34.9 EM with translated data. These gains leave room between distilled readers and the leading systems. They also show that adding examples can help a reader even when the absolute result remains well below the top of the comparison.
From English supervision to French answers
The zero-shot comparison uses SQuAD-en train to teach multilingual readers to select answer boundaries and then evaluates their predictions on French passages. XLM-R base scores 81.3 F1 and 65.0 EM on FQuAD dev with ordinary English task training. Its French-training baseline on that split is 82.1 F1 and 66.8 EM. XLM-R large reaches 82.8 F1 and 64.8 EM on FQuAD dev under ordinary English task training, compared with 86.8 F1 and 71.5 EM under ordinary French task training. For this pair of readers, English-only task supervision carries much of the span-extraction ability across languages, with the closeness depending on the checkpoint and measure.
The PIAF results give another view of the same transfer. XLM-R base trained on SQuAD-en reaches 61.4 F1 and 37.2 EM on PIAF dev. Its French-training baseline is 65.0 F1 and 39.6 EM. XLM-R large scores 65.1 F1 and 39.1 EM on PIAF with the English baseline, compared with 70.4 F1 and 43.8 EM under French training. The ability to select French answers after English supervision extends to both datasets, while the native French annotation remains valuable for these readers.
Tuning the English training helps several configurations. XLM-R large reaches 84.4 F1 and 67.8 EM on FQuAD dev and 66.3 F1 and 40.5 EM on PIAF dev. Tuning mBERT raises its FQuAD results from 76.0 F1 and 59.3 EM to 79.5 F1 and 62.3 EM. Its PIAF F1 rises from 61.6 to 62.1, while its EM moves from 37.2 to 36.9. That last case is a reminder that tuning can affect the two measures differently even when the language of the training data and the pretrained reader are held fixed.
Combining English SQuAD and French FQuAD examples improves on the English-only baseline for each multilingual reader in the reported FQuAD comparison. XLM-R large reaches 87.1 F1 and 72.0 EM on FQuAD dev in that condition. It reaches 69.0 F1 and 43.2 EM on PIAF dev. mBERT base reaches 83.5 F1 and 67.6 EM on FQuAD dev, and small-mBERT reaches 81.4 F1 and 62.1 EM. Distil-mBERT also gains from the mixed training, reaching 75.9 F1 and 56.3 EM on FQuAD dev, with 56.5 F1 and 33.1 EM on PIAF dev. The bilingual recipe helps the weaker compact settings while preserving the lead of XLM-R large among the readers trained that way.
XLM-R large training strategies on FQuAD dev by F1
Bilingual supervision improves on English-only training, while tuned French training has the highest score for this reader.
The numbers
| System or setting | F1 |
|---|---|
| English SQuAD | 82.8 |
| English SQuAD with tuning | 84.4 |
| English SQuAD with French FQuAD | 87.1 |
| French FQuAD | 86.8 |
| French FQuAD with translated SQuAD | 87.3 |
| French FQuAD with tuning (this paper) | 89.5 |
The cost of a fine-tuning run
The cost experiment uses an NVIDIA V100 GPU with 16GB of memory. The authors report a run of 10 epochs on FQuAD train with a batch size of 4. An epoch is a pass through the training data. They monitor elapsed time, energy in kilowatt-hours and carbon dioxide emissions estimated by their tracking setup. Measured under this common workload, these quantities describe what the readers cost to adapt. They can be read alongside parameter count and file size, which describe the stored system.
FrALBERT base takes 3,816 seconds, uses 0.57 kWh and has a reported emissions estimate of 167.80 grams of carbon dioxide. CamemBERT base takes 7,207 seconds, uses 1.08 kWh and has an estimate of 317.87 grams. Distil-mBERT takes 6,466 seconds, uses 1.06 kWh and has an estimate of 314.17 grams. The compact French reader has the lowest reported energy use and elapsed time in the comparison. Its advantage extends to a distilled multilingual reader whose training runtime is lower than that of several other multilingual configurations.
Fine-tuning energy on FQuAD train by pretrained reader
FrALBERT uses the least energy during the measured training run.
The numbers
| System or setting | kWh |
|---|---|
| CamemBERT base | 1.08 |
| CamemBERT large | 3.10 |
| FrALBERT base (this paper) | 0.57 |
| XLM-R base | 1.14 |
| XLM-R large | 3.30 |
| mBERT base | 1.07 |
| small-mBERT base | 1.09 |
| distil-mBERT base | 1.06 |
The large variants are more expensive in the same run. CamemBERT large takes 19,445 seconds and has a reported emissions estimate of 914.27 grams, while XLM-R large takes 21,137 seconds with an estimate of 973.29 grams. XLM-R base takes 7,676 seconds and has an estimate of 337.70 grams. The base and compact entries also show why the authors measure resource use directly. Small-mBERT has fewer parameters than mBERT base and a smaller file when the vocabulary is reduced, yet its measured energy is 1.09 kWh compared with 1.07 kWh for mBERT. Storage savings and savings in this training workload can therefore rank the same readers differently.
What the ablations show
Holding the reader fixed while changing training
The paper offers controlled training comparisons and a computational cost analysis. Its cleanest comparisons keep the pretrained reader and evaluation split fixed while changing the supervision or fine-tuning strategy. Other comparisons change the pretrained checkpoint itself. Those results show what happens when choosing among available systems, with several properties moving together. Reading the two types of comparison differently helps explain why a particular result supports a training decision more directly than an architectural claim.
Tuning CamemBERT large isolates the practical importance of the fine-tuning procedure. On FQuAD dev, the same checkpoint rises from 81.2 F1 and 55.9 EM to 90.2 F1 and 75.5 EM when the authors search training settings with FQuAD supervision. The result speaks to a central concern in the paper. An ordinary recipe can substantially understate what a pretrained reader can achieve with the examples already available. The size of the change also depends on the starting point. For XLM-R base on FQuAD dev, for instance, tuning changes 82.1 F1 and 66.8 EM to 83.1 F1 and 67.9 EM. The experiment evaluates the search procedure as a whole. It gives no per-setting result that identifies which hyper-parameter accounts for an individual improvement.
Translated augmentation can be compared against the native baseline for the same checkpoint. FrALBERT's FQuAD dev scores are especially informative because both F1 and EM improve when it trains with the translated corpus, and the gain is larger than in its tuned native-only condition. PIAF dev shows an advantage for augmentation with the same checkpoint. CamemBERT large, by contrast, performs better with tuning than with the translated-data condition on both French development sets. Taken together, the cases explain the paper's emphasis on augmentation as a productive response to scarcity, while leaving room for the choice of training strategy to depend on the reader and benchmark.
The translation experiment changes several properties of the training material at once. It gives the reader more examples, broadens the available passages and questions, and introduces wording generated by translation. Where an answer fails to occur literally, it also introduces an automatically recovered boundary. The observed gain is therefore evidence for the complete augmentation recipe. A comparison between examples that kept a literal match and those recovered with chrF would have addressed a narrower question about span alignment. The paper evaluates the translated corpus through its contribution to downstream reading and through a translation-quality sample.
Comparing routes across languages
The English-only condition provides a check on the transfer ability of the multilingual reader before French task examples are added. Under that condition the system learns how a reading-comprehension example works from English supervision. Its score on French questions then reflects how far that learning carries over with the multilingual representations already present. XLM-R base's FQuAD dev result comes close to its native French baseline. The weaker results on PIAF and the lower scores of the distilled multilingual checkpoint show that transfer varies across both readers and evaluation collections.
The bilingual comparison changes the language evidence available during supervised learning. Adding FQuAD to English SQuAD makes the same multilingual reader learn jointly from English examples and examples that directly represent the target task in French. One useful counterpart is the condition that trains on FQuAD and translated SQuAD. For XLM-R large, that French-language mixture yields 87.3 F1 and 72.5 EM on FQuAD dev, and the bilingual mixture yields 87.1 F1 and 72.0 EM. The proximity supports the authors' observation that original English examples can supply useful extra supervision to a multilingual reader even when the evaluation language is French. On PIAF dev the corresponding mixtures score 72.6 F1 and 45.2 EM for translated augmentation and 69.0 F1 and 43.2 EM for bilingual training. The resemblance between routes is more pronounced on FQuAD for this reader.
The checkpoint comparison within English-only transfer also reveals differences tied to the choice of metric. Under ordinary English training, XLM-R large has higher F1 on FQuAD dev than XLM-R base, while the base checkpoint narrowly leads it in EM. With tuning, the large checkpoint leads on both measures. This is compatible with a large reader having a greater capacity to use the available data, but the scores alone characterize the checkpoints under particular training recipes. They do not establish how a specific pretraining objective or change in size caused either ranking.
What compactness buys in the measured setup
The closest architectural comparison in the study pairs FrALBERT and CamemBERT base pretrained on French Wikipedia. Matching the stated pretraining source and amount gives a clearer basis for comparison than placing FrALBERT against a checkpoint trained on a much larger crawl. The ordinary baseline shows a recurring pattern for the Wikipedia pair. FrALBERT has a lower F1 and higher EM on both evaluation sets. After augmentation, the F1 advantage of the Wikipedia CamemBERT checkpoint persists on FQuAD dev but reverses on PIAF dev. The useful conclusion is conditional. Compactness can coexist with competitive accuracy, and the route used to train the reader affects how close the results come.
The authors suggest that the technique used to make a reader compact could explain some of the variation among the smaller systems. FrALBERT's sharing and factorization, small-mBERT's vocabulary reduction, and distil-mBERT's distillation leave each reader with different capabilities and costs. The results motivate the explanation because the methods do not move together in accuracy and energy. They cannot single out the reduction technique as the cause, since the comparison changes the language coverage, pretraining source and architecture as well. An isolated test of sharing or vocabulary reduction would need to match more of these initial conditions.
The resource analysis supplies an additional comparison under the same fine-tuning workload. FrALBERT's smaller parameter inventory accompanies lower measured runtime and energy in that run. Small-mBERT and mBERT base are much closer in measured runtime and energy in spite of their different storage sizes. This evidence supports treating file size, answer quality and the cost of running training as separate quantities. The best value for each quantity can belong to a different system, and the result that matters depends on the resource constraint that motivated the comparison.
Limitations
Limits the authors identify
The authors begin with limited annotated French material and end with evidence from extractive reading over Wikipedia passages. They frame translation, tuning and transfer as ways to alleviate the pressure of collecting more labels. Their experiments cover that particular combination of language, task and source material. In their outlook they propose extending the compact reader to other languages and evaluating it on other tasks, including named entity recognition and natural language understanding. They also propose a meta-learning direction aimed at a more general method for scarce supervision. Those proposals identify parts of the broader usability question left open by the study.
The paper explicitly notes a version and test-access restriction. Its FQuAD experiments use v1.0, while earlier published experiments discussed by the authors concern v1.1. Because the test sets were unavailable, the authors report French development-set results. This makes the paper's readers directly comparable to one another within its own evaluation, with the same data and answer normalization. Comparisons against published results from a different version or split require additional care. A high score on the development set supplies evidence about performance on that set and leaves final test performance unmeasured.
The authors offer two explanations for the generally lower PIAF scores. They point to differences in available reference answers and to the wider range of article titles represented in PIAF dev. When acceptable wording has multiple references, a prediction can have more ways to count as correct. When a collection covers more distinct articles, a reader may face more varied contexts. The comparison between the two development sets contains both differences and others besides. It does not estimate the effect of changing reference availability while holding the questions and passages fixed, so the explanations should be read as contributors proposed by the authors.
Translation reliability is another issue the paper recognizes. A useful machine-translated passage can still lead to a broken extractive example if the translated answer has no explicit match within it. That is why the authors add the chrF-based recovery step and assess a sample with manual corrections. The authors also suggest that the pretraining corpus may limit the strongest results obtainable with the Wikipedia readers. The comparison supports the relevance of pretraining source, since the checkpoints using more extensive text can score higher. Several properties change between those checkpoints, so the relevance of the source does not on its own establish how much of the observed difference comes from domain or amount of text.
Further limits of the experiments
The task definition narrows what the results establish about question answering. Every evaluation begins with a supplied passage, and the expected answer is an extract from it. The experiments leave open how well a system would find a passage in a large collection, decide that an available passage contains no answer, combine evidence across documents, or give an answer that requires wording absent from the context. Even a very high score shows how well the system selects and delimits text under the benchmark's assumptions. The distinction matters when considering the paper's motivating examples of resource-constrained language applications, whose workflows may include more than span extraction.
The reported answer scores are aggregate measurements. EM counts normalized agreements, and F1 reflects overlap, but neither shows which questions were solved or how errors were distributed. A lead in exact agreement alongside a lower overlap score could arise from different patterns across individual answers. The paired metrics reveal that the rankings differ. To explain the difference at the level of reader behavior would require examining the predictions themselves, the lengths and kinds of spans involved, and the cases on which the systems disagree. The article's analysis provides no such breakdown for the Wikipedia pair.
Training stability is part of the motivation, but the result tables give point scores for the stated settings. They show that hyper-parameter search can improve the observed outcome, sometimes substantially. They do not report a spread across repeated runs within each configuration or variation across independent validation draws. A point result answers whether the investigators obtained a stronger reader with that strategy. It leaves a separate question about how reliably another run of the same recipe would find an equally good solution. As a consequence, closely spaced scores are best read as observed outcomes with the precision used in the paper.
The English-only experiments establish transfer from English task supervision, given a multilingual starting point. They do not establish that the French reading capability emerged from an entirely English training history. The multilingual pretraining is what makes the experiment a test of transfer through shared representations. The English and French annotated training sets also differ in size and collection. Similar scores across the English-only and native French configurations show that the English resource is practically useful in this setup. They cannot determine the relative value of an English and a French annotation with the amount of supervision held equal.
The mixed-language training comparison carries a related limitation. The authors compare two useful ways to reuse English supervision. One translates the examples and aligns a French answer span, while the other leaves the examples in English. These procedures differ in wording, tokenization and supervision quality as well as in language. The experiments therefore tell a practitioner which whole recipes produced competitive scores. They cannot separate the benefit of seeing a source question in its original form from the effects of alignment or other changes involved in producing the translated set.
The translation quality scores are reported for questions and contexts. The paper does not give a separate answer-boundary accuracy estimate for the examples that needed recovery. That distinction matters because fluency, reference overlap and alignment are different evaluation targets. A translation might convey the passage well while changing which contiguous words make the best answer. Conversely, a slightly awkward translation can still preserve the right boundaries. The improvement after augmentation supports the use of the translated collection as a training resource. The accuracy of its recovered spans remains a separate empirical question.
The resource measurements are specific to the reported GPU, dataset, batch size and number of passes through the data. They record the cost of a fine-tuning session. The table does not add the cost of creating each pretrained checkpoint, translating the source dataset, or running the search used to tune the supervised settings. It also does not measure response time or power use for inference on a mobile device. The smaller FrALBERT file and its lower measured fine-tuning energy therefore answer two concrete questions about storage and supervised adaptation. The end-to-end costs of obtaining and deploying an answering system remain outside those figures.
What came after
French CrowS-Pairs (2022) extends a challenge dataset for measuring social bias in masked language models to French. The shared issue is how to evaluate pretrained systems when an assessment has chiefly been available in English. The later work takes that issue into bias measurement. Its evaluation target is a system's behavior on a social-bias challenge, whereas the reading study evaluates the match between extracted spans and reference answers. The connection is the construction of a task-specific French evaluation. The citation establishes a link between the studies, while the later work's stated contribution concerns the challenge dataset.
New Semantic Task for the French Spoken Language Understanding MEDIA Benchmark (2024) adds a semantic task to a French spoken language understanding benchmark. It places the evaluation problem in spoken language and changes what the system must demonstrate. The question-answering paper obtains its measurements from questions and passages sourced from Wikipedia, with answer boundaries supplying the supervision. The MEDIA work concerns semantic evaluation for spoken French. Its stated contribution identifies an extension of the benchmark to a further task. The citation connects that work to the earlier study of French task evaluation, without establishing that it adopts FrALBERT or the SQuAD translation procedure.
Cite
Cite as Oralie Cattan, Christophe Servan and Sophie Rosset. 2021. On the Usability of Transformers-based Models for a French Question-Answering Task. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2021).
@inproceedings{cattan2021usability,
title = {{On the Usability of Transformers-based Models for a French Question-Answering Task}},
author = {Oralie Cattan, Christophe Servan and Sophie Rosset},
booktitle = {Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2021)},
year = {2021},
doi = {10.26615/978-954-452-072-4\_029},
url = {https://doi.org/10.26615/978-954-452-072-4_029}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cattan-2021-usability-transformers-based-models-french/