calibrated-similarity
LLM generation novelty through the lens of semantic similarity — Davydov et al. (2025) (arXiv:2510.27313, 2025)
What this evaluates
Measures the semantic novelty of LLM-generated text by quantifying its similarity to the closest segment in the model's pretraining corpus. It probes whether models merely reproduce memorized training data or generalize to produce compositionally distinct outputs.
Datasets
- Dolma (Reddit & Pes2o subsets) — total 1210; splits: test (1210)
- GSM8K — total ?; splits: test (-1)
- TruthfulQA — total ?; splits: test (-1)
- OpenRewriteEval — total ?; splits: test (-1)
Metrics
calibrated similarity(primary) — range: [0, 1]- Computes the maximum semantic similarity between a generated text and any chunk in the pretraining corpus using a two-stage retrieval pipeline (GIST embeddings for coarse retrieval, ColBERTv2 for re-ranking). Scores are calibrated to account for generation length variations.
Input / output format
Input: For open-ended generation: empty string or neutral instruction. For prompted generation: 1000-token context window from a source document. For domain tasks: standard prompts from GSM8K, TruthfulQA, and OpenRewriteEval.
Output: Generated text continuation or answer.
Scoring recipe
def compute_novelty(model, input_text, corpus_chunks, gold_answer):
gen = model.generate(input_text)
# Stage 1: Coarse retrieval with GIST embeddings
candidates = faiss_search(gist_embed(gen), topk=100)
# Stage 2: Re-ranking with ColBERTv2
best_chunk = colbertv2_rerank(gen, candidates)[0]
# Compute raw similarity
raw_sim = colbertv2_score(gen, best_chunk)
# Filter for correctness (domain-specific)
if not is_correct(gen, gold_answer): return None
# Calibrate for length and return
return calibrate_similarity(raw_sim, len(gen))
Common pitfalls
- Conflating novelty with hallucination: nonsensical outputs are trivially novel because they do not match training data, so correctness filtering is mandatory.
- Ignoring generation length effects: similarity scores vary systematically with output length, requiring analysis across multiple chunk sizes (k ∈ {50, 100, ..., 500}).
- Relying on lexical matching: surface-level paraphrasing or stylistic shifts can hide high semantic similarity, necessitating token-level late-interaction (ColBERTv2).
Evidence (verbatim from paper)
Figure[2] shows that models prompted without context (right plots) achieve higher calibrated similarity scores across chunk sizes than context-conditioned generations (left plots), for both SmolLM and SmolLM2.
Citation
@misc{davydov2025llm,
title={LLM generation novelty through the lens of semantic similarity},
author={Davydov et al. (2025)},
year={2025},
note={arXiv:2510.27313}
}
- arXiv: 2510.27313