[Paper Review] Measuring Reliability of Large Language Models through Semantic Consistency
This paper proposes a semantic consistency metric for evaluating large language models (LLMs) in open-ended text generation, replacing traditional lexical equality with semantic equivalence functions like paraphrase detection and natural language inference. The method shows significantly higher correlation with human judgments than lexical metrics and reveals that decoding strategy is the primary driver of inconsistency, not model size or accuracy.
While large pretrained language models (PLMs) demonstrate incredible fluency and performance on many natural language tasks, recent work has shown that well-performing PLMs are very sensitive to what prompts are feed into them. Even when prompts are semantically identical, language models may give very different answers. When considering safe and trustworthy deployments of PLMs we would like their outputs to be consistent under prompts that mean the same thing or convey the same intent. While some work has looked into how state-of-the-art PLMs address this need, they have been limited to only evaluating lexical equality of single- or multi-word answers and do not address consistency of generative text sequences. In order to understand consistency of PLMs under text generation settings, we develop a measure of semantic consistency that allows the comparison of open-ended text outputs. We implement several versions of this consistency metric to evaluate the performance of a number of PLMs on paraphrased versions of questions in the TruthfulQA dataset, we find that our proposed metrics are considerably more consistent than traditional metrics embodying lexical consistency, and also correlate with human evaluation of output consistency to a higher degree.
Motivation & Objective
- To address the lack of reliable consistency evaluation in LLMs for free-form text generation, where lexical equality fails to capture semantic equivalence.
- To develop a semantic consistency framework that generalizes beyond exact token matching to measure true semantic agreement between model outputs.
- To evaluate how model architecture, size, and decoding strategies affect consistency in natural language generation.
- To validate the proposed metric against human judgments and compare it with existing lexical-based consistency measures.
Proposed method
- Proposes a generalized consistency metric, Cons_sem(Y), replacing exact token equality with a semantic agreement function f(y_i, y_j) that measures semantic equivalence between outputs.
- Implements four semantic agreement functions: BERTScore for semantic similarity, paraphrase detection (PP), and entailment/contradiction classification using DeBERTa-v2-xxlarge fine-tuned on MNLI.
- Applies the framework to paraphrased questions from the TruthfulQA dataset, evaluating multiple LLMs (e.g., OPT, LLaMA) with different decoding methods.
- Uses Spearman correlation to compare consistency scores against human annotations, assessing validity of the proposed metrics.
- Employs a multi-metric evaluation strategy, comparing semantic metrics (PP, entailment, BERTScore) against lexical baselines (ROUGE-1, NER).
- Introduces a new dataset of paraphrased TruthfulQA questions for reproducibility and benchmarking.
Experimental results
Research questions
- RQ1How do semantic consistency metrics compare to lexical-based metrics in correlating with human judgments of output consistency?
- RQ2To what extent does model size influence semantic consistency in open-ended text generation?
- RQ3How do different decoding strategies (e.g., greedy vs. nucleus sampling) affect semantic consistency?
- RQ4Are accuracy and consistency orthogonal properties in LLMs, or do they correlate?
Key findings
- The entailment-based consistency metric showed the strongest correlation with human judgments (ρ = 0.70), significantly outperforming lexical metrics like ROUGE-1 (ρ = 0.32) and NER (ρ = 0.15).
- Paraphrase detection (PP) and BERTScore also showed moderate-to-strong correlation with human scores (ρ = 0.52 and ρ = 0.54, respectively), indicating their effectiveness in capturing semantic consistency.
- Greedy decoding produced significantly more consistent outputs than nucleus sampling across all semantic consistency metrics, highlighting decoding strategy as the primary source of inconsistency.
- Model size and accuracy are not correlated with consistency: larger models are more consistent, but accuracy decreases with size (inverse scaling), indicating these are orthogonal properties.
- Lexical metrics such as ROUGE-1 and NER showed weak correlation with human judgments (ρ ≤ 0.32), making them poor proxies for semantic consistency.
- The proposed semantic consistency framework, especially using entailment and paraphrase detection, provides a more reliable and human-aligned evaluation of LLM reliability in text generation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.