While Large Language Models (LLMs) have demonstrated remarkable potential in natural language generation and instruction following, a persistent challenge lies in their susceptibility to "hallucinations", which erodes trust in their outputs. Although Uncertainty Quantification (UQ) presents a promising solution, its accurate implementation within the context of LLMs remains a significant hurdle. To address this critical roadblock, our research originates from a fundamental heuristic insight: tokens within auto-regressive LLM-generated text do not equally reflect the underlying meaning. Some tokens carry greater relevance and representativeness than others, owing to the phenomenon of "linguistic redundancy", wherein a select few keywords suffice to convey the essence of lengthy sentences. Regrettably, existing methodologies treat all tokens with equal importance when estimating uncertainty, disregarding these inherent generative inequalities. Our analysis reveals a significant issue with state-of-the-art: numerous tokens (and sentences) of limited semantic significance receive equal or even excessive weighting during uncertainty estimation. To rectify this bias, we propose to jointly Shifting Attention to more Relevant (SAR) components, at both the token- and the sentence-levels for accurate uncertainty estimation. We conduct extensive experiments involving a range of popular "off-the-shelf" LLMs, including instruction-tuned LLMs such as Vicuna, WizardLM, and LLaMA-2-chat, as well as pretrained LLMs like OPT and LLaMA, with model sizes extending up to 33B parameters. We carry out evaluation across various free-form question-answering tasks, encompassing domains such as reading comprehension, science Q&A, and medical Q&A. Our experimental results demonstrate the superior performance of SAR in addressing the challenges of uncertainty estimation within the realm of LLMs.
翻译:摘要:尽管大型语言模型(LLMs)在自然语言生成和指令遵循方面展现出显著潜力,但其易产生“幻觉”的固有问题持续削弱了人们对输出的信任。虽然不确定性量化(UQ)提供了有前景的解决方案,但在LLM语境中实现其精准应用仍是重大挑战。为攻克这一关键障碍,本研究源于一个基础启发式洞察:自回归型LLM生成文本中的词元并非同等反映底层含义。由于“语言冗余性”现象——少数关键词足以传达长句精髓,某些词元比其它词元具有更大的相关性和代表性。遗憾的是,现有方法在估计不确定性时将所有权重等量齐观,完全忽视了这种固有的生成非均衡性。我们的分析揭示了当前最先进方法存在的显著问题:大量语义有限的词元(及句子)在不确定性估计中获得了相等甚至过高的权重。为纠正此偏差,我们提出联合将注意力转向更相关(SAR)成分的方案,同时在词元级和句子级实现精准不确定性估计。我们针对一系列流行的“现成”LLM展开了广泛实验,包括经指令调优的LLM(如Vicuna、WizardLM和LLaMA-2-chat)以及预训练LLM(如OPT和LLaMA),模型参数规模最高达330亿。我们在多项自由问答任务中实施评估,涵盖阅读理解、科学问答和医学问答等领域。实验结果表明,SAR在应对LLM领域不确定性估计挑战方面展现出卓越性能。