Kernel Language Entropy: Fine-grained Uncertainty Quantification for LLMs from Semantic Similarities

Alexander Nikitin, Jannik Kossen, Y. Gal, Pekka Marttinen

arXiv:2405.20003 · 2026-07-27 공개 · arXiv · PDF

llm uncertainty-quantification semantic-similarity semantic-uncertainty natural-language-generation white-box-llm black-box-llm entropy-estimation

Abstract

Uncertainty quantification in Large Language Models (LLMs) is crucial for applications where safety and reliability are important. In particular, uncertainty can be used to improve the trustworthiness of LLMs by detecting factually incorrect model responses, commonly called hallucinations. Critically, one should seek to capture the model's semantic uncertainty, i.e., the uncertainty over the meanings of LLM outputs, rather than uncertainty over lexical or syntactic variations that do not affect answer correctness. To address this problem, we propose Kernel Language Entropy (KLE), a novel method for uncertainty estimation in white- and black-box LLMs. KLE defines positive semidefinite unit trace kernels to encode the semantic similarities of LLM outputs and quantifies uncertainty using the von Neumann entropy. It considers pairwise semantic dependencies between answers (or semantic clusters), providing more fine-grained uncertainty estimates than previous methods based on hard clustering of answers. We theoretically prove that KLE generalizes the previous state-of-the-art method called semantic entropy and empirically demonstrate that it improves uncertainty quantification performance across multiple natural language generation datasets and LLM architectures.

한국어 요약

한 줄 요약

Kernel Language Entropy(KLE)는 LLM의 의미적 불확실성을 정량화하기 위한 새로운 방법으로, 기존 semantic entropy를 일반화하고 여러 생성 데이터셋에서 성능을 개선한다.

핵심 기여도

핵심 아이디어

기존 semantic entropy는 의미 클러스터 간의 **동등 관계**(equivalence relations)만 고려하여, 의미 유사도의 **정량적 차이**(distance metric)를 반영하지 못한다. 예를 들어, "apple"과 "granny smith"는 의미적으로 가까우나, 기존 방법은 이를 "apple"과 "house"만큼 멀게 처리한다. 이를 해결하기 위해, KLE는 **유사도 커널**(K_heat, K_full)을 도입하여 의미 공간에서의 거리를 반영하고, **von Neumann entropy**를 통해 불확실성을 계산한다. 이는 의미 클러스터 간의 **쌍별 종속성**(pairwise dependencies)을 고려하여, 의미적 불확실성을 더 정확하게 추정할 수 있다.

기술적 접근법

주요 결과

의의 및 한계

KLE는 의미적 불확실성을 정량화하는 새로운 접근법으로, **의미 유사도를 커널로 모델링**하여 기존 semantic entropy를 일반화하고, **더 세분화된 불확실성 추정**을 가능하게 한다. 이는 LLM의 신뢰성 향상에 기여하며, **의료, 교육, 소프트웨어 개발** 등 고위험 분야에서의 안전한 사용을 지원할 수 있다. 그러나 한계로는 **NLI 모델에 의존**하며, 의미 그래프 생성 과정에서의 오류가 불확실성 추정에 영향을 줄 수 있다. 또한, 커널의 **하이퍼파라미터**(α) 조정이 성능에 영향을 미친다는 점도 주목할 필요가 있다.

실용적 활용

KLE는 **의료 진단, 법률 자문, 교육 콘텐츠 생성** 등 LLM의 신뢰성과 안전성이 중요한 분야에서 활용 가능하다. 특히, **black-box 모델**에서도 적용 가능하므로, 기존 모델을 개선하지 않고도 불확실성을 추정할 수 있어 **산업 현장에서 즉각적으로 활용**할 수 있다.