Source-linked AI summary

Evaluating Semantic Accuracy of Data-to-Text Generation with Natural Language Inference

Ondřej Dušek, Zdeněk Kasner

arXiv:2011.10819v1cs.CL

TL;DR

Semantic accuracy in D2T generation is difficult to assess because outputs can omit or hallucinate facts, while human evaluation is costly to scale. The paper uses a pretrained NLI model with two-way entailment checks over templated input facts and generated text, achieving >90% accuracy on E2E and >75% on WebNLG.

  • Problem

    D2T systems may omit or hallucinate facts, and assessing semantic accuracy is difficult because wording changes can change meaning, handcrafted heuristics miss edge cases, and human evaluation is costly to scale.

    Source: §1 · p. 1
  • Method

    A pretrained NLI model checks entailment in both directions between generated text and input facts, which are converted to text using trivial templates.

    Source: §1 · p. 1
  • Results

    The metric achieves >90% accuracy on E2E and >75% accuracy on WebNLG, competitive with domain-specific handcrafted scripts.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The metric detects omissions or hallucinations without human references or training and yields results competitive with crowdsourced ratings or domain-specific handcrafted scripts.

    Source: §6 · p. 5

    Imprecise templates can confuse the NLI model, and the authors identify template selection as a current weak point that may be mitigated with better templates.

    Source: §5.1 · p. 4

Abstract

from arXiv · show

A major challenge in evaluating data-to-text (D2T) generation is measuring the semantic accuracy of the generated text, i.e. checking if the output text contains all and only facts supported by the input data. We propose a new metric for evaluating the semantic accuracy of D2T generation based on a neural model pretrained for natural language inference (NLI). We use the NLI model to check textual entailment between the input data and the output text in both directions, allowing us to reveal omissions or hallucinations. Input data are converted to text for NLI using trivial templates. Our experiments on two recent D2T datasets show that our metric can achieve high accuracy in identifying erroneous system outputs.

1 Introduction

The paper addresses the difficulty of assessing semantic accuracy in D2T outputs, where systems may omit or hallucinate facts and existing evaluation can require full language understanding. It uses pretrained NLI checks in both directions, with input facts rendered as text, and reports high accuracy on E2E and useful results on WebNLG.

1 Introduction

  • Neural D2T systems can omit or hallucinate facts, making recognition of these errors important for system evaluation and further research.Assessing semantic accuracy requires language understanding; wording changes can alter meaning, while handcrafted heuristics struggle to cover edge cases and human evaluation is costly to scale.Source: §1 · p. 1
  • The method uses a pretrained NLI model to test entailment in both directions: generated text against input facts for omissions, and input facts against generated text for hallucinations.The aim is to check whether the semantic information implied by the input and output is equal.Source: §1 · p. 1
  • Structured input facts are converted to text with trivial templates so they can be used with the NLI model.The paper presents this as a way to address the mismatch between structured D2T input and the natural-language hypotheses expected by standard NLI.Source: §1 · p. 1
  • The two-way check is intended for tasks without content selection; with explicit selection, the selected facts can instead be checked in both directions.For tasks where the generator selects facts without making that selection explicit, the paper proposes checking only for hallucinations.Source: §1 · p. 1
  • The metric achieves >90% accuracy on E2E and >75% accuracy on WebNLG, while remaining competitive with domain-specific handcrafted scripts.It requires no human references or in-domain training and uses minimal handcrafting.Source: §1 · p. 2

2 Related Work

Prior NLG evaluation includes reference-based overlap and referenceless fluency metrics, but the paper identifies a lack of generally accepted metrics that explicitly measure semantic accuracy. Its approach differs by using a pretrained NLI model without further domain-specific training.

Automatic Evaluation of NLG

  • Reference-based BLEU, ROUGE, and METEOR measure n-gram overlap, while referenceless language-model and linguistic-feature metrics focus on fluency rather than semantic accuracy.Finetuned pretrained-model metrics can capture some semantic-accuracy aspects, but only implicitly.Source: §2 · p. 2

Semantic Accuracy

  • The paper reports no generally accepted automatic metric that explicitly measures semantic accuracy of NLG outputs.Slot error rate is a commonly used nearby alternative, typically based on dataset-tailored pattern matching; Goodrich et al. (2019) introduced a neural metric using named-entity recognition and fact extraction.Source: §2 · p. 2

Faithful NLG

  • Harkous et al. (2020) also use a pretrained neural classifier to detect inaccurate output, but finetune it on manually augmented domain-specific data.Source: §2 · p. 2
  • Unlike those approaches, the paper uses a pretrained NLI-finetuned model without further training on domain-specific data.Source: §2 · p. 2

3 Method

The method applies a pretrained NLI model to templated facts and generated text, using directional entailment checks to identify omissions and hallucinations. It can report error types separately or collapse them into a correctness label.

3.1 NLI Model

  • An NLI check passes when entailment has the highest probability among contradiction, neutral, and entailment.The method uses the roberta-large-mnli checkpoint, finetuned on MultiNLI, without further training.Source: §3.1 · p. 2

3.2 Data Preparation

  • The metric takes input facts and their verbalization, with facts represented as RDF-like subject-predicate-object triples.Each triple is converted into natural language with a template: either a custom template per predicate or a single universal backoff template.Source: §3.2 · p. 2

3.3 Evaluation Process

  • For omissions, each fact is tested as a hypothesis against the generated text as premise; for hallucinations, the concatenated facts are premise and generated text is hypothesis.The omission checks are run separately by fact, which identifies which facts were omitted; the hallucination check cannot be split into simpler checks.Source: §3.3 · p. 2, Figure 1 · p. 3
  • FINE distinguishes OK, omission, hallucination, and both errors, while ROUGH collapses all error types into not_OK.FINE can distinguish whether a system tends to omit or hallucinate; ROUGH is suited to reranking or filtering outputs, and confidence is the minimum entailment probability across checks.Source: §3.3 · p. 3

4 Experimental Setup

The experiments use WebNLG and E2E, with different sources of semantic-accuracy judgments for evaluation. They compare default predicate-specific templates with a universal backoff template.

4 Experimental Setup

  • The experiments use the English WebNLG and E2E datasets, both of which have shared-task system outputs and semantic-accuracy measures.Source: §4 · p. 3
  • For WebNLG, the metric is compared with crowdsourced semantic-adequacy ratings, treating scores of 2.5 or higher on a three-point scale as correct.The authors also tried a 2.0 threshold and report slightly worse results.Source: §4 · p. 3
  • For E2E, the handcrafted challenge script supplies the ground truth, and expert-annotated outputs are used for gold-standard and classifier comparisons.The authors note that the crowdsourced E2E semantic-accuracy results were unreliable and overestimated errors; unlike their metric, the handcrafted approach is viable only for limited domains such as E2E.Source: §4 · p. 3
  • The Default setup uses one custom template per predicate, while Backoff uses a single universal template; templates are filled with triple values and concatenated for multitriple inputs.WebNLG Default templates come from delexicalized single-triple training references, whereas E2E uses eight handcrafted templates.Source: §4 · p. 3

5 Results Analysis

The metric scores well above random baselines across both datasets, with results varying by dataset and evaluation setting. The analyses also expose annotation and template-related issues that qualify comparisons with reference judgments and handcrafted classifiers.

5 Results Analysis

  • The evaluation reports accuracy, precision, recall, and F1, treating not_OK samples as positive when measuring error detection.Manual error analysis sampled 100 disagreements per dataset; the E2E challenge’s crowdsourced accuracy evaluation was reported as unreliable and prone to overestimating errors.Source: §5 · p. 3
  • Results were well above the random baselines of 0.5 for ROUGH and 0.25 for FINE, but differed between WebNLG and E2E.The section discusses WebNLG and E2E results separately.Source: §5 · p. 4

5.1 WebNLG Analysis

  • WebNLG disagreements involved noisy human ratings and imprecise templates, while annotators also penalized accurate but ungrammatical or poorly organized outputs that the metric rated OK.The authors note that better template selection could mitigate the template issue.Source: §5.1 · p. 4
  • Re-examination found 42 of 100 WebNLG disagreement cases correctly classified by the metric, suggesting reported performance may be understated by erroneous human annotations.The WebNLG results also showed a −0.05 Spearman correlation between input-triple count and metric errors in the Default setting.Source: §5.1 · p. 4
  • WebNLG confidence scores correlated with average human scores at 0.63, compared with reported BLEU and METEOR correlations of 0.59 and 0.73.The approach does not require human-written references.Source: §5.1 · p. 4, Table 1 · p. 4

5.2 E2E Analysis

  • On E2E, the metric showed over 90% agreement with the handcrafted script, with only a slight performance drop as input triples increased (Default-setting Spearman correlation −0.08).The E2E results are summarized in Table 2.Source: §5.2 · p. 4, Table 2 · p. 4
  • In the E2E error analysis, the metric correctly classified 45 of 100 examples labeled erroneous by the handcrafted script, suggesting reported performance may be understated because of annotation errors.The analysis also considered output expressions that do not correspond to input facts to be hallucinations.Source: §5.2 · p. 4

5.3 E2E MR Classifier Comparison

  • On E2E system outputs, the approach reached 97.8% vs. 99.5% accuracy, slightly less precise than both handcrafted scripts.Excluding eat-Type=restaurant yielded 76.5% accuracy and 97.6% recall on human-written data.Source: §5.3 · p. 5, Table 3 · p. 5

6 Conclusions and Future Work

The paper presents a minimally handcrafted metric for detecting omissions and hallucinations, with results competitive with human ratings and domain-specific scripts. It identifies limited dataset scope and separating semantic accuracy from grammaticality as areas for future work.

  • The metric detects omissions or hallucinations without human references or training and with minimal handcrafting, achieving results competitive with crowdsourced ratings or domain-specific scripts.Source: §6 · p. 5
  • The authors say the WebNLG and E2E datasets remain limited, leaving performance on long-text generation and tasks requiring content selection for future evaluation.Source: §6 · p. 5
  • Future work will explore combining the metric with fluency or grammaticality checks and better separating grammaticality from semantic correctness in human evaluation.The authors report that human semantic-correctness ratings are influenced by grammaticality.Source: §6 · p. 5

Dataset details

The experiments use sampled WebNLG system outputs and E2E test outputs, with additional expert-annotated E2E sets for classifier comparison.

  • The WebNLG subset contains 223 sampled inputs, each paired with outputs from 10 NLG systems, for 2,230 instances.Source: Dataset details · p. 8
  • The main E2E experiments cover 13,230 outputs: 21 system outputs for each of 630 test inputs.Source: Dataset details · p. 8
  • E2E semantic-classifier comparisons use expert-annotated sets of 200 training-set instances and 400 outputs from TGen variants.Source: Dataset details · p. 8

WebNLG Error Analysis

In a 100-example WebNLG error analysis, human and NLI judgments often disagreed, and the cases revealed annotation, template, fluency, and value-format issues.

  • Among disagreements, crowdsourced annotation was correct in 51 cases, the NLI approach in 42, and seven remained incorrect or ambiguous.Source: WebNLG Error Analysis · p. 8
  • Annotation problems and inaccurate templates each accounted for 22 counts; one human rating fell below threshold without an apparent reason, while an underspecified template prompted a false hallucination assessment.Analyzed examples may belong to multiple or none of the error classes.Source: WebNLG Error Analysis · p. 8
  • An underspecified Aenir language template led the NLI to treat an acceptable English-language statement as a hallucination.Source: WebNLG Error Analysis · p. 8
  • Disfluent or disorganized sentences occurred 14 times; in an example, poor organization likely lowered the human score but caused no NLI problem.Source: WebNLG Error Analysis · p. 9
  • Value-format errors occurred seven times; an example omitted “comicsCharacter,” which the NLI treated as an omission.Source: WebNLG Error Analysis · p. 9

E2E Error Analysis

In sampled E2E examples, the NLI-based approach and slot error script often disagreed, with more cases favoring NLI than the script. The error analysis identifies value-interpretation issues, script-pattern errors, difficult edge cases, and off-topic hallucinations.

E2E Error Analysis

  • In 100 randomly sampled E2E examples where the methods differed, 34 cases favored the slot error script, 45 favored NLI, and 18 were both incorrect or ambiguous.The analyzed examples may belong to multiple error classes or none.Source: E2E Error Analysis · p. 10
  • 40 value-interpretation cases included “adult only” for family-friendly=no, which the slot script accepted but NLI flagged as a hallucination.The text is generally considered correct in E2E, but “adult only” does not necessarily follow from “is not family friendly.”Source: E2E Error Analysis · p. 10
  • 33 slot-script pattern errors included missing family-friendly=yes for “for all the family,” although NLI handled the expression without issue.The script likely lacks the “for all the family” pattern.Source: E2E Error Analysis · p. 10
  • 18 difficult edge cases included “moderate restaurant” for price_range=moderate, which NLI accepted while the slot script did not.The analysis describes this wording as hard to interpret as a correct verbalization of the price range.Source: E2E Error Analysis · p. 11
  • Eight off-topic hallucination cases included “beautiful” and “reasonably liked,” which NLI flagged while the slot script missed them; both methods detected the missing area.The example also omitted a verbalization of the area.Source: E2E Error Analysis · p. 11
Loading 2011.10819v1…