AAAI 2025Grammatical error correction · Evaluation

DSGram: Dynamic Weighting Sub-Metrics for Grammatical Error Correction in the Era of Large Language Models

Jinxiang Xie1,2, Yilin Li1, Xunjian Yin1, Xiaojun Wan1

1 Peking University · 2 Beijing Jiaotong University

Good grammatical correction must preserve meaning, avoid unnecessary edits, and read fluently. DSGram scores these dimensions separately and adapts their importance to each sentence.

Result
SEEDA-S sentence-level pairwise accuracy: GPT-4-weighted DSGram 0.776 vs 0.768 for SOME, the strongest baseline; equal 0.33 weights give 0.648.
New vs prior
SOME, following Asano et al. (2017), scores grammaticality, fluency, and meaning with three BERT models and sums them with preset weights; DSGram adds an over-editing criterion and derives sentence-specific weights through AHP.
Limitation
The scorer sets the ceiling: on DSGram-Eval, fine-tuned LLaMA3-8B correlates 0.419 with human overall scores, versus 0.772 for zero-shot GPT-4.
Scroll sideways to read the figure. DSGram combines criterion scores with weights derived from pairwise comparisons and a consistency check. Full size ↗

A better-sounding rewrite is not always a better correction

Grammatical error correction (GEC) must fix the language while preserving what the writer meant. An LLM corrector may produce a valid paraphrase that shares few words with the reference, or rewrite too much and shift the meaning; overlap scores penalize the first, and fluency-oriented scores can reward the second. In Figure 1, BLEU cannot separate over- from under-correction, and the reference-free metric SOME misses over-correction.

DSGram scores three criteria. Semantic Coherence asks whether meaning is preserved; Edit Level asks whether the changes were necessary, rather than counting edited tokens; Fluency covers grammar and natural expression. Folding grammaticality into fluency removes a redundant vote: in SOME's annotation data the two correlate at 0.89.

Closest prior work

Reference-based GEC metrics such as M², ERRANT, and BLEU depend on gold corrections that may not cover every valid edit, and they miss the over-correction typical of LLM correctors (Fang et al. 2023). Reference-free metrics follow Asano et al. (2017): SOME scores grammaticality, fluency, and meaning preservation with three BERT models and combines them by a weighted sum. DSGram merges the largely redundant grammaticality and fluency scores, adds an Edit Level criterion for over-correction, and replaces the single weighting with sentence-specific weights that an LLM derives through AHP; IMPARA appears as a further reference-free baseline in Table 3.

Quality and importance are judged separately for each sentence

An LLM first scores the original–corrected pair on the three criteria, then judges how much each matters for this sentence: legal or medical text calls for strict Semantic Coherence and Edit Level, casual dialogue for Fluency. Importance is elicited as pairwise comparisons under the Analytic Hierarchy Process (AHP), not as directly stated weights, so inconsistent judgments can be caught and revised.

Algorithm 1 · Figure 5 examples

Derive the weights from pairwise judgments

DSGram does not ask for weights directly. For each sentence pair, an LLM compares the three criteria two at a time on the 1–9 scale; the weights are the principal eigenvector of that judgment matrix, accepted only when its consistency ratio is below 0.1 (Section 3.2, Algorithm 1). Make the three judgments yourself for a sentence pair from Figure 5.

Adapted · Figure 5(a) Casual daily dialogue; the paper says Fluency is emphasized.

Original
So I think we can not live if old people could not find siences and tecnologies and they did not developped .
Corrected
So I think we would not be alive if our ancestors did not develop sciences and technologies .

Judgment matrix A

Row vs columnSCELF
Semantic coherence111/2
Edit level111
Fluency211

aij is the importance of the row criterion relative to the column criterion; aji = 1/aij. Your input

λmax
3.054
CI = (λmax − 3) / 2
0.027
CR = CI / 0.58
0.046

Consistent: CR < 0.10, accepted

Weights

CriterionYour AHP weightFigure 5(a) · GPT-4Equal
Semantic coherence0.2600.2680.333
Edit level0.3270.2950.333
Fluency0.4130.4370.333

Computed · Section 3.2 your weights: the principal eigenvector of A, normalized to sum to 1. Measured · Figure 5(a) GPT-4 weights printed in the paper; the matrix behind them is not printed.

Apply the weights: W = Σ wi · si

Figure 5(a) correction · DSGram-Eval #1

So I think we would not be alive if our ancestors did not develop sciences and technologies .

  • Human sub-scores
  • SC8
  • EL8
  • F9
Your weights
8.41
Figure 5 weights
8.44
Equal weights
8.33
Human overall
9
Another system output · DSGram-Eval #4

So I think we can not live if old people can not find the science and technology that has not been developed .

  • Human sub-scores
  • SC2
  • EL10
  • F5
Your weights
5.86
Figure 5 weights
not reported
Equal weights
5.67
Human overall
2

Measured · released DSGram-Eval human sub-scores and overall scores (annotation file 1, items 1, 4, 9, 11); Figure 5 prints the same sub-scores for its two pairs. Your judgments are applied to both outputs; DSGram elicits a separate matrix for every sentence pair.

Consistent: CR = 0.046 is below 0.10, so Algorithm 1 accepts these weights. Your weights prefer DSGram-Eval #1 by 2.55 points; the annotator gave 9 and 2. Figure 5 weights give the Figure 5 correction 8.44; yours give 8.41.

Measured: Figure 5 weights and scores; human sub-scores and overall scores from the released DSGram-Eval annotation. Adapted: sentence pairs from Figure 5; RI = 0.58 and the CR < 0.1 rule from Section 3.2; scale wording from the released weight prompt. Computed: your weights, λmax, CI, CR and weighted scores. The paper prints GPT-4's weights but not its matrices; “Closest match to Figure 5” is our search over consistent integer judgments, which differs from the printed weights by up to 0.032 for (a) and 0.010 for (b). No model runs in this page.Section 3.2 and Algorithm 1 ↗Figure 5 ↗Released DSGram-Eval annotation ↗

Sentence-specific weights matter because a fixed average can hide a low score on the criterion that matters most for a given sentence. In Figure 5, the casual-dialogue pair receives its largest weight on Fluency and the formal pair on Edit Level.

  1. 01

    Score three dimensions

    Use an LLM to assess semantic coherence, edit level, and fluency directly from the original and corrected sentences.

  2. 02

    Adapt the weights

    Generate pairwise criterion comparisons, check their consistency with the Analytic Hierarchy Process, and derive sentence-specific weights.

  3. 03

    Combine and validate

    Aggregate the weighted scores and compare against human judgments; use GPT-4 annotations to fine-tune smaller evaluators.

Dynamic weighting helps most at sentence level; the scorer sets the ceiling

Weighting can be tested apart from scoring. Applied to human sub-scores on DSGram-Eval, the authors' human-scored set, AHP weights correlate 0.8764 with human overall ratings versus 0.8544 for equal weights, a difference the paper calls significant only at a relaxed level. On SEEDA, equal weights cost far more at sentence level than at system level (Table 3).

Component scores set the ceiling. GPT-4 correlates best with human sub-scores on all three criteria, LLaMA3-70B is weakest on Edit Level, and LLaMA models fine-tuned on GPT-4-annotated data beat five-shot prompting without approaching GPT-4 (Table 4). On SEEDA-S system-level Pearson correlation, IMPARA and SOME stay ahead of DSGram (Table 3).

Table 3 (selected columns). Meta-evaluation on SEEDA, whose human judgments are sentence-based (SEEDA-S) or edit-based (SEEDA-E): Pearson r and Spearman ρ with human system rankings, and pairwise accuracy (Acc) and Kendall τ at sentence level; higher is better. DSGram rows differ only in how the weights are set; the equal-weights row is printed in the paper as Avg_DSGram (G.w), and the other two as DSGram (L.w) and DSGram (G.w). Source ↗

MetricSystem SEEDA-S rSystem SEEDA-E rSystem SEEDA-E ρSentence SEEDA-S AccSentence SEEDA-S τ
M20.6580.7910.7640.5120.200
ERRANT0.5570.6970.6710.4980.189
GLEU0.8470.9110.8970.6730.351
SOME0.8920.9010.9510.7680.555
IMPARA0.9110.8890.9440.7610.540
DSGram, equal weights (0.33)0.7970.9220.9300.6480.296
DSGram, LLaMA3-70B weights0.8800.9060.8950.6310.263
DSGram, GPT-4 weights0.8800.9270.9440.7760.551

Method proposed in the paper

Scope. Meta-evaluation uses SEEDA and DSGram-Eval, the authors' human-scored set built from CoNLL-2014 and BEA-2019 test sentences. Only GPT-4, GPT-4o, and LLaMA-family models were tested as scorers and weight generators. Read the study ↗

Further reading in the paperPaper · Sections 3–4 and Tables 3–4 ↗Code and evaluation resources ↗
Read the abstract

Evaluating the performance of Grammatical Error Correction (GEC) models has become increasingly challenging, as large language model (LLM)-based GEC systems often produce corrections that diverge from provided gold references. This discrepancy undermines the reliability of traditional reference-based evaluation metrics. In this study, we propose a novel evaluation framework for GEC models, DSGram, integrating Semantic Coherence, Edit Level, and Fluency, and utilizing a dynamic weighting mechanism. Our framework employs the Analytic Hierarchy Process (AHP) in conjunction with large language models to ascertain the relative importance of various evaluation criteria. Additionally, we develop a dataset incorporating human annotations and LLM-simulated sentences to validate our algorithms and fine-tune more cost-effective models. Experimental results indicate that our proposed approach enhances the effectiveness of GEC model evaluations.

Full paper ↗
Citation BibTeX
@inproceedings{xie2025dsgram,
  title = {DSGram: Dynamic Weighting Sub-Metrics for Grammatical Error Correction in the Era of Large Language Models},
  author = {Xie, Jinxiang and Li, Yilin and Yin, Xunjian and Wan, Xiaojun},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  volume = {39},
  number = {24},
  pages = {25561--25569},
  year = {2025},
  doi = {10.1609/aaai.v39i24.34746},
  url = {https://ojs.aaai.org/index.php/AAAI/article/view/34746}
}