Papers
Topics
Authors
Recent
Search
2000 character limit reached

Keyword-Prioritized Correction Score (KPCS)

Updated 6 July 2026
  • KPCS is a family of evaluation metrics that assigns higher weight to answer‐ or domain-critical keywords, ensuring that key tokens drive the overall score.
  • It comprises dual implementations—KPQA for generative question answering using learned, question-conditioned token weights, and MedGuards for medical error correction via annotated clinical keywords.
  • Empirical studies show that KPCS variants correlate more strongly with human judgments than standard metrics, particularly in contexts requiring numeric precision and clinical accuracy.

Keyword-Prioritized Correction Score (KPCS) denotes a family of evaluation metrics that assign disproportionate importance to answer- or domain-critical terms when judging generated or corrected text. In the cited literature, the name is used for two related but formally distinct constructions. In generative question answering, KPCS is instantiated from KPQA as a KPQA-weighted precision/recall/F1F_1 over aligned tokens or spans, where question-conditioned keyphrase weights determine which parts of an answer matter most for correctness. In medical error correction, KPCS is defined as a convex combination of exact-match recall over annotated clinical keywords and the average of ROUGE-1, BERTScore, and BLEURT, with a tunable balance parameter α\alpha (Lee et al., 2020, Ma et al., 24 Jun 2026).

1. Terminological scope and conceptual basis

Both uses of KPCS are motivated by the same evaluation problem: conventional lexical and semantic similarity metrics can assign high scores to outputs that preserve broad surface overlap while missing the terms that determine factual or clinical correctness. The central idea is therefore keyword prioritization rather than uniform token treatment.

Source Core score Keyword mechanism
"KPQA: A Metric for Generative Question Answering Using Keyphrase Weights" (Lee et al., 2020) Weighted precision/recall/F1F_1 over aligned tokens or spans Question-conditioned KeyPhrase Weights (KPW) per token
"MedGuards: Multi-Agent System for Reliable Medical Error Detection and Correction" (Ma et al., 24 Jun 2026) αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M Exact-match recall over annotated clinical keywords

In the KPQA setting, the evaluation target is correctness of free-form generated answers. The metric reweights overlap so that matches on high-importance tokens dominate the score, while function words and other low-importance tokens contribute little. In the MedGuards setting, the evaluation target is reliability of medical correction, especially whether the corrected sentence reproduces clinically critical concepts such as a diagnosis, medication, therapeutic action, or causal organism.

A common source of confusion is to treat KPCS as a single canonical equation. The literature here instead shows a shared design principle—prioritize critical keywords—implemented in two different ways. This suggests that KPCS is better understood as a keyword-sensitive evaluation paradigm than as a uniquely fixed formula.

2. KPQA-derived KPCS in generative question answering

The KPQA formulation begins from a question Q=[q1,,q]Q = [q_1, \ldots, q_\ell], a reference answer R=[r1,,rn]R = [r_1, \ldots, r_n], and a generated answer A=[a1,,am]A = [a_1, \ldots, a_m]. Inputs are lowercased and tokenized with BERT’s WordPiece tokenizer using bert-base-uncased. No explicit stemming, lemmatization, stopword removal, or punctuation stripping is performed; instead, punctuation and function words are assigned low importance by the learned keyphrase predictor (Lee et al., 2020).

KPQA predicts token-level importance conditioned on the question. For generated tokens, KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m), where wi[0,1]w_i \in [0,1] is the importance of aia_i for answering α\alpha0. For reference tokens, α\alpha1, where α\alpha2 is the importance of α\alpha3 for answering α\alpha4. These weights are produced as output probabilities of a softmax layer, so they are normalized across the answer tokens, and the metric denominators include the sums of weights to keep the score well-defined regardless of normalization.

The paper states that a Keyword-Prioritized Correction Score can be instantiated directly from KPQA by defining a weighted precision/recall/α\alpha5 over token or span matches using the KPQA keyphrase weights. Let α\alpha6 be indices of generated tokens aligned to some reference token, and let α\alpha7 be reference tokens that have at least one aligned generated token. Then

α\alpha8

and

α\alpha9

This definition abstracts away the alignment choice. Exact match over WordPiece tokens yields a strict factual criterion. LCS-based alignment yields order-sensitive correctness. Embedding similarity, including a max-cosine threshold for embeddings, allows paraphrase-sensitive matching. The paper presents this abstraction as a direct generalization of the weighted precision/recall/F1F_10 structure already used in BLEU-1-KPQA, ROUGE-L-KPQA, and BERTScore-KPQA.

The underlying KPQA scoring family makes the same principle concrete. BLEU-1-KPQA uses weighted unigram precision with exact token equality and no clipping. ROUGE-L-KPQA computes weighted LCS-based precision, recall, and F1F_11-measure using binary LCS membership. BERTScore-KPQA computes weighted cosine-similarity matching using contextual embeddings from bert-large-uncased-whole-word-masking-finetuned-squad, first hidden layer. In each case, the score is driven by KPW rather than uniform or IDF-style token weighting.

3. MedGuards KPCS in medical error correction

The MedGuards formulation defines KPCS over a reference corrected sentence F1F_12, a model-corrected sentence F1F_13, and a set of required clinical keywords extracted from F1F_14. The metric proceeds in three steps (Ma et al., 24 Jun 2026).

The first step is a keyword check. Let F1F_15 be the number of required keywords in F1F_16, and let F1F_17 be the number of those required keywords that appear in F1F_18. The paper defines

F1F_19

It also states that if no keyword is present in αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M0, the score is set to zero. By construction, αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M1.

The second step is semantic and lexical similarity:

αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M2

The third step is the weighted combination:

αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M3

with αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M4. The paper sets αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M5 for all main experiments and studies αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M6 in sensitivity analysis.

This version of KPCS uses exact string matching for the required keywords. The paper explicitly notes that this can miss clinically equivalent synonyms and suggests future integration of medical ontologies. It does not specify handling of multiple occurrences, partial matches, lemmatization, abbreviations, numeric tolerances and units, or negation polarity. Consequently, keyword robustness arises primarily from the αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M7 component, especially BERTScore and BLEURT, rather than from the keyword check itself.

Keyword selection is annotation-driven rather than automatically extracted. In MEDEC, categories include Diagnosis, Management, Treatment, Pharmacotherapy, and Causal Organism, and the keywords correspond to the entities constituting the error. Non-error factual information is excluded from keywords. The paper does not specify automatic NER, UMLS concept extraction, or multilingual lexicons.

4. Computation, alignment, and implementation

In the KPQA setting, the practical pipeline begins with raw αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M8, tokenizes all three inputs with the bert-base-uncased WordPiece tokenizer, computes αK+(1α)M\alpha \cdot K + (1-\alpha)\cdot M9 and Q=[q1,,q]Q = [q_1, \ldots, q_\ell]0, selects an alignment rule, and then computes weighted precision, recall, and Q=[q1,,q]Q = [q_1, \ldots, q_\ell]1. The alignment rule can be unigram exact match for BLEU-1-KPQA, LCS dynamic-programming alignment for ROUGE-L-KPQA, or cosine similarity over contextual embeddings for BERTScore-KPQA. The paper also gives high-level pseudocode for these variants and notes the corresponding complexities: naive weighted unigram precision is Q=[q1,,q]Q = [q_1, \ldots, q_\ell]2 but reducible to Q=[q1,,q]Q = [q_1, \ldots, q_\ell]3 with a hash map over reference tokens; ROUGE-L-KPQA uses LCS dynamic programming with Q=[q1,,q]Q = [q_1, \ldots, q_\ell]4; BERTScore-KPQA computes embeddings in Q=[q1,,q]Q = [q_1, \ldots, q_\ell]5 and pairwise cosine maxima in Q=[q1,,q]Q = [q_1, \ldots, q_\ell]6 (Lee et al., 2020).

The KPQA weight predictor is a BERT-based classifier using bert-base-uncased with an additional fully-connected layer of 768 units and tanh, followed by a softmax output over answer tokens. The input is the concatenation [question, [SEP], answer-sentences]. The task is to classify whether each token in the answer sentence belongs to the gold answer span for that question. Training uses cross-entropy over tokens against binary in-span versus out-of-span labels. The training data combine SQuAD v1.1, HotpotQA excluding yes/no questions, and the MS-MARCO QA subset, split 9:1 for train and dev. Hyperparameters are max input length 256, AdamW with learning rate Q=[q1,,q]Q = [q_1, \ldots, q_\ell]7, batch size 16, and 5 training epochs, selecting the checkpoint with minimum dev loss and training five times to pick the best-performing model. Reported token-level dev Q=[q1,,q]Q = [q_1, \ldots, q_\ell]8 is 55.81 on SQuAD and 59.26 on MS-MARCO QA. Training takes approximately 150 minutes per epoch on a single 1080 Ti GPU, evaluation about 5 minutes, and model size is about 109.4M parameters.

In the MedGuards setting, computation is simpler. One takes Q=[q1,,q]Q = [q_1, \ldots, q_\ell]9 and the annotated keyword set R=[r1,,rn]R = [r_1, \ldots, r_n]0, counts exact string matches of each required keyword in R=[r1,,rn]R = [r_1, \ldots, r_n]1, computes R=[r1,,rn]R = [r_1, \ldots, r_n]2, computes ROUGE-1, BERTScore, and BLEURT using standard implementations, averages them to form R=[r1,,rn]R = [r_1, \ldots, r_n]3, and then combines R=[r1,,rn]R = [r_1, \ldots, r_n]4 and R=[r1,,rn]R = [r_1, \ldots, r_n]5 with R=[r1,,rn]R = [r_1, \ldots, r_n]6. The only tunable hyperparameter is R=[r1,,rn]R = [r_1, \ldots, r_n]7. No case normalization, edit-distance thresholds, synonym mapping, unit normalization, or negation handling is specified for the keyword check. The paper states that the authors release code at https://github.com/congboma/MedErrBench; the KPQA paper releases code at https://github.com/hwanheelee1993/KPQA.

These implementation differences are substantive. KPQA-derived KPCS requires a learned question-conditioned salience model and an explicit alignment operator. MedGuards KPCS instead assumes annotated keywords and uses exact-match recall as a lightweight keyword fidelity signal. This suggests that the two formulations occupy different points in the design space: one learns token salience, the other relies on curated domain-critical keyword sets.

5. Empirical behavior and validation

The KPQA study evaluates correctness on two newly annotated generative QA datasets: the MS-MARCO NLG subset, with average answer length 16.6 tokens, and AVSD, with average answer length 9.4 tokens. For context, it also reports results on NarrativeQA with average answer length 4.7 and SemEval-2018 Task 11 with average answer length 2.5. Human judgments are collected by training two GenQA models per dataset—UniLM and MHPGM for MS-MARCO, MTN and AMF for AVSD—sampling 500 questions per model, discarding exact matches to the ground truth, and obtaining 10 MTurk ratings per sample on a 5-point Likert scale. Up to five noisy ratings per sample are removed by z-score filtering, and the remaining ratings are averaged. Krippendorff’s alpha is R=[r1,,rn]R = [r_1, \ldots, r_n]8 for MS-MARCO and R=[r1,,rn]R = [r_1, \ldots, r_n]9 for AVSD, with average retained annotators per sample A=[a1,,am]A = [a_1, \ldots, a_m]0 and A=[a1,,am]A = [a_1, \ldots, a_m]1 respectively (Lee et al., 2020).

Against these human judgments, KPQA-integrated metrics achieve markedly higher correlation than standard metrics. On MS-MARCO, BLEU-1 has A=[a1,,am]A = [a_1, \ldots, a_m]2 and A=[a1,,am]A = [a_1, \ldots, a_m]3, ROUGE-L has A=[a1,,am]A = [a_1, \ldots, a_m]4 and A=[a1,,am]A = [a_1, \ldots, a_m]5, METEOR has A=[a1,,am]A = [a_1, \ldots, a_m]6 and A=[a1,,am]A = [a_1, \ldots, a_m]7, CIDEr has A=[a1,,am]A = [a_1, \ldots, a_m]8 and A=[a1,,am]A = [a_1, \ldots, a_m]9, and BERTScore has KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)0 and KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)1. The KPQA variants improve to BLEU-1-KPQA KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)2, KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)3; ROUGE-L-KPQA KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)4, KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)5; and BERTScore-KPQA KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)6, KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)7. On AVSD, baseline BLEU-1 reaches KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)8, KPW(Q,A)=(w1,,wm)\mathrm{KPW}(Q,A) = (w_1,\ldots,w_m)9; ROUGE-L wi[0,1]w_i \in [0,1]0, wi[0,1]w_i \in [0,1]1; and BERTScore wi[0,1]w_i \in [0,1]2, wi[0,1]w_i \in [0,1]3, while KPQA variants reach BLEU-1-KPQA wi[0,1]w_i \in [0,1]4, wi[0,1]w_i \in [0,1]5; ROUGE-L-KPQA wi[0,1]w_i \in [0,1]6, wi[0,1]w_i \in [0,1]7; and BERTScore-KPQA wi[0,1]w_i \in [0,1]8, wi[0,1]w_i \in [0,1]9. All reported correlations have aia_i0.

The same paper reports several robustness studies. Training KPQA without MS-MARCO data lowers MS-MARCO correlations, but KPQA variants still outperform baselines: BLEU-1-KPQA aia_i1, aia_i2; ROUGE-L-KPQA aia_i3, aia_i4; and BERTScore-KPQA aia_i5, aia_i6. Removing question context from KPQA training also degrades performance. On MS-MARCO, BLEU-1-KP reaches aia_i7, aia_i8; ROUGE-L-KP reaches aia_i9, α\alpha00; and BERTScore-KP reaches α\alpha01, α\alpha02, all below the full KPQA variants. For question types on MS-MARCO, gains are reported across PERSON, NUMERIC, DESCRIPTION, LOCATION, and ENTITY, with the largest gains for NUMERIC. On a 100-example multiple-sentence subset, BERTScore-KPQA reaches α\alpha03 and α\alpha04, compared with BERTScore at α\alpha05 and α\alpha06. In model-ranking “win-lose” comparisons where the human score gap is at least 2, KPQA variants match human judgments on 74–76% of pairs in MS-MARCO versus 61–68% for baselines, and on 77–81% of pairs in AVSD versus 71–78% for baselines.

A qualitative example illustrates the intended behavior. For the question “How many steps are involved in a hypothesis test?”, the reference is “Four steps are involved in a hypothesis test.” and the generated answer is “There are seven steps …”. Human judgment is 0.063, BLEU-1 is 0.778, ROUGE-L is 0.713, BLEU-1-KPQA is 0.057, and ROUGE-L-KPQA is 0.127. The metric assigns high weight to the numeric token, so the weighted score approaches zero for the incorrect answer. In another example on “How long do I need to walk in order to lose a pound?”, BERTScore with IDF gives 0.72, BERTScore-KPQA gives 0.93, and human judgment is 0.94.

The MedGuards paper evaluates KPCS on MEDEC and on MedErrBench, a multilingual benchmark spanning English, Arabic, and Chinese. On MEDEC, KPCS improves substantially when MedGuards is used with several LLM backbones: Gemini 2.0 Flash improves from 0.370 to 0.472, GPT-4o-mini from 0.210 to 0.461, Doubao-1.5-thinking-pro from 0.219 to 0.554, Deepseek-V3 from 0.257 to 0.556, Gemini 2.5 Flash Lite from 0.127 to 0.385, and Llama-3.3-70B-Instruct from 0.360 to 0.487 (Ma et al., 24 Jun 2026). The paper states that all reported improvements for MedGuards are statistically significant with α\alpha07 on the MEDEC results where p-values are shown.

Sensitivity analysis over α\alpha08 yields the following KPCS values for MedGuards variants: for α\alpha09, α\alpha10; for α\alpha11, α\alpha12; for α\alpha13, α\alpha14. The paper concludes that α\alpha15 yielded KPCS scores most consistent with human Mean Opinion Score trends.

6. Interpretation, limitations, and methodological significance

The principal strength shared by both formulations is sensitivity to content-bearing words that determine correctness. In the KPQA setting, the token weights are question-conditioned and learned to highlight answer-span tokens. This focuses the score on keywords and keyphrases that determine whether a generated answer is correct. In the medical setting, the keyword recall term directly penalizes missing diagnoses, medications, therapeutic actions, and causal organisms, while the semantic and lexical term preserves broader similarity assessment (Lee et al., 2020, Ma et al., 24 Jun 2026).

The KPQA-derived formulation has several explicit limitations. It relies on accurate keyphrase prediction; when the model misidentifies salient tokens, the weighted score can diverge from human judgment. The paper notes such cases especially for NUMERIC questions, including overweighting units such as “million” or “years.” Performance also degrades under domain shift, although it remains above baselines in the reported out-of-domain experiment. Exact-match variants such as BLEU-1-KPQA and ROUGE-L-KPQA do not directly account for synonymy, and while BERTScore-KPQA mitigates this through embeddings, KPQA itself does not incorporate external synonym lists. Gains are smaller for multi-sentence or DESCRIPTION-type answers, where keyphrases are more diffuse, and there is no explicit penalty term for contradictions beyond absence of matched keyphrases.

The MedGuards formulation has a different limitation profile. The keyword component uses unweighted recall over required keywords and exact string matching only. The paper explicitly states that this is not robust to clinically equivalent synonyms or morphological variants and proposes ontology-based extensions as future work. The score also depends on the quality and coverage of keyword annotations; misannotations or incomplete keyword sets can distort evaluation. In addition, contextual correctness beyond string presence remains only partly modeled. Dosages, units, and negation are not explicitly handled in the keyword check.

A worked example from MedGuards clarifies this behavior. If the reference contains “Continue heparin drip, Continue HFNC …” with required keyword set α\alpha16, and the prediction instead contains “Continue lepirudin drip, Continue HFNC …”, then α\alpha17, α\alpha18, and α\alpha19. With α\alpha20, the final score becomes α\alpha21. If the prediction preserves “heparin,” then α\alpha22, and with high similarity the final score approaches 1. This demonstrates that KPCS can strongly penalize failure on the critical term even when the remaining sentence is similar.

Methodologically, the two formulations show different routes to the same goal. The KPQA line treats importance as a learned, question-conditioned distribution over tokens and then defines weighted overlap relative to an alignment rule. The MedGuards line treats importance as externally annotated domain knowledge and combines keyword recall with conventional generation metrics. A plausible implication is that KPCS-style evaluation can be adapted either by learning salience from supervision or by curating a set of required terms, depending on task structure and available annotations.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Keyword-Prioritized Correction Score (KPCS).