LLM-as-a-Judge 相似性评分敏感性测试:语义干草堆中的针
Semantic Needles in Document Haystacks: Sensitivity Testing of LLM-as-a-Judge Similarity Scoring
AI 导读
论文提出一个可扩展的多因素实验框架,将单句语义扰动(否定、连词替换、命名实体替换)嵌入文档中,在数万个文档对上测试七个 LLM 的相似性评分敏感性。研究发现模型存在文档内位置偏差、话题无关上下文会抬高相似分、各模型对扰动类型的惩罚层级一致但尺度差异显著,且提示词中相似性定义只改变幅度不改变方向。
正文 · 原文
Abstract:We propose a scalable, multifactorial experimental framework that systematically probes LLM sensitivity to subtle semantic changes in pairwise document comparison. We analogize this as a needle-in-a-haystack problem: a single semantically altered sentence (the needle) is embedded within surrounding context (the hay), and we vary the perturbation type (negation, conjunction swap, named entity replacement), context type (original vs. topically unrelated), needle position, and document length across all combinations, testing seven LLMs on tens of thousands of document pairs. Our analysis reveals several striking findings. First, LLMs can exhibit a within-document positional bias distinct from previously studied candidate-order effects: some models penalize semantic differences more harshly when they occur earlier in a document. Second, when the altered sentence is surrounded by topically unrelated context, it raises similarity scores in almost all settings. This is consistent with a contradiction account, in which topically related context allows the alteration to conflict with the surrounding sentences. Third, all models exhibit the same hierarchy in how harshly they score different perturbation types, with negation penalized the most, but express this hierarchy on significantly different scales. Finally, varying the prompt's conception of semantic similarity across several alternatives changes the magnitude but not the direction of these effects. Together, these results demonstrate how LLM semantic similarity scores are sensitive to the aforementioned parameters in ways that go beyond the semantic change itself; our framework offers a practical toolkit for auditing and comparing scoring behavior across current and future models.
| Comments: | 21 pages, 10 figures, 1 table |
| Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
| MSC classes: | 68T50, 68T01 |
| Cite as: | arXiv:2604.18835 [cs.CL] |
| (or arXiv:2604.18835v2 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2604.18835 arXiv-issued DOI via DataCite |
Submission history
From: Sinan Aksoy [view email]
[v1]
Mon, 20 Apr 2026 20:59:25 UTC (1,002 KB)
[v2]
Fri, 23 Oct 2026 22:23:31 UTC (247 KB)
来源:arXiv cs.AI · arxiv.org