Reproduce “CSS: Contrastive Semantic Similarity for Uncertainty Quantification of LLMs” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Shuang Ao, Stefan Rueger, Advaith Siddharthan

Contrastive Semantic Similarity (CSS) is introduced for quantifying uncertainty in large language model (LLM) generations, utilizing a modified CLIP text encoder to extract rich semantic features for a Graph Laplacian-based clustering approach. This method yields an average 1.5% to 2% improvement in AUARC over NLI logits-based Graph Laplacian methods, enhancing selective answering performance and overall uncertainty quantification.

Key insights

  • The CLIP text encoder, originally designed for vision-language tasks, can be effectively adapted for text-text semantic similarity extraction, generating more informative features than NLI logits or other language model embeddings for uncertainty quantification.
  • Dimension reduction techniques like PCA, applied to the high-dimensional CSS feature maps, improve the efficacy of semantic clustering and subsequently enhance uncertainty quantification performance.
  • Leveraging Graph Laplacian with these robust contrastive semantic features provides a powerful black-box mechanism to model semantic dispersion among LLM generations, leading to more accurate uncertainty estimations.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.