arXiv:2410.22685cs.LGcs.AI2024-10被引 33

用语义嵌入更准确地衡量大模型的不确定性

Improving Uncertainty Quantification in Large Language Models via Semantic Embeddings

  • 用语义嵌入代替文本序列概率,减少无关词汇干扰
  • 在多个问答数据集上优于传统方法,结果更细腻
  • 单次前向传播完成估计,计算效率显著提升

准确量化大语言模型(LLM)的不确定性对高风险应用的可靠部署至关重要。现有最优方法依赖生成响应间的严格双向蕴含关系和序列似然值,但常因细微措辞差异、额外正确信息或非关键词汇而高估不确定性。本文提出一种新方法,利用语义嵌入实现更平滑、鲁棒的语义不确定性估计。该方法不依赖序列似然,天然降低无关词汇带来的偏差。此外,我们通过在联合概率模型中将语义显式建模为潜在变量,提出可加速版本,仅需一次前向传播即可在嵌入空间完成不确定性估计,显著降低计算开销。在多个问答数据集及前沿LLM上的实验表明,基于嵌入的方法在准确性与细致度上均优于传统方法。

原文摘要 · Abstract (English)

Accurately quantifying uncertainty in large language models (LLMs) is crucial for their reliable deployment, especially in high-stakes applications. Current state-of-the-art methods for measuring semantic uncertainty in LLMs rely on strict bidirectional entailment criteria between multiple generated responses and also depend on sequence likelihoods. While effective, these approaches often overestimate uncertainty due to their sensitivity to minor wording differences, additional correct information, and non-important words in the sequence. We propose a novel approach that leverages semantic embeddings to achieve smoother and more robust estimation of semantic uncertainty in LLMs. By capturing semantic similarities without depending on sequence likelihoods, our method inherently reduces any biases introduced by irrelevant words in the answers. Furthermore, we introduce an amortised version of our approach by explicitly modelling semantics as latent variables in a joint probabilistic model. This allows for uncertainty estimation in the embedding space with a single forward pass, significantly reducing computational overhead compared to existing multi-pass methods. Experiments across multiple question-answering datasets and frontier LLMs demonstrate that our embedding-based methods provide more accurate and nuanced uncertainty quantification than traditional approaches.

不确定性量化语义嵌入大模型高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。