Character-level metrics score generated text by counting character edits instead of whole-word matches. They beat word-level scores in morphologically dense languages because they give partial credit for near-misses. They share one blind spot, though: every character costs the same. In clinical or legal text that is backwards. Turning "10 mg" into "100 mg", "hypo-" into "hyper-", or "§ 12(b)(6)" into "§ 12(b)(5)" is a one-character edit that reverses the meaning. Writing "haemorrhage" for "hemorrhage" is a one-character edit that changes nothing. Meanwhile, specialized generators such as BioBART are still judged with ROUGE and BLEU, which legal experts' judgments barely track.
We propose a domain-weighted character error rate. It aligns a generated text to its reference character by character, as ordinary Character Error Rate (CER) does, and then charges each edit by how much it moves the representation of a domain-pretrained language model. The question behind this is also a question about domain pre-training itself. Does pre-training on PubMed or contract text give a model a usable sense of which surface characters carry domain meaning? And is that sense something a general-domain model lacks? If the answer is yes, domain pre-training becomes a measuring instrument as well as a way to build generators, and the metric it yields should both track expert judgment and rank domain generators differently than ROUGE does.
Core Claim
Our claim is that uniform character metrics and embedding metrics fail in opposite ways on technical text. Uniform character metrics such as CER and chrF (character n-gram F-score) notice every small edit but cannot tell harmful edits from harmless ones. Embedding metrics compare subword vectors and can miss single-digit or single-affix changes, because the altered word shares most of its subword pieces with the reference.
Combining character-level alignment with edit costs taken from a domain-pretrained model should fix both failures. The improvement should come from the domain pre-training specifically: swapping the weighting model for a general-domain model of the same size should remove most of the gain. That ablation is the heart of the proposal.
Where This Sits in Prior Work
Two results motivate the work. Advocating Character Error Rate for Multilingual ASR Evaluation showed with 60 human raters that CER tracks human rankings of speech-recognition output better than word error rate. In English it reached 74.91% ranking correlation against 69.98% for word error rate, and it gained on average 4.75 points in Malayalam and Arabic. That study used only general conversational speech, and its own normalization discussion concedes that some character edits destroy meaning while others do not. An Evaluation Framework for Legal Document Summarization found that on Indian case law BLEU correlates at −0.09 and ROUGE-L at 0.06 with expert relevance judgments. Its intent-phrase metric reached Spearman 0.42, but it matches phrases by exact containment or token classification, with no character-level tolerance.
Three papers supply the domain models and generation tasks we reuse. Domain-Specific Language Model Pretraining for Biomedical Natural Language Processing pretrained PubMedBERT from scratch with an in-domain vocabulary. It reported 81.16 on the BLURB suite of biomedical understanding tasks and showed that the domain vocabulary reduces fragmentation of technical terms. That makes PubMedBERT a natural candidate for sensing sub-word meaning changes. BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model continued pre-training BART on PubMed and raised MeQSum (a consumer health question summarization set) ROUGE-L from 51.05 to 53.15. It evaluated only with word-level metrics and kept the general vocabulary. Exploiting Language Characteristics for Legal Domain-Specific Language Model Pretraining built legal encoders that separate boilerplate contract text from the variable spans inside it, such as party names and dates. That is exactly the kind of span where one-character errors matter.
One paper constrains the design. Why do language models perform worse for morphologically complex languages? found that tokenizer–morpheme alignment explains little of the cross-language performance gap. We therefore do not assume that subword boundaries by themselves encode salience. Instead we measure salience through the model's contextual representations and test the assumption directly.
The closest neighbour is the character-level evaluation line: chrF-style metrics, BEER from Milos Stanojevic et al., and span-level evaluation in MuCGEC. All of these weight edits by string properties alone. None uses a domain model to set edit costs, and none has been validated against domain experts.
Research Program
The metric works as follows. We align hypothesis $h$ and reference $r$ with character Levenshtein distance and group adjacent edits into contiguous edit spans $e \in E(h,r)$. For each span, we apply only that edit to the reference, giving $r \oplus e$. We then measure how much a domain model $f_\theta$ changes its contextual representation of the enclosing word or number:
$$w_\theta(e) = 1 - \cos\big(f_\theta(r)_{\text{span}},\, f_\theta(r \oplus e)_{\text{span}}\big)$$
Here $f_\theta(\cdot)_{\text{span}}$ is the mean-pooled contextual embedding of the tokens covering the edited region. The score is
$$\text{dCER}_\theta(h,r) = \frac{\sum_{e \in E(h,r)} w_\theta(e)\,|e|}{\sum_{e} \bar w_\theta\,|r|/|E| + |r|}$$
where $|e|$ is the span's character length and $\bar w_\theta$ is the model's mean weight on a held-out calibration set of general text. The denominator keeps scores comparable across weighting models, so that a model producing uniformly large shifts is not favoured.
Applying each edit alone keeps the costs independent of each other and the computation linear in the number of edit spans. We instantiate $\theta$ as PubMedBERT and BioBART's encoder for biomedicine, and as the legal encoders of Xiao et al. for law. Each is paired with its general-domain counterpart of matched size (BERT, BART, and the base model used for the legal encoders).
The work has three parts. First, a controlled perturbation suite that tests salience directly. We take MeQSum reference summaries and CUAD contract spans and inject paired one-to-three-character edits of two kinds. Critical edits include dosage digits, drug-class suffixes, hypo/hyper prefixes, laterality, negation particles, statute and clause numbers, dates, and party names. Benign edits include British/American spelling, hyphenation, case, spacing, and common abbreviation variants. A clinician and a lawyer label a sample to confirm each category. Second, a human-judgment study. Two clinicians rate about 300 MeQSum summaries for clinical correctness. The summaries come from BART-Large, BioBART-Large, and a fine-tuned LLaMA-2-7B following Faithful Summarization of Consumer Health Queries. For law, we reuse the existing expert relevance scores on the Indian case-law data, with the caveat that there are only 101 documents. Third, a model-ranking study. We ask whether dCER changes the measured gap between general and domain-pretrained generators relative to ROUGE-L, which would change what the domain pre-training literature has concluded.
Baselines
The naive reference points are the metrics the field already uses. For generation these are ROUGE-L and BLEU, run exactly as BioBART and the legal framework report them. For character-level scoring they are unweighted CER and chrF++ computed on the same normalized text. The existing numbers to beat are Spearman 0.06 for ROUGE-L and −0.09 for BLEU against expert relevance on the Indian legal data. We found no reported result on Lacuna for chrF or CER against expert judgments in any clinical or legal generation task, so we compute these ourselves on identical outputs.
The strongest existing competitor on the legal data is the intent metric of An Evaluation Framework for Legal Document Summarization, with a reported Spearman of 0.42 against relevance. Beating it means exceeding 0.42 on the same 101 documents, with a bootstrap confidence interval that excludes it. The strongest competitor overall is BERTScore computed with the same domain encoder as dCER. It is domain-aware, handles paraphrase, and was used in the Faithful Summarization evaluation, though the file gives no number for it on MeQSum. We run it with the same encoder checkpoint, the same layer-selection search budget, and the same text normalization. On the clinical study, beating it means a higher Kendall correlation with clinician correctness ratings, tested with a paired bootstrap.
We add an entity-exact-match score, meaning F1 over medical or legal entities extracted by a domain NER model. The ablation that isolates our key ingredient replaces the domain weighting model with its general counterpart while leaving everything else unchanged. A second control shuffles the weights across edits to rule out gains from the weight distribution alone.
Why not just…?
Why not just use chrF or CER, which already beat word metrics? On general speech they do. Our perturbation suite asks something they cannot answer by construction: whether a critical and a benign edit of equal length receive different costs. Uniform metrics score both identically, so their accuracy at separating the pairs is 50% by definition. The live question is whether that blindness matters for correlation with experts on real system outputs. The human study settles it. If unweighted chrF matches dCER there, the weighting is unnecessary for practical ranking and we will report that.
Why not just use BERTScore with PubMedBERT? This is the real threat, because it already brings in domain pre-training. Our hypothesis is that it under-penalizes numeric and affix edits, since "100" and "10", or "-nib" and "-mab" variants, share subword pieces and receive nearby vectors, while token-level greedy matching dilutes a single bad token across a long summary. If BERTScore separates critical from benign perturbations as well as dCER does, and correlates as well with clinicians, then the character-level alignment adds nothing. In that case we would reframe the contribution as validating domain BERTScore for these tasks.
Why not just check the entities? Entity matching catches wrong drug names. It does not catch errors outside NER types, such as negation, laterality, or dosage units, and it gives no partial credit for harmless spelling variants of entities. The perturbation categories are split by whether an NER tagger covers them, which shows directly where entity matching goes blind. We also report a combination of entity F1 and dCER, in case the two are complementary.
Proposed Experiments
The first decisive check is the perturbation suite. dCER with a domain weighting model should assign higher cost to the critical member of an edit pair in clearly more pairs than dCER with a general weighting model does. If the domain and general weighting models perform alike, domain pre-training has not taught character salience, and the central claim fails. We break results down by category. We expect digit and statute edits to be hardest, given BioBART's general vocabulary and the tokenization findings of Arnett and Bergen.
The second check is expert correlation. dCER should exceed chrF++, ROUGE-L, and domain BERTScore in Kendall correlation with clinician correctness on MeQSum, and should exceed the 0.42 intent-metric correlation on the Indian legal data. Because that legal set is small, the legal result will be reported with its confidence interval rather than as a headline.
The third check asks whether the metric changes conclusions about domain pre-training. We recompute the BART-Large versus BioBART-Large comparison on MeQSum, where ROUGE-L shows 51.05 against 53.15, and check whether dCER widens, shrinks, or reverses the gap. We then inspect which edit categories drive any change. A reversal would suggest that part of the reported benefit of domain pre-training lies in surface word overlap rather than in getting clinically decisive characters right.
As an exploratory extension, we would apply the method to Bangla consumer health summaries from BanglaCHQ-Summ. The byte premium and agglutination there make uniform character costs even less trustworthy. However, no Bangla domain-pretrained encoder appears in our materials, so this part tests only a multilingual weighting model.
References
- Advocating Character Error Rate for Multilingual ASR Evaluation
- An Evaluation Framework for Legal Document Summarization
- Domain-Specific Language Model Pretraining for Biomedical Natural Language Processing
- BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model
- Exploiting Language Characteristics for Legal Domain-Specific Language Model Pretraining
- Why do language models perform worse for morphologically complex languages?
- Fitting Sentence Level Translation Evaluation with Many Dense Features
- MuCGEC: a Multi-Reference Multi-Source Evaluation Dataset for Chinese Grammatical Error Correction
- Faithful Summarization of Consumer Health Queries: A Cross-Lingual Framework with LLMs