Reasoning before Comparison: LLM-Enhanced Semantic Similarity Metrics for Domain Specialized Text Analysis

Shaochen Xu, Zihao Wu, Huaqin Zhao, Peng Shu, Zhengliang Liu, Wenxiong Liao, Sheng Li, Andrea Sikora, Tianming Liu, Xiang LiarXiv 2024 · DOI

Introduction

In Natural Language Processing (NLP), evaluating the similarity between two texts is a fundamental task. Standard metrics such as ROUGE and BLEU rely on surface-level word overlap (n-grams). While effective for general language, these metrics are often inadequate in specialized domains like medicine. For instance, the phrases "No evidence of pneumonia" and "Clear evidence of pneumonia" share high word overlap but represent opposite clinical states. This discrepancy necessitates a more robust approach to semantic similarity that prioritizes clinical meaning over syntax.

Methodology

The researchers propose a "Reasoning before Comparison" pipeline. This approach leverages the zero-shot reasoning capabilities of GPT-4 to transform unstructured medical reports into structured, comparable data.

The pipeline consists of four distinct stages:

  1. Text Identification: The LLM identifies the specific type of medical report (e.g., Chest X-ray) without prior context.
  2. Task Generation: The model defines categorization criteria relevant to the identified report type, such as finding-based or technique-based labeling.
  3. Label Creation: A comprehensive list of specific clinical labels (e.g., "Pleural Effusion", "Stable Findings") is generated for the domain.
  4. Categorization & Comparison: Raw reports are mapped to these labels. The resulting label sets are converted into high-dimensional vectors using the all-mpnet-base-v2 embedding model, and similarity is computed via cosine similarity.

Experimental Setup

The framework was evaluated using 500 radiology reports from the MIMIC-CXR dataset, resulting in 62,500 unique pair comparisons. Performance was benchmarked against ground truth labels derived from established clinical tools, CheXpert and NegBio, which are highly accurate automated systems used by medical professionals to label pathologies.

Results

The proposed GPT_sim metric demonstrated superior performance compared to traditional metrics when measured against clinical ground truth (GT).

Metric Mean Difference from Ground Truth (CheXpert)
GPT_sim 0.1768
ROUGE-1 0.3654
ROUGE-L 0.3765
BLEU 0.5991

GPT_sim reduced the mean difference from ground truth by more than 50% compared to ROUGE-1 and nearly 70% compared to BLEU, indicating a much tighter correlation with actual clinical findings.

Discussion and Key Insights

  • Semantics Over Syntax: The core innovation is that an LLM’s internal "understanding" of clinical concepts is more valuable for comparison than literal word matching. By forcing the model to generate labels first, the researchers created a "semi-quantitative" bridge between messy human language and structured data.
  • Explainability (XAI): Because similarity is derived from human-readable clinical labels (e.g., "Cough," "Rib Fractures"), the metric is inherently more interpretable. A clinician can see exactly why two reports were deemed similar.
  • Zero-Shot Versatility: The framework does not require fine-tuning on medical data. GPT-4’s general pre-training was sufficient to identify and categorize complex medical findings, suggesting this method could easily scale to other specialized fields like law or engineering.

Limitations and Future Work

Despite its success, the authors note several hurdles. The computational cost and latency of using GPT-4 for every comparison may limit real-time, large-scale applications. Additionally, while the study focused on chest X-rays, future work must validate the framework across other modalities like MRI or CT scans and involve real clinicians to further confirm the clinical utility of the generated labels.

Summary updated

Abstract

In this study, we leverage LLM to enhance the semantic analysis and develop similarity metrics for texts, addressing the limitations of traditional unsupervised NLP metrics like ROUGE and BLEU. We develop a framework where LLMs such as GPT-4 are employed for zero-shot text identification and label generation for radiology reports, where the labels are then used as measurements for text similarity. By testing the proposed framework on the MIMIC data, we find that GPT-4 generated labels can significantly improve the semantic similarity assessment, with scores more closely aligned with clinical ground truth than traditional NLP metrics. Our work demonstrates the possibility of conducting semantic analysis of the text data using semi-quantitative reasoning results by the LLMs for highly specialized domains. While the framework is implemented for radiology report similarity analysis, its concept can be extended to other specialized domains as well.
BibTeX
@misc{xu2024reasoning,
  author = {Shaochen Xu and Zihao Wu and Huaqin Zhao and Peng Shu and Zhengliang Liu and Wenxiong Liao and Sheng Li and Andrea Sikora and Tianming Liu and Xiang Li},
  title = {{Reasoning before Comparison: LLM-Enhanced Semantic Similarity Metrics for Domain Specialized Text Analysis}},
  year = {2024},
  eprint = {2402.11398},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.11398},
}
Figure