A distantly supervised Grammatical Error Detection/Correction system for Swedish
Paper · 2023 · Murathan Kurfalı and Robert Östling
Summary
A grammar checker for people learning Swedish needs to recognize errors in sentences it has never seen. Training such a system on examples of learner writing can require a substantial collection in which people have marked and corrected the errors. The authors investigate a different way to use that work. They take statistics from the annotated DaLAJ dataset and use them to help create training examples from a much larger collection of ordinary Swedish text. The resulting system practices grammatical error correction on artificial errors, then uses the edits it proposes to flag words in the Swedish track of MultiGED-2023.
The starting material is 3.2 billion words of modern Swedish from Språkbanken, after duplicate sentences are removed from the merged collection. It includes blogs, news, and fiction. The authors generate altered versions of the sentences by moving words, inserting or replacing passages, changing word forms and splitting compounds, substituting letters, and changing capitalization. The operations run in sequence, so a training input can contain several kinds of changes. DaLAJ supplies empirical distributions for operations such as choosing a phrase to insert or a letter to substitute. Each altered sentence is paired with its original, which supplies the desired correction. The paper calls this distant supervision because the human annotations inform the artificial examples through statistics.
A Transformer trained on those pairs takes a sentence as input and produces a proposed revision. To enter it in a detection task, the authors compare the revision with the input. Each original word that fails to carry over unchanged is flagged. A word added by the system supplies no flag of its own. The authors make the implementation available in the MurathanKurfali/swedish-gec repository.
On the Swedish test set, the system reached 82.41% precision, the highest in the track. Its recall was 27.18%, and its F0.5 score of 58.60% placed it fourth. The shared task’s training and development sets showed a similar pattern when used for additional evaluation. The experiment demonstrates that errors synthesized from ordinary text can teach a system to make reliable flags on learner writing, while leaving substantial gaps in coverage. The explanation for those gaps remains open. The system has to generate an edit before it can flag a word, and the paper leaves the value of individual corruption choices unmeasured. DaLAJ and the test material also draw on the same underlying learner corpus, SweLL, so the extent of their separation is uncertain.
Deep dive: A distantly supervised Grammatical Error Detection/Correction system for Swedish
A Swedish grammar checker learns from artificially altered sentences, using learner error statistics to guide training for error detection. · about 32 minutes to read
The problem and its context
Finding an error and correcting it
When someone learns to write in another language, a checker can offer help at different levels. It can point to a word that may need attention, or it can propose a revised version of the text. The authors distinguish these tasks as grammatical error detection, abbreviated GED, and grammatical error correction, abbreviated GEC. Detection in the shared task concerns the words already present in a sentence. Correction can require a replacement word, a different arrangement of words, or material that the writer left out. Those changes may all lead to a better sentence, but they have different consequences for a task that asks for a decision at each existing word.
The difference matters to training as well as to what a learner sees. A detection example can specify that a particular word needs attention. A correction example also supplies a target sentence, making a choice about what the writer should have written. The target can express several decisions at once. If a word has the wrong form and is also in the wrong place, a corrected sentence can show where it belongs and which form it should take. The task of producing that sentence includes the decisions needed to make the repair, whether or not the eventual evaluation will inspect them.
The paper studies a submission to the Swedish track of the inaugural multilingual detection task, MultiGED-2023. The authors already had a reason to develop a Swedish correction system as a baseline for their ongoing research. Their submission therefore connects an existing research aim to a benchmark with a different output. They train a system that rewrites sentences and derive detection decisions from the rewrites. The relation between the two tasks is part of the experiment’s design. It determines which signals the system can use when the evaluation asks for error locations.
The cost of collecting examples
A corpus with linguistic annotation records judgments that originally existed only in the interaction between a reader and a text. An annotation can say which part of a learner’s sentence is problematic or show how it was corrected. Such a corpus provides evidence about errors people actually make. It is also a finite sample. Many sentences in a much larger collection of Swedish text will have no corresponding learner version, and many errors that could appear in a new sentence will be sparsely represented in the annotated material.
The authors’ response is to separate two jobs that an annotated corpus could do. It can provide individual sentences for a system to learn from, and it can reveal patterns in the errors made by learners. In this study, the second job belongs to DaLAJ. The bulk of the paired sentences comes from a different kind of resource, a broad collection of modern Swedish. The authors can use a sentence from that collection as a target and manufacture an input by changing it. Human judgments enter through the design of the changes and through distributions estimated from learner data.
That arrangement gives the term distant supervision a concrete meaning in this paper. The examples seen in training are related to learner judgments indirectly. A DaLAJ distribution can make a particular operation resemble an observed error pattern, while the sentence in which the operation occurs comes from the ordinary Swedish collection. The approach depends on a distinction between evidence about what kinds of errors occur and examples of how to recover a sentence after those errors have been introduced. The authors can generate the latter on a much larger textual base.
The distinction also explains the paper’s interest for settings with relatively little annotated learner writing. There is still a need for evidence about the target language and its learners. The method changes what that evidence has to supply. An error corpus can contribute information about the kinds of changes worth practicing without supplying the full set of sentence pairs used for training. The authors test that arrangement in Swedish, with a large monolingual collection available to furnish the target side of the pairs.
Earlier Swedish approaches
The paper places the work in a Swedish research tradition that includes rule-based grammar checking, systems that propose likely replacements, and neural correction. Granska is an early example of combining linguistic analysis and rules. It uses part-of-speech tagging, which assigns grammatical categories to words, alongside features of morphology, the structure and forms of words. Error rules use that information to identify grammatical problems. This setup makes the description of an error part of how the checker operates. The system can call on a grammatical category or a feature of a word form when deciding whether a pattern should be flagged.
Later Swedish work discussed by the authors put more emphasis on finding possible repairs in learner text. Ildikó Pilán and Elena Volodina explored word embeddings as a source of candidates. Embeddings represent words numerically and can be used to retrieve related possibilities for a replacement. Yaroslav Getman developed a system that identifies suspect words or sequences and proposes edits using sub-word probability estimates and morphological information. A sub-word is a unit smaller than a full word. Using such units allows the system to consider how the pieces of an unfamiliar or altered word fit together.
Martina Nyberg’s work provides the closest Swedish precedent for the paper’s training design. Nyberg investigated both a neural machine translation formulation and a method that used Swedish BERT to judge possible corrections. In the translation formulation, a sentence containing errors plays the part of the source string, and a corrected sentence plays the part of the target. Both strings are Swedish. In the candidate-scoring formulation, the system uses the context of an error to estimate the plausibility of possible repairs. The Swedish work thus already included a way to learn sentence rewriting and a way to judge individual correction candidates in context.
The authors also place synthetic training within previous research on neural correction beyond Swedish. Their immediate starting point is Nyberg’s use of deliberately altered text. The new experiment gives the corruption procedure a broader set of operations and connects some of its sampling decisions to observed learner errors. It then puts a correction system trained on those examples into a detection evaluation. The combination raises a specific question. Given practice reversing changes of the kinds the generator makes, how well will the system recognize suspect words when faced with naturally occurring errors?
The method, step by step
Preparing the text and pairing sentences
The procedure begins with ordinary Swedish sentences. Each original can serve as the answer to a training example because the authors can make the input more difficult by changing a copy. They preserve the original as the target even when the copy undergoes several changes. The correction system sees the altered version on the source side and learns to produce the original on the target side. At evaluation time, it receives an actual example from the shared task and proposes a target without access to a clean version. A separate comparison turns that proposal into flags.
From Swedish source text to error flags
The steps in order.
Språkbanken supplies the starting collection. The authors bring together modern Swedish from domains including blogs, news, and fiction. They use sentence-scrambled releases because the procedure treats each sentence by itself. The original order of sentences in a document has no role in generating a pair. After merging the subcorpora, they deduplicate the result. This treats a sentence that appears in separate source collections as a duplicate just as it treats repetition within a collection. The final collection contains 3.2 billion words.
The diversity of the source material gives the procedure different kinds of sentences to alter. A sentence drawn from fiction can enter the same sequence of operations as a news or blog sentence. The paper reports the scale of this collection in words. The training example itself is a pair of sentences, one on each side of the correction task. Word count describes the amount of original material available to the generator, while the sentence pair describes the unit on which the correction system learns.
DaLAJ, a dataset for judgments about Swedish acceptability, contributes information about learner errors. For the operations that use its empirical distributions, sampling means selecting an outcome according to patterns observed in that data. Different outcomes can have different chances of being selected. An observed tendency to make a particular substitution can therefore affect which altered forms are created. The sentence receiving the substitution still originates in Språkbanken. DaLAJ is derived from the SweLL learner corpus, a relationship that matters when interpreting the shared-task evaluation.
The generator also incorporates decisions made by the authors about the kinds of operations to apply and how often to attempt them. The paper specifies probabilities for several of these decisions. These values serve a different purpose from the distributions that determine the actual content of an insertion, replacement, or letter change. A probability can say when to try inserting something. A distribution over phrases can then determine what gets inserted. The procedure combines both types of specification, so its resemblance to learner writing depends on the heuristic design as well as on the learner statistics.
Moving words before changing their content
The opening operation perturbs word order. The generator considers the word at a position and, with probability 0.1, moves it toward a sampled position. The paper gives the sampling distribution in the following notation.
N(i, 1.5)
N denotes a normal distribution. i is the original position of the word and the center of that distribution. 1.5 is the second parameter used to set the spread of the sampled positions. The paper gives that parameter in the notation above without spelling out whether its convention uses variance or standard deviation. The sample is rounded to the nearest integer to produce a position in the sequence. Punctuation constrains the move. A word cannot cross a punctuation mark in this step.
This gives the generator a way to create an error while leaving the words themselves available. A move can make a familiar word occur in an unfamiliar place, and the system has to use the surrounding sequence to recover the order represented by the original. The paper illustrates the operation using a sentence about enjoying the reading of textbooks. One alteration places the word for textbooks much earlier and displaces other words as a result. The important feature of the example is that a changed position can be the source of the trouble even when each word looks ordinary in isolation.
The punctuation restriction gives the operation a built-in notion of locality in addition to the distribution centered on the current position. The draw determines a candidate position around the source word. Punctuation limits which moves the procedure permits. This is a rule for creating illustrative disruptions, not a claim that a particular grammatical construction has been identified in the sentence. The recovery target remains the original word sequence, whoever or whatever would supply the grammatical explanation for the move.
Adding and replacing words and phrases
Next, the generator considers inserting material. For each position, it has probability 0.025 of inserting a sequence sampled from DaLAJ. The paper calls the inserted sequence an n-gram, a run of consecutive items that in this step are words. It can consist of a single word or a longer phrase. The position provides a place to make the change. The empirical distribution supplies the material that will occupy it.
In the paper’s illustration, the generator adds plötsligt, meaning suddenly, to the sentence about reading textbooks. The word is Swedish and can be interpreted in the sentence. The target still omits it because the system is being trained to undo what the generator did. This illustrates why a synthetic pair supplies an unambiguous target for training while leaving room for a separate question about linguistic acceptability. The pairing reflects the provenance of the sentence. It does not require a fresh human judgment on whether each alternative could make sense in some context.
After the insertion pass comes a replacement pass. At each sentence position, the procedure samples a replacement sequence from the empirical replacement distribution in DaLAJ. This generally leaves the input unchanged. When a replacement does occur, it can affect a word or a phrase. If a shorter sequence takes the place of a longer one, the operation also removes words from the source side of the training pair. From the correction system’s point of view, recovering the original from such an input can require generating material that is absent.
The example of reading textbooks also illustrates the substitution of skriva, to write, for läsa, to read. The change affects the action being described without creating an unfamiliar spelling. This is a different training situation from a simple letter error. The system is presented with real Swedish forms and is asked to predict a target with a different word. The surrounding words provide the context in which it must do that. As with the insertion example, the operation defines the desired reconstruction even when the modified wording can be understood by itself.
Putting insertion and replacement in separate stages gives them different roles. An insertion introduces text with no corresponding material at that location in the original. A replacement can preserve the length of the expression, expand it, or shorten it. These cases require different actions to reverse. Deletion from the altered input is especially relevant because correcting it will later require an addition, and the final conversion to detection does not assign a label to a newly added word.
Changing word forms, compounds, letters, and case
The next stage changes inflections and splits compounds. An inflection is a form of a word that expresses grammatical information, such as a particular tense. With probability 0.1, the procedure picks a new inflection for an eligible word. A word the procedure cannot inflect stays as it is. This can create an altered sentence in which a recognizable form of the right word occurs in an unsuitable context. The original form supplies the correction target.
A compound combines components into a word. The generator can insert spaces at the boundaries of those components with probability 0.25. It uses the morphological lexicon of SALDO to analyze the compound and locate the relevant boundaries. This step gives the procedure linguistic information about where a Swedish word can be divided. The corresponding training target teaches the correction system to recover the original spelling and word boundary. The paper’s illustration changes the form of the verb for loving and alters the expression for textbooks. In that example, läroböcker appears as läro bok after the change, so the visible effect involves spacing and form.
The following stage works letter by letter. It uses the letter replacement distribution estimated from DaLAJ. The most common outcome is that a letter remains unchanged, but a sampled alternative can create a spelling disruption or a different form inside the word. The paper reports a temperature for this part of sampling.
t = 1.5
t denotes the sampling temperature, which controls how strongly the probabilities concentrate on more likely outcomes. The equals sign assigns its value, 1.5, for the letter substitution step. The paper gives the setting without specifying a separate formula for transforming the replacement probabilities. This use of 1.5 belongs to letter sampling and is separate from the parameter with the same value in the word-position distribution.
A letter change can leave the broad structure of a sentence intact. In the illustration, läsa becomes läda. The position and the neighboring words still offer clues to the intended verb, even though the letters differ. The training target tells the system which form to recover. Learner statistics here operate at a finer grain than in the phrase operations. They help select a new letter, while the target continues to be the full original sentence.
Capitalization is the final stage. The paper specifies probability 0.2 for converting the entire sentence to lower-case and probability 0.01 for converting it to upper-case. It also specifies a sentence-level probability of 0.025 for carrying out a word-by-word procedure. In that procedure, each word is converted to upper-case with probability 0.1. The probability of entering the word-by-word procedure and the probability applied to a word within it describe different decisions.
These case changes can have different scopes. Making the entire sentence lower-case can remove the capital at its beginning. The word-by-word procedure can produce isolated stretches of upper-case text within an otherwise ordinary sentence. The paper illustrates mixed capitalization by uppercasing the word att and the word for textbooks while lowercasing the initial pronoun. The same original sentence remains the answer, so restoring case is learned alongside restoring word forms and order.
What the ordered passes teach
The published examples isolate operations so that a reader can see what each does. In the actual generator, the output of a pass becomes the material for the next. An inserted word can thus be present when letters are sampled, and the final case operation can affect a form produced by an earlier step. A word whose position has already changed can be subject to a new alteration in its new setting. The training input is the outcome of the sequence, not a collection of examples partitioned by a visibly marked error category.
Consequently, the correction system learns from the combined effect of the operations. It receives the altered sentence and the original sentence, with the supervision expressed as the target string. A sample can require restoring several things together. Operations can also make no change, as the paper explicitly observes for replacement and letter sampling. The nominal list of passes describes which actions are possible and in what order. It does not give a count of actual errors for any particular output.
The design puts the ordinary sentence in a specific role. It is the desired target by construction. This is what lets the authors create examples without separately commissioning a corrected version of every new input. It also means that the relationship between input and target is based on the generator’s edits. If an artificial substitution produces another plausible sentence, the designated target is still the preexisting source. An observed learner error supplies an analogy for the change, while the original supplies the answer.
These distinctions matter to the interpretation of the final score. The generator produces practice in recovering original sentences after changes at several levels. Some operations have explicit linguistic constraints, some use estimated distributions, and some perform simple changes in order or case. The correction system is evaluated on the combined consequences of that design when it is applied to learner material. Its overall test score cannot reveal which classes of generated practice were most useful.
Learning to write the target sentence
The correction stage treats input and output as sequences, following the translation formulation described in earlier Swedish work. An encoder reads the altered source sentence, and a decoder uses that representation while producing a target sequence. The target during training is the original sentence. On the shared-task data, the decoder instead produces the system’s own proposed revision. This sentence-oriented setup lets an output have a different length from its input, which is necessary when reversing some insertions, deletions, or changes in word boundaries.
The authors use the architecture introduced in Attention Is All You Need and implement it in OpenNMT-py, following the base configuration of OpenNMT. Both the encoder and the decoder use six layers and eight attention heads, with a hidden size of 512. A layer is a successive stage of processing. The hidden size describes the width of the internal representation, while attention heads allow several sets of relationships between positions to be considered within the attention mechanism. Attention allows the system to use information from separated positions when interpreting a word or choosing part of an output.
Before training, the authors learn a vocabulary with SentencePiece. The vocabulary has 32,000 units for subword tokenization, which represents a sentence as a sequence of pieces that need not coincide with full words. A word may correspond to a single vocabulary entry or be assembled from several entries. This is the representation supplied to the encoder and produced by the decoder. The eventual shared-task decisions concern original words, so a change in the neural sequence is relevant insofar as it affects the resulting comparison at that level.
The authors train for 100,000 steps. They report that validation takes place every 10,000 steps and that the warm-up lasts for the first 8,000 steps. The warm-up is the initial portion of the training schedule during which the update rate is brought up from its starting setting. The validation interval specifies when the implementation checks performance during a training run. The shared task’s development set is a separate matter. The authors report that none of the shared-task splits was used to train the system.
The training configuration uses mini-batches of 400 sentence pairs and work distributed across four A100 GPUs. Gradients are accumulated for 4 iterations. A gradient is the information used to adjust the system’s parameters in response to its training errors. Accumulation combines that information across iterations before an update. According to the authors, each effective mini-batch contained 6,400 sentence pairs, and training took about 16 hours. Those figures describe the correction training run. The later comparison of input and output is a separate operation applied to completed predictions.
Converting revisions into detection labels
To produce an answer for MultiGED, the system compares each original evaluation sentence with its proposed correction using difflib. The comparison identifies material that the output carries over and material that changes. A word in the input is flagged whenever it fails to carry over unchanged under that comparison. This can cover a replaced word and a word removed by the proposed revision. A change involving a longer passage can affect several original words.
An addition by itself is treated differently. The shared-task output assigns labels to words already in the input. An inserted word exists only in the revision and so supplies no original word for the procedure to label. Imagine one of the training situations in which a shorter span replaced a longer one. If a comparable sentence at evaluation time is repaired completely by restoring missing text, the repair can be visible in the output without producing a corresponding flag for the addition. A revision can help a reader while contributing no detection decision at the site of that particular change.
The comparison also makes detection depend on the edit the system chooses. For example, a generator might create a word-order error by moving an item. A correction system that reverses the move yields two sentence strings with different orders. The comparison must decide which words match across them. If more than one alignment is plausible, the set of words marked as changed depends on that alignment. The output of this pipeline is therefore a set of labels inferred from a selected revision and a string comparison. There is no separate token-level judgment in the submitted system that can flag a suspect word while withholding a proposed repair.
Experiments and results
What the evaluation measures
The official experiment evaluates detections on Swedish learner text in MultiGED-2023. This gives the system a different task from the one used to train it. Training success depends on recovering the original Swedish sentence used to create the artificial input. During evaluation, success concerns agreement with the shared task’s marks for incorrect words. The reported test results evaluate the labels derived from the proposed revisions. They do not score the revisions as complete corrections.
Precision answers a question about the words the system flagged. Among those words, how many are marked as errors in the evaluation data? Recall starts with the annotated errors and asks how many the system found. These quantities make different mistakes visible. Flagging a correct word hurts precision. Leaving an annotated error unflagged hurts recall. A system that mostly edits cases it can repair confidently can fare well on the first measure while leaving many opportunities to flag an error unused.
The official ranking uses F0.5. The paper describes it as a weighted harmonic combination of precision and recall, with more emphasis on precision. That weighting gives a reliable flag considerable value in the ranking while still making coverage matter. A high score on precision alone is therefore insufficient for the leading position. The official Swedish results illustrate this directly because the system with the strongest precision and the system with the strongest F0.5 are different entries.
The competition entries in the paper’s results table are the comparisons available for the official experiment. The authors describe their correction system as a baseline for their own ongoing work, a separate use of the term from a benchmark baseline. They do not report a matched Swedish system trained on the same text with another generator, or a detector trained under the same conditions to label words directly. Comparing standings shows how the submitted systems performed on the benchmark. It does not hold the components of their training procedures constant.
The Swedish test standings
Official Swedish MultiGED-2023 test results by F0.5
EliCoDe leads the standings, and the correction-based system places fourth.
The numbers
| System or setting | F0.5 % |
|---|---|
| EliCoDe | 78.16 |
| DSL-MIM-HUS | 66.05 |
| Brainstorm Thinkers | 63.11 |
| Authors’ correction-based system (this paper) | 58.60 |
| VLP-char | 29.46 |
| NTNU-TRH | 20.31 |
The authors’ submission recorded 82.41% precision and 27.18% recall on the Swedish test set. Its F0.5 was 58.60%. EliCoDe led on the ranking metric with 78.16% F0.5. It obtained 81.80% precision and 66.34% recall. Looking at the components makes the ordering intelligible. The authors’ system had the higher proportion of correct flags, and EliCoDe found a much larger share of the annotated errors. The combination favored EliCoDe.
Official Swedish MultiGED-2023 test results by precision
The correction-based system leads on the proportion of flags that match annotated errors.
The numbers
| System or setting | Precision % |
|---|---|
| Authors’ correction-based system (this paper) | 82.41 |
| EliCoDe | 81.80 |
| NTNU-TRH | 80.12 |
| DSL-MIM-HUS | 74.85 |
| Brainstorm Thinkers | 73.81 |
| VLP-char | 26.40 |
The middle of the F0.5 standings also shows the role of coverage. DSL-MIM-HUS scored 74.85% precision, 44.92% recall, and 66.05% F0.5 on the Swedish test set. Brainstorm Thinkers scored 73.81% precision, 39.94% recall, and 63.11% F0.5. Each ranked ahead of the correction-based submission on the target metric in spite of producing a lower proportion of correct flags. The rankings depend on what the systems find and what they leave unmarked.
The entries below the authors’ submission show other combinations. On the Swedish test set, VLP-char had 26.40% precision and 55.00% recall, for 29.46% F0.5. NTNU-TRH had 80.12% precision and 5.09% recall, for 20.31% F0.5. In the first case, higher recall than the authors’ system came with much lower precision. In the second, substantial precision coexisted with very low recall. These comparisons give the authors’ description of a conservative system a specific meaning. Its flags were usually correct, while its recall remained limited even in a field with several different precision and recall profiles.
The paper is inconsistent about the total field size. Its abstract describes fourth place among seven submissions, and its results discussion describes fourth among six teams. The official results table contains six entries and also puts the authors’ submission fourth. The reported placing agrees across the paper. The different totals leave the relationship between the abstract’s count and the entries in the table unclear.
The shared task’s other splits
The authors also apply the trained system to the shared task’s training and development sets. Those names describe how the benchmark partitions its data. In this study, the authors use these partitions for additional evaluation because the correction training uses artificial pairs from the separate Swedish collection. The split called the training set therefore gives another measurement of the finished system. It does not represent performance on the synthetic data on which the system learned to restore sentences.
Recall of the correction-based system across Swedish MultiGED splits
Recall stays low across all the shared-task splits.
The numbers
| System or setting | Recall % |
|---|---|
| Shared-task training set | 26.63 |
| Shared-task development set | 26.73 |
| Shared-task test set (this paper) | 27.18 |
On the Swedish shared-task training set, the authors report 78.72% precision, 26.63% recall, and 56.59% F0.5. On the Swedish development set, they report 81.52% precision, 26.73% recall, and 57.82% F0.5. The Swedish test set gives 82.41% precision, 27.18% recall, and 58.60% F0.5. The small spread of recall scores accompanies the same broad precision and recall pattern throughout. The test score is the best of the reported split scores on each measure.
This comparison makes the official result easier to interpret. A detector evaluated only on the test set could show an unusual profile because something particular about that split makes its preferred errors easy or rare. In this case, the other benchmark partitions also show reliable flags and limited coverage. The evidence supports describing that behavior as recurrent under the benchmark’s conditions. The scores are aggregate descriptions of different partitions, so similar values leave open whether the same error categories were detected in each.
There is also a distinction between what the score says about the flags and what a learner would encounter in a suggested rewrite. A correct flag means that the location agrees with the annotation. It can count as a successful detection even if a reader would prefer a different replacement. Similarly, a system could restore missing material without receiving credit for a flag at that location if all original words are carried over. The reported ranking is evidence about the benchmark’s detection output. The paper gives no corresponding quality score for full-sentence revisions.
What the ablations show
The paper reports no ablation in which a component is removed or varied with the rest of the setup held fixed. It offers comparisons of the submitted system across benchmark splits, comparisons with other teams, and an analysis of why converting corrections into flags may constrain detection. The authors explicitly leave an ablation of the learner-derived error distributions for future work. These forms of evidence address the behavior of the complete system and help locate questions for controlled testing.
Consistency across splits
The extra split evaluations keep the submitted procedure fixed and change the benchmark partition to which it is applied. The comparisons ask whether the precision and recall profile in the official standings recurs elsewhere in the shared-task data. It does. The system produces broadly similar aggregate scores on the training, development, and test portions. This makes the limited coverage more difficult to explain as a peculiarity of the official partition alone.
The comparison also leaves stable components shared across the results. The learning procedure, the synthetic inputs, and the rule for converting a revision to labels stay the same. Any of them could contribute to the recurring precision and recall profile. Similar scores on several partitions are consistent with a property of the system, but the comparison supplies no intervention that would identify which stage produced that property. It measures variability across these data partitions with the pipeline held fixed.
The aggregate numbers also answer a narrower question than an error analysis organized by category. The score can stay similar if a detector succeeds on different kinds of errors in different partitions. The paper does not report separate detection scores for form, order, spelling, case, or other categories. The illustrations of how the generator creates those changes belong to the method. They do not establish which of those changes the submission detects most effectively in actual learner writing.
The role of the learner distributions remains open
The DaLAJ distributions are meant to make synthetic errors reflect errors seen in learner text. The generator also supplies a large amount of paired Swedish, a collection of distinct operations, lexical analysis for compounds, and probabilities that govern where or when to attempt changes. These ingredients act together in training. DaLAJ can influence what examples are selected during a pass, while the surrounding choices determine what sorts of passes exist and what kinds of sentences they operate on.
A controlled test of the DaLAJ contribution would compare training conditions that differ in whether the relevant choices follow those empirical distributions. The result would bear on an important claim underlying the design. Artificial errors can provide practice simply by making the input harder to reconstruct, while empirically guided errors may provide practice that is better matched to the eventual learner data. The paper’s results concern the condition in which the learner distributions are already present. They leave the comparison with a different sampling policy unresolved.
The same issue applies to the ordered corruption operations. The isolated examples in the paper make it possible to recognize the intended effect of a pass. Real inputs can contain interactions among passes, as when a replacement introduces a word whose spelling changes later. An experiment that removed a pass would change both the corresponding practice cases and some of those interactions. The paper does not report such an experiment. The competitive precision obtained by the whole system is compatible with important contributions from several passes and gives no empirical ordering of their importance.
Why correction can constrain detection
The authors argue that the task given to the correction system may be demanding in a way that matters for recall. It has to settle on output wording before the benchmark sees a flag. A direct detector would be asked whether a word needs correction. In principle, such a detector could mark a word from the available evidence even when the best repair remains uncertain. The submitted system expresses its judgment only through the chosen sentence and the edits recovered by comparison.
This reasoning explains a mechanism by which detection could miss real errors. A word that is difficult to repair can survive unchanged into the output, leaving the comparison with no basis for a flag. When a system does make an edit, the edit may reflect a situation in which the reconstruction was easier to infer. That would be consistent with a high proportion of correct flags alongside low recall. The paper does not collect token-level judgments prior to generation, so its results do not show whether unchanged words were internally treated as suspect or simply appeared acceptable to the system.
A similar distinction applies to the effect of additions. The label conversion clearly discards a new word as a source of a flag. Its rule is part of the procedure, so that consequence follows directly. The paper does not measure how often this occurred on the Swedish benchmark or how much it mattered to the measured recall. In the absence of a comparison with another conversion procedure or with direct detection, the contribution of the rule to the aggregate score remains unquantified.
The cross-team results show that the benchmark permits other precision and recall profiles, including strong recall alongside strong precision. They do not settle which design choice explains any team’s advantage. The published standings compare complete submissions. The authors’ proposal that a Transformer trained directly on detection might yield better coverage is a hypothesis about the training objective and output. The paper’s comparisons motivate it without putting it to a matched test.
Limitations
Limits identified by the authors
The authors’ principal data caveat concerns the relationship between DaLAJ and the Swedish test material. Both were derived from SweLL. DaLAJ contributes statistics about errors, and material originating in SweLL also appears in the test set. The authors explain that the two resources were constructed through different processing procedures, which makes it difficult to trace a sentence in one resource to its counterpart in the other. They consequently cannot say how much the statistics used to generate training inputs may reflect material drawn from the same underlying source as the test examples.
This is a question of independence between the information used to design the artificial errors and the material used to measure the resulting detector. Even a distribution that discards the original sentence strings can carry information from the errors in those sentences. If some of the underlying learner material is shared, that information might make the artificial examples more representative of the evaluation examples. The paper does not determine whether there was an effect on the scores or how large it could have been. The authors call for deriving corruption parameters and evaluating the system on fully disjoint data.
A further limitation identified by the authors is the choice to perform detection through correction. A full rewrite requires decisions about the form, location, and wording of repairs. The benchmark can give credit for identifying a problematic word even if the repair itself is difficult. Training on reconstruction makes the submitted system useful for the authors’ correction research, but it also ties detection to a more demanding prediction. The authors consider the submitted scores an incomplete account of what a Transformer with training aimed directly at token-level detection could achieve.
The authors also acknowledge the restriction to Swedish. They describe the pipeline as adaptable when a language has a substantial monolingual corpus and an annotated source of learner errors. The experiment demonstrates the arrangement with resources already available for Swedish, including a lexicon for compound analysis. Claims about applicability elsewhere remain proposals. How well the approach travels would depend in part on what errors the annotations expose and which corruption operations make sense for the target language.
Further limits of the evaluation
High precision describes the accuracy of the flags that were produced. It cannot establish how well the system recognizes plausible sentences in general, or whether it would have a low false-positive rate under a different distribution of correct and incorrect words. Precision conditions on flags. A false-positive rate conditions on words that ought to remain unflagged. The headline precision is directly relevant to how frequently a user might find a produced flag justified under the benchmark’s annotations, while the paper does not supply the other quantity in its reported results.
Likewise, low recall tells how much of the annotated error material went unflagged in aggregate. It leaves the composition of those misses mostly unknown. The system could have weak coverage spread across several categories, or be much better at some kinds of problems than at others. Interpreting that score in terms of the corruption pipeline requires category-level evidence about errors in synthetic practice and errors in real learner writing. The paper illustrates the available operations and reports aggregate detection results. Linking particular training operations to particular failures remains an open empirical question.
There is a difference between assumptions about target sentences and evidence about output quality. Every original from Språkbanken is treated as the target for its altered version. That gives a reproducible pairing. It does not supply a manual judgment about whether every original is grammatical or every alteration is unsuitable in context. Several illustrated changes use recognizable Swedish words. That alone helps show how the gap can arise between recovering the designated sentence and judging the acceptability of all possible alternatives. The benchmark tests whether labels from that training arrangement are useful on its annotated examples.
The paper’s word-level alignment creates another limit on what the official results reveal. Where a revision and its input admit different ways of matching material, the resulting labels describe the comparison chosen by the procedure. A misplaced phrase can make several words appear to change position. A split or merged expression can also alter the units available for matching. Even a plausible repair can therefore induce a set of flags that differs from the way the benchmark assigns responsibility for the error. The results combine the quality of the proposed edit and the behavior of the conversion. They provide no separate estimate for either contribution.
The same distinction runs in the opposite direction. A flag can coincide with the annotated location even when the change made to that word would be an unsatisfactory correction. Precision and recall of flagging therefore leave open whether the proposed revisions preserve what the learner meant and repair the sentence acceptably. The procedure is a correction system in how it is trained and how it produces text. The evaluation in this paper establishes performance on detection derived from that output. An evaluation of corrections would have to examine the actual changes.
Sentence-level processing sets a further boundary. The approach can use relationships among positions within the sentence, and it can learn from examples involving nonadjacent words. The data procedure takes sentences out of document order, so training does not give it surrounding sentences from the source document. A decision that requires broader discourse context lies outside the evidence made available by this setup. The shared-task scores do not indicate how that restriction affects any specific class of errors.
The size of the Swedish source collection also matters when considering the paper’s motivation. The experiment reduces the role of error-annotated examples in training while drawing on 3.2 billion words of monolingual text and substantial computation. It leaves open what would happen with a much smaller source collection or a less well-covered lexicon. The two claims concern different resources. The results establish what this distantly supervised design achieved with the reported Swedish material, not a minimum amount of data that would suffice to reproduce the behavior.
Finally, stable aggregate results across shared-task splits give limited evidence about generalization beyond that benchmark. The splits are useful additional test material for a system that was trained on artificial pairs. They still share the broad evaluation setup and its definition of acceptable flags. A different collection of learner writing could have a different mixture of errors, and a different annotation procedure could attach labels to different words involved in the same repair. The paper does not measure performance under those changes. It shows a repeated pattern within the partitions on which the authors evaluated the system.
What came after
No later study is identified as having tested or extended this system. The paper ends with several questions whose answers would distinguish the promise of the approach from the behavior of this particular submission. The most direct one concerns whether the empirical learner distributions improve the resulting detector. The paper demonstrates the full pipeline with those distributions included. A comparison that varies their use would establish whether the resemblance to observed learner errors makes a difference beyond the practice afforded by synthetic text generally.
The authors also point toward evaluation with fully separated learner sources. Estimating a corruption distribution from material independent of the evaluation set would address a question different from the value of the distribution itself. The former concerns where the information came from. The latter concerns how useful that information is once it enters training. Keeping those questions distinct would make it possible to determine whether the synthetic examples generalize across learner material as well as whether the sampling scheme improves the detector.
The proposed extensions to direct detection and to other languages follow from different parts of the design. Direct detection would change what the system has to predict, allowing a token-level judgment without requiring a complete revised sentence. Applying the pipeline to another language would change the resources and potentially the set of useful corruption operations. The Swedish result supplies a concrete starting point for both questions. It shows that a system can learn from this combination of ordinary text and learner error statistics and produce highly precise flags, while leaving the causes of its limited coverage and the scope of transfer to further experiments.
Cite
Cite as Murathan Kurfalı and Robert Östling. 2023. A distantly supervised Grammatical Error Detection/Correction system for Swedish. Proceedings of the 12th Workshop on NLP for Computer Assisted Language Learning.
@inproceedings{kurfali2023distantly,
title = {{A distantly supervised Grammatical Error Detection/Correction system for Swedish}},
author = {Murathan Kurfalı and Robert Östling},
booktitle = {Proceedings of the 12th Workshop on NLP for Computer Assisted Language Learning},
year = {2023},
doi = {10.3384/ecp197004},
url = {https://doi.org/10.3384/ecp197004}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/kurfal-2023-distantly-supervised-grammatical-error-detection/