---
title: "Mitigating Exposure Bias in Grammatical Error Correction with"
description: "Cao and colleagues train a grammar corrector on its own beam-search outputs and learn which outputs to use as decoder input during training."
canonical: "https://research.elamur.ai/free/en/papers/cao-2023-mitigating-exposure-bias-grammatical-error/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/cao-2023-mitigating-exposure-bias-grammatical-error/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2023](https://md.research.elamur.ai/free/en/papers/2023/) / Mitigating Exposure Bias in Grammatical Error Correction with Data Augmentation and Reweighting

# Mitigating Exposure Bias in Grammatical Error Correction with Data Augmentation and Reweighting

Paper · 2023 · Hannan Cao, Wenmian Yang and Hwee Tou Ng

**Authors:** [Hannan Cao](https://md.research.elamur.ai/free/en/authors/hannan-cao/), [Wenmian Yang](https://md.research.elamur.ai/free/en/authors/wenmian-yang/) and [Hwee Tou Ng](https://md.research.elamur.ai/free/en/authors/hwee-tou-ng/) · **Year:** 2023 · **Venue:** Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2023.eacl-main.155/)
- [PDF](https://aclanthology.org/2023.eacl-main.155.pdf)
- [DOI 10.18653/v1/2023.eacl-main.155](https://doi.org/10.18653/v1/2023.eacl-main.155)

## Summary

A grammar corrector that writes a sentence from left to right has to continue from whatever it has already written. If it leaves an early error in place, it still needs to find and fix later errors. Yet a common training procedure, teacher forcing, gives the decoder the correct preceding words at every step. The decoder learns to continue from clean text and then has to work with its own imperfect text in use. Cao and colleagues investigate this mismatch, called exposure bias, in [grammatical error correction](https://md.research.elamur.ai/free/en/topics/grammatical-error-correction/). They ask whether a corrector can learn to recover from the kinds of mistakes it actually makes.

Their approach, called data manipulation, changes what the decoder sees during training while keeping the desired correction fixed. An earlier checkpoint of the corrector generates several complete proposals for each training sentence using beam search, which keeps multiple promising continuations as it builds an output. The authors use ERRANT to align each proposal with the reference correction, dropping extra tokens and padding gaps so the proposal can serve as decoder input alongside the usual clean input. A separate data scorer learns how frequently to draw a proposal from each beam rank. Its reward comes from comparing the direction in which that proposal would change the corrector with the direction that would reduce loss on development data. The authors report releasing the implementation as `nusnlp/gec_eb`.

The combined approach, DM, reaches an F₀.₅ score of 66.8% on the CoNLL-2014 test set and 71.5% on the BEA-2019 test set. F₀.₅ gives greater weight to the precision of the proposed edits than to how many reference edits the system finds. DM leads the paper’s fine-tuning comparisons on both benchmarks, and its improvements over ordinary cross-entropy training and over equal weighting of the beam proposals are statistically significant on CoNLL-2014. The authors could not run the same significance tests on the blind BEA-2019 test set.

In a separate CoNLL-2014 experiment, systems read identical imperfect decoder inputs. DM assigns the reference token a higher probability than ordinary cross-entropy training does at 89.41% of the reference token positions. The paper also finds larger gains on source sentences longer than 56 tokens or with more than 8 reference edits, and gives examples where DM fixes later errors after missing an earlier one. These results support training with mistakes drawn from the corrector’s own outputs, while leaving open how well the approach transfers. The authors present it as language-independent in principle and evaluate it only on [English](https://md.research.elamur.ai/free/en/topics/english/).

## Deep dive: Mitigating Exposure Bias in Grammatical Error Correction with Data Augmentation and Reweighting

Cao and colleagues train a grammar corrector on its own beam-search outputs and learn which outputs to use as decoder input during training. · about 34 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### The corrector has to live with its earlier choices

Grammatical error correction starts with a source sentence and asks for a corrected version. A sequence-to-sequence corrector reads the source with an encoder and produces the output with a decoder. The source stays available while the decoder works. At each step, the decoder also uses its output so far to decide what to write next. A correction made near the beginning can therefore matter in two places. It changes the text the reader sees, and it changes the context from which the decoder makes later decisions.

Teacher forcing provides a direct training signal for this kind of system. For each position, the training pair supplies a reference token, the preceding reference tokens, and the source sentence. The decoder can be evaluated at every position even if it would have made a mistake earlier in the sentence. In use, the source sentence is just as available, but the preceding output comes from the corrector. A missed agreement edit, an extra word, or a malformed phrase can leave the decoder working with a prefix different from the one used for training. Exposure bias names the difference between the conditions under which the decoder learns and those under which it generates.

The distinction matters even when a corrector already does well on standard evaluations. Success on a clean prefix tells us how well the system predicts the next reference token once earlier decisions have been supplied. It leaves a separate question about the same prediction after an earlier decision has gone wrong. An early omission may be harmless for some later positions. In other places, the words involved in a later edit may depend on the number, construction, or phrase chosen earlier. A corrector that can still make a sensible later edit has a form of robustness that clean-prefix training does little to exercise directly.

The paper’s opening example illustrates why it matters which prefixes are introduced during training. The source contains several errors, including a malformed verb and an incorrect final noun. The corrector’s own output partly repairs the verb and carries the noun error forward. The example produced by random noise changes some words the corrector actually handled differently, including a word the corrector had spelled correctly. The example made by randomly substituting predictions stays closer to the reference in other places and misses some of the corrector’s characteristic mistakes. The alternatives all contain deviations. Their patterns of deviations are different.

This concern is specific to the role of edits in grammar correction. The decoder may need to preserve most of the source and make a handful of coordinated changes. A training procedure that damages a sentence indiscriminately can create contexts that are hard to continue from but unlikely to occur when correcting learner writing. Even a token drawn from the corrector’s predictions can land in an unfamiliar context if its neighbors come from a different kind of sequence. The paper’s proposal begins with full outputs from the existing corrector so the surrounding words and errors reflect decisions that were made together.

#### What earlier approaches changed

As the authors describe the field, most earlier work on exposure bias took place in neural [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/). Scheduled sampling gives the decoder some of its own predictions during training in place of the reference tokens it would ordinarily receive. The training schedule controls the opportunities for this replacement. That provides a way to vary the amount of imperfect context as the system learns. The paper treats the schedule and the source of the imperfect context as separate design choices.

Other work in translation perturbed inputs at the word and sentence levels. In the approach the authors discuss, sentence candidates could be chosen using the [BLEU score](https://md.research.elamur.ai/free/en/concepts/bleu/). Applying that strategy to grammar correction raises a question about the criterion for choosing a candidate. A sentence-level similarity score and an edit-based comparison can favor different sentences. The authors adapt the sentence-noise baseline to choose by edit distance, which fits their focus on the changes that separate a correction from its reference.

Earlier work also changed the objective rather than just the input. The paper describes translation research that uses reinforcement learning to optimize a sequence-level measure used at evaluation time. It also discusses Sakaguchi and colleagues’ use of reinforcement learning to optimize the grammar corrector toward GLEU. GLEU supplies a score for a completed output. In Cao and colleagues’ approach, the decoder continues to learn by predicting reference tokens. Reinforcement learning instead controls the distribution from which the decoder’s alternative inputs are drawn. The roles of a task metric and a training-data policy therefore differ, even though both approaches use a reward somewhere in the training procedure.

The paper also places its work in the tradition of data reweighting. In the earlier grammar correction work it discusses, Lichtarge and colleagues assigned sentence weights offline using changes in perplexity between checkpoints. Perplexity reflects how well a system predicts text under the relevant conditioning. A checkpoint comparison provides a signal for weighting examples before the final training run uses those weights. The paper also cites reweighting in multilingual translation, where the distribution being learned is over languages. Cao and colleagues make their distribution depend on how the corrector is doing during fine-tuning. It is a distribution over ranked alternatives to the ordinary decoder input.

These lines of work lead to two questions. The first is what an appropriate imperfect prefix looks like for a corrector trained to make small edits. The second is whether the same mix of easier and harder contexts is useful throughout training. Using beam outputs addresses the first question by choosing a source of candidate sentences. Learning a distribution over the candidates addresses the second by deciding how often to use each rank as training progresses.

### The method, step by step

#### Keep the source and the answer fixed

An ordinary training pair contains a source sentence and a corrected reference. The authors preserve both. The encoder still receives the original source, and at each output position the decoder is still rewarded for assigning probability to the reference token. The intervention changes the sequence supplying the decoder’s previous tokens. The reference supplies that sequence in the ordinary loss term. An aligned correction proposal supplies it in the additional term.

This is a different use of synthetic text from making extra source sentences for pretraining. In synthetic pretraining, a sentence can be used to construct a new source–target pair. Here the learner sentence and its reference already exist. The authors add alternative histories to the same pair. If a beam proposal fails to correct a spelling error, the decoder can see that spelling in its history and still be trained to predict the reference at a later position. Any wrong token in the proposal serves as context, while the training target stays anchored to the human correction.

The hypotheses come from the checkpoint at the end of the second of the paper’s three training stages. Before that point, the corrector has already learned from synthetic and other parallel data. It generates proposals for the sentences used in the final stage, where the authors apply the intervention. For the two main benchmark setups, the beam size is 5, and the authors keep all five proposals for each training sentence. The highest-ranked hypothesis is the corrector’s preferred output from that search. The lower ranks keep alternative decisions that would otherwise be discarded when producing a single correction.

Candidate generation and candidate selection take place on different timescales. The checkpoint supplies a collection of outputs in advance. As fine-tuning changes the corrector, the data scorer changes which ranks the corrector is likely to see. The changing policy therefore acts on a fixed supply of proposals. It can make lower-ranked contexts more common without having to decode the training corpus again or insert fresh random errors into the hypotheses.

Training with ranked correction proposals The steps in order.

#### Align the proposals before using them

A proposal can contain a word that the reference omits, or omit a word that the reference contains. If the training procedure paired positions by their raw sequence indices, a missing word could shift the entire rest of the sentence. Later tokens would then be compared at positions that represented different parts of the correction. The authors use ERRANT’s linguistically enhanced Damerau–Levenshtein alignment to establish which parts of a proposal correspond to parts of the reference. In the aligned decoder input, tokens with no slot in the target are removed, and gaps where the proposal missed target material are filled with padding.

The result has the length the training procedure requires, with a corresponding position for every target position. A substitution can remain in the aligned proposal as a plausible error. A missing word is represented by padding, and an extra word can disappear from the aligned input. This treatment gives the method a way to learn from proposals with different lengths while keeping the prediction task the same. It also means that the training context is a processed version of a beam output. The results should be read with that transformation in mind, especially where insertion and deletion errors matter.

The clean and augmented inputs serve complementary purposes. With the reference as context, the corrector practices continuing a clean correction. With the aligned proposal as context, it practices reaching reference tokens after earlier material that may contain errors. The decoder uses the prefix of the selected input at a prediction position. It does not receive the entire reference as future context to decide what to write at that position.

#### The ordinary prediction objective

The paper first defines a loss that works with either kind of decoder input. At each position, it takes the negative logarithm of the probability assigned to the reference token. The vocabulary sum makes explicit that the contribution comes from the reference token’s entry in the predicted distribution.

```
ℓ(x, d, y; θ) = −∑ₜ₌₁ᴸʸ ∑ₖ₌₁^|V| 𝟙{yₜ = k} · log P(yₜ = k ∣ d<ₜ, x; θ)
```

Here ℓ is the loss for a sentence. The source is x, the decoder input is d, and the target is y. The parameters of the corrector are θ. The outer sum traverses target positions t from 1 through Lʸ, the target length. The inner sum traverses vocabulary entries k from 1 through |V|, with V the target vocabulary and the bars denoting its size. The token at position t in the reference is yₜ. The indicator 𝟙 selects the entry k that equals that token. P is the conditional probability assigned by the corrector, and the conditioning bar separates the predicted token from the inputs used to predict it. The notation d\<ₜ refers to decoder-input tokens before position t. The dot indicates multiplication, log takes the logarithm, and the leading minus sign makes greater probability for the reference token correspond to lower loss.

For standard teacher forcing, d is itself the reference. The negative log-likelihood objective, written Lₙₗₗ below, averages the sentence losses over the training pairs.

```
Lₙₗₗ(θ) = (1/M) ∑ᵢ₌₁ᴹ ℓ(x⁽ⁱ⁾, y⁽ⁱ⁾, y⁽ⁱ⁾; θ)
```

Here M is the number of sentence pairs, and i indexes them. The source x⁽ⁱ⁾ and reference y⁽ⁱ⁾ form pair i. The first occurrence of y⁽ⁱ⁾ inside ℓ supplies the decoder input, and the next supplies the prediction targets. Multiplication by 1/M forms the average. As before, θ is the corrector’s parameter set. This is the clean objective used for the ordinary fine-tuning comparison and for the loss on development data in the reweighting procedure.

Once the corrector is trained, generation uses the highest-probability proposal found by its beam search. The paper writes the intended choice as a maximum over output sentences.

```
ŷ = arg maxᵧ P(y ∣ x; θ̂)
```

Here ŷ is the selected hypothesis, x is the source, and θ̂ denotes the trained parameters. The y underneath the maximization denotes a candidate output sentence. The expression arg max selects the sentence that maximizes the conditional probability P. Beam search is the procedure used to seek that sentence by extending a restricted set of partial hypotheses. For augmentation, the paper retains the ranked alternatives from the search as well as its preferred output.

#### From a weight for each proposal to a distribution over ranks

In the paper’s initial formulation, each aligned candidate belonging to a source sentence can have its own weight. The sentence contributes its usual clean-context loss plus the weighted losses from its augmented contexts.

```
Lₑᵦ(θ) = ℓ(x, y, y; θ) + ∑ⱼ₌₁ⁿ αₓ,ⱼ · ℓ(x, ȳⱼ, y; θ)
```

Here Lₑᵦ is the training loss with exposure-bias mitigation for the example in question. The source x, reference y, parameters θ, and sentence loss ℓ have the same meanings as before. The index j identifies a candidate’s beam rank, and n is the number of retained candidates. The aligned version of candidate j is ȳⱼ, with the bar distinguishing it from the raw proposal. The quantity αₓ,ⱼ is the weight assigned to this candidate for this source. The authors constrain these weights as follows.

```
∑ⱼ₌₁ⁿ αₓ,ⱼ = 1
```

The sum runs over all n candidates for source x. Its value of 1 gives the collection of augmented contexts the same total coefficient as the clean-context term. That is a statement about the coefficients. The observed loss and its gradient can still differ considerably between the clean context and the candidate mixture.

Optimizing a separate set of weights for every training sentence and rank would be costly. The authors approximate the per-sentence weights with a shared weight for each rank. Their expectation is over training sources at a given j.

```
Eαⱼ = E[αₓ,ⱼ ∣ x drawn from Dₜᵣₐᵢₙ]
```

Here Eαⱼ is the expected candidate weight at rank j, E denotes expectation, and Dₜᵣₐᵢₙ is the training dataset from which the source x is drawn. The term αₓ,ⱼ on the right is the individual weight. The authors use γⱼ to approximate Eαⱼ, giving the following loss.

```
Lₑᵦ(θ) = ℓ(x, y, y; θ) + ∑ⱼ₌₁ⁿ γⱼ · ℓ(x, ȳⱼ, y; θ)
```

Here γⱼ is the shared weight for rank j. The two occurrences of ℓ still represent predictions of the same y from the same x with parameters θ. The decoder input is y in the first term and ȳⱼ in the candidate term. The index j ranges through the n retained ranks. In the augmentation-only setting, the paper sets each rank’s weight to 1/n. This gives a comparison in which the candidates are available and none receives preference by rank.

The full system replaces the fixed mixture with a learned sampling policy. In the paper, βⱼ denotes the sampling probability for rank j and serves as an approximation to γⱼ. The scorer P(j; ψ) provides these probabilities, with ψ denoting the scorer’s own parameters. This use of P describes a distribution over ranks. The corrector’s earlier conditional probability P describes a distribution over tokens or output sentences. A single-layer embedding network computes the scores, and a subsequent softmax converts them into a probability distribution.

Sharing the policy by rank has a concrete consequence. At a given state of training, the probability of choosing a rank is shared across examples. Choosing that rank yields a different proposal for each source sentence. The policy can prefer a region of the beam at one point in training and a different region later. It has fewer decisions to learn than a system that evaluates the particular error pattern in every individual candidate before assigning it a weight.

#### What the data scorer tries to improve

The authors formulate the scorer’s goal as an outer optimization around the corrector’s training. A policy is useful if the corrector trained under it has low development loss. In this formulation the scorer affects the training objective through the choice of augmented context.

```
ψ* = arg minψ L(θ*(ψ), Ddev)
```

Here ψ* is the desired scorer parameter set and arg minψ chooses the value of ψ that minimizes the expression. The function L evaluates the resulting corrector on development data Ddev. The notation θ*(ψ) denotes the corrector parameters obtained by minimizing the training objective under the scorer ψ. The inside optimization is written separately.

```
θ*(ψ) = arg minθ ∑₍ₓ,ᵈ,ʸ₎ Lₑᵦ(θ, ψ)
```

Here arg minθ seeks the corrector parameters θ that minimize the summed loss. The sum ranges over training items represented by source x, decoder input d, and target y. The exposure-bias loss Lₑᵦ now depends on ψ because ψ controls the choice of candidate input. The asterisks in ψ* and θ*(ψ) designate the optima in the objective. The actual procedure alternates updates to the two parameter sets and uses a gradient-based reward to guide the scorer.

For a particular training example i, the scorer supplies a draw sᵢ from the available candidate ranks. The sampled objective expresses the choice by setting the indicator to select that rank.

```
Lₑᵦ(θ, ψ) = ℓ(x, y, y; θ) + ∑ⱼ₌₁ⁿ 𝟙{j = sᵢ} · ℓ(x, ȳⱼ, y; θ)
```

Here sᵢ is the sampled rank for example i, drawn according to P(j; ψ). The indicator 𝟙 admits the term whose candidate index j matches sᵢ. Once the draw is made, the sum provides the loss of that candidate instead of a loss contribution from every rank. The clean term is present for every example. The meanings of x, y, θ, n, ȳⱼ, and ℓ remain the same. In expectation over draws from a fixed policy, each candidate contributes according to its sampling probability. The implementation draws one candidate at a time with PyTorch’s multinomial sampling function.

#### Reward a rank for pointing toward a useful update

The scorer needs feedback about the training choice. The outer objective would be expensive to evaluate directly by training a corrector for each possible policy and checking the resulting development loss. The paper instead asks whether a training choice points toward a locally useful update. It compares two gradients, using a gradient as the direction in parameter space in which the corresponding loss increases. The first gradient comes from development loss under teacher forcing. The second comes from training loss when a particular candidate rank is used alongside the clean input.

```
R(j; θₜ) = cos(∇θ Ldev(Ddev; θₜ), ∇θ Ltrain(j; θₜ))
```

Here R is the reward for rank j at the current corrector state θₜ, with t indexing that state. The operator ∇θ takes the gradient with respect to the corrector parameters θ. The development loss Ldev is evaluated on Ddev, using the ordinary negative log-likelihood objective. The training loss Ltrain evaluates rank j. The function cos is cosine similarity between the gradient vectors, written with its two arguments separated for clarity. It measures agreement in direction. When the gradients are aligned, a step opposite to the training gradient is locally consistent with decreasing the development loss. The comparison concerns direction, so a large gradient does not receive a high reward solely for being large.

The rank-specific training loss combines the ordinary context and the candidate context. Both terms are evaluated at the current corrector state for the reward calculation.

```
Ltrain(j; θₜ) = ℓ(x, y, y; θₜ) + ℓ(x, ȳⱼ, y; θₜ)
```

Here x is the source, y the reference, ȳⱼ the aligned candidate of rank j, and θₜ the current corrector parameters. The sentence loss ℓ first uses y as context and then uses ȳⱼ. This combination matters because it is the same kind of update the corrector will receive when a rank is sampled. The reward rates that combined update rather than assessing the added context independently of the clean term.

The scorer learns through REINFORCE, which uses a reward to change the log probability of an action. Its action in this procedure is to choose a candidate rank. The paper writes the update contribution for a rank as follows.

```
ψₜ ← ψₜ₋₁ + R(j; θₜ) · ∇ψ log P(j; ψ)
```

Here ψₜ and ψₜ₋₁ denote the updated and preceding scorer parameters, and the arrow assigns the updated value. The reward is R(j; θₜ). The operator ∇ψ differentiates with respect to the scorer parameters ψ, and log P(j; ψ) is the log probability the scorer gives rank j. The dot multiplies the gradient by the reward. The paper’s pseudocode combines the contributions across the evaluated ranks before updating the scorer. A favorable reward directs the policy towards putting more weight on the associated action. Because the outputs form a probability distribution, changing the treatment of one rank can affect the relative probabilities of the others.

The corrector is then updated with the sampled loss. The paper gives the following schematic gradient step.

```
θₜ ← θₜ₋₁ − ∑₍ₓ,ᵈ,ʸ₎ ∇θ Lₑᵦ(θ, ψ)
```

Here θₜ receives the update from the previous corrector parameters θₜ₋₁. The sum ranges over training items with source x, decoder input d, and target y. The operator ∇θ differentiates the sampled loss Lₑᵦ with respect to the corrector parameters θ. The scorer parameters ψ govern the candidate draw. The minus sign specifies a descent update for the loss. The equations describe update directions, and the paper gives the optimizer settings separately.

The training loop groups the work so that the development gradient can be reused. For a group of f training batches, the procedure first gets a development gradient. It evaluates the rank rewards against that gradient and updates the scorer with the corrector held fixed. It then uses the revised policy to sample augmented inputs and trains the corrector on the same group of training data. A fresh development gradient is computed for the next group. The implementation notes say it is computed using all validation data. They report f values of 250 training steps for fine-tuning in the CoNLL-2014 setup and 220 for the BEA-2019 setup. Reuse reduces the frequency of the development calculation, while each scorer update still depends on comparisons with the training gradients.

### Experiments and results

#### What was trained and how it was evaluated

The experiments start with a transformer-big encoder–decoder, a configuration of the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). The first training stage uses C4 200M, a synthetic collection of 200 million parallel sentences generated following the approach of Stahlberg and Kumar. Training in the following stage uses NUCLE, FCE, and CLang-8 together. The encoder and decoder share a vocabulary of 10K byte pair encoding tokens, so the prediction units are drawn from the same [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) vocabulary as the source units. The resulting checkpoint is the common starting point for the fine-tuning comparisons and the source of the beam candidates.

The two main setups both use W&I train for [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). What changes is the development set and the test evaluation. In the CoNLL setup, the policy’s development signal comes from CoNLL-2013, and the final evaluation uses the CoNLL-2014 test set, which contains 1,312 sentences. In the BEA setup, development uses W&I dev. The BEA-2019 test split is W&I test, which contains 4,477 sentences. The distinction between development and test matters because the scorer is explicitly designed to favor updates that agree with the development data.

The implementation uses fairseq and PyTorch. The appendix reports 202 hours to reach convergence in pretraining, 0.6 hours for the next training stage, and 0.4 hours for W&I fine-tuning with DM. These are stage timings in the authors’ setup. The appendix identifies 2 NVIDIA A100 GPUs for pretraining and 1 for the later stages. The main comparison therefore concerns changes to fine-tuning from an already trained corrector, even though producing that checkpoint is a substantial part of the complete procedure.

The paper scores CoNLL-2014 with MaxMatch and BEA-2019 with ERRANT. The reported edit precision measures how many proposed edits receive credit. Recall reflects how many reference edits the corrector recovers. The main measure, F₀.₅, balances these quantities while placing more weight on precision. This gives an important way to interpret the proposed system’s scores. A fine-tuning method can have the best F₀.₅ while recovering fewer reference edits overall, provided that its proposed edits are sufficiently more precise.

The fine-tuning comparisons include CE, ordinary cross-entropy training with the reference as decoder input, and SS, scheduled sampling. RN-Word adds random noise at word level. RN-Sent is a sentence-level noise alternative adapted by the authors to choose a candidate with the smallest edit distance. Ad-Bridge injects word-level noise adaptively using a matching score. DA uses the authors’ beam augmentation with equal weights, while DA + RE-DP combines the same augmented contexts with offline weights derived from changes in perplexity. DM is the full combination of augmentation and online sampling. The shared checkpoint makes these comparisons more direct than comparisons with independently trained systems.

#### Scores on CoNLL-2014 and BEA-2019

Fine-tuning methods on CoNLL-2014 test by F₀.₅ Beam augmentation with online reweighting leads the shared-checkpoint comparison.

**The numbers**

| System or setting | F₀.₅ % |
| --- | --- |
| CE | 65.4 |
| SS | 65.6 |
| RN-Word | 65.9 |
| RN-Sent | 66.3 |
| Ad-Bridge | 66.0 |
| DA | 66.3 |
| DA + RE-DP | 66.4 |
| DM (this paper) | 66.8 |

Fine-tuning methods on BEA-2019 test by F₀.₅ The full method again scores highest among the fine-tuning alternatives.

**The numbers**

| System or setting | F₀.₅ % |
| --- | --- |
| CE | 70.2 |
| SS | 70.7 |
| RN-Word | 70.7 |
| RN-Sent | 70.8 |
| Ad-Bridge | 70.4 |
| DA | 71.1 |
| DA + RE-DP | 71.3 |
| DM (this paper) | 71.5 |

The CoNLL-2014 test results put DM at 66.8% F₀.₅, with precision of 74.0% and recall of 48.1%. CE has precision of 70.3% and recall of 51.0%. Thus, the higher F₀.₅ is associated with a greater share of creditable edits among those proposed, alongside lower coverage of the reference edits. RN-Sent is the strongest of the noise-based alternatives by F₀.₅ on this test, matching equal-weight beam augmentation at 66.3%. The full system’s recall of 48.1% also exceeds DA’s 47.4% while its precision exceeds DA’s 73.6%. What changes relative to CE and what changes relative to DA are different comparisons.

On the BEA-2019 test set, DM has precision of 73.1% and recall of 65.5%, for F₀.₅ of 71.5%. CE has precision of 70.8% and recall of 67.7%, for F₀.₅ of 70.2%. DA has precision of 72.6% and recall of 66.0%, so the move from equal weighting to online sampling on this benchmark raises precision and lowers recall. A reader who values finding more of the reference edits can see the cost of that operating point in the reported recall, even though the benchmark’s combined score favors DM.

All the exposure-bias interventions in the main comparison score above CE in F₀.₅ on both test sets. The ordering includes closely spaced scores, and the statistical evidence concerns specific comparisons. The authors take the mean of the results from three runs and apply a one-tailed sign test with bootstrap resampling. The CoNLL-2014 table marks DA’s improvement over CE and DM’s improvements over CE and DA at p \< 0.01. The BEA-2019 test is blind, which prevents the authors from performing significance tests there. The ordering of scores on that test is a reported result in its own right, with a different level of statistical evidence from the CoNLL comparisons.

#### Comparison with separately trained systems

The paper also compares DM with previously reported sequence-to-sequence systems. Its single-system scores are the highest among the transformer-big entries listed for both main tests. The Stahlberg and Kumar system scores 66.6 on CoNLL-2014 and 70.4 on BEA-2019 in the paper’s F₀.₅ comparison. According to the authors, it used over 540 million synthetic sentence pairs, while their own setup used 200 million. This makes the comparison informative about the performance of the complete systems. The shared-checkpoint experiments provide the more direct evidence about the effect of the fine-tuning intervention.

On the same two test sets, the T5-xxl system from Rothe and colleagues scores 68.9% and 75.9% F₀.₅, respectively. The paper reports 11 billion parameters for T5-xxl and 220 million for the authors’ transformer-big corrector. The T5-base variant, also reported as having 220 million parameters, scores 65.1% on CoNLL-2014 and 69.4% on BEA-2019. These comparisons show where DM sits among the systems the authors selected, across different sizes and training setups. Parameter count gives context for the comparison without making those setups equivalent.

The authors also combine eight separately trained DM systems. Their ensemble reaches 68.5% F₀.₅ on CoNLL-2014 and 74.8% on BEA-2019. The Stahlberg and Kumar ensemble reaches 68.3 and 74.9 on those same tests. The larger comparison includes stronger results outside the sequence-to-sequence grouping. The paper cites Qorib and colleagues’ hybrid ensemble, which combines sequence generation and sequence tagging, at 69.51% F₀.₅ on CoNLL-2014 and 79.90% on BEA-2019. The ensemble numbers for DM describe what combination adds to the same training approach, while its single-system results describe a directly usable corrector from one run.

#### Additional test sets

The appendix reports results for CWEB-S, CWEB-G, and JFLEG. For the CWEB evaluations, the corrector fine-tunes on CWEB-train and uses CWEB-dev for validation. For JFLEG, it fine-tunes on W&I train and uses JFLEG-dev for validation. The CWEB test results use F₀.₅ and the JFLEG test uses GLEU. Each is a comparison within its own split and metric.

On the CWEB-S test, DM reaches 42.7% F₀.₅, compared with 42.4% for DA and 38.2% for CE. On CWEB-G, the corresponding F₀.₅ results are 49.0%, 47.0%, and 43.0%. On the JFLEG test, DM gets 63.5% GLEU, DA gets 63.2%, and CE gets 62.9%. For each of these tests, the appendix marks DM’s improvements over CE and DA at p \< 0.01.

The additional settings also show that the other interventions are sensitive to the task setup. For instance, CWEB-S test F₀.₅ is 33.8% for SS and 37.7% for RN-Sent, against 38.2% for CE. Adding a way to depart from teacher forcing is therefore insufficient on its own to guarantee a benefit on every test in the paper. The consistent result across these comparisons is the ranking of DM against the alternatives the authors ran, across the different English development and test setups.

### What the ablations show

#### Beam proposals and learned sampling make separate contributions

The direct comparison begins with CE, then adds the beam-derived contexts with equal weighting in DA, and finally changes their use through the learned sampling policy in DM. On the CoNLL-2014 test set, the steps move from 65.4% to 66.3% to 66.8% F₀.₅. On the BEA-2019 test set the scores are 70.2%, 71.1%, and 71.5%. The first comparison shows that the paper can obtain a gain from beam-based contexts while treating all ranks equally. The second shows that the same family of contexts gives a further gain when the scorer adjusts how frequently ranks are used. The significant DM–DA comparison on CoNLL-2014 is the paper’s strongest direct evidence for the added online component on its main benchmarks.

DA + RE-DP is a more demanding comparison for the learned policy. It keeps the augmented examples and weights them using an offline procedure adapted from earlier work. The authors use the augmented collection as a base dataset and the ordinary training collection as the target dataset. Starting from the common trained checkpoint, they adapt a copy to the augmented collection, then further adapt it to the ordinary collection. The intermediate and later checkpoints provide the perplexities used to obtain a candidate weight. The appendix gives the following loss for adapting the first of those copies on augmented input.

```
Lᵣₑ₋ᴅₚ = ∑ⱼ₌₁ⁿ ℓ(x, ȳⱼ, y; θ)
```

Here Lᵣₑ₋ᴅₚ is the loss used in this preliminary adaptation. Candidate rank j ranges through the n aligned proposals. The sentence loss ℓ uses the source x, candidate ȳⱼ as decoder input, reference y as target, and corrector parameters θ. The next checkpoint is obtained with the ordinary negative log-likelihood objective. The authors use the change in perplexity to assign and normalize αₓ,ⱼ for each source, then use the weighted clean-plus-augmented loss to fine-tune from the common starting checkpoint.

DA + RE-DP reaches 66.4% F₀.₅ on CoNLL-2014 test and 71.3% on BEA-2019 test, between DA and DM on both. The comparison shows how these concrete ways of weighting the augmented inputs performed. The offline and online procedures differ in both when they determine the weights and what signal they use to determine them. The result therefore supports the full online scheme over the tested offline alternative without isolating timing from the gradient-based criterion.

The authors also check a choice inside RN-Sent. On the CoNLL-2014 test, sentence-level candidate selection using BLEU gives 65.5 F₀.₅, while selection using edit distance gives 66.3. On BEA-2019 test, the corresponding scores are 70.0 and 70.8. In both cases the edit-distance version performs better. This matters for interpreting the baseline comparison. The paper tests DM against a version of sentence noise adapted to grammar correction, and the appendix shows that the adaptation itself helps.

#### The scorer changes which mistakes the decoder sees

The statistics for the W&I training set and its augmented proposals describe two aspects of error density. The first is the share of sentences in each collection that contain any error relative to the target. The second is the number of edits needed to reach the target, averaged only over sentences in that collection with errors. Separating these measures matters because a collection can contain many exact corrections and still have substantial errors in the remainder.

For the W&I training sources, the paper reports an erroneous share of 67.1% and 3.45 edits per erroneous sentence. For the highest-ranked beam candidate, the corresponding values are 54.8% and 2.64. The erroneous share then rises across the lower-ranked candidates, from 90.7% at rank 2 through 95.6% at rank 3 and 96.9% at rank 4 to 98.5% at rank 5. A lower-ranked candidate is therefore more likely to supply a flawed context in this collection.

The edits per erroneous sentence give a more detailed picture. For ranks 2 through 5 they are 2.18, 2.24, 2.30, and 2.39, respectively. The progression among those ranks is gradual, and the 2.64 for faulty rank 1 candidates is higher than any of those values. Rank is useful as a rough guide to a candidate group’s chance of containing an error. The paper’s own breakdown also shows that ranking behaves differently once the comparison is restricted to already erroneous proposals.

In the sampling curves, the authors observe that the scorer puts increasing probability on candidates with higher error density as training proceeds. That is consistent with the idea that the preferred mixture can change with the state of the corrector. Early and late updates have access to the same fixed candidates, but the learned policy presents different proportions of them. The observed trajectory describes what this policy learned under the paper’s objective. There is no controlled comparison in which that trajectory is prescribed independently and then tested against other schedules.

RN-Sent produces 7.82 edits per augmented sentence under the appendix’s measurement. Its chance of producing an augmented sentence varies by epoch, so the authors give an epoch-dependent schedule instead of a single erroneous share in the main error-density comparison. They also report convergence in seven epochs for RN-Sent and one for DM in the W&I comparison. The RN-Sent decay parameter was adjusted to suit the shorter run relative to its original setting. Taken with the beam statistics, this shows that the tested random-noise procedure can generate more heavily edited sentences than the candidates from the correction checkpoint. Edit counts measure the size of that difference in perturbation. Error types and the dependencies between edits can also matter and are not summarized by those counts.

#### Outputs after a missed edit

The paper gives examples that make the idea of recovery concrete. In one, the source combines a quantifier unsuitable for the mass noun “surveillance” with a plural verb. CE leaves both issues in place. RN-Sent and DM still miss the quantifier correction but change the verb to agree with the noun. The relevant difference is what happens after the first shared failure. The grammar corrector can improve the sentence at a later position even though the earlier problem remains visible.

Another source is about surveillance helping families avoid losing their members. CE, RN-Sent, and DM all leave the noun “family” singular where the reference uses the plural. CE also misses the correction to the construction built around “prevent” and leaves a later noun singular. RN-Sent pluralizes “member” but leaves the construction uncorrected. DM both pluralizes the later noun and repairs the construction by using “from” with a gerund. The outputs differ in how much of the remaining correction they complete after making the same early mistake.

A further example compares DA and DM directly. In a sentence about a rumba dancer, both fail to repair an early typo in the phrase “as well as.” DA also leaves a later misspelling and fails to insert an article before “rumba.” DM fixes the spelling and restores the article. The case illustrates the kind of output difference that could account for a gain from reweighting over equal use of the candidates. These examples follow naturally from the paper’s hypothesis about error accumulation. Since each output is generated as a whole, the examples cannot establish that forcing the first decision to be correct would by itself change the later decisions.

#### How length and the number of edits change the comparison

The authors group the CoNLL-2014 test sentences by source length and, separately, by the number of edits in the reference annotation. The length analysis asks how the relative performance changes when the decoder has a longer output history to work through. The edit analysis asks what happens when there are more opportunities to miss or mishandle a correction. A long source can have few errors, and a short source can have several, so the groupings address related but different aspects of difficulty.

DM scores above CE and RN-Sent across the plotted groups. The authors highlight larger improvements for sources longer than 56 tokens and for sentences whose reference has more than 8 edits. These patterns fit the expectation that a corrector exposed to plausible errors during training will benefit in settings with more scope for one poor decision to affect another. They also complement the sentence examples by showing a performance pattern across groups. The grouping leaves other characteristics of the sentences free to vary, so the comparisons describe where the gains concentrate.

#### All systems see the same imperfect prefix

The most direct diagnostic gives different systems the same imperfect decoder inputs. The authors generate noisy correction proposals for CoNLL-2014 test sources using the checkpoint before fine-tuning. They align and pad those proposals with the augmentation procedure. Each pair of systems then sees the same source and the same padded decoder history. The comparison uses the probability each system assigns to the reference token at each position.

```
win ratio of B over A = N / T
```

Here A and B are the two systems being compared. N counts positions where B assigns strictly greater probability to the reference token than A does. T is the total number of reference token positions in the gold sentences for this test. The win ratio is reported as a percentage. A win can occur even if the reference token is not the most probable next token. The ratio counts the direction of the comparison at each position without incorporating the size of the probability difference.

Win ratio over CE under shared noisy decoder input on CoNLL-2014 test DM most often assigns the reference token a higher probability than CE does.

**The numbers**

| System or setting | win ratio % |
| --- | --- |
| SS | 69.99 |
| RN-Word | 73.54 |
| RN-Sent | 76.41 |
| DM (this paper) | 89.41 |

Against CE, RN-Sent gives the highest win ratio among the tested noise baselines, and DM gives the highest overall. The paper also reverses the role of the reference system in a further set of comparisons by using DM as A. On the same CoNLL-2014 diagnostic, SS wins at 35.26% of positions, RN-Word at 39.04%, and RN-Sent at 37.64%. The order among the alternatives changes depending on whether the comparator is CE or DM. DM’s advantage is consistent across both sets of comparisons in the sense that it frequently wins against CE and each alternative wins against it at a minority of positions.

Holding the decoder input fixed removes one source of ambiguity in a free-generation comparison. A system that gets better next-token probabilities simply because it produced a cleaner prefix cannot benefit from having a different prefix in this test. All systems must work from the same one. The experiment thus addresses how they respond when earlier material is imperfect. The ordinary test scores and examples supply the separate evidence about the final corrections each system actually generates.

### Limitations

#### The limit the authors state

The authors describe their approach as language-independent and explicitly limit the empirical claim to English grammar correction. The method’s abstract ingredients are a corrector capable of generating ranked proposals, references for training, a way to align the proposals to those references, and development data for the scorer. The paper demonstrates these ingredients together in English. An application to Ukrainian or another language would require suitable data and an alignment procedure for that setting. The experiments give no transfer result for the error distributions, segmentation choices, or edit conventions of another language.

#### What the setup leaves open

Beam output is a proxy for the histories a deployed corrector sees. The authors make that proxy plausible by taking whole outputs from an earlier stage of the same correction system and by contrasting their edit counts with random sentence noise. The proposals still come from a fixed checkpoint. Once fine-tuning has changed the corrector, its own mistakes may occur at different positions, with different types or frequencies. The scorer can change the mixture of the available ranks, but the contents of their proposal sets remain fixed. The experiments establish that this approximation is useful in the tested training pipeline. They do not measure the distance between those candidate histories and histories produced by the final corrector over time.

Alignment introduces another qualification. ERRANT establishes a correspondence using the reference, after which extra tokens are removed and missing material is represented by padding. At inference time, an extra token the decoder has written remains part of the prefix, and the decoder cannot consult a reference to locate a missing word. Training on aligned proposals therefore exercises a related task under controlled conditions. The paper does not separately measure how well the gains carry over to prefixes containing the original, unaltered insertion or deletion errors. It also offers no comparison between ERRANT and another alignment method that would isolate the contribution of the alignment choice.

The rank policy summarizes preferences across sentences. The evidence supports adapting these shared probabilities with training, but a rank means different things for different sources. On an easy source, a lower-ranked proposal might differ only in one edit. On a difficult source, even the preferred output might leave substantial errors. The study’s error-density aggregates and the learned sampling curves describe the rank groups as a whole. They cannot show that the reward selects the most useful context for a particular sentence. The comparison with offline perplexity weighting also leaves open whether different fixed weights, a fixed schedule, or the same gradient signal applied under a different policy would account for some of the gains.

Cosine similarity is a local proxy for usefulness. It compares a training gradient with the development gradient at the state where they are evaluated. Development gradients are also reused across a group of training updates. This procedure reduces computation, but a favorable direction at a checkpoint does not itself establish the long-run effect of training on that rank. Further, the development gradient is computed from the usual reference-context loss. The policy is thus guided by a signal compatible with good clean-context prediction, while the intended robustness concerns noisy contexts. The test results show that these objectives can work together in the evaluated setups. They leave open how sensitive the outcome is to the validation corpus or to the choice of loss for the reward.

The controlled diagnostic should also be read narrowly. Its 89.41% win ratio against CE refers to positions where DM gave the correct reference token greater probability under common noisy histories on CoNLL-2014. It measures neither token accuracy nor the proportion of source sentences that DM corrects after a mistake. A small probability advantage counts the same as a large one, and the benchmark contains positions that require copying as well as positions involved in edits. The reported aggregate does not say how much of the advantage comes specifically from positions immediately after an erroneous prediction. Because the histories are produced by the starting checkpoint, the diagnostic also does not establish which system would best handle every other system’s self-generated prefixes.

The examples and subgroup analysis help connect these measurements to error accumulation, but neither isolates a causal chain between particular edits. The examples show outputs that share an early mistake and differ later. The length and edit-count breakdowns show where larger gains appear. Other properties of especially long or heavily edited sentences can help explain that pattern, and the paper does not report a position-by-position intervention that holds the rest of generation fixed while changing one earlier token. The evidence supports improved recovery as an interpretation of the results, with the common-prefix diagnostic giving the cleanest direct test of behavior under imperfect context.

Finally, the reported improvements have the scope of the scoring setup. The main F₀.₅ gains coincide with lower recall than CE on both main tests. The authors provide significance tests for the designated CoNLL-2014 comparisons and for the additional tests in the appendix, while the blind BEA-2019 test supports a score comparison only. The published cross-system results also come from differing architectures, training corpora, and ensemble setups. Taken together, the most direct claims concern this way of fine-tuning the shared checkpoint, its response to checkpoint-generated prefixes, and its edit scores across the English tests the authors ran.

### What came after

[Unsupervised Grammatical Error Correction Rivaling Supervised Methods](https://md.research.elamur.ai/free/en/papers/cao-2023-unsupervised-grammatical-error-correction-rivaling/) cites the paper from a closely related setting. Its subject is unsupervised grammar correction and how it compares with supervised methods. That shifts attention from how to train a decoder on different histories within a supervised correction pair to how far correction can go without the same supervision. The citation establishes a connection within grammatical error correction. It does not establish that the unsupervised work used the beam-derived inputs or the online rank scorer.

[DECOR](https://md.research.elamur.ai/free/en/papers/zhang-2024-decor-improving-coherence-l2-english/) cites the paper in work on coherence in second-language English writing. Its benchmark covers detecting incoherence, reasoning about it, and rewriting text. The connection is to another setting where a system must decide what to preserve and what to change in learner writing, with coherence supplying the reason for revision. The citation does not specify a transfer of the exposure-bias procedure to that benchmark. The later work can be situated alongside Cao and colleagues’ study through its concern with revising learner text, while the evidence for beam augmentation and rank reweighting remains the correction experiments in the original paper.

## Cite

Cite as Hannan Cao, Wenmian Yang and Hwee Tou Ng. 2023. Mitigating Exposure Bias in Grammatical Error Correction with Data Augmentation and Reweighting. Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2023.eacl-main.155](https://doi.org/10.18653/v1/2023.eacl-main.155)

```bibtex
@inproceedings{cao2023mitigating,
  title = {{Mitigating Exposure Bias in Grammatical Error Correction with Data Augmentation and Reweighting}},
  author = {Hannan Cao, Wenmian Yang and Hwee Tou Ng},
  booktitle = {Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.eacl-main.155},
  url = {https://doi.org/10.18653/v1/2023.eacl-main.155}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
