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

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

May 30, 2024 | Alexander Nikitin, Jannik Kossen, Yarin Gal, Pekka Marttinen
Kernel Language Entropy (KLE) is a novel method for estimating semantic uncertainty in Large Language Models (LLMs). Unlike previous methods that rely on hard clustering of answers, KLE uses semantic similarities between generated texts to provide more fine-grained uncertainty estimates. It defines positive semidefinite unit trace kernels to encode semantic similarities and quantifies uncertainty using the von Neumann entropy. KLE can be applied to both individual model generations and semantic clusters, offering improved uncertainty quantification across multiple natural language generation datasets and LLM architectures. The method generalizes semantic entropy and is effective for both white-box and black-box LLMs. KLE is theoretically proven to be more expressive than semantic entropy, allowing it to distinguish uncertainty in some cases where semantic entropy cannot. Empirical results show that KLE outperforms baselines in uncertainty quantification, achieving state-of-the-art results across various tasks and models. KLE is implemented using semantic graph kernels derived from natural language inference (NLI) models, and its performance is evaluated using metrics such as AUROC and AUARC. The method is flexible, allowing for kernel combination and hyperparameter selection without validation sets. KLE provides more accurate uncertainty estimates by capturing fine-grained semantic relations, making it a valuable tool for improving the reliability and safety of LLMs.Kernel Language Entropy (KLE) is a novel method for estimating semantic uncertainty in Large Language Models (LLMs). Unlike previous methods that rely on hard clustering of answers, KLE uses semantic similarities between generated texts to provide more fine-grained uncertainty estimates. It defines positive semidefinite unit trace kernels to encode semantic similarities and quantifies uncertainty using the von Neumann entropy. KLE can be applied to both individual model generations and semantic clusters, offering improved uncertainty quantification across multiple natural language generation datasets and LLM architectures. The method generalizes semantic entropy and is effective for both white-box and black-box LLMs. KLE is theoretically proven to be more expressive than semantic entropy, allowing it to distinguish uncertainty in some cases where semantic entropy cannot. Empirical results show that KLE outperforms baselines in uncertainty quantification, achieving state-of-the-art results across various tasks and models. KLE is implemented using semantic graph kernels derived from natural language inference (NLI) models, and its performance is evaluated using metrics such as AUROC and AUARC. The method is flexible, allowing for kernel combination and hyperparameter selection without validation sets. KLE provides more accurate uncertainty estimates by capturing fine-grained semantic relations, making it a valuable tool for improving the reliability and safety of LLMs.
Reach us at info@study.space