The Failure of Surface-Level Matching
Traditional natural language evaluation relies heavily on lexical overlap. Metrics like BLEU, ROUGE, and Word Error Rate (WER) count how many exact words or $n$-grams are shared between a generated text and a reference text. While computationally trivial, this approach fails to capture the core property of human language: the ability to express the same underlying concept using entirely different words.
When an AI model generates a high-quality paraphrase, lexical metrics often penalize it for its creativity. As Aaditya Prakash et al. observe in Neural Paraphrase Generation with Stacked Residual LSTM Networks, traditional machine translation metrics fail to reward linguistic diversity or novelty, making them poor judges of semantic preservation. This problem extends to speech processing as well. Suyoun Kim et al. demonstrate in Evaluating User Perception of Speech Recognition System Quality with Semantic Distance Metric that minor syntactic variations—such as contractions or compound word differences—heavily degrade traditional WER scores even when the transcript perfectly satisfies the user.
To address this, the field of natural language generation (NLG) has shifted toward embedding-based evaluation. As detailed in a comprehensive survey by Chenhe Dong et al., A Survey of Natural Language Generation, automated evaluation is moving away from surface-level token matching toward machine-learned metrics that project text into a continuous vector space where geometric proximity reflects conceptual alignment.
The Geometry of Meaning: How Embedding Similarity Works
The core intuition behind embedding-based semantic similarity is geometric. If we can map words, sentences, or entire documents into a high-dimensional latent space where proximity correlates with meaning, we can replace fragile string matching with robust vector calculus.
The simplest way to build a text embedding is by aggregating word-level vectors. In WEmbSim: A Simple yet Effective Metric for Image Captioning, Naeha Sharif et al. demonstrate that simply calculating the mean of pre-trained word embeddings for a candidate and a reference caption yields a highly effective metric. The semantic overlap is then quantified by computing the cosine similarity between these two mean vectors:
$$\text{Cosine Similarity}(A, B) = \frac{A \cdot B}{\|A\| \|B\|}$$
This formula measures the cosine of the angle between the two vectors. If the vectors point in the same direction, the score is 1, indicating complete conceptual alignment, regardless of whether the specific word choices differ.
Modern approaches swap static word averages for deep contextual representations generated by large language models or specialized sentence encoders. For example, Dilip Venkatesh et al. leverage powerful pre-trained models like OpenAI's text-embedding-3-large and Google's LaBSE in BITS Pilani at SemEval-2024 Task 1: Using text-embedding-3-large and LaBSE embeddings for Semantic Textual Relatedness to compute normalized dot products that quantify semantic textual relatedness in a zero-shot manner. By projecting text into these shared spaces, evaluation toolkits like VizSeq, introduced by Changhan Wang et al. in VizSeq: a visual analysis toolkit for text generation tasks, can capture abstract conceptual alignment across a wide range of text generation tasks.
Assessing Quality and Alignment Across Tasks
By treating evaluation as a geometric distance problem, researchers can measure abstract properties of text that were previously impossible to quantify automatically.
Summarization and Information Overlap
In multi-document or multi-narrative summarization, the goal is often to find common ground between conflicting perspectives. Naman Bansal et al. developed the SEM-F1 metric in SEM-F1: an Automatic Way for Semantic Evaluation of Multi-Narrative Overlap Summaries at Scale to evaluate semantic overlap using sentence embeddings. This allows the metric to reward abstractive summaries where the same core information is expressed through different vocabulary or syntactic structures.
Similarly, Nannan Huang et al. utilize cosine similarity of sentence embeddings in Examining Bias in Opinion Summarisation through the Perspective of Opinion Diversity to determine how closely a summary reflects the overall semantic space of its source text, helping expose when minority viewpoints are silenced by a model's "majority bias."
Cross-Modal and Reference-Free Evaluation
Embedding spaces also allow for cross-modal evaluation and reference-free scoring. In video retrieval, Michael Wray demonstrates in On Semantic Similarity in Video Retrieval that text-based similarity proxies can estimate the relevance between different video samples by calculating the semantic distance between their associated captions. This bypasses the need for exhaustive manual cross-annotation.
For audio captioning, Zelin Zhou et al. introduce FENSE in Can Audio Captions Be Evaluated with Image Caption Metrics?, which pairs Sentence-BERT embeddings with a specialized fluency detector to capture semantic meaning far better than traditional token-matching methods.
When no "gold standard" reference text is available, a dual-encoder architecture can map different types of text into a shared space for direct comparison. David C. Uthus proposes this in RISE: Leveraging Retrieval Techniques for Summarization Evaluation, treating summary evaluation as a retrieval task where the quality score is calculated as the dot product between the source document embedding and the candidate summary embedding.
Domain-Specific Scoring and Extraction
In specialized domains, embedding similarity provides a way to enforce topical adherence and factual consistency:
- Education: Shengjie Li 0002 et al. show in Conundrums in Cross-Prompt Automated Essay Scoring: Making Sense of the State of the Art that prompt adherence can be quantified by calculating the dot-product similarity between the sentence embeddings of an essay and its prompt. For short answers, the ESAS framework by Palak Goenka et al. in ESAS: Towards Practical and Explainable Short Answer Scoring (Student Abstract) combines word- and document-level embeddings to score student responses against a reference rubric.
- Medicine: Pablo Messina et al. introduce CXRFE and CXRFEScore in Extracting and Encoding: Leveraging Large Language Models and Medical Knowledge to Enhance Radiological Text Representation. Their framework extracts atomic facts from radiology reports and compares their embeddings in a latent space, prioritizing clinical accuracy and penalizing dangerous factual contradictions.
- Social Science & Health: In Leveraging Large Language Models for Automated Definition Extraction with TaxoMatic - a Case Study on Media Bias, Li Lin et al. use cosine similarity between sentence embeddings to evaluate the conceptual alignment of machine-extracted definitions against human ground truths. Similarly, the DepressMind system by Roque Fernández-Iglesias et al. in DepressMind: A Depression Surveillance System for Social Media Analysis calculates the maximum cosine similarity between Sentence-BERT embeddings of user-generated social media posts and clinical symptom descriptions to screen for depression.
- Quantifying Market Shifts: Liang Lyu et al. demonstrate in Wikipedia Contributions in the Wake of ChatGPT that calculating the cosine similarity between embeddings of human-authored reference material and AI-generated text can quantify the degree of "substitutability" for specific knowledge domains, identifying which topics are most vulnerable to displacement by automated systems.
- Clinical Narratives: Raquel Norel et al. show in Turning Patients' Open-Ended Narratives of Chronic Pain Into Quantitative Measures: Natural Language Processing Study. that cosine similarity between text embeddings can turn subjective, open-ended patient interviews into quantitative measures that correlate with traditional clinical pain assessments.
Beyond Evaluation: Diagnostics, Security, and Explainability
Because embedding similarity measures the distance between meanings, it can be adapted into a diagnostic tool to audit model behavior, secure prompts, and detect hallucinations.
Hallucination and Uncertainty Detection
When a large language model generates text, measuring the semantic divergence between its output and a reference text can flag when the model is fabricating information. Huizhi Liang demonstrates this in NU-RU at SemEval-2024 Task 6: Hallucination and Related Observable Overgeneration Mistake Detection Using Hypothesis-Target Similarity and SelfCheckGPT, showing that if the cosine similarity between a generated hypothesis and a target text falls below a specific threshold, it serves as a computationally efficient indicator of an overgeneration hallucination.
To measure uncertainty without a reference text, Walter Gerych introduces a method in Complementing Self-Consistency with Cross-Model Disagreement for Uncertainty Quantification that maps outputs from an ensemble of different model families into a vector space. By measuring the semantic similarity and disagreement among these vectors, the system calculates "Total Uncertainty" to identify when a model is confidently wrong.
Prompt Security and Explainability
Embedding spaces can also be manipulated to hide information or audit model internals. In ProxyPrompt: Securing System Prompts against Prompt Extraction Attacks, Zhixiong Zhuang et al. protect system prompts by replacing them with optimized "proxies" in the embedding space. To evaluate whether an attacker has successfully bypassed this defense, they shift from string matching to embedding-based similarity and entailment models, ensuring they catch instances where the attacker extracts the prompt's core meaning using alternative phrasing.
For model explainability, the ConceptX framework by Kenza Amara et al. in Concept-Level Explainability for Auditing & Steering LLM Responses calculates the cosine similarity between the sentence embeddings of original and perturbed model responses. This ensures that the explanation captures shifts in semantic meaning even if the model uses completely different wording to express the same concept.
Similarly, Meng Li et al. show in Evaluating Readability and Faithfulness of Concept-based Explanations that the human-perceived readability of an internal model concept can be quantified by calculating the embedding-based cosine similarity between the tokens that most strongly trigger that internal representation.
Mathematical and Practical Nuances
Despite its power, embedding-based semantic similarity is not a silver bullet. It introduces its own set of mathematical vulnerabilities and engineering challenges.
The Fragility of Cosine Similarity
We almost instinctively reach for cosine similarity as the default metric for comparing vectors. However, Vitalii Zhelezniak et al. expose a fundamental statistical reality in Correlation Coefficients and Semantic Textual Similarity: cosine similarity is simply a special case of the Pearson correlation coefficient. Because the Pearson coefficient is notoriously fragile when handling high-dimensional data, cosine similarity can be easily distorted by outliers or uninformative dimensions in word vectors. The authors demonstrate that combining simple vector averaging with rank-based similarity metrics (like Spearman's $\rho$ or Kendall's $\tau$) can often match or exceed the performance of complex deep learning architectures on semantic textual similarity tasks.
The Reproducibility Crisis in Modern Metrics
As embedding-based metrics become more sophisticated, reproducing their reported performance becomes increasingly difficult. Jonas Belouadi et al. investigate this issue in Reproducibility Issues for BERT-based Evaluation Metrics, auditing popular transformer-based metrics like BERTScore, MoverScore, BaryScore, and SentSim.
The authors reveal that much of the claimed "state-of-the-art" performance in the literature does not stem from the underlying geometric formulation itself. Instead, it often depends on undocumented preprocessing steps, specific token-masking strategies, or weak baselines. This suggests that while moving from surface-level tokens to deep latent spaces solves the vocabulary mismatch problem, it introduces a layer of opacity that requires strict standardization to ensure reliable evaluation.
Key Foundational Work
Style Transfer in Text: Exploration and Evaluation (2018) — contributed 1 concept elements to this direction.
Neural Paraphrase Generation with Stacked Residual LSTM Networks (2016) — contributed 1 concept elements to this direction.